Exemplo n.º 1
0
        private void HourRectangle_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (Bot.GlobalSettings.Schedule.ActionList == null)
            {
                Bot.GlobalSettings.Schedule.ActionList = new List <ScheduleAction>();
            }

            var rec  = sender as Rectangle;
            var indx = rec?.Tag as Tuple <int, int>;

            if (indx == null)
            {
                return;
            }


            var sae = new ScheduleActionEditor
            {
                Day  = indx.Item1,
                Hour = indx.Item2
            };

            TranslationEngine.ApplyLanguage(sae);

            sae.SetSchedule(this);
            ScheduleControlGrid.Children.Add(sae);
            _sae = sae;
        }
Exemplo n.º 2
0
 public void CloseSae()
 {
     if (_sae == null)
     {
         return;
     }
     ScheduleControlGrid.Children.Remove(_sae);
     _sae = null;
     RefreshSchedule(_schedule, Bot.GlobalSettings.Schedule.ActionList);
 }