示例#1
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public Counter()
 {
     customerDetail = new UserInfoViewer();
     this.InitializeComponent();
     this.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - (this.Height + 50);
     this.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - (this.Width + 10);
     timeCounter.Interval = new TimeSpan(0, 0, 59);
     counterNumber = Properties.Settings.Default.CounterNumber;
     timeCounter.Start();
     this.Closing += new System.ComponentModel.CancelEventHandler(Counter_Closing);
     counterWindow = this;
 }
示例#2
0
 /// <summary>
 /// With User Information
 /// </summary>
 /// <param name="userinfo"></param>
 public static void CounterWindow(UserInfoViewer loggedInUserInfo)
 {
     Counter counterWindow = new Counter();
     counterWindow.customerDetail = loggedInUserInfo;
     MiraculousMethods.conterInformation.CustomerID = loggedInUserInfo.Username;
     MiraculousMethods.conterInformation.Status = CounterStatus.Busy;
     if (String.IsNullOrEmpty(loggedInUserInfo.TeamName) || String.IsNullOrWhiteSpace(loggedInUserInfo.TeamName))
     {
         counterWindow.userLoginTimer();
     }
     else
     {
         counterWindow.teamLoginTimer();
     }
     counterWindow.Show();
 }