public FormChooseTestName(FormHello formHello, int index) { InitializeComponent(); _formHello = formHello; _index = index; //marks = new int[3] { 0, 0, 0 }; _marks = new List <int> { 0, 0, 0 }; buttonNext.Enabled = false; textBoxMark5.TextChanged += buttonNext_checkNullMarks; textBoxMark4.TextChanged += buttonNext_checkNullMarks; textBoxMark3.TextChanged += buttonNext_checkNullMarks; textBoxUserChooseTestName.TextChanged += buttonNext_checkNullMarks; comboBoxCourse.SelectedIndexChanged += buttonNext_checkNullMarks; comboBoxCourse.Items.AddRange(Courses.Get().ToArray()); this.MinimumSize = this.Size; this.MaximumSize = this.Size; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormHello = new FormHello(); Application.Run(FormHello); }
public FormCourse(FormHello formHello) { InitializeComponent(); listOfCourses.AddRange(Courses.Get().ToArray()); listBoxCourse.Items.AddRange(Courses.Get().ToArray()); _formHello = formHello; }
public void Initialize(FormHello form) { try { var loader = new TestLoader(); var tests = loader.LoadTestsFromFolder(new DynamicParams().GetPath()); VzvodAndLs.Set(tests.PlatoonList); Courses.Set(tests.CourseList); } catch (Exception) { } }
public FormChooseVzvod(FormHello formHello) { InitializeComponent(); _formHello = formHello; foreach (var vzvod in VzvodAndLs.Get()) { listBoxVzvoda.Items.Add(vzvod.Key); } listBoxVzvoda.SelectedIndexChanged += listBoxVzvoda_SelectedIndexChanged; this.MinimumSize = this.Size; this.MaximumSize = this.Size; }
static void Main() { var runningProccess = from proc in Process.GetProcesses(".") orderby proc.Id select proc; if (runningProccess.Count(p => p.ProcessName.Contains("Voenkaff")) > 1) { MessageBox.Show("Программа уже запущена, невозможно запустить ещё один экземпляр", "Программа уже запущена", MessageBoxButtons.OK, MessageBoxIcon.Error); Environment.Exit(0); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FormHello = new FormHello(); Application.Run(FormHello); }
public Test(FormHello formHello, string testName, List <int> listMarks, string course) { InitializeComponent(); _testOperationsName = formHello.TestOperations.Name; _indexTest = formHello.ListPanelsTestsOnPanel.Count - 1; TestName = testName; ListMarks = listMarks; Course = course; this.Text = TestName; this.MinimumSize = this.Size; this.MaximumSize = this.Size; panelMiddle.Controls.Add(panelTaskStart); LinkLabel firstLL = createLinkLabel(0); ListPanelsTasks = new Dictionary <LinkLabel, PanelWrapper> { { firstLL, new PanelWrapper(panelTaskStart, 1) } }; LinkLabelButtonDel = new Dictionary <LinkLabel, Button> { { firstLL, createButtonDelTask(0) } }; ListPanelsTasks[firstLL].Entity.Name = firstLL.Text; panelQuestion.Text = "Задание №1"; panelTaskStart.Controls.Add(panelQuestion); _currentTask.Entity = panelTaskStart; _currentTask.Identifier = 1; _currentPanelQuestion.Entity = panelQuestion; panelQuestion.AllowDrop = true; panelQuestion.DragEnter += new DragEventHandler(panelQuestion_DragEnter); panelQuestion.DragDrop += new DragEventHandler(panelQuestion_DragDrop); createPasteFunc(panelQuestion); this.FormClosing += Test_Closing; }