Exemplo n.º 1
0
        private void InitializeComponent()
        {
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ModsSelector));
            DataGridViewCellStyle    dataGridViewCellStyle    = new DataGridViewCellStyle();
            DataGridViewCellStyle    control = new DataGridViewCellStyle();

            this.gridView = new MyDataGridView();
            this.colImage = new DataGridViewImageColumn();
            this.colFile  = new DataGridViewTextBoxColumn();
            this.colDesc  = new DataGridViewTextBoxColumn();
            this.colPlay  = new DataGridViewImageColumn();
            this.colMod   = new DataGridViewComboBoxColumn();
            ((ISupportInitialize)this.gridView).BeginInit();
            base.SuspendLayout();
            componentResourceManager.ApplyResources(this.gridView, "gridView");
            this.gridView.AllowUserToAddRows       = false;
            this.gridView.AllowUserToDeleteRows    = false;
            this.gridView.AllowUserToResizeColumns = false;
            this.gridView.AllowUserToResizeRows    = false;
            this.gridView.BackgroundColor          = SystemColors.ControlLightLight;
            this.gridView.BorderStyle                 = System.Windows.Forms.BorderStyle.None;
            this.gridView.CellBorderStyle             = DataGridViewCellBorderStyle.SingleHorizontal;
            this.gridView.ClipboardCopyMode           = DataGridViewClipboardCopyMode.Disable;
            this.gridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection columns = this.gridView.Columns;

            DataGridViewColumn[] dataGridViewColumnArray = new DataGridViewColumn[] { this.colImage, this.colFile, this.colDesc, this.colPlay, this.colMod };
            columns.AddRange(dataGridViewColumnArray);
            dataGridViewCellStyle.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle.BackColor          = SystemColors.ControlLightLight;
            dataGridViewCellStyle.Font               = new System.Drawing.Font("Segoe UI", 8.25f);
            dataGridViewCellStyle.ForeColor          = SystemColors.ControlText;
            dataGridViewCellStyle.SelectionBackColor = SystemColors.Highlight;
            dataGridViewCellStyle.SelectionForeColor = SystemColors.HighlightText;
            dataGridViewCellStyle.WrapMode           = DataGridViewTriState.False;
            this.gridView.DefaultCellStyle           = dataGridViewCellStyle;
            this.gridView.EditMode          = DataGridViewEditMode.EditOnEnter;
            this.gridView.Name              = "gridView";
            this.gridView.RowFilter         = null;
            this.gridView.RowHeadersVisible = false;
            this.gridView.SelectionMode     = DataGridViewSelectionMode.FullRowSelect;
            this.gridView.CellClick        += new DataGridViewCellEventHandler(this.gridView_CellClick);
            this.colImage.AutoSizeMode      = DataGridViewAutoSizeColumnMode.AllCells;
            this.colImage.Frozen            = true;
            componentResourceManager.ApplyResources(this.colImage, "colImage");
            this.colImage.Name        = "colImage";
            this.colFile.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.colFile.FillWeight   = 40f;
            componentResourceManager.ApplyResources(this.colFile, "colFile");
            this.colFile.Name         = "colFile";
            this.colFile.ReadOnly     = true;
            this.colFile.Resizable    = DataGridViewTriState.True;
            this.colDesc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.colDesc.FillWeight   = 60f;
            componentResourceManager.ApplyResources(this.colDesc, "colDesc");
            this.colDesc.Name             = "colDesc";
            this.colDesc.ReadOnly         = true;
            this.colDesc.Resizable        = DataGridViewTriState.True;
            this.colPlay.AutoSizeMode     = DataGridViewAutoSizeColumnMode.AllCells;
            control.Alignment             = DataGridViewContentAlignment.MiddleCenter;
            control.BackColor             = SystemColors.Control;
            control.NullValue             = componentResourceManager.GetObject("dataGridViewCellStyle1.NullValue");
            this.colPlay.DefaultCellStyle = control;
            componentResourceManager.ApplyResources(this.colPlay, "colPlay");
            this.colPlay.Image       = (Image)componentResourceManager.GetObject("colPlay.Image");
            this.colPlay.Name        = "colPlay";
            this.colMod.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.colMod.FillWeight   = 40f;
            componentResourceManager.ApplyResources(this.colMod, "colMod");
            this.colMod.Name     = "colMod";
            this.colMod.SortMode = DataGridViewColumnSortMode.Automatic;
            componentResourceManager.ApplyResources(this, "$this");
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.Controls.Add(this.gridView);
            base.Name = "ModsSelector";
            ((ISupportInitialize)this.gridView).EndInit();
            base.ResumeLayout(false);
        }
Exemplo n.º 2
0
        private void InitializeComponent()
        {
            this.TextBoxAssayProtocol = new TextBox();
            this.Label5                      = new Label();
            this.TextBoxAssayCode            = new TextBox();
            this.CheckBoxAssayActive         = new CheckBox();
            this.Label8                      = new Label();
            this.TextBoxSearchValue          = new TextBox();
            this.Label2                      = new Label();
            this.ComboBoxTestFileMachineName = new ComboBox();
            this.Label17                     = new Label();
            this.GroupBoxSearch              = new GroupBox();
            this.Label15                     = new Label();
            this.Label14                     = new Label();
            this.Label1                      = new Label();
            this.TextBoxAssayName            = new TextBox();
            this.DataGridView1               = new DataGridView();
            this.MachineName                 = new DataGridViewTextBoxColumn();
            this.AssayName                   = new DataGridViewTextBoxColumn();
            this.AssayCode                   = new DataGridViewTextBoxColumn();
            this.AssayType                   = new DataGridViewTextBoxColumn();
            this.AssayProtocol               = new DataGridViewTextBoxColumn();
            this.AssayActive                 = new DataGridViewTextBoxColumn();
            this.btnSave                     = new Button();
            this.DataGridViewTextBoxColumn1  = new DataGridViewTextBoxColumn();
            this.DataGridViewTextBoxColumn2  = new DataGridViewTextBoxColumn();
            this.DataGridViewTextBoxColumn3  = new DataGridViewTextBoxColumn();
            this.DataGridViewTextBoxColumn4  = new DataGridViewTextBoxColumn();
            this.DataGridViewTextBoxColumn5  = new DataGridViewTextBoxColumn();
            this.Label3                      = new Label();
            this.TextBoxAssayType            = new TextBox();
            this.GroupBoxSearch.SuspendLayout();
            this.DataGridView1.BeginInit();
            this.SuspendLayout();
            this.TextBoxAssayProtocol.BorderStyle = BorderStyle.FixedSingle;
            this.TextBoxAssayProtocol.Font        = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.TextBoxAssayProtocol.Location    = new Point(115, 143);
            this.TextBoxAssayProtocol.MaxLength   = 100;
            this.TextBoxAssayProtocol.Name        = "TextBoxAssayProtocol";
            this.TextBoxAssayProtocol.Size        = new Size(194, 23);
            this.TextBoxAssayProtocol.TabIndex    = 304;
            this.Label5.AutoSize = true;
            this.Label5.Font     = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label5.Location = new Point(12, 89);
            this.Label5.Name     = "Label5";
            this.Label5.Size     = new Size(83, 17);
            this.Label5.TabIndex = 302;
            this.Label5.Text     = "Assay Code";
            this.TextBoxAssayCode.BorderStyle = BorderStyle.FixedSingle;
            this.TextBoxAssayCode.Font        = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.TextBoxAssayCode.Location    = new Point(115, 85);
            this.TextBoxAssayCode.MaxLength   = 100;
            this.TextBoxAssayCode.Name        = "TextBoxAssayCode";
            this.TextBoxAssayCode.Size        = new Size(104, 23);
            this.TextBoxAssayCode.TabIndex    = 301;
            this.CheckBoxAssayActive.AutoSize = true;
            this.CheckBoxAssayActive.Location = new Point(405, 192);
            this.CheckBoxAssayActive.Name     = "CheckBoxAssayActive";
            this.CheckBoxAssayActive.Size     = new Size(56, 17);
            this.CheckBoxAssayActive.TabIndex = 300;
            this.CheckBoxAssayActive.Text     = "Active";
            this.CheckBoxAssayActive.UseVisualStyleBackColor = true;
            this.Label8.AutoSize                = true;
            this.Label8.Font                    = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label8.Location                = new Point(12, 31);
            this.Label8.Name                    = "Label8";
            this.Label8.Size                    = new Size(85, 17);
            this.Label8.TabIndex                = 294;
            this.Label8.Text                    = "LIS Machine";
            this.TextBoxSearchValue.Anchor      = AnchorStyles.Top | AnchorStyles.Right;
            this.TextBoxSearchValue.BackColor   = Color.AliceBlue;
            this.TextBoxSearchValue.BorderStyle = BorderStyle.FixedSingle;
            this.TextBoxSearchValue.Font        = new Font("Microsoft Sans Serif", 11f);
            this.TextBoxSearchValue.ForeColor   = Color.Black;
            this.TextBoxSearchValue.Location    = new Point(6, 14);
            this.TextBoxSearchValue.Margin      = new Padding(0);
            this.TextBoxSearchValue.Name        = "TextBoxSearchValue";
            this.TextBoxSearchValue.Size        = new Size((int)byte.MaxValue, 24);
            this.TextBoxSearchValue.TabIndex    = 242;
            this.Label2.AutoSize                = true;
            this.Label2.Font                    = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label2.Location                = new Point(12, 147);
            this.Label2.Name                    = "Label2";
            this.Label2.Size                    = new Size(60, 17);
            this.Label2.TabIndex                = 305;
            this.Label2.Text                    = "Protocol";
            this.ComboBoxTestFileMachineName.FormattingEnabled = true;
            ComboBox.ObjectCollection items1 = this.ComboBoxTestFileMachineName.Items;
            object[] items2 = new object[14];
            int      index1 = 0;
            string   str1   = "ARCHITECT";

            items2[index1] = (object)str1;
            int    index2 = 1;
            string str2   = "ELITE";

            items2[index2] = (object)str2;
            int    index3 = 2;
            string str3   = "Cell Dyn Rubi";

            items2[index3] = (object)str3;
            int    index4 = 3;
            string str4   = "IMMULITE 2000";

            items2[index4] = (object)str4;
            int    index5 = 4;
            string str5   = "SIEMENS ADVIA";

            items2[index5] = (object)str5;
            int    index6 = 5;
            string str6   = "SIEMENS DIMENSION";

            items2[index6] = (object)str6;
            int    index7 = 6;
            string str7   = "ADAMS A1c HA";

            items2[index7] = (object)str7;
            int    index8 = 7;
            string str8   = "Sysmex";

            items2[index8] = (object)str8;
            int    index9 = 8;
            string str9   = "Biorad D10";

            items2[index9] = (object)str9;
            int    index10 = 9;
            string str10   = "Biorad Variant";

            items2[index10] = (object)str10;
            int    index11 = 10;
            string str11   = "Celltac Chemi";

            items2[index11] = (object)str11;
            int    index12 = 11;
            string str12   = "VIDAS";

            items2[index12] = (object)str12;
            int    index13 = 12;
            string str13   = "Chemray";

            items2[index13] = (object)str13;
            int    index14 = 13;
            string str14   = "Hemaray";

            items2[index14] = (object)str14;
            items1.AddRange(items2);
            this.ComboBoxTestFileMachineName.Location = new Point(115, 29);
            this.ComboBoxTestFileMachineName.Name     = "ComboBoxTestFileMachineName";
            this.ComboBoxTestFileMachineName.Size     = new Size(346, 21);
            this.ComboBoxTestFileMachineName.TabIndex = 303;
            this.Label17.Anchor        = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            this.Label17.BorderStyle   = BorderStyle.Fixed3D;
            this.Label17.FlatStyle     = FlatStyle.Flat;
            this.Label17.Font          = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0);
            this.Label17.ForeColor     = Color.Black;
            this.Label17.Location      = new Point(499, 25);
            this.Label17.Name          = "Label17";
            this.Label17.Size          = new Size(72, 24);
            this.Label17.TabIndex      = 299;
            this.Label17.Text          = "Charges";
            this.Label17.TextAlign     = ContentAlignment.MiddleLeft;
            this.GroupBoxSearch.Anchor = AnchorStyles.Top | AnchorStyles.Right;
            this.GroupBoxSearch.Controls.Add((Control)this.TextBoxSearchValue);
            this.GroupBoxSearch.Font      = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, (byte)0);
            this.GroupBoxSearch.ForeColor = Color.FromArgb(192, 0, 0);
            this.GroupBoxSearch.Location  = new Point(583, 11);
            this.GroupBoxSearch.Name      = "GroupBoxSearch";
            this.GroupBoxSearch.Size      = new Size(267, 43);
            this.GroupBoxSearch.TabIndex  = 298;
            this.GroupBoxSearch.TabStop   = false;
            this.GroupBoxSearch.Text      = "Search";
            this.Label15.Anchor           = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
            this.Label15.BorderStyle      = BorderStyle.Fixed3D;
            this.Label15.Font             = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label15.ForeColor        = SystemColors.ActiveBorder;
            this.Label15.Location         = new Point(489, -1);
            this.Label15.Name             = "Label15";
            this.Label15.Size             = new Size(3, 415);
            this.Label15.TabIndex         = 297;
            this.Label14.Anchor           = AnchorStyles.Bottom | AnchorStyles.Left;
            this.Label14.BorderStyle      = BorderStyle.Fixed3D;
            this.Label14.Font             = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label14.ForeColor        = SystemColors.ActiveBorder;
            this.Label14.Location         = new Point(4, 361);
            this.Label14.Name             = "Label14";
            this.Label14.Size             = new Size(487, 3);
            this.Label14.TabIndex         = 296;
            this.Label1.AutoSize          = true;
            this.Label1.Font     = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label1.Location = new Point(12, 60);
            this.Label1.Name     = "Label1";
            this.Label1.Size     = new Size(87, 17);
            this.Label1.TabIndex = 295;
            this.Label1.Text     = "Assay Name";
            this.TextBoxAssayName.BorderStyle        = BorderStyle.FixedSingle;
            this.TextBoxAssayName.Font               = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.TextBoxAssayName.Location           = new Point(115, 56);
            this.TextBoxAssayName.MaxLength          = 100;
            this.TextBoxAssayName.Name               = "TextBoxAssayName";
            this.TextBoxAssayName.Size               = new Size(194, 23);
            this.TextBoxAssayName.TabIndex           = 291;
            this.DataGridView1.AllowUserToAddRows    = false;
            this.DataGridView1.AllowUserToDeleteRows = false;
            this.DataGridView1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection columns = this.DataGridView1.Columns;

            DataGridViewColumn[] dataGridViewColumnArray = new DataGridViewColumn[6];
            int index15 = 0;
            DataGridViewTextBoxColumn machineName = this.MachineName;

            dataGridViewColumnArray[index15] = (DataGridViewColumn)machineName;
            int index16 = 1;
            DataGridViewTextBoxColumn assayName = this.AssayName;

            dataGridViewColumnArray[index16] = (DataGridViewColumn)assayName;
            int index17 = 2;
            DataGridViewTextBoxColumn assayCode = this.AssayCode;

            dataGridViewColumnArray[index17] = (DataGridViewColumn)assayCode;
            int index18 = 3;
            DataGridViewTextBoxColumn assayType = this.AssayType;

            dataGridViewColumnArray[index18] = (DataGridViewColumn)assayType;
            int index19 = 4;
            DataGridViewTextBoxColumn assayProtocol = this.AssayProtocol;

            dataGridViewColumnArray[index19] = (DataGridViewColumn)assayProtocol;
            int index20 = 5;
            DataGridViewTextBoxColumn assayActive = this.AssayActive;

            dataGridViewColumnArray[index20] = (DataGridViewColumn)assayActive;
            columns.AddRange(dataGridViewColumnArray);
            this.DataGridView1.EditMode   = DataGridViewEditMode.EditOnEnter;
            this.DataGridView1.Location   = new Point(498, 60);
            this.DataGridView1.Name       = "DataGridView1";
            this.DataGridView1.ReadOnly   = true;
            this.DataGridView1.Size       = new Size(353, 344);
            this.DataGridView1.TabIndex   = 293;
            this.MachineName.HeaderText   = "Machine Name";
            this.MachineName.Name         = "MachineName";
            this.MachineName.ReadOnly     = true;
            this.MachineName.Width        = 120;
            this.AssayName.HeaderText     = "Assay Name";
            this.AssayName.Name           = "AssayName";
            this.AssayName.ReadOnly       = true;
            this.AssayCode.HeaderText     = "Assay Code";
            this.AssayCode.Name           = "AssayCode";
            this.AssayCode.ReadOnly       = true;
            this.AssayType.HeaderText     = "Assay Type";
            this.AssayType.Name           = "AssayType";
            this.AssayType.ReadOnly       = true;
            this.AssayProtocol.HeaderText = "Assay Protocol";
            this.AssayProtocol.Name       = "AssayProtocol";
            this.AssayProtocol.ReadOnly   = true;
            this.AssayActive.HeaderText   = "Active";
            this.AssayActive.Name         = "AssayActive";
            this.AssayActive.ReadOnly     = true;
            this.btnSave.Anchor           = AnchorStyles.Bottom | AnchorStyles.Left;
            this.btnSave.Location         = new Point(405, 377);
            this.btnSave.Name             = "btnSave";
            this.btnSave.Size             = new Size(75, 24);
            this.btnSave.TabIndex         = 292;
            this.btnSave.Text             = "&Save";
            this.DataGridViewTextBoxColumn1.HeaderText = "Machine Name";
            this.DataGridViewTextBoxColumn1.Name       = "DataGridViewTextBoxColumn1";
            this.DataGridViewTextBoxColumn1.Width      = 120;
            this.DataGridViewTextBoxColumn2.HeaderText = "Assay Name";
            this.DataGridViewTextBoxColumn2.Name       = "DataGridViewTextBoxColumn2";
            this.DataGridViewTextBoxColumn3.HeaderText = "Assay Code";
            this.DataGridViewTextBoxColumn3.Name       = "DataGridViewTextBoxColumn3";
            this.DataGridViewTextBoxColumn4.HeaderText = "Assay Protocol";
            this.DataGridViewTextBoxColumn4.Name       = "DataGridViewTextBoxColumn4";
            this.DataGridViewTextBoxColumn5.HeaderText = "Active";
            this.DataGridViewTextBoxColumn5.Name       = "DataGridViewTextBoxColumn5";
            this.Label3.AutoSize = true;
            this.Label3.Font     = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.Label3.Location = new Point(12, 118);
            this.Label3.Name     = "Label3";
            this.Label3.Size     = new Size(82, 17);
            this.Label3.TabIndex = 307;
            this.Label3.Text     = "Assay Type";
            this.TextBoxAssayType.BorderStyle = BorderStyle.FixedSingle;
            this.TextBoxAssayType.Font        = new Font("Microsoft Sans Serif", 10f, FontStyle.Regular, GraphicsUnit.Point, (byte)0);
            this.TextBoxAssayType.Location    = new Point(115, 114);
            this.TextBoxAssayType.MaxLength   = 100;
            this.TextBoxAssayType.Name        = "TextBoxAssayType";
            this.TextBoxAssayType.Size        = new Size(141, 23);
            this.TextBoxAssayType.TabIndex    = 306;
            this.AutoScaleDimensions          = new SizeF(6f, 13f);
            this.AutoScaleMode = AutoScaleMode.Font;
            this.ClientSize    = new Size(855, 413);
            this.Controls.Add((Control)this.Label3);
            this.Controls.Add((Control)this.TextBoxAssayType);
            this.Controls.Add((Control)this.TextBoxAssayProtocol);
            this.Controls.Add((Control)this.Label5);
            this.Controls.Add((Control)this.TextBoxAssayCode);
            this.Controls.Add((Control)this.CheckBoxAssayActive);
            this.Controls.Add((Control)this.Label8);
            this.Controls.Add((Control)this.Label2);
            this.Controls.Add((Control)this.ComboBoxTestFileMachineName);
            this.Controls.Add((Control)this.Label17);
            this.Controls.Add((Control)this.GroupBoxSearch);
            this.Controls.Add((Control)this.Label15);
            this.Controls.Add((Control)this.Label14);
            this.Controls.Add((Control)this.Label1);
            this.Controls.Add((Control)this.TextBoxAssayName);
            this.Controls.Add((Control)this.DataGridView1);
            this.Controls.Add((Control)this.btnSave);
            this.Name        = "PMS_LISAssayList";
            this.Text        = "LIS Assay List";
            this.WindowState = FormWindowState.Maximized;
            this.GroupBoxSearch.ResumeLayout(false);
            this.GroupBoxSearch.PerformLayout();
            this.DataGridView1.EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }
        private void InitializeComponent()
        {
            this.groupBox1            = new GroupBox();
            this.dataGridViewListUser = new DataGridView();
            this.ColumnName           = new DataGridViewTextBoxColumn();
            this.ColumnBlocked        = new DataGridViewCheckBoxColumn();
            this.ColumnPwd            = new DataGridViewCheckBoxColumn();
            this.button1 = new Button();
            this.groupBox1.SuspendLayout();
            ((ISupportInitialize)this.dataGridViewListUser).BeginInit();
            base.SuspendLayout();
            this.groupBox1.Controls.Add(this.dataGridViewListUser);
            this.groupBox1.Location = new Point(12, 12);
            this.groupBox1.Name     = "groupBox1";
            this.groupBox1.Size     = new System.Drawing.Size(566, 325);
            this.groupBox1.TabIndex = 0;
            this.groupBox1.TabStop  = false;
            this.groupBox1.Text     = "Список пользователей";
            this.dataGridViewListUser.AllowUserToAddRows          = false;
            this.dataGridViewListUser.AllowUserToDeleteRows       = false;
            this.dataGridViewListUser.AutoSizeColumnsMode         = DataGridViewAutoSizeColumnsMode.Fill;
            this.dataGridViewListUser.AutoSizeRowsMode            = DataGridViewAutoSizeRowsMode.AllCells;
            this.dataGridViewListUser.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection columns = this.dataGridViewListUser.Columns;

            DataGridViewColumn[] columnName = new DataGridViewColumn[] { this.ColumnName, this.ColumnBlocked, this.ColumnPwd };
            columns.AddRange(columnName);
            this.dataGridViewListUser.Location           = new Point(6, 25);
            this.dataGridViewListUser.MultiSelect        = false;
            this.dataGridViewListUser.Name               = "dataGridViewListUser";
            this.dataGridViewListUser.ReadOnly           = true;
            this.dataGridViewListUser.RowTemplate.Height = 28;
            this.dataGridViewListUser.Size               = new System.Drawing.Size(554, 294);
            this.dataGridViewListUser.TabIndex           = 0;
            this.ColumnName.AutoSizeMode         = DataGridViewAutoSizeColumnMode.AllCells;
            this.ColumnName.HeaderText           = "Имя";
            this.ColumnName.Name                 = "ColumnName";
            this.ColumnName.ReadOnly             = true;
            this.ColumnName.Width                = 65;
            this.ColumnBlocked.HeaderText        = "Блокировка";
            this.ColumnBlocked.Name              = "ColumnBlocked";
            this.ColumnBlocked.ReadOnly          = true;
            this.ColumnPwd.HeaderText            = "Ограничение";
            this.ColumnPwd.Name                  = "ColumnPwd";
            this.ColumnPwd.ReadOnly              = true;
            this.button1.AutoSize                = true;
            this.button1.DialogResult            = System.Windows.Forms.DialogResult.OK;
            this.button1.Location                = new Point(220, 358);
            this.button1.Name                    = "button1";
            this.button1.Size                    = new System.Drawing.Size(134, 35);
            this.button1.TabIndex                = 1;
            this.button1.Text                    = "ОК";
            this.button1.UseVisualStyleBackColor = true;
            base.AcceptButton                    = this.button1;
            base.AutoScaleDimensions             = new SizeF(9f, 20f);
            base.AutoScaleMode                   = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize = new System.Drawing.Size(590, 403);
            base.Controls.Add(this.button1);
            base.Controls.Add(this.groupBox1);
            base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            base.Name            = "ListUserForm";
            base.StartPosition   = FormStartPosition.CenterParent;
            this.Text            = "Зарегистрированные пользователи";
            base.Load           += new EventHandler(this.ListUserForm_Load);
            this.groupBox1.ResumeLayout(false);
            ((ISupportInitialize)this.dataGridViewListUser).EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Exemplo n.º 4
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ModEditor));
            DataGridViewCellStyle    dataGridViewCellStyle    = new DataGridViewCellStyle();
            DataGridViewCellStyle    control = new DataGridViewCellStyle();

            this.gridViewContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.tsmiDeleteFile      = new ToolStripMenuItem();
            this.gridView            = new MyDataGridView();
            this.colEnabled          = new DataGridViewCheckBoxColumn();
            this.colSelect           = new DataGridViewButtonColumn();
            this.colFile             = new DataGridViewTextBoxColumn();
            this.colDesc             = new DataGridViewTextBoxColumn();
            this.colOpen             = new DataGridViewImageColumn();
            this.gridViewContextMenu.SuspendLayout();
            ((ISupportInitialize)this.gridView).BeginInit();
            base.SuspendLayout();
            componentResourceManager.ApplyResources(this.gridViewContextMenu, "gridViewContextMenu");
            this.gridViewContextMenu.Items.AddRange(new ToolStripItem[] { this.tsmiDeleteFile });
            this.gridViewContextMenu.Name = "gridViewContextMenu";
            componentResourceManager.ApplyResources(this.tsmiDeleteFile, "tsmiDeleteFile");
            this.tsmiDeleteFile.Image  = Images16px.Cross;
            this.tsmiDeleteFile.Name   = "tsmiDeleteFile";
            this.tsmiDeleteFile.Click += new EventHandler(this.tsmi_DeleteFile_Click);
            componentResourceManager.ApplyResources(this.gridView, "gridView");
            this.gridView.AllowUserToAddRows       = false;
            this.gridView.AllowUserToDeleteRows    = false;
            this.gridView.AllowUserToResizeColumns = false;
            this.gridView.AllowUserToResizeRows    = false;
            this.gridView.BackgroundColor          = SystemColors.ControlLightLight;
            this.gridView.BorderStyle                 = System.Windows.Forms.BorderStyle.None;
            this.gridView.CellBorderStyle             = DataGridViewCellBorderStyle.SingleHorizontal;
            this.gridView.ClipboardCopyMode           = DataGridViewClipboardCopyMode.Disable;
            this.gridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection columns = this.gridView.Columns;

            DataGridViewColumn[] dataGridViewColumnArray = new DataGridViewColumn[] { this.colEnabled, this.colSelect, this.colFile, this.colDesc, this.colOpen };
            columns.AddRange(dataGridViewColumnArray);
            this.gridView.ContextMenuStrip           = this.gridViewContextMenu;
            dataGridViewCellStyle.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle.BackColor          = SystemColors.ControlLightLight;
            dataGridViewCellStyle.Font               = new System.Drawing.Font("Segoe UI", 8.25f);
            dataGridViewCellStyle.ForeColor          = SystemColors.ControlText;
            dataGridViewCellStyle.SelectionBackColor = SystemColors.Highlight;
            dataGridViewCellStyle.SelectionForeColor = SystemColors.HighlightText;
            dataGridViewCellStyle.WrapMode           = DataGridViewTriState.False;
            this.gridView.DefaultCellStyle           = dataGridViewCellStyle;
            this.gridView.EditMode          = DataGridViewEditMode.EditOnEnter;
            this.gridView.Name              = "gridView";
            this.gridView.RowFilter         = null;
            this.gridView.RowHeadersVisible = false;
            this.gridView.SelectionMode     = DataGridViewSelectionMode.FullRowSelect;
            this.gridView.CellClick        += new DataGridViewCellEventHandler(this.gridView_CellClick);
            this.gridView.KeyDown          += new KeyEventHandler(this.gridView_KeyDown);
            this.colEnabled.AutoSizeMode    = DataGridViewAutoSizeColumnMode.AllCells;
            componentResourceManager.ApplyResources(this.colEnabled, "colEnabled");
            this.colEnabled.Name        = "colEnabled";
            this.colEnabled.ReadOnly    = true;
            this.colEnabled.SortMode    = DataGridViewColumnSortMode.Automatic;
            this.colSelect.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
            this.colSelect.DividerWidth = 1;
            componentResourceManager.ApplyResources(this.colSelect, "colSelect");
            this.colSelect.Name = "colSelect";
            this.colSelect.Text = "...";
            this.colSelect.UseColumnTextForButtonValue = true;
            this.colFile.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.colFile.FillWeight   = 40f;
            componentResourceManager.ApplyResources(this.colFile, "colFile");
            this.colFile.Name         = "colFile";
            this.colFile.ReadOnly     = true;
            this.colFile.Resizable    = DataGridViewTriState.True;
            this.colDesc.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
            this.colDesc.DividerWidth = 1;
            this.colDesc.FillWeight   = 60f;
            componentResourceManager.ApplyResources(this.colDesc, "colDesc");
            this.colDesc.Name             = "colDesc";
            this.colDesc.ReadOnly         = true;
            this.colDesc.Resizable        = DataGridViewTriState.True;
            this.colOpen.AutoSizeMode     = DataGridViewAutoSizeColumnMode.AllCells;
            control.Alignment             = DataGridViewContentAlignment.MiddleCenter;
            control.BackColor             = SystemColors.Control;
            control.NullValue             = componentResourceManager.GetObject("dataGridViewCellStyle1.NullValue");
            this.colOpen.DefaultCellStyle = control;
            componentResourceManager.ApplyResources(this.colOpen, "colOpen");
            this.colOpen.Name      = "colOpen";
            this.colOpen.Resizable = DataGridViewTriState.False;
            componentResourceManager.ApplyResources(this, "$this");
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.Controls.Add(this.gridView);
            base.Name = "ModEditor";
            this.gridViewContextMenu.ResumeLayout(false);
            ((ISupportInitialize)this.gridView).EndInit();
            base.ResumeLayout(false);
        }
Exemplo n.º 5
0
        private void InitializeComponent()
        {
            DataGridViewCellStyle dataGridViewCellStyle  = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
            DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();

            this.cboFile            = new ComboBox();
            this.dgvTranslate       = new DataGridView();
            this.key                = new DataGridViewTextBoxColumn();
            this.english            = new DataGridViewTextBoxColumn();
            this.text               = new DataGridViewTextBoxColumn();
            this.Translated         = new DataGridViewCheckBoxColumn();
            this.cboSection         = new ComboBox();
            this.chkOnlyTranslation = new CheckBox();
            this.dgvSection         = new DataGridView();
            this.sectionEnglish     = new DataGridViewTextBoxColumn();
            this.sectionText        = new DataGridViewTextBoxColumn();
            this.sectionBook        = new DataGridViewTextBoxColumn();
            this.sectionPage        = new DataGridViewTextBoxColumn();
            this.sectionTranslated  = new DataGridViewCheckBoxColumn();
            this.btnSearch          = new Button();
            this.txtSearch          = new TextBox();
            ((ISupportInitialize)this.dgvTranslate).BeginInit();
            ((ISupportInitialize)this.dgvSection).BeginInit();
            base.SuspendLayout();
            this.cboFile.DropDownStyle     = ComboBoxStyle.DropDownList;
            this.cboFile.FormattingEnabled = true;
            this.cboFile.Location          = new Point(12, 12);
            this.cboFile.Name                             = "cboFile";
            this.cboFile.Size                             = new System.Drawing.Size(218, 21);
            this.cboFile.TabIndex                         = 0;
            this.cboFile.SelectedIndexChanged            += new EventHandler(this.cboFile_SelectedIndexChanged);
            this.dgvTranslate.AllowUserToAddRows          = false;
            this.dgvTranslate.AllowUserToDeleteRows       = false;
            this.dgvTranslate.Anchor                      = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.dgvTranslate.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection columns = this.dgvTranslate.Columns;

            DataGridViewColumn[] translated = new DataGridViewColumn[] { this.key, this.english, this.text, this.Translated };
            columns.AddRange(translated);
            this.dgvTranslate.Location          = new Point(12, 39);
            this.dgvTranslate.MultiSelect       = false;
            this.dgvTranslate.Name              = "dgvTranslate";
            this.dgvTranslate.RowHeadersVisible = false;
            this.dgvTranslate.Size              = new System.Drawing.Size(1197, 476);
            this.dgvTranslate.TabIndex          = 7;
            this.dgvTranslate.CellValueChanged += new DataGridViewCellEventHandler(this.dgvTranslate_CellValueChanged);
            this.dgvTranslate.Sorted           += new EventHandler(this.dgvTranslate_Sorted);
            this.dgvTranslate.KeyDown          += new KeyEventHandler(this.dgvTranslate_KeyDown);
            this.key.AutoSizeMode          = DataGridViewAutoSizeColumnMode.None;
            this.key.DataPropertyName      = "key";
            dataGridViewCellStyle.WrapMode = DataGridViewTriState.True;
            this.key.DefaultCellStyle      = dataGridViewCellStyle;
            this.key.HeaderText            = "Key";
            this.key.Name                                   = "key";
            this.key.ReadOnly                               = true;
            this.key.Width                                  = 300;
            this.english.AutoSizeMode                       = DataGridViewAutoSizeColumnMode.None;
            this.english.DataPropertyName                   = "english";
            dataGridViewCellStyle1.WrapMode                 = DataGridViewTriState.True;
            this.english.DefaultCellStyle                   = dataGridViewCellStyle1;
            this.english.HeaderText                         = "English";
            this.english.Name                               = "english";
            this.english.ReadOnly                           = true;
            this.english.Width                              = 400;
            this.text.AutoSizeMode                          = DataGridViewAutoSizeColumnMode.None;
            this.text.DataPropertyName                      = "text";
            dataGridViewCellStyle2.WrapMode                 = DataGridViewTriState.True;
            this.text.DefaultCellStyle                      = dataGridViewCellStyle2;
            this.text.HeaderText                            = "Text";
            this.text.Name                                  = "text";
            this.text.Width                                 = 400;
            this.Translated.AutoSizeMode                    = DataGridViewAutoSizeColumnMode.None;
            this.Translated.DataPropertyName                = "translated";
            this.Translated.HeaderText                      = "Translated";
            this.Translated.Name                            = "Translated";
            this.Translated.SortMode                        = DataGridViewColumnSortMode.Automatic;
            this.Translated.Width                           = 70;
            this.cboSection.DropDownStyle                   = ComboBoxStyle.DropDownList;
            this.cboSection.FormattingEnabled               = true;
            this.cboSection.Location                        = new Point(236, 12);
            this.cboSection.Name                            = "cboSection";
            this.cboSection.Size                            = new System.Drawing.Size(218, 21);
            this.cboSection.TabIndex                        = 1;
            this.cboSection.Visible                         = false;
            this.cboSection.SelectedIndexChanged           += new EventHandler(this.cboSection_SelectedIndexChanged);
            this.chkOnlyTranslation.AutoSize                = true;
            this.chkOnlyTranslation.Location                = new Point(460, 14);
            this.chkOnlyTranslation.Name                    = "chkOnlyTranslation";
            this.chkOnlyTranslation.Size                    = new System.Drawing.Size(199, 17);
            this.chkOnlyTranslation.TabIndex                = 2;
            this.chkOnlyTranslation.Text                    = "Only Show Text Needing Translation";
            this.chkOnlyTranslation.UseVisualStyleBackColor = true;
            this.chkOnlyTranslation.CheckedChanged         += new EventHandler(this.chkOnlyTranslation_CheckedChanged);
            this.dgvSection.AllowUserToAddRows              = false;
            this.dgvSection.AllowUserToDeleteRows           = false;
            this.dgvSection.Anchor                          = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            this.dgvSection.ColumnHeadersHeightSizeMode     = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            DataGridViewColumnCollection dataGridViewColumnCollections = this.dgvSection.Columns;

            DataGridViewColumn[] dataGridViewColumnArray = new DataGridViewColumn[] { this.sectionEnglish, this.sectionText, this.sectionBook, this.sectionPage, this.sectionTranslated };
            dataGridViewColumnCollections.AddRange(dataGridViewColumnArray);
            this.dgvSection.Location                = new Point(12, 39);
            this.dgvSection.MultiSelect             = false;
            this.dgvSection.Name                    = "dgvSection";
            this.dgvSection.RowHeadersVisible       = false;
            this.dgvSection.Size                    = new System.Drawing.Size(1197, 476);
            this.dgvSection.TabIndex                = 5;
            this.dgvSection.Visible                 = false;
            this.dgvSection.CellValueChanged       += new DataGridViewCellEventHandler(this.dgvSection_CellValueChanged);
            this.dgvSection.Sorted                 += new EventHandler(this.dgvSection_Sorted);
            this.dgvSection.KeyDown                += new KeyEventHandler(this.dgvSection_KeyDown);
            this.dgvSection.CellMouseUp            += new DataGridViewCellMouseEventHandler(this.dgvSection_CellMouseUp);
            this.sectionEnglish.AutoSizeMode        = DataGridViewAutoSizeColumnMode.None;
            this.sectionEnglish.DataPropertyName    = "english";
            dataGridViewCellStyle3.WrapMode         = DataGridViewTriState.True;
            this.sectionEnglish.DefaultCellStyle    = dataGridViewCellStyle3;
            this.sectionEnglish.HeaderText          = "English";
            this.sectionEnglish.Name                = "sectionEnglish";
            this.sectionEnglish.ReadOnly            = true;
            this.sectionEnglish.Width               = 480;
            this.sectionText.AutoSizeMode           = DataGridViewAutoSizeColumnMode.None;
            this.sectionText.DataPropertyName       = "text";
            dataGridViewCellStyle4.WrapMode         = DataGridViewTriState.True;
            this.sectionText.DefaultCellStyle       = dataGridViewCellStyle4;
            this.sectionText.HeaderText             = "Text";
            this.sectionText.Name                   = "sectionText";
            this.sectionText.Width                  = 480;
            this.sectionBook.DataPropertyName       = "book";
            this.sectionBook.HeaderText             = "Book";
            this.sectionBook.Name                   = "sectionBook";
            this.sectionBook.ReadOnly               = true;
            this.sectionBook.Width                  = 70;
            this.sectionPage.DataPropertyName       = "page";
            this.sectionPage.HeaderText             = "Page";
            this.sectionPage.Name                   = "sectionPage";
            this.sectionPage.Width                  = 70;
            this.sectionTranslated.AutoSizeMode     = DataGridViewAutoSizeColumnMode.None;
            this.sectionTranslated.DataPropertyName = "translated";
            this.sectionTranslated.HeaderText       = "Translated";
            this.sectionTranslated.Name             = "sectionTranslated";
            this.sectionTranslated.SortMode         = DataGridViewColumnSortMode.Automatic;
            this.sectionTranslated.Width            = 70;
            this.btnSearch.Anchor                   = AnchorStyles.Top | AnchorStyles.Right;
            this.btnSearch.Location                 = new Point(1134, 10);
            this.btnSearch.Name     = "btnSearch";
            this.btnSearch.Size     = new System.Drawing.Size(75, 23);
            this.btnSearch.TabIndex = 4;
            this.btnSearch.Text     = "Search";
            this.btnSearch.UseVisualStyleBackColor = true;
            this.btnSearch.Click    += new EventHandler(this.btnSearch_Click);
            this.txtSearch.Anchor    = AnchorStyles.Top | AnchorStyles.Right;
            this.txtSearch.Location  = new Point(962, 12);
            this.txtSearch.Name      = "txtSearch";
            this.txtSearch.Size      = new System.Drawing.Size(166, 20);
            this.txtSearch.TabIndex  = 3;
            this.txtSearch.KeyPress += new KeyPressEventHandler(this.txtSearch_KeyPressed);
            this.txtSearch.GotFocus += new EventHandler(this.txtSearch_GotFocus);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize          = new System.Drawing.Size(1221, 527);
            base.Controls.Add(this.txtSearch);
            base.Controls.Add(this.btnSearch);
            base.Controls.Add(this.chkOnlyTranslation);
            base.Controls.Add(this.cboSection);
            base.Controls.Add(this.cboFile);
            base.Controls.Add(this.dgvSection);
            base.Controls.Add(this.dgvTranslate);
            base.KeyPreview    = true;
            base.Name          = "frmTranslate";
            base.ShowInTaskbar = false;
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text          = "Translating";
            base.Load         += new EventHandler(this.frmTranslate_Load);
            base.KeyDown      += new KeyEventHandler(this.frmTranslate_KeyDown);
            ((ISupportInitialize)this.dgvTranslate).EndInit();
            ((ISupportInitialize)this.dgvSection).EndInit();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
 private void buttonOK_Click(object sender, EventArgs e)
 {
     DataGridViewColumn[] cols = new DataGridViewColumn[_tbl.Rows.Count];
     for (int i = 0; i < _tbl.Rows.Count; i++)
     {
         Type t = typeof(string);
         try
         {
             string tx = Convert.ToString(_tbl.Rows[i][2]);
             if (string.Compare(tx, "Integer", StringComparison.OrdinalIgnoreCase) == 0)
             {
                 t = typeof(int);
             }
             else if (string.Compare(tx, "Decimal", StringComparison.OrdinalIgnoreCase) == 0)
             {
                 t = typeof(double);
             }
             else if (string.Compare(tx, "DateTime", StringComparison.OrdinalIgnoreCase) == 0)
             {
                 t = typeof(DateTime);
             }
             else if (string.Compare(tx, "Time", StringComparison.OrdinalIgnoreCase) == 0)
             {
                 t = typeof(TimeSpan);
             }
             else if (string.Compare(tx, "Boolean", StringComparison.OrdinalIgnoreCase) == 0)
             {
                 t = typeof(bool);
             }
         }
         catch
         {
         }
         string name = _tbl.Rows[i][0].ToString();
         string text = _tbl.Rows[i][1].ToString();
         for (int k = 0; k < _cols.Count; k++)
         {
             if (string.Compare(_cols[k].DataPropertyName, name, StringComparison.OrdinalIgnoreCase) == 0)
             {
                 if (t.Equals(_cols[k].ValueType))
                 {
                     cols[i]            = _cols[k];
                     cols[i].HeaderText = text;
                     break;
                 }
             }
         }
         if (cols[i] == null)
         {
             if (t.Equals(typeof(bool)))
             {
                 cols[i] = new DataGridViewCheckBoxColumn();
             }
             else
             {
                 cols[i] = new DataGridViewTextBoxColumn();
             }
             cols[i].HeaderText       = text;
             cols[i].DataPropertyName = name;
             cols[i].Name             = name;
             cols[i].ValueType        = t;
         }
     }
     _cols.Clear();
     //
     Type[] tps = new Type[cols.Length];
     for (int i = 0; i < cols.Length; i++)
     {
         tps[i] = cols[i].ValueType;
     }
     _cols.AddRange(cols);
     for (int i = 0; i < _cols.Count; i++)
     {
         _cols[i].ValueType = tps[i];
     }
     this.DialogResult = DialogResult.OK;
 }