Example #1
0
        void CScheduleEntryEdit(object sender, EventArgs e)
        {
            var sr  = (ScheduleRow)sender;
            var ose = sr.Ose;

            using (var see = new ScheduleEntryEditor())
            {
                see.ose = ose;
                if (see.ShowDialog(this) == DialogResult.OK)
                {
                    sr.Ose = see.ose;
                    sr.Invalidate();
                }
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var ose = new objectsScheduleEntry
            {
                objectid     = Io.ObjectID,
                objecttypeid = Io.ObjectTypeID,
                daysofweek   = "",
                parameter    = "",
                time         = (int)DateTime.Now.TimeOfDay.TotalMinutes,
                active       = true
            };

            using (var see = new ScheduleEntryEditor())
            {
                see.ose = ose;
                if (see.ShowDialog(this) == DialogResult.OK)
                {
                    MainForm.Schedule.Add(see.ose);
                    RenderSchedule();
                }
            }
        }
Example #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            var ose = new objectsScheduleEntry
            {
                objectid = Io.ObjectID,
                objecttypeid = Io.ObjectTypeID,
                daysofweek = "",
                parameter = "",
                time = (int) DateTime.Now.TimeOfDay.TotalMinutes,
                active = true
            };

            using (var see = new ScheduleEntryEditor())
            {
                see.ose = ose;
                if (see.ShowDialog(this) == DialogResult.OK)
                {
                    MainForm.Schedule.Add(see.ose);
                    RenderSchedule();
                }
            }            
        }
Example #4
0
 void CScheduleEntryEdit(object sender, EventArgs e)
 {
     var sr = (ScheduleRow)sender;
     var ose = sr.Ose;
     using (var see = new ScheduleEntryEditor())
     {
         see.ose = ose;
         if (see.ShowDialog(this) == DialogResult.OK)
         {
             sr.Ose = see.ose;
             sr.Invalidate();
         }
     }
 }