Пример #1
0
        void riImageEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit edit = sender as DevExpress.XtraEditors.ButtonEdit;
            DynamicParameterItem pi = _row;

            #region Loading picture data from the server
            GetAttachData(pi);
            #endregion

            #region Зургийн форм дуудах

            Image  newimage = null;
            Image  image    = null;
            string filename = null;

            if (pi.AttachData != null)
            {
                image = Static.ImageFromByte(pi.AttachData);
            }
            DialogResult dlg = ShowImageForm(image, ref newimage, ref filename);
            if (dlg == DialogResult.OK)
            {
                if (pi != null)
                {
                    //if (pi.Row != null) pi.Row.Properties.Value = filename;
                    edit.EditValue = filename;
                    pi.Editing     = true;
                    pi.Value       = filename;
                    pi.AttachData  = Static.ImageToByte(newimage);
                }
            }

            #endregion
        }
Пример #2
0
 protected void SetButtonEditButtonsVisibility(DevExpress.XtraEditors.ButtonEdit buttonEdit, bool visible)
 {
     foreach (DevExpress.XtraEditors.Controls.EditorButton button in buttonEdit.Properties.Buttons)
     {
         button.Visible = visible;
     }
 }
Пример #3
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
			this.buttonEdit1 = new DevExpress.XtraEditors.ButtonEdit();
			((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
			this.groupControl1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).BeginInit();
			this.SuspendLayout();
			// 
			// groupControl1
			// 
			this.groupControl1.Appearance.BackColor = System.Drawing.Color.WhiteSmoke;
			this.groupControl1.Appearance.Options.UseBackColor = true;
			this.groupControl1.AppearanceCaption.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
			this.groupControl1.AppearanceCaption.ForeColor = System.Drawing.Color.DarkOrange;
			this.groupControl1.AppearanceCaption.Options.UseFont = true;
			this.groupControl1.AppearanceCaption.Options.UseForeColor = true;
			this.groupControl1.Controls.Add(this.buttonEdit1);
			this.groupControl1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.groupControl1.Location = new System.Drawing.Point(0, 0);
			this.groupControl1.Name = "groupControl1";
			this.groupControl1.Size = new System.Drawing.Size(216, 69);
			this.groupControl1.TabIndex = 0;
			this.groupControl1.Text = "请填入修改地址";
			// 
			// buttonEdit1
			// 
			this.buttonEdit1.EditValue = "";
			this.buttonEdit1.Location = new System.Drawing.Point(71, 32);
			this.buttonEdit1.Name = "buttonEdit1";
			// 
			// buttonEdit1.Properties
			// 
			this.buttonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
																												new DevExpress.XtraEditors.Controls.EditorButton()});
			this.buttonEdit1.Properties.Mask.EditMask = "d";
			this.buttonEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
			this.buttonEdit1.Size = new System.Drawing.Size(75, 23);
			this.buttonEdit1.TabIndex = 1;
			this.buttonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.buttonEdit1_ButtonClick);
			this.buttonEdit1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.buttonEdit1_KeyPress);
			// 
			// ModifiMachineAddress
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
			this.ClientSize = new System.Drawing.Size(216, 69);
			this.Controls.Add(this.groupControl1);
			this.Name = "ModifiMachineAddress";
			this.ShowInTaskbar = false;
			this.Text = "修改机器地址";
			((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
			this.groupControl1.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).EndInit();
			this.ResumeLayout(false);

		}
Пример #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
     this.buttonEdit1   = new DevExpress.XtraEditors.ButtonEdit();
     ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
     this.groupControl1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).BeginInit();
     this.SuspendLayout();
     //
     // groupControl1
     //
     this.groupControl1.Appearance.BackColor                   = System.Drawing.Color.WhiteSmoke;
     this.groupControl1.Appearance.Options.UseBackColor        = true;
     this.groupControl1.AppearanceCaption.Font                 = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
     this.groupControl1.AppearanceCaption.ForeColor            = System.Drawing.Color.DarkOrange;
     this.groupControl1.AppearanceCaption.Options.UseFont      = true;
     this.groupControl1.AppearanceCaption.Options.UseForeColor = true;
     this.groupControl1.Controls.Add(this.buttonEdit1);
     this.groupControl1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.groupControl1.Location = new System.Drawing.Point(0, 0);
     this.groupControl1.Name     = "groupControl1";
     this.groupControl1.Size     = new System.Drawing.Size(216, 69);
     this.groupControl1.TabIndex = 0;
     this.groupControl1.Text     = "请填入修改地址";
     //
     // buttonEdit1
     //
     this.buttonEdit1.EditValue = "";
     this.buttonEdit1.Location  = new System.Drawing.Point(71, 32);
     this.buttonEdit1.Name      = "buttonEdit1";
     //
     // buttonEdit1.Properties
     //
     this.buttonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton()
     });
     this.buttonEdit1.Properties.Mask.EditMask = "d";
     this.buttonEdit1.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
     this.buttonEdit1.Size         = new System.Drawing.Size(75, 23);
     this.buttonEdit1.TabIndex     = 1;
     this.buttonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.buttonEdit1_ButtonClick);
     this.buttonEdit1.KeyPress    += new System.Windows.Forms.KeyPressEventHandler(this.buttonEdit1_KeyPress);
     //
     // ModifiMachineAddress
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
     this.ClientSize        = new System.Drawing.Size(216, 69);
     this.Controls.Add(this.groupControl1);
     this.Name          = "ModifiMachineAddress";
     this.ShowInTaskbar = false;
     this.Text          = "修改机器地址";
     ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
     this.groupControl1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).EndInit();
     this.ResumeLayout(false);
 }
Пример #5
0
        void riFolderEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit edit = sender as DevExpress.XtraEditors.ButtonEdit;

            string       newvalue = null;
            DialogResult dlg      = ShowFolderForm((string)edit.EditValue, ref newvalue);

            if (dlg == DialogResult.OK)
            {
                edit.EditValue = newvalue;
            }
        }
Пример #6
0
        public void lkpVaiTro_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit editor = (DevExpress.XtraEditors.ButtonEdit)sender;
            int buttonindex = System.Convert.ToInt32(editor.Properties.Buttons.IndexOf(e.Button));

            if (buttonindex == 1)
            {
                HT_PhanQuyen_ThemVaiTro f = new HT_PhanQuyen_ThemVaiTro();
                f.eventThemXong += LoadVaiTro;
                f.ShowDialog();
            }
        }
        public void lkpBoPhan_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit editor = (DevExpress.XtraEditors.ButtonEdit)sender;
            int buttonindex = Convert.ToInt32(editor.Properties.Buttons.IndexOf(e.Button));

            if (buttonindex == 1)
            {
                DanhMuc_ThemBoPhan f = new DanhMuc_ThemBoPhan();
                f.eventThemXongBoPhan += LoadComboBoxBoPhan;
                f.ShowDialog();
            }
        }
Пример #8
0
        public void lkpNguoiQuanLy_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit editor = (DevExpress.XtraEditors.ButtonEdit)sender;
            int buttonindex = System.Convert.ToInt32(editor.Properties.Buttons.IndexOf(e.Button));

            if (buttonindex == 1)
            {
                DanhMuc_ThemNhanVien f = new DanhMuc_ThemNhanVien();
                f.eventThemXong += LoadComboboxNhanVien;
                f.ShowDialog();
            }
        }
Пример #9
0
 private void Btn_Click(object send, EventArgs e)
 {
     //DevExpress.XtraEditors.SimpleButton simpleButton = (DevExpress.XtraEditors.SimpleButton)send;
     //MessageBox.Show(simpleButton.Text);
     AllButtonClear(dt);
     DevExpress.XtraEditors.ButtonEdit buttonEdit = (DevExpress.XtraEditors.ButtonEdit)send;
     buttonEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.OK)
     });
     //buttonEdit.Properties.Buttons[0].Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph;
     //buttonEdit.Properties.Buttons[0].Visible = false;
 }
Пример #10
0
        public void lkpNhaCungCap_ButtonClick_1(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit Editor = (DevExpress.XtraEditors.ButtonEdit)sender;
            int buttonIndex = System.Convert.ToInt32(Editor.Properties.Buttons.IndexOf(e.Button));

            if (buttonIndex == 1)
            {
                DanhMuc_ThemNhaCungCap f = new DanhMuc_ThemNhaCungCap();
                f.eventThemXong += LoadNhaCungCap;
                f.ShowDialog();
            }
        }
Пример #11
0
        public void lkpKhoMacDinh_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit Editor = (DevExpress.XtraEditors.ButtonEdit)sender;
            int buttonIndex = System.Convert.ToInt32(Editor.Properties.Buttons.IndexOf(e.Button));

            if (buttonIndex == 1)
            {
                DanhMuc_ThemKhoHang f = new DanhMuc_ThemKhoHang();
                f.eventThemXongKho += LoadKhoMacDinh;
                f.ShowDialog();
            }
        }
Пример #12
0
 public virtual void F2FieldMain_KeyDown(object sender, KeyEventArgs e)
 {
     if (GetGridStatu() != GridStatu.gsBrowse)
     {
         if (e.KeyData == Keys.F2)
         {
             DevExpress.XtraEditors.ButtonEdit btn = (DevExpress.XtraEditors.ButtonEdit)sender;
             if (F2FieldMain.Contains(btn.Name))
             {
                 btn.PerformClick(btn.Properties.Buttons[0]);
             }
         }
     }
 }
Пример #13
0
        public CalendarForm(object textbox)
        {
            InitializeComponent();
            textBox1 = (DevExpress.XtraEditors.ButtonEdit)textbox;
            DateTime val;

            if (!string.IsNullOrWhiteSpace(textBox1.Text) && DateTime.TryParse(textBox1.Text, out val))
            {
                DateTime startDate = Convert.ToDateTime(validCheck.convertDate(textBox1.Text));
                dateNavigator1.DateTime = startDate;
            }
            else
            {
                dateNavigator1.DateTime = DateTime.Today;
            }
        }
Пример #14
0
        public void ShowButtonForm(object sender)
        {
            ItemInfo ii  = (ItemInfo)vGridControl1.FocusedRow.Tag;
            DataRow  row = ii.row;

            if (row != null)
            {
                int valuetype = Static.ToInt(row["addtype"]);
                switch (valuetype)
                {
                case 3:     //Picture type
                    MessageBox.Show(string.Format("Button Click: Value Type = {0}", row["addtype"]));

                    ISM.Template.FormImage frm = new FormImage();
                    frm.Resource = _resource;
                    DialogResult dlg = frm.ShowDialog();
                    if (dlg == DialogResult.OK)
                    {
                        DevExpress.XtraEditors.ButtonEdit edit = sender as DevExpress.XtraEditors.ButtonEdit;
                        if (string.IsNullOrEmpty(edit.Text) && frm.ImageObject != null)
                        {
                            edit.EditValue = "[new]";
                        }

                        edit.ForeColor = System.Drawing.Color.Red;
                    }

                    break;

                case 4:     // Folder type
                    FolderBrowserDialog folder = new FolderBrowserDialog();
                    DialogResult        res    = folder.ShowDialog();
                    if (res == DialogResult.OK)
                    {
                        DevExpress.XtraEditors.ButtonEdit edit = sender as DevExpress.XtraEditors.ButtonEdit;
                        edit.EditValue = folder.SelectedPath;
                        //edit.ForeColor = System.Drawing.Color.Red;
                    }

                    break;
                }
            }
        }
Пример #15
0
        void repositoryItemButtonEdit2_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit bt = sender as DevExpress.XtraEditors.ButtonEdit;
            SelectVariableForm form = new SelectVariableForm();

            form.Activitie  = this.Activitie;
            form.DataSource = this.Activitie.StructSource.ModelProjVariable;
            //this.Activitie.Property.Statistics.Begin();
            //form.DataSource = this.Activitie.Property.Statistics.ResultVarable;
            form.GetValue = bt.Text;
            DialogResult dl = form.ShowDialog();

            if (dl == DialogResult.OK)
            {
                //bt.Text = form.GetValue;
                (this.metaanalysisList1.treeList1.Current as DataRowView)["Calculation"] = form.GetValue;
                Method.Calculate();
                this.metaanalysisList1.treeList1.RefreshDataSource();
                //this.Source.ResetBindings(false);
            }
        }
Пример #16
0
        void riFileEdit_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit edit = sender as DevExpress.XtraEditors.ButtonEdit;
            DynamicParameterItem pi = _row;

            if (pi != null)
            {
                switch (e.Button.Index)
                {
                case 0:
                    string       newvalue = null;
                    DialogResult dlg      = ShowFileForm((string)pi.Value, ref newvalue);
                    if (dlg == DialogResult.OK)
                    {
                        pi.Editing = true;
                        if (pi.Row != null)
                        {
                            //pi.Row.Properties.Value = newvalue;
                            edit.EditValue = newvalue;
                            pi.Value       = newvalue;
                        }
                        AttachUtility.FileRead(newvalue, ref pi.AttachData);
                    }
                    break;

                case 1:
                    if (pi != null)
                    {
                        string filename = Static.ToStr(pi.Value);
                        GetAttachData(pi);
                        if (!string.IsNullOrEmpty(filename))
                        {
                            Globals.ShellOpenFile(filename, pi.AttachData);
                        }
                    }
                    break;
                }
            }
        }
Пример #17
0
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            DevExpress.XtraEditors.ButtonEdit but = sender as DevExpress.XtraEditors.ButtonEdit;

            TJLXSelect form = new TJLXSelect();

            form.Activitie     = this.Activitie;
            form.TJBH          = but.Text;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.Source        = this.m_TabTJLX;
            DialogResult dl = form.ShowDialog();

            if (dl == DialogResult.OK)
            {
                DataRowView view = this.bindingSource1.Current as DataRowView;
                if (view != null)
                {
                    view.BeginEdit();
                    view["LX"] += "," + form.LXID;
                    view.EndEdit();
                }
            }
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.textEdit1     = new DevExpress.XtraEditors.TextEdit();
     this.label1        = new System.Windows.Forms.Label();
     this.memoEdit1     = new DevExpress.XtraEditors.MemoEdit();
     this.label2        = new System.Windows.Forms.Label();
     this.label3        = new System.Windows.Forms.Label();
     this.buttonEdit1   = new DevExpress.XtraEditors.ButtonEdit();
     this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
     this.textEdit2     = new DevExpress.XtraEditors.TextEdit();
     this.label4        = new System.Windows.Forms.Label();
     this.groupControl1 = new DevExpress.XtraEditors.GroupControl();
     this.linkLabel1    = new System.Windows.Forms.LinkLabel();
     this.textEdit4     = new DevExpress.XtraEditors.TextEdit();
     this.textEdit3     = new DevExpress.XtraEditors.TextEdit();
     this.label6        = new System.Windows.Forms.Label();
     this.label5        = new System.Windows.Forms.Label();
     this.radioButton3  = new System.Windows.Forms.RadioButton();
     this.radioButton2  = new System.Windows.Forms.RadioButton();
     this.radioButton1  = new System.Windows.Forms.RadioButton();
     this.checkBox1     = new System.Windows.Forms.CheckBox();
     this.linkLabel2    = new System.Windows.Forms.LinkLabel();
     this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
     this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).BeginInit();
     this.groupControl1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).BeginInit();
     this.SuspendLayout();
     //
     // textEdit1
     //
     this.textEdit1.EditValue = "Orca";
     this.textEdit1.Location  = new System.Drawing.Point(88, 8);
     this.textEdit1.Name      = "textEdit1";
     this.textEdit1.Size      = new System.Drawing.Size(280, 20);
     this.textEdit1.TabIndex  = 0;
     //
     // label1
     //
     this.label1.Font      = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
     this.label1.Location  = new System.Drawing.Point(24, 8);
     this.label1.Name      = "label1";
     this.label1.Size      = new System.Drawing.Size(56, 23);
     this.label1.TabIndex  = 1;
     this.label1.Text      = "Name:";
     this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // memoEdit1
     //
     this.memoEdit1.EditValue = @"Designed to be the human's main water-based transport, the Orca carries up to 8 Marine passengers, an operator, and a gunner.  It is outfitted with a machine gun in the front, navigation in the back, and protective carbon composite plating along the sides.";
     this.memoEdit1.Location  = new System.Drawing.Point(88, 40);
     this.memoEdit1.Name      = "memoEdit1";
     this.memoEdit1.Size      = new System.Drawing.Size(280, 96);
     this.memoEdit1.TabIndex  = 2;
     //
     // label2
     //
     this.label2.Font      = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
     this.label2.Location  = new System.Drawing.Point(0, 40);
     this.label2.Name      = "label2";
     this.label2.Size      = new System.Drawing.Size(80, 23);
     this.label2.TabIndex  = 3;
     this.label2.Text      = "Description:";
     this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // label3
     //
     this.label3.Font      = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
     this.label3.Location  = new System.Drawing.Point(0, 152);
     this.label3.Name      = "label3";
     this.label3.Size      = new System.Drawing.Size(80, 23);
     this.label3.TabIndex  = 4;
     this.label3.Text      = "Root Tag:";
     this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // buttonEdit1
     //
     this.buttonEdit1.EditValue = "vehicles\\orca\\orca.vehicle";
     this.buttonEdit1.Location  = new System.Drawing.Point(88, 152);
     this.buttonEdit1.Name      = "buttonEdit1";
     //
     // buttonEdit1.Properties
     //
     this.buttonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
         new DevExpress.XtraEditors.Controls.EditorButton()
     });
     this.buttonEdit1.Size     = new System.Drawing.Size(280, 20);
     this.buttonEdit1.TabIndex = 5;
     //
     // simpleButton1
     //
     this.simpleButton1.Location = new System.Drawing.Point(216, 176);
     this.simpleButton1.Name     = "simpleButton1";
     this.simpleButton1.Size     = new System.Drawing.Size(152, 23);
     this.simpleButton1.TabIndex = 6;
     this.simpleButton1.Text     = "Customize Packaged Tags";
     this.simpleButton1.Click   += new System.EventHandler(this.simpleButton1_Click);
     //
     // textEdit2
     //
     this.textEdit2.EditValue = "BobTheBuilder";
     this.textEdit2.Location  = new System.Drawing.Point(88, 216);
     this.textEdit2.Name      = "textEdit2";
     this.textEdit2.Size      = new System.Drawing.Size(120, 20);
     this.textEdit2.TabIndex  = 7;
     //
     // label4
     //
     this.label4.Font      = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold);
     this.label4.Location  = new System.Drawing.Point(0, 216);
     this.label4.Name      = "label4";
     this.label4.Size      = new System.Drawing.Size(80, 23);
     this.label4.TabIndex  = 8;
     this.label4.Text      = "Creator:";
     this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // groupControl1
     //
     this.groupControl1.Controls.Add(this.linkLabel1);
     this.groupControl1.Controls.Add(this.textEdit4);
     this.groupControl1.Controls.Add(this.textEdit3);
     this.groupControl1.Controls.Add(this.label6);
     this.groupControl1.Controls.Add(this.label5);
     this.groupControl1.Controls.Add(this.radioButton3);
     this.groupControl1.Controls.Add(this.radioButton2);
     this.groupControl1.Controls.Add(this.radioButton1);
     this.groupControl1.Location = new System.Drawing.Point(8, 248);
     this.groupControl1.Name     = "groupControl1";
     this.groupControl1.Size     = new System.Drawing.Size(360, 112);
     this.groupControl1.TabIndex = 9;
     this.groupControl1.Text     = "Protection";
     //
     // linkLabel1
     //
     this.linkLabel1.Location = new System.Drawing.Point(224, 24);
     this.linkLabel1.Name     = "linkLabel1";
     this.linkLabel1.Size     = new System.Drawing.Size(136, 23);
     this.linkLabel1.TabIndex = 7;
     this.linkLabel1.TabStop  = true;
     this.linkLabel1.Text     = "Which protection scheme?";
     //
     // textEdit4
     //
     this.textEdit4.EditValue = "Num83r5&13773rs";
     this.textEdit4.Location  = new System.Drawing.Point(184, 80);
     this.textEdit4.Name      = "textEdit4";
     this.textEdit4.Size      = new System.Drawing.Size(168, 20);
     this.textEdit4.TabIndex  = 6;
     //
     // textEdit3
     //
     this.textEdit3.EditValue = "orcapub";
     this.textEdit3.Location  = new System.Drawing.Point(184, 56);
     this.textEdit3.Name      = "textEdit3";
     this.textEdit3.Size      = new System.Drawing.Size(168, 20);
     this.textEdit3.TabIndex  = 5;
     //
     // label6
     //
     this.label6.Location  = new System.Drawing.Point(152, 80);
     this.label6.Name      = "label6";
     this.label6.Size      = new System.Drawing.Size(32, 23);
     this.label6.TabIndex  = 4;
     this.label6.Text      = "Pass:"******"label5";
     this.label5.Size      = new System.Drawing.Size(32, 23);
     this.label5.TabIndex  = 3;
     this.label5.Text      = "Pass:"******"radioButton3";
     this.radioButton3.Size     = new System.Drawing.Size(128, 24);
     this.radioButton3.TabIndex = 2;
     this.radioButton3.Text     = "Private Use and Edit";
     //
     // radioButton2
     //
     this.radioButton2.Location = new System.Drawing.Point(16, 56);
     this.radioButton2.Name     = "radioButton2";
     this.radioButton2.TabIndex = 1;
     this.radioButton2.Text     = "Private Use";
     //
     // radioButton1
     //
     this.radioButton1.Location = new System.Drawing.Point(16, 32);
     this.radioButton1.Name     = "radioButton1";
     this.radioButton1.TabIndex = 0;
     this.radioButton1.Text     = "No Protection";
     //
     // checkBox1
     //
     this.checkBox1.Location = new System.Drawing.Point(16, 376);
     this.checkBox1.Name     = "checkBox1";
     this.checkBox1.Size     = new System.Drawing.Size(248, 24);
     this.checkBox1.TabIndex = 10;
     this.checkBox1.Text     = "Register Prefab with HaloDev database";
     //
     // linkLabel2
     //
     this.linkLabel2.Location  = new System.Drawing.Point(272, 376);
     this.linkLabel2.Name      = "linkLabel2";
     this.linkLabel2.Size      = new System.Drawing.Size(40, 23);
     this.linkLabel2.TabIndex  = 8;
     this.linkLabel2.TabStop   = true;
     this.linkLabel2.Text      = "Why?";
     this.linkLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // simpleButton2
     //
     this.simpleButton2.Location = new System.Drawing.Point(16, 408);
     this.simpleButton2.Name     = "simpleButton2";
     this.simpleButton2.Size     = new System.Drawing.Size(104, 23);
     this.simpleButton2.TabIndex = 11;
     this.simpleButton2.Text     = "Create Prefab";
     //
     // simpleButton3
     //
     this.simpleButton3.Location = new System.Drawing.Point(264, 408);
     this.simpleButton3.Name     = "simpleButton3";
     this.simpleButton3.Size     = new System.Drawing.Size(104, 23);
     this.simpleButton3.TabIndex = 12;
     this.simpleButton3.Text     = "Cancel";
     //
     // PrefabPackager
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
     this.ClientSize        = new System.Drawing.Size(376, 438);
     this.Controls.Add(this.simpleButton3);
     this.Controls.Add(this.simpleButton2);
     this.Controls.Add(this.checkBox1);
     this.Controls.Add(this.groupControl1);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.textEdit2);
     this.Controls.Add(this.simpleButton1);
     this.Controls.Add(this.buttonEdit1);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.memoEdit1);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.textEdit1);
     this.Controls.Add(this.linkLabel2);
     this.Name  = "PrefabPackager";
     this.Text  = "PrefabPackager";
     this.Load += new System.EventHandler(this.PrefabPackager_Load);
     ((System.ComponentModel.ISupportInitialize)(this.textEdit1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.memoEdit1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit2.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.groupControl1)).EndInit();
     this.groupControl1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.textEdit4.Properties)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.textEdit3.Properties)).EndInit();
     this.ResumeLayout(false);
 }
Пример #19
0
        //    private void IniGrid()
        //    {
        //        DataTable dt = new DataTable();
        //        dt.Columns.Add("Payment", typeof(String));
        //        //  int iID = 0;
        //        for (int i = 0; i < 15; i++)
        //        {
        //            string str = i + "号付款方式";
        //            dt.Rows.Add(new object[] { str });
        //        }
        //        gridControl1.DataSource = dt.DefaultView;
        //    }
        private void IniPaymentLayout(DataTable dataTable)
        {
            //  TableLayoutPanel tableLayoutPanel=new TableLayoutPanel ();
            this.tableLayoutPanel4.SuspendLayout();
            this.SuspendLayout();
            //暂定一行最多8个
            int iDataRow = 0;
            int iCount   = dataTable.Rows.Count;
            int iColumn  = 5;
            int iRow     = iCount / iColumn;

            if (iCount % iColumn > 0)
            {
                iRow += 1;
            }
            this.tableLayoutPanel4.ColumnCount = iColumn;
            float ColumnPercent = 100 / Convert.ToSingle(iColumn);

            this.tableLayoutPanel4.ColumnStyles.Clear();
            for (int i = 0; i < iColumn; i++)
            {
                this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, ColumnPercent));
            }
            this.tableLayoutPanel4.RowCount = iRow;
            for (int i = 0; i < iRow; i++)
            {
                this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100 / iRow));
            }

            DevExpress.XtraEditors.ButtonEdit buttonEdit;
            for (int i = 0; i < iRow; i++)
            {
                for (int k = 0; k < iColumn; k++)
                {
                    iDataRow = i * iColumn + k;
                    if (iCount > iDataRow)
                    {
                        buttonEdit        = new DevExpress.XtraEditors.ButtonEdit();
                        buttonEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
                        // buttonEdit.Dock = DockStyle.Fill;
                        buttonEdit.Properties.AutoHeight = false;
                        buttonEdit.BorderStyle           = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                        buttonEdit.Size = new Size(163, 60);
                        buttonEdit.Properties.Appearance.BackColor            = System.Drawing.Color.White;
                        buttonEdit.Properties.Appearance.Font                 = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                        buttonEdit.Properties.Appearance.Options.UseBackColor = true;
                        buttonEdit.Properties.Appearance.Options.UseFont      = true;
                        // buttonEdit.Properties.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                        buttonEdit.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
                        buttonEdit.Text = dataTable.Rows[i * iColumn + k]["Payment"].ToString();
                        buttonEdit.Name = "BtnName_" + dataTable.Rows[i * iColumn + k]["PaymentID"].ToString();
                        buttonEdit.Properties.Buttons.Clear();
                        buttonEdit.Properties.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                        buttonEdit.Click += Btn_Click;
                        this.tableLayoutPanel4.Controls.Add(buttonEdit, k, i);
                    }
                }
            }
            this.tableLayoutPanel4.ResumeLayout(false);
            this.ResumeLayout(false);
        }