public HandleRuleControl(MainForm mainForm, WriteToLogDelegate writeToLog, ServiceBusHelper serviceBusHelper, RuleWrapper ruleWrapper, bool? isFirstRule)
 {
     this.mainForm = mainForm;
     this.writeToLog = writeToLog;
     this.serviceBusHelper = serviceBusHelper;
     this.ruleWrapper = ruleWrapper;
     this.isFirstRule = isFirstRule;
     InitializeComponent();
     InitializeData();
 }
 public HandleRuleControl(MainForm mainForm, WriteToLogDelegate writeToLog, ServiceBusHelper serviceBusHelper, RuleWrapper ruleWrapper, bool?isFirstRule)
 {
     this.mainForm         = mainForm;
     this.writeToLog       = writeToLog;
     this.serviceBusHelper = serviceBusHelper;
     this.ruleWrapper      = ruleWrapper;
     this.isFirstRule      = isFirstRule;
     InitializeComponent();
     InitializeData();
 }
Exemplo n.º 3
0
        private void ShowRule(RuleWrapper wrapper, bool? isFirstRule)
        {
            HandleRuleControl ruleControl = null;

            try
            {
                panelMain.SuspendDrawing();
                panelMain.Controls.Clear();
                panelMain.BackColor = SystemColors.GradientInactiveCaption;
                ruleControl = new HandleRuleControl(this, WriteToLog, serviceBusHelper, wrapper, isFirstRule);
                ruleControl.SuspendDrawing();
                ruleControl.Location = new Point(1, panelLog.HeaderHeight + 1);
                panelMain.Controls.Add(ruleControl);
                SetControlSize(ruleControl);
                ruleControl.OnCancel += MainForm_OnCancel;
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
            finally
            {
                panelMain.ResumeDrawing();
                if (ruleControl != null)
                {
                    ruleControl.ResumeDrawing();
                }
            }
        }