コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Action action = new Action(textBox1.Text, int.Parse(textBox2.Text), checkBox1.Checked);

            ActionAdministrator.AddAction(action);
            this.Close();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: Darker1198/MyDiploma
 private void SectionBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (SectionBox.SelectedIndex != -1)
     {
         FormAdministrator.CurrentFolder = SectionBox.SelectedTab.Text;
         ActionAdministrator.Load();
         EventsAdministrator.Load();
     }
 }
コード例 #3
0
ファイル: Form1.cs プロジェクト: Darker1198/MyDiploma
 public Form1()
 {
     InitializeComponent();
     FormAdministrator.main = this;
     SectionAdministrator.Load();
     if (SectionBox.TabPages.Count != 0)
     {
         FormAdministrator.CurrentFolder = SectionBox.TabPages[0].Text;
     }
     ActionAdministrator.Load();
     EventsAdministrator.Load();
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: Darker1198/MyDiploma
        private void черговийІнститутуToolStripMenuItem_Click(object sender, EventArgs e)
        {
            BinaryFormatter formatter = new BinaryFormatter();

            using (FileStream fs = new FileStream(FormAdministrator.CategoriesFolder + "cherg.bin", FileMode.OpenOrCreate))
            {
                if (fs.Length != 0)
                {
                    List <Action> bufer = (List <Action>)formatter.Deserialize(fs);
                    foreach (Action a in bufer)
                    {
                        ActionAdministrator.AddAction(a);
                    }
                }
            }
        }