private void Form1_Load(object sender, EventArgs e) { // Create a GroupedListControl instance: GroupListControl glc = this.groupListControl1; glc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); // Add some sample columns: for (int i = 1; i <= 5; i++) { ListGroup lg = new ListGroup(); lg.Columns.Add("List Group " + i.ToString(), 120); lg.Columns.Add("Group " + i + " SubItem 1", 150); lg.Columns.Add("Group " + i + " Subitem 2", 150); lg.Name = "Group " + i; // Now add some sample items: for (int j = 1; j <= 5; j++) { ListViewItem item = lg.Items.Add("Item " + j.ToString()); item.SubItems.Add(item.Text + " SubItem 1"); item.SubItems.Add(item.Text + " SubItem 2"); } // Add handling for the columnRightClick Event: lg.ColumnRightClick += new ListGroup.ColumnRightClickHandler(lg_ColumnRightClick); lg.MouseClick += new MouseEventHandler(lg_MouseClick); glc.Controls.Add(lg); } }
public SummaryNotificationForm(GroupListControl groupListControl, WorkMode workMode, bool noActionsNeeded = false) { InitializeComponent(); switch (workMode.WorkType) { case WorkModeType.DownloadFromCashBoxAndShowNotificationTable: this.Text = "Загрузка информации с кассы"; if (noActionsNeeded == false) { this.descriptionTextBox.Text = "Подтвердите загрузку информации, указанной выше"; } else { this.descriptionTextBox.Text = "Согласно полученным данным никаких действий проводить не требуется."; this.cancelButton.Visible = false; } break; case WorkModeType.DownloadFromCashBoxAndShowCorrespondingResults: this.Text = "Результаты загрузки информации с кассы"; this.descriptionTextBox.Text = "Выше показаны результаты загрузки информации с кассы.\n" + "Если возникли ошибки, то просмотрите логи для более детального разбора\n" + " либо свяжитесь с системным администратором."; this.cancelButton.Visible = false; break; case WorkModeType.UploadToCashBoxAndShowNotificationTable: this.Text = "Отправка информации на кассу"; if (noActionsNeeded == false) { this.descriptionTextBox.Text = "Подтвердите загрузку информации, указанной выше"; } else { this.descriptionTextBox.Text = "Согласно полученным данным никаких действий проводить не требуется."; this.cancelButton.Visible = false; } break; case WorkModeType.UploadToCashBoxAndShowCorrespondingResults: this.Text = "Результаты отправки информации на кассу"; this.descriptionTextBox.Text = "Выше показаны результаты загрузки информации на кассы.\n" + "Если возникли ошибки, то просмотрите логи для более детального разбора\n" + " либо свяжитесь с системным администратором."; this.cancelButton.Visible = false; break; } int counter = groupListControl.Controls.Count; for (int i = 0; i < counter; i++) { this.groupListControl1.Controls.Add(groupListControl.Controls[0]); } groupListControl1.Update(); groupListControl1.Invalidate(true); }
public HL7MasterForm() { InitializeComponent(); setSimulatorDataFolder(); ShowConsoleWindow(); // Create a GLC instance: glc = this.groupListControl1; glc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); }
private void button1_Click(object sender, EventArgs e) { System.IO.StreamReader sr = new System.IO.StreamReader(this._File1Stream); List <string> temp = new List <string>(); while (!sr.EndOfStream) { temp.Add(sr.ReadLine()); } one = dane(temp.ToArray <string>()); _MatrixCount = Convert.ToInt32(one[(one.Count - 4)]); for (int i = 1; i <= _MatrixCount; i++) { this.comboBoxpodmacierz.Items.Add(i); this.comboBoxpodmacierz.SelectedItem = 1; } sr.Close(); sr = new System.IO.StreamReader(_File2Stream); temp = new List <string>(); while (!sr.EndOfStream) { temp.Add(sr.ReadLine()); } two = dane(temp.ToArray <string>()); sr.Close(); glc = this.groupListControl1; glc.Visible = false; glc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); if (glc != null && glc.Controls != null) { while (glc.Controls.Count > 0) { glc.Controls.RemoveAt(0); } } // Add some sample columns: for (int i = 0; i < one.Count; i += 4) { if (Convert.ToInt32(one[i]) == Convert.ToInt32(this.comboBoxpodmacierz.Text)) { ListGroup lg = new ListGroup(); lg.Columns.Add(one[i], 120); lg.Columns.Add(one[i + 2], 150); lg.Columns.Add(one[i + 3], 150); lg.Columns.Add("Liczba falowa", 150); lg.Columns.Add("Długość fali", 150); lg.Columns.Add("Przejście", 150); lg.Name = "Group " + i; List <string> wynik = oblicz(this.comboBoxpodmacierz.Text, one[i + 2], two); for (int j = 0; j < wynik.Count; j += 6) { ListViewItem item = lg.Items.Add(wynik[j]); item.SubItems.Add(wynik[j + 1]); item.SubItems.Add(wynik[j + 2]); item.SubItems.Add(wynik[j + 3]); item.SubItems.Add(wynik[j + 4]); item.SubItems.Add(wynik[j + 5]); } // Add handling for the columnRightClick Event: lg.ColumnRightClick += new ListGroup.ColumnRightClickHandler(lg_ColumnRightClick); //lg.GroupCollapsed += new ListGroup.GroupExpansionHandler(lg_GroupCollapsed); lg.GroupExpanded += new ListGroup.GroupExpansionHandler(lg_GroupExpanded); lg.MouseClick += new MouseEventHandler(lg_MouseClick); glc.Controls.Add(lg); } } glc.Visible = true; this.labelPodmacierz.Visible = true; this.comboBoxpodmacierz.Visible = true; this.chkSingleItemOnlyMode.Visible = true; }