Пример #1
0
        public override void Run()
        {
            var wb = Workbench.Instance;
            var ed = wb.ActiveEditor;

            if (ed != null && ed.CanEditAsXml)
            {
                var win = new XmlEditorDialog(ed.EditorService);
                win.SetXmlContent(ed.GetXmlContent(), ed.Resource.ResourceType);
                if (win.ShowDialog() == DialogResult.OK)
                {
                    //
                    //
                    //
                    ed.EditorService.UpdateResourceContent(win.XmlContent);
                    ((ResourceEditorService)ed.EditorService).ReReadSessionResource();
                    ed.EditorService = ed.EditorService;
                }
            }
        }
Пример #2
0
 private void btnEditConfiguration_Click(object sender, EventArgs e)
 {
     var content = _fs.GetConfigurationContent();
     var dlg = new XmlEditorDialog(_edsvc);
     dlg.XmlContent = content;
     if (dlg.ShowDialog() == DialogResult.OK)
     {
         content = dlg.XmlContent;
         _fs.SetConfigurationContent(content);
         OnResourceChanged();
     }
 }