Ejemplo n.º 1
0
        /// <summary>
        /// 保存计时器信息
        /// </summary>
        /// <param name="mod"></param>
        private void SaveTimer(GroupTimer mod)
        {
            var timer = GroupTimers.Where(a => a.name == mod.name).FirstOrDefault();

            if (timer != null)
            {
                //GroupTimers.Remove(timer);
                timer = mod;
            }
            else
            {
                GroupTimers.Add(mod);
            }
            dgv_TimerList.Refresh();
        }
Ejemplo n.º 2
0
 private void SaveTimer_Load(object sender, EventArgs e)
 {
     if (model != null)
     {
         this.Title = $"编辑-{model.name}";
         txt_TimerName.InputText = model.name;
         num_Hour.Num            = model.Hour;
         num_Min.Num             = model.Min;
         num_Sec.Num             = model.Sec;
         txt_Content.Text        = model.Content;
     }
     else
     {
         model = new GroupTimer();
     }
 }
Ejemplo n.º 3
0
 public SaveTimer(GroupTimer groupTimer, IList <string> names)
 {
     InitializeComponent();
     model      = groupTimer;
     this.names = names;
 }