Commit 9703755f authored by 黄奎's avatar 黄奎

页面修改

parent 4b240004
......@@ -102,8 +102,9 @@ namespace Edu.Common.Plugin
string para = paragraph.Text;
foreach (DocumentObject docObject in paragraph.ChildObjects)
{
if (docObject is DocPicture pic)
if ( docObject.DocumentObjectType == DocumentObjectType.Picture)
{
DocPicture pic = docObject as DocPicture;
string imageName = string.Format(@"WordImage_{0}.png", DateTime.Now.Ticks);
using MemoryStream ms = new MemoryStream(pic.ImageBytes);
Image outputImg = Image.FromStream(ms);
......
......@@ -173,7 +173,17 @@ namespace Edu.Module.Question
break;
//单选题(数字)
case "single-number":
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
try
{
if (!string.IsNullOrEmpty(data))
{
obj = Common.Plugin.JsonHelper.DeserializeObject<List<optionItem>>(data);
}
}
catch (Exception ex)
{
string str = ex.Message;
}
break;
}
return obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment