Exemplo n.º 1
0
 private void monthCalendar1_DateSelected(object sender, DateRangeEventArgs e)
 {
     week = new UIModel.UIWeek(week.border,
                               EventManager.GetInstance().WeekEventsFromStartDate(monthCalendar1.SelectionRange.Start),
                               week.pictureBox);
     DrawCalendar();
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            DateTime day = week.startDay;

            day  = day.AddDays(-7);
            week = new UIModel.UIWeek(week.border,
                                      EventManager.GetInstance().WeekEventsFromStartDate(day),
                                      week.pictureBox);
            DrawCalendar();
        }
Exemplo n.º 3
0
        private void EditEventForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            week = new UIModel.UIWeek(week.border,
                                      EventManager.GetInstance().WeekEventsFromStartDate(week.startDay),
                                      week.pictureBox);
            week.Draw();

            if (main != null)
            {
                main.Update();
            }
        }
Exemplo n.º 4
0
 // add new event mode
 public EditEventForm(UIModel.UIWeek week, MainForm main)
 {
     InitializeComponent();
     this.main           = main;
     isEditMode          = false;
     this.week           = week;
     button1.Enabled     = false;
     button1.Visible     = false;
     completeButton.Text = "Добавить";
     Text = "Новое событие";
     priorityComboBox.SelectedIndex = 1;
     //this.owner = owner;
 }
Exemplo n.º 5
0
        public void doSomething()
        {
            PictureBox pictureBox = new PictureBox();

            pictureBox.Width  = flowLayoutPanel1.Width * 2;
            pictureBox.Height = flowLayoutPanel1.Height * 2;
            pictureBox.Image  = new Bitmap(pictureBox.Width, pictureBox.Height);
            flowLayoutPanel1.Controls.Add(pictureBox);
            pictureBox.MouseDoubleClick += new MouseEventHandler(pictureBox1DoubleClick);
            week = new UIModel.UIWeek(new UIModel.Border(0, 0,
                                                         pictureBox.Width, pictureBox.Height), manager.WeekEventsFromStartDate(DateTime.Today), pictureBox);
            DrawCalendar();
        }
Exemplo n.º 6
0
        // edit event mode
        public EditEventForm(Event ev, UIModel.UIWeek week) : base()
        {
            InitializeComponent();
            this.week  = week;
            isEditMode = true;
            this.ev    = ev;

            Fill(ev);

            priorityComboBox.SelectedIndex = (int)ev.Priority;
            completeButton.Text            = "Изменить";
            button1.Text = "Удалить";
            Text         = "Редактирование события";
            //TODO: notifications
        }
Exemplo n.º 7
0
 private void EditFrom_FormClosing(object sender, FormClosingEventArgs e)
 {
     DrawCalendar();
     week = new UIModel.UIWeek(week.border,
                               manager.WeekEventsFromStartDate(week.startDay), week.pictureBox);
 }