示例#1
0
        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;
        }
示例#2
0
文件: Program.cs 项目: Voenkaff/Test
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     FormHello = new FormHello();
     Application.Run(FormHello);
 }
示例#3
0
        public FormCourse(FormHello formHello)
        {
            InitializeComponent();

            listOfCourses.AddRange(Courses.Get().ToArray());
            listBoxCourse.Items.AddRange(Courses.Get().ToArray());

            _formHello = formHello;
        }
示例#4
0
 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) { }
 }
示例#5
0
        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;
        }
示例#6
0
        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);
        }
示例#7
0
文件: Test.cs 项目: Voenkaff/Test
        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;
        }