예제 #1
0
        void setDefault_Click(object sender, EventArgs e)
        {
            //string temp;
            //Control editor = mHLProp.GetEditor(out temp);
            ////editor.Size
            //PopupEditor pe = new PopupEditor();
            //pe.ShowPopup(this, editor);//, FormBorderStyle.Sizable);

            Label l = new Label();

            l.Text = mValue.Name;
            string  temp;
            Control editor = mHLProp.GetEditor(out temp);
            int     height = editor.Height;
            int     width  = editor.Width;
            Control pair   = DynamicUIHelpers.MakePair(l, editor, l.Width / 3);

            pair.Height = height;
            SetCenterControl(pair);

            this.Width += width;
        }
예제 #2
0
        private void InitVarMode()
        {
            panel1.Controls.Clear();

            //need var display label...
            Label l = new Label();

            l.Text = mValue.Name;


            //if (TriggerSystemMain.mTriggerDefinitions.IsListType(mValue.Type))
            {
                Button setDefault = new Button();

                setDefault.Text   = "Default";
                setDefault.Click += new EventHandler(setDefault_Click);
                SetCenterControl(DynamicUIHelpers.MakePair(l, setDefault));
            }
            //else
            //{

            //   SetCenterControl(l);
            //}


            //Button b = new Button();
            //b.Text = "Default value..";
            //if(mValue.Value != null && mValue.Value != "")
            //{
            //   b.ForeColor = System.Drawing.Color.Green;
            //}

            //Control c = DynamicUIHelpers.MakePair(l, b);


            mMode = localEditMode.VarView;

            this.Text = "VARIABLE " + mVariable.Name + " : " + mValue.Type;
        }