コード例 #1
0
 /// <summary>
 /// 插入图像事件
 /// </summary>
 private void InsertImageExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     if (htmldoc != null)
     {
         ImageDialog d = new ImageDialog();
         d.Owner = this.hostedWindow;
         if (d.ShowDialog() == true)
         {
             htmldoc.InsertImage(d.Model);
             imageDic[d.Model.ImageUrl] = d.Model;
         }
     }
 }
コード例 #2
0
ファイル: HtmlEditor.xaml.cs プロジェクト: meloht/yihuiServer
 /// <summary>
 /// 插入图像事件
 /// </summary>
 private void InsertImageExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     if (htmldoc != null)
     {
         ImageDialog d = new ImageDialog(This.UploadType);
         d.Owner = this.hostedWindow;
         if (d.ShowDialog() == true)
         {
             var dict = d.GetServerFiles();
             foreach (var item in dict)
             {
                 uploadFileList.Add(item.Key, item.Value);
             }
             htmldoc.InsertImage(d.Model);
             imageDic[d.Model.ImageUrl] = d.Model;
         }
         else
         {
             d.DeleteServerFile();
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// 插入图像事件
 /// </summary>
 private void InsertImageExecuted(object sender, ExecutedRoutedEventArgs e)
 {
     if (htmldoc != null)
     {
         ImageDialog d = new ImageDialog();
         d.Owner = this.hostedWindow;
         if (d.ShowDialog() == true)
         {
             htmldoc.InsertImage(d.Model);
             imageDic[d.Model.ImageUrl] = d.Model;
         }
     }
 }