public void SetFormation(int size, formTypes formation) { int units_per_row; if (!initialized) { Init(); } Set_formation_size(size); angle = starting_angle; target_angle = angle; num_units = size; switch (formation) { case formTypes.one_row: for (int i = 0; i < size; i++) { positions[i] = new Vector3(0, 0, unit_height * i + space_height * i); } break; case formTypes.auto: switch (size) { case 1: positions[0] = new Vector3(0, 0, 0); leader_index = 0; break; case 2: positions[0] = new Vector3(0, 0, 0); positions[1] = new Vector3(0 + space_width + unit_width, 0, 0); leader_index = 0; break; case 3: positions[0] = new Vector3(0, 0, 0); positions[1] = new Vector3(0 - space_width - unit_width, 0 + space_height + unit_height, 0); positions[2] = new Vector3(0 + space_width - unit_width, 0 + space_height + unit_height, 0); leader_index = 0; break; case 4: positions[0] = new Vector3(0, 0, 0); positions[1] = new Vector3(0 + space_width + unit_width, 0, 0); positions[2] = new Vector3(0, 0, 0 + space_height + unit_height); positions[3] = new Vector3(0 + space_width + unit_width, 0, 0 + space_height + unit_height); leader_index = 0; break; case 5: positions = GetFormation(5, Vector3.zero, 0f); leader_index = 0; break; default: for (int i = 0; i < size; i++) { positions[i] = new Vector3((i / 4) * (unit_width + space_width), 0, unit_height * (i % 4) + space_height * (i % 4)); } break; } break; } // }
public void setTo(ThreatItem other) { group = other.group; form = other.form; }
private void formData_Shown(object sender, EventArgs e) { switch (formType) { case formTypes.INFERENCELKK: this.Text = "Висновки ЛКК"; formType = formTypes.INFERENCELKK; gridInit(); this.Size = new Size(728, 372); break; case formTypes.DOCTORS: this.Text = "Лікарі"; formType = formTypes.DOCTORS; gridInit(); break; case formTypes.DEPARTMENTS: this.Text = "Відділення"; formType = formTypes.DEPARTMENTS; gridInit(); break; case formTypes.REGIONS: this.Text = "Райони"; formType = formTypes.REGIONS; gridInit(); break; case formTypes.DIAGNOSE: this.Text = "Діагнози"; formType = formTypes.DIAGNOSE; gridInit(); break; case formTypes.MEMBERSLKK: this.Text = "Комісія ЛКК"; formType = formTypes.MEMBERSLKK; gridInit(); break; } }
public void setFormType(formTypes type) { formType = type; }
private void deleteButton_Click(object sender, EventArgs e) { DialogResult deleteQuestion = MessageBox.Show("Ви дійсно бажаєте видалити запис: "+dataGridView1.CurrentCell.Value.ToString(), "Видалення запису", MessageBoxButtons.YesNo); if (deleteQuestion == DialogResult.Yes) { switch (formType) { case formTypes.INFERENCELKK: lkk.deleteData(Database.typesData.lkk, ""); this.Size = new Size(728, 372); break; case formTypes.DOCTORS: lkk.deleteData(Database.typesData.doctor, "1000"); break; case formTypes.DEPARTMENTS: formType = formTypes.DEPARTMENTS; gridInit(); break; case formTypes.REGIONS: formType = formTypes.REGIONS; gridInit(); break; case formTypes.DIAGNOSE: formType = formTypes.DIAGNOSE; gridInit(); break; } } }