예제 #1
0
 public void SetGrid(LogonsList data)
 {
     code        = data.OverrideCode;
     MaxLogons   = data.MaxLogons;
     Usertype    = data.UserType;
     label2.Text = (Usertype == UT.Student) ? string.Format(label2.Text, MaxLogons) : "Check you logged on to these computers";
     foreach (trackerlogentrysmall entry in data.Logons)
     {
         dataGridView1.Rows.Add(entry.ComputerName, entry.DomainName, DateTime.Parse(entry.LogOnDateTime).ToString("f"), "Logoff");
     }
     CheckCount();
 }
예제 #2
0
파일: Loading.cs 프로젝트: techienickb/hap
 void c_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     closing = true;
     if (e.Error == null)
     {
         LogonsList list = JsonConvert.DeserializeObject <LogonsList>(e.Result);
         if (list.Logons.Length > 0)
         {
             Background bg = new Background();
             bg.Main.SetGrid(list);
             bg.Main.baseurl = baseurl;
             bg.ShowDialog(this);
         }
     }
     if (action == Action.Logon)
     {
         Process proc = new Process();
         proc.StartInfo.FileName  = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "HAP Logon Tracker Notifier.exe");
         proc.StartInfo.Arguments = baseurl;
         proc.Start();
     }
     Close();
 }