public Form1() { InitializeComponent(); this.Height = 700; this.Width = 1106; Vulkaniums Vulk_data = new Vulkaniums(); col_vulk = Vulk_data.col_vulkans; Vulk_data.coord_vulkans(); vulkan_markers = new one_vulkan[col_vulk]; vulkans_name = Vulk_data.vulkans_name(1); vulkans_koord = Vulk_data.coord_vulkans(); Vulk_data.group_priznak(); Vulk_data.priz_group_mass(1); for (int i = 0; i < col_vulk; i++) { // MessageBox.Show(vulkans_koord[i, 1].ToString() + "|||" + vulkans_koord[i, 0].ToString()); int[] location_vulk = inProg(vulkans_koord[i, 1], vulkans_koord[i, 0]); one_vulkan vul = new one_vulkan(vulkans_name[i], location_vulk[0], location_vulk[1]); vulkan_markers[i] = vul; this.panel1.Controls.Add(vulkan_markers[i]); vul.Location = vulkan_markers[i].locat; } V_CHB = new Vulk_chackbox(vulkan_markers, vulkans_name, col_vulk); P_CHB = new priznak_checkbox(0, true); this.panel2.Controls.Add(V_CHB); }
public priznak_checkbox(int el, bool fl) { InitializeComponent(); Vulkaniums Vulk_data = new Vulkaniums(); int[,] grup_priznak = Vulk_data.group_priznak(); string[] priz_name = Vulk_data.priz_group_mass(); string[] grup_name = Vulk_data.priz_group_mass(1); col_priz_in_gr = Vulk_data.col_priz_in_grupp(); int now_col = col_priz_in_gr[0]; col_prizn = Vulk_data.col_priznak; col_grup = Vulk_data.col_grupp; index_grupp = new int[col_grup]; int k = 0; bool flag_gr = true; for (int i = 0; i < col_prizn; i++) { if (i >= now_col && flag_gr == false) { k++; now_col += col_priz_in_gr[k]; flag_gr = true; } if (i < now_col && flag_gr == true) { this.checkedListBox1.Items.Add("__ГРУППА№" + (k + 1).ToString() + " " + grup_name[k], true); index_grupp[k] = this.checkedListBox1.Items.Count - 1; // MessageBox.Show(index_grupp[k].ToString()); flag_gr = false; } this.checkedListBox1.Items.Add((i + 1).ToString() + " " + priz_name[i], fl); checkedListBox1.SetItemChecked(i, fl); } if (el == 1) { checkedListBox1.Height = 250; } }