Exemple #1
0
        protected override void         Dispose(bool disposing)
        {
            if (disposing)
            {
                mObjectValue = null;

                if (mHolder != null)
                {
                    mHolder.ListChanged -= MHolder_ListChanged;
                    mHolder.clear();
                    mHolder = null;
                }

                if (mRB != null)
                {
                    clearRB();
                    mRB = null;
                }

                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }
        public DropDownListPanel(IObjectValueReadWrite aObjectValue)
        {
            mObjectValue = aObjectValue;
            InitializeComponent();

            BackColor            = SystemColors.Control;
            mHolder.ListChanged += MHolder_ListChanged;
            mHolder.add("Current value", mObjectValue.ValueObject, false);
        }
        public StringTextEditorPanel(IObjectValueReadWrite aObjectValue)
        {
            mObjectValue = aObjectValue;
            InitializeComponent();

            BackColor = SystemColors.Control;
            mValue    = StringUtils.ObjectToString(mObjectValue.ValueObject);
            fastColoredTextBox_Text.Text = mValue;
        }
        public StringEditBoxPanel(IObjectValueReadWrite aObjectValue)
        {
            mObjectValue = aObjectValue;
            InitializeComponent();

            BackColor   = SystemColors.Control;
            MaximumSize = new Size(Int32.MaxValue, textBox_Value.Height + 2);
            MinimumSize = new Size(0, textBox_Value.Height + 2);
            textBox_Value.ContextMenu = new ContextMenu();   // иначе появляется стандартное меню
        }