Exemplo n.º 1
0
        private void добавитьДисциплинуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddCourse form = new AddCourse
            {
                Owner = this
            };

            form.ShowDialog();

            int start_top = label7.Top + (label7.Height + 10) + count_courses * (17 + 5);

            CheckBox checkBox = new CheckBox
            {
                Location = new Point(start_left, start_top),
                Name     = "checkBox" + ++count_courses,
                Size     = new Size(80, 17),
                Text     = course,
                AutoSize = true
            };

            checkBox.CheckedChanged += new EventHandler(lessonCheckBox_CheckedChanged);

            TextBox textBox = new TextBox
            {
                Location = new Point(start_text_left, start_top),
                Name     = "mark" + count_courses,
                Enabled  = false
            };

            textBox.TextChanged += new EventHandler(this.CheckNum);
            this.Controls.Add(textBox);
            this.Controls.Add(checkBox);
        }
Exemplo n.º 2
0
        private void adddis_Click(object sender, EventArgs e)
        {
            AddCourse form = new AddCourse
            {
                Owner = this
            };

            form.ShowDialog();

            int start_top = 45 + count_courses * (17 + 5);

            CheckBox checkBox = new CheckBox
            {
                Location = new Point(start_left, start_top),
                Name     = "checkBox" + ++count_courses,
                Size     = new Size(80, 17),
                Text     = course,
                AutoSize = true
            };

            checkBox.CheckedChanged += new EventHandler(lessonCheckBox_CheckedChanged);

            TextBox textBox = new TextBox
            {
                Location = new Point(start_text_left, start_top),
                Name     = "mark" + count_courses,
                Enabled  = false
            };

            textBox.TextChanged += new EventHandler(this.CheckNum);
            groupBox3.Controls.Add(textBox);
            groupBox3.Controls.Add(checkBox);
        }
Exemplo n.º 3
0
        private void сохранитьВНовыйБинарныйФайлToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog FBD = new FolderBrowserDialog();

            FBD.ShowNewFolderButton = false;
            if (FBD.ShowDialog() == DialogResult.OK)
            {
                string str = FBD.SelectedPath;
                Core.new_file = true;
                AddCourse    form = new AddCourse();
                DialogResult dr   = form.ShowDialog();
                if (dr == DialogResult.OK)
                {
                    str           += @"\" + MainMenu.text + ".bin";
                    Core.core_file = str;
                    WritingInGrid();
                }
            }
        }