Restore() public abstract method

public abstract Restore ( ) : void
return void
        private void RestoreSelectedRule()
        {
            if (RulesTreeView.SelectedNode == null)
            {
                if (currentRule_ != null)
                {
                    currentRule_.DisposeControl();
                    currentRule_ = null;
                    NoRuleSelectedLabel.Show();
                }
            }
            else
            {
                NoRuleSelectedLabel.Hide();

                IRule oldrule = currentRule_;

                currentRule_ = (IRule)RulesTreeView.SelectedNode.Tag;

                SuspendLayout();

                Point pos = new Point();
                ruleControl_      = null;
                ruleControl_      = currentRule_.CreateControl(this, RuleControlSpace.Controls, pos);
                ruleControl_.Size = RuleControlSpace.Size;

                currentRule_.Name = RulesTreeView.SelectedNode.Text;

                currentRule_.Restore();

                if (oldrule != null)
                {
                    if (!currentRule_.Equals(oldrule))
                    {
                        oldrule.DisposeControl();
                    }
                }

                ruleControl_.Visible = true;

                ResumeLayout();
            }
            UpdateEnabledStates();
            setTreeViewColours();
        }
Ejemplo n.º 2
0
        private void RestoreSelectedRule()
        {
            if (RulesTreeView.SelectedNode == null)
            {
                if (CurrentRule != null)
                {
                    CurrentRule.DisposeControl();
                    CurrentRule = null;
                    NoRuleSelectedLabel.Show();
                }
            }
            else
            {
                NoRuleSelectedLabel.Hide();

                IRule oldrule = CurrentRule;

                CurrentRule = (IRule)RulesTreeView.SelectedNode.Tag;

                SuspendLayout();

                ruleControl_      = CurrentRule.CreateControl(this, RuleControlSpace.Controls, new Point());
                ruleControl_.Size = RuleControlSpace.Size;

                CurrentRule.Name = RulesTreeView.SelectedNode.Text;

                CurrentRule.Restore();

                if (oldrule != null)
                {
                    if (!CurrentRule.Equals(oldrule))
                    {
                        oldrule.DisposeControl();
                    }
                }

                ruleControl_.Visible = true;

                ResumeLayout();
            }
            UpdateEnabledStates();
            SetTreeViewColours();
        }
Ejemplo n.º 3
0
        private void RestoreSelectedRule()
        {
            if (RulesTreeView.SelectedNode == null)
            {
                if (currentRule_ != null)
                {
                    currentRule_.DisposeControl();
                    currentRule_ = null;
                    NoRuleSelectedLabel.Show();
                }
            }
            else
            {
                NoRuleSelectedLabel.Hide();

                IRule oldrule = currentRule_;

                currentRule_ = (IRule)RulesTreeView.SelectedNode.Tag;

                SuspendLayout();

                Point pos = new Point();
                ruleControl_ = null;
                ruleControl_ = currentRule_.CreateControl(this, RuleControlSpace.Controls, pos);
                ruleControl_.Size = RuleControlSpace.Size;

                currentRule_.Name = RulesTreeView.SelectedNode.Text;

                currentRule_.Restore();

                if (oldrule != null)
                {
                    if (!currentRule_.Equals(oldrule))
                        oldrule.DisposeControl();
                }

                ruleControl_.Visible = true;

                ResumeLayout();
            }
            UpdateEnabledStates();
            setTreeViewColours();
        }
Ejemplo n.º 4
0
        private void RestoreSelectedRule()
        {
            if (RulesTreeView.SelectedNode == null)
            {
                if (CurrentRule != null)
                {
                    CurrentRule.DisposeControl();
                    CurrentRule = null;
                    NoRuleSelectedLabel.Show();
                }
            }
            else
            {
                NoRuleSelectedLabel.Hide();

                IRule oldrule = CurrentRule;

                CurrentRule = (IRule)RulesTreeView.SelectedNode.Tag;

                SuspendLayout();

                ruleControl_ = CurrentRule.CreateControl(this, RuleControlSpace.Controls, new Point());
                ruleControl_.Size = RuleControlSpace.Size;

                CurrentRule.Name = RulesTreeView.SelectedNode.Text;

                CurrentRule.Restore();

                if (oldrule != null)
                {
                    if (!CurrentRule.Equals(oldrule))
                        oldrule.DisposeControl();
                }

                ruleControl_.Visible = true;

                ResumeLayout();
            }
            UpdateEnabledStates();
            SetTreeViewColours();
        }