private void CloseOtherWindows() { if (m_Rules_Editor != null) { m_Rules_Editor.Close(); m_Rules_Editor = null; } }
private void btnAdd_Click(object sender, EventArgs e) { IdpeRule idpeRule = new IdpeRule(); this.Cursor = Cursors.WaitCursor; FormAlreadyOpened(idpeRule); RuleEditor.MainWindow ruleEditor = new RuleEditor.MainWindow(idpeRule, Common.RuleSetTypes.RowPrepared); ElementHost.EnableModelessKeyboardInterop(ruleEditor); ruleEditor.RuleForm = this; this.Cursor = Cursors.Default; ruleEditor.Show(); }
private void listView_DoubleClick(object sender, EventArgs e) { if (listView.SelectedItems.Count > 0) { this.Cursor = Cursors.WaitCursor; IdpeRule idpeRule = new Manager().GetRule((listView.SelectedItems[0].Tag as IdpeRule).Id); RuleEditor.MainWindow ruleEditor = new RuleEditor.MainWindow(idpeRule, Common.RuleSetTypes.RowPreparing); string sname = idpeRule.Name.Replace("-", "").Replace(" ", ""); ruleEditor.Name = sname; if (!CheckOpenWindow.Helpers.IsWindowOpen(sname)) { CheckOpenWindow.Helpers.AddWindowToList(sname); ElementHost.EnableModelessKeyboardInterop(ruleEditor); ruleEditor.RuleForm = this; ruleEditor.Show(); } else { MessageBox.Show("Workflow Window already open for rule \"" + idpeRule.Name + "\"", "IDPE warning", MessageBoxButtons.OK, MessageBoxIcon.Information); } this.Cursor = Cursors.Default; } }
public void OpenDataSourceWindow() { //if (GetSchema()) // return; if (m_dm_GlobalAttributes != null) //already open { return; } dockPanel.Visible = false; dockPanel.SuspendLayout(true); CloseOtherWindows(); m_dm_GlobalAttributes = new DockPanelGlobalAttributes(); m_dm_GlobalAttributes.CloseButtonVisible = false; m_dm_GlobalAttributes.sreListView1.ItemSelectedIndexChanged += new EventHandler(OnAttributeChanged); m_dm_GlobalAttributes.sreListView1.AddButtonClick += new EventHandler(OnAttributeAddButtonClicked); m_dm_GlobalAttributes.sreListView1.PrintButtonClick += new EventHandler(OnAttributePrintButtonClicked); m_dm_GlobalAttributes.Show(dockPanel, DockState.DockLeftAutoHide); m_dm_DataSources = new DockPanelDataSources(); m_dm_DataSources.sreListView1.ItemSelectedIndexChanged += new EventHandler(OnDataSourceChanged); m_dm_DataSources.sreListView1.AddButtonClick += new EventHandler(OnDataSourceAddButtonClicked); m_dm_DataSources.sreListView1.PrintButtonClick += new EventHandler(OnDataSourcePrintButtonClicked); m_dm_DataSources.CloseButtonVisible = false; m_dm_DataSources.Show(dockPanel, DockState.Document); m_Rules = new Rules(); m_Rules.CloseButtonVisible = false; m_Rules.Show(dockPanel, DockState.DockLeftAutoHide); m_Rules.AutoHidePortion = 0.50; m_Monitor = new Monitor(); m_Monitor.CloseButtonVisible = false; m_Monitor.Show(dockPanel, DockState.DockRightAutoHide); m_Monitor.AutoHidePortion = 0.5; m_FileLog = new FileLog(); m_FileLog.CloseButtonVisible = false; m_FileLog.Show(dockPanel, DockState.DockBottomAutoHide); m_FileLog.AutoHidePortion = 0.965; m_EmailLog = new EmailLogs(); m_EmailLog.CloseButtonVisible = false; m_EmailLog.Show(dockPanel, DockState.DockRightAutoHide); m_EmailLog.AutoHidePortion = 0.5; m_Rules_Editor = new RuleEditor.MainWindow(new IdpeRule(), Common.RuleSetTypes.RowPreparing); m_dm_Property = new DockPanelProperty(); m_dm_Property.CloseButtonVisible = false; m_dm_Property.MainWindow = this; m_dm_Property.Show(m_dm_DataSources.Pane, DockAlignment.Right, 0.5); m_dm_Attributes = new DockPanelDataSourceAttributes(); m_dm_Attributes.sreListView1.ItemSelectedIndexChanged += new EventHandler(OnAttributeChanged); m_dm_Attributes.sreListView1.Repositioned += new EventHandler(OnAttributeRepositioned); m_dm_Attributes.sreListView1.DeleteKeyPressed += new EventHandler(OnAttributeDelete); m_dm_Attributes.CloseButtonVisible = false; m_dm_Attributes.MainWindow = this; m_dm_SystemAttributes = new DockPanelDataSourceSystemAttributes(); m_dm_SystemAttributes.sreListView1.ItemSelectedIndexChanged += new EventHandler(OnAttributeChanged); m_dm_SystemAttributes.sreListView1.Repositioned += new EventHandler(OnAttributeRepositioned); m_dm_SystemAttributes.sreListView1.DeleteKeyPressed += new EventHandler(OnAttributeDelete); m_dm_SystemAttributes.CloseButtonVisible = false; m_dm_SystemAttributes.MainWindow = this; m_dm_Mapper = new DockPanelMapper(); m_dm_Mapper.CloseButtonVisible = false; m_dm_Attributes.Show(m_dm_DataSources.Pane, DockAlignment.Bottom, 0.65); m_dm_SystemAttributes.Show(m_dm_Attributes.Pane, DockAlignment.Right, 0.45); m_dm_Mapper.Show(m_dm_Attributes.Pane, DockAlignment.Right, 0.2); if (m_dm_DataSources.sreListView1.ListView.Items.Count > 0) { m_dm_DataSources.sreListView1.ListView.Items[0].Selected = true; } m_dm_DataSources.Activate(); dockPanel.ResumeLayout(true, true); dockPanel.Visible = true; }