Beispiel #1
0
        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();
        }
Beispiel #2
0
 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;
     }
 }