private void menuItemDataSource_Click(object sender, EventArgs e) { frmFormatObject frmFormatObject = new frmFormatObject(__cProfile, () => { __cChart.Dispose(); __cSignalObject.Dispose(); }); DialogResult cResult = frmFormatObject.ShowDialog(); frmFormatObject.Dispose(); if (cResult == DialogResult.OK) { if (frmFormatObject.ModifyDataRequest) { CreateChartEngine(); CreateSignalObject(); } } }
internal static void Create(WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel, ScriptInformation script) { frmFormatObject frmFormatObject = new frmFormatObject(); frmFormatObject.SetScriptInformation(script); DialogResult cResult = frmFormatObject.ShowDialog(); frmFormatObject.Dispose(); if (cResult == DialogResult.OK) { ProfileSetting cProfile = frmFormatObject.Profile; switch (cProfile.ScriptType) { case ScriptType.Script: break; case ScriptType.Signal: frmSignalViewer.Create(dockPanel, cProfile); break; } } }
private void panelForms_DragDrop(object sender, DragEventArgs e) { ScriptInformation cInfo = e.Data.GetData("__script") as ScriptInformation; frmFormatObject frmFormatObject = new frmFormatObject(); frmFormatObject.SetScriptInformation(cInfo); DialogResult cResult = frmFormatObject.ShowDialog(); frmFormatObject.Dispose(); if (cResult == DialogResult.OK) { CreateScriptViewer(frmFormatObject.Profile); } }