Beispiel #1
0
 private void SectionBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (SectionBox.SelectedIndex != -1)
     {
         FormAdministrator.CurrentFolder = SectionBox.SelectedTab.Text;
         ActionAdministrator.Load();
         EventsAdministrator.Load();
     }
 }
Beispiel #2
0
 public Form1()
 {
     InitializeComponent();
     FormAdministrator.main = this;
     SectionAdministrator.Load();
     if (SectionBox.TabPages.Count != 0)
     {
         FormAdministrator.CurrentFolder = SectionBox.TabPages[0].Text;
     }
     ActionAdministrator.Load();
     EventsAdministrator.Load();
 }
Beispiel #3
0
        private void ActionMouseUp(object sender, MouseEventArgs e)
        {
            int a = 0;

            if (Example != null && e.Location.X > 200)
            {
                Button         bufer       = (sender as Button);
                object         buff        = bufer.Tag;
                MyActionButton tag         = buff as MyActionButton;
                int            Top         = (((e.Location.Y + Yras - 30) / 30) * 30 + 5) + SectionBox.TabPages[a].VerticalScroll.Value;
                int            duration    = tag.Action.Duration;
                int            starthour   = hours[(Top / 30) / 12];
                int            startminute = minute[(Top / 30) % 12];
                int            endhour     = starthour + (startminute + duration) / 60;
                int            endminute   = (startminute + duration) % 60;
                Events         eve         = new Events(Example.Text, duration, tag.Action.NeedFeedback, starthour, startminute, endhour, endminute);
                EventsAdministrator.AddEvents(eve);
            }
            Example = null;
            Xras    = 0;
            Yras    = 0;
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            int  a    = SectionBox.SelectedIndex;
            Plan plan = new Plan((Sections[a].Tag as Section).Name, (Sections[a].Tag as Section).TelegaName, (Sections[a].Tag as Section).Destination, EventsAdministrator.GetEvents());

            PlanAdministrator.SendPlan(plan);
        }