Esempio n. 1
0
 private void BindOne(object objTag)
 {
     s.GlobalEventsOnComplete item = objTag as s.GlobalEventsOnComplete;
     if (item != null)
     {
         txtName.Text       = item.Name;
         txtWatchingOn.Text = item.CommaSeparatedDataSourceIds;
         nudTimeOut.Value   = item.TimeOutInMinutes == 0 ? 5 : item.TimeOutInMinutes;
         txtCommands.Text   = item.DosCommands;
     }
 }
Esempio n. 2
0
 public static GlobalEventsOnComplete ParseRawString(string rawString)
 {
     string[] commands = rawString.Split("|".ToCharArray());
     if (commands.Length == 4)
     {
         int timeOut = 5;
         int.TryParse(commands[2], out timeOut);
         GlobalEventsOnComplete gec = new GlobalEventsOnComplete(CommaToList(commands[1]), commands[0], commands[3], __IntervalMinutes, timeOut);
         return(gec);
     }
     return(null);
 }
Esempio n. 3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (btnAdd.Text == "&Add")
     {
         txtName.Text       = "new global event";
         txtWatchingOn.Text = string.Empty;
         nudTimeOut.Value   = 5;
         txtCommands.Text   = string.Empty;
         ListViewItem             item   = new ListViewItem(txtName.Text);
         s.GlobalEventsOnComplete newgec = new s.GlobalEventsOnComplete(new List <int>(), txtName.Text, txtCommands.Text, 5);
         item.Tag = newgec;
         listView.Items.Add(item);
         item.Selected = true;
         txtName.Focus();
     }
     else
     {
         btnAdd.Text = "&Add";
         Bind();
     }
 }