当前位置: 首页>>代码示例>>C#>>正文


C# EditorWindow.ShowDialog方法代码示例

本文整理汇总了C#中EditorWindow.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# EditorWindow.ShowDialog方法的具体用法?C# EditorWindow.ShowDialog怎么用?C# EditorWindow.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EditorWindow的用法示例。


在下文中一共展示了EditorWindow.ShowDialog方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: gridDiffs_CellClick

 private void gridDiffs_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
       {
     if (e.ColumnIndex == colCompare.DisplayIndex && e.RowIndex >= 0)
     {
       var diff = (InstallItemDiff)gridDiffs.Rows[e.RowIndex].DataBoundItem;
       if (diff.DiffType == DiffType.Different)
       {
     var diffWin = new ADiff.DiffWindow();
     diffWin.LeftText = diff.LeftScript.OuterXml;
     diffWin.RightText = diff.RightScript.OuterXml;
     ElementHost.EnableModelessKeyboardInterop(diffWin);
     diffWin.Show();
       }
       else
       {
     using (var dialog = new EditorWindow())
     {
       dialog.AllowRun = false;
       dialog.AmlGetter = o => Utils.FormatXml(diff.LeftScript ?? diff.RightScript);
       dialog.DisplayMember = "Name";
       dialog.DataSource = new List<InstallItemDiff>() { diff };
       dialog.SetConnection(_wizard.Connection, _wizard.ConnectionInfo.First().ConnectionName);
       dialog.ShowDialog(this);
     }
       }
     }
       }
       catch (Exception ex)
       {
     Utils.HandleError(ex);
       }
 }
开发者ID:Barnickle,项目名称:InnovatorAdmin,代码行数:34,代码来源:Compare.cs

示例2: gridDiffs_CellClick

 private void gridDiffs_CellClick(object sender, DataGridViewCellEventArgs e)
 {
   try
   {
     if (e.ColumnIndex == colCompare.DisplayIndex && e.RowIndex >= 0)
     {
       var diff = (InstallItemDiff)gridDiffs.Rows[e.RowIndex].DataBoundItem;
       if (diff.DiffType == DiffType.Different)
       {
         Settings.Current.PerformDiff("Left"
           , s => ToAml(s, diff.LeftScript)
           , "Right"
           , s => ToAml(s, diff.RightScript));
       }
       else
       {
         using (var dialog = new EditorWindow())
         {
           dialog.AllowRun = false;
           dialog.Script = Utils.FormatXml(diff.LeftScript ?? diff.RightScript);
           dialog.SetConnection(_wizard.Connection, _wizard.ConnectionInfo.First().ConnectionName);
           dialog.ShowDialog(this);
         }
       }
     }
   }
   catch (Exception ex)
   {
     Utils.HandleError(ex);
   }
 }
开发者ID:rneuber1,项目名称:InnovatorAdmin,代码行数:31,代码来源:Compare.cs

示例3: mniEdit_Click

 private void mniEdit_Click(object sender, EventArgs e)
 {
   using (var dialog = new EditorWindow())
   {
     dialog.AllowRun = false;
     //dialog.AmlGetter = o => Utils.FormatXml(((ImportStepResolve)o).Item.Script);
     //dialog.AmlSetter = (o,a) => ((ImportStepResolve)o).Item.SetScript(a);
     //dialog.DisplayMember = "Name";
     //dialog.DataSource = SelectedRows().ToList();
     dialog.Script = Utils.FormatXml(SelectedRows().First().Item.Script);
     dialog.SetConnection(_wizard.Connection, _wizard.ConnectionInfo.First().ConnectionName);
     if (dialog.ShowDialog(this) == DialogResult.OK)
     {
       SelectedRows().First().Item.SetScript(dialog.Script);
     }
   }
 }
开发者ID:cornelius90,项目名称:InnovatorAdmin,代码行数:17,代码来源:ExportResolve.cs


注:本文中的EditorWindow.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。