Esempio n. 1
0
        public void edit_MouseClick(object sender, EventArgs e)
        {
            CreateEventForm form = new CreateEventForm(ec[position]);

            ec.RemoveAt(position);
            EventWriter.SerializeToXML(ec);
            form.ShowDialog();
            Control control = this.Parent;

            control.Controls.Clear();
            List <EventClass> ec2 = EventReader.DeserializeFromXML();
            int b = 0;
            int c = 0;

            for (int i = 0; i < ec2.Count; i++)
            {
                if (ec2[i].IsFinished != true)
                {
                    Event list = new Event(ec2, i);
                    if (ec2[i].IsMultiEvent == false)
                    {
                        list.Size     = new Size(300 - 2, 60);
                        list.Location = new Point(0, (b++) * 60 + c * 85 + b + c - 1);
                    }
                    else
                    {
                        list.Size     = new Size(300 - 2, 85);
                        list.Location = new Point(0, b * 60 + (c++) * 85 + b + c - 1);
                    }
                    control.Controls.Add(list);
                }
            }
            eventPanel.Visible   = true;
            controlPanel.Visible = false;
        }
Esempio n. 2
0
        public void adder_MouseClick(object sender, MouseEventArgs e)
        {
            CreateEventForm form = new CreateEventForm();

            form.ShowDialog();
            sortMethod = sortMethod == 1 ? 0 : 1;
            Sort();
        }