예제 #1
0
        override public void addLi(string tag, TableLayer Ab, System.Windows.Forms.TextBox input)
        {
            noOfLi++;
            currentLi     = noOfLi;
            li[currentLi] = new TextLayer(tag, currentLi, this);
            li[currentLi].getDesign().Click += (s, er) =>
            {
                IndexedFlowLayout f       = (IndexedFlowLayout)li[currentLi].getDesign().Parent;
                IndexedFlowLayout parentF = (IndexedFlowLayout)f.Parent;
                Form1.currentLayer = parentF.getIndex();
                // MessageBox.Show(f.getIndex().ToString());

                setCurrentTrOfTable(Ab, f.getIndex());
                input.Text = li[currentLi].getDesign().Text;
                // setCurrentLi(li[currentLi].getDesign().getIndex());



                // MessageBox.Show(this.index.ToString());
            };

            /*li[currentLi].getDesign().DoubleClick += (s, er) =>
             * {
             *
             *  li[currentLi].getDesign().ReadOnly = true;
             * };*/
            p.Controls.Add(li[currentLi].getDesign());
        }
예제 #2
0
        override public void addLi(string tag)
        {
            noOfLi++;
            currentLi     = noOfLi;
            li[currentLi] = new TextLayer(tag, currentLi);

            p.Controls.Add(li[currentLi].getDesign());
            li[currentLi].getDesign().Click += (s, er) =>
            {
                IndexedFlowLayout f = (IndexedFlowLayout)li[currentLi].getDesign().Parent;
                Form1.currentLayer = f.getIndex();
            };
        }
예제 #3
0
        public override void addChoice(string value)
        {
            noOfChoices++;
            currentChoice         = noOfChoices;
            choice[currentChoice] = new InputLayer("input", currentChoice, type, name, value);
            p.Controls.Add(choice[currentChoice].getPanel());
            p.FlowDirection = System.Windows.Forms.FlowDirection.LeftToRight;
            p.AutoSize      = true;
            choice[currentChoice].getInputDesign().Click += (s, er) =>
            {
                IndexedFlowLayout f = (IndexedFlowLayout)choice[currentChoice].getPanel().Parent;
                Form1.currentLayer = f.getIndex();
            };

            /* choice[currentChoice].getInputDesign().Click += (s, er) =>
             * {
             *   System.Windows.MessageBox.Show(currentChoice.ToString());
             *   System.Windows.MessageBox.Show(choice[currentChoice].getIndex().ToString());
             *
             * };*/
        }