Exemplo n.º 1
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
 protected override void Dispose(bool disposing)
 {
     if (disposing && (components != null))
     {
         if (doc != null)
         {
             doc = null;
         }
         components.Dispose();
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        public PickANumber(ushort[] values, string[] labels) : this()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PickANumber));
            this.tableLayoutPanel1.Controls.Clear();
            this.tableLayoutPanel1.ColumnStyles.Clear();
            this.tableLayoutPanel1.RowStyles.Clear();
            this.tableLayoutPanel1.RowCount    = 0;
            this.tableLayoutPanel1.ColumnCount = 2;
            this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
            this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));

            this.tableLayoutPanel1.RowCount++;
            this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.AutoSize));
            this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);

            for (int i = 0; i < values.Length; i++)
            {
                this.tableLayoutPanel1.RowCount++;
                this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.AutoSize));

                TextBox t = new TextBox();
                t.Name = "textBox" + (i + 2).ToString();
                resources.ApplyResources(t, "textBox1");
                ltb.Add(t);
                t.Enabled = false;
                pjse.BhavOperandWizards.DataOwnerControl d = new pjse.BhavOperandWizards.DataOwnerControl(null, null, null,
                                                                                                          t, null, null, null, 0x07, values[i]);
                ldoc.Add(d);
                this.tableLayoutPanel1.Controls.Add(t, 1, tableLayoutPanel1.RowCount - 1);

                RadioButton r = new RadioButton();
                resources.ApplyResources(r, "radioButton1");
                r.Text            = labels[i];
                r.Checked         = false;
                r.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
                r.TextAlign       = ContentAlignment.MiddleRight;
                lrb.Add(r);
                this.tableLayoutPanel1.Controls.Add(r, 0, tableLayoutPanel1.RowCount - 1);
            }

            ltb[ltb.Count - 1].Enabled = true;
            ltb[ltb.Count - 1].Enter  += new System.EventHandler(this.ltbLast_Enter);
            lrb[0].Checked             = true;

            this.tableLayoutPanel1.RowCount++;
            int last = this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, (float)(btnOK.Height * 1.5)));

            this.tableLayoutPanel1.Controls.Add(btnOK, 0, last);
            this.tableLayoutPanel1.Controls.Add(btnCancel, 1, last);
            this.AcceptButton = btnOK;
            this.CancelButton = btnCancel;
        }
Exemplo n.º 3
0
 public LabelledDataOwner(BhavWiz inst, byte downer, ushort value)
 {
     InitializeComponent();
     doc = new pjse.BhavOperandWizards.DataOwnerControl(
         inst
         , cbDataOwner
         , cbPicker
         , tbVal
         , ckbDecimal
         , ckbUseInstancePicker
         , lbInstance
         , downer, value);
 }