Exemple #1
0
 private void DeviceManage_Load(object sender, EventArgs e)
 {
     //Control.CheckForIllegalCrossThreadCalls = false;
     dm = new DeviceManageUI(this);
     AttachEvents();
     UserSessionChecker();
 }
Exemple #2
0
 //System.Timers.Timer _CheckTimer;
 private void DeviceManage_Load(object sender, EventArgs e)
 {
     aboutTempCentreToolStripMenuItem.Text = Common.Versions == Versions.SoftwareVersions.Pro ? "About TempCentre" : "About TempCentre Lite";
     this.Width  = Screen.PrimaryScreen.WorkingArea.Width;
     this.Height = (Screen.PrimaryScreen.WorkingArea.Height);
     this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
     this.dm = new DeviceManageUI(this);
     dm.ViewManager.ShowAdminForm += new EventHandler(ShowAdmin);
     dm.DataManager.ShowAdminForm += new EventHandler(ShowAdmin);
     OnDeviceChange += new EventHandler(dm.ViewManager.DisconnectDeviceOnRemove);
     if (Platform.TrialValidation.IsProductKeyExist())
     {
         activeTempCentreToolStripMenuItem.Visible = true;
     }
     else
     {
         activeTempCentreToolStripMenuItem.Visible = false;
     }
     if (Common.Versions == SoftwareVersions.Pro)
     {
         if (!Platform.TrialValidation.IsValidated())
         {
             TrialValidation trial = new TrialValidation();
             trial.ShowDialog();
             if (!trial.Validated)
             {
                 this.Close();
             }
             else
             {
                 trial.Close();
                 trial.Dispose();
             }
         }
         InitIdle();
     }
     else
     {
         if (activeTempCentreToolStripMenuItem != null)
         {
             activeTempCentreToolStripMenuItem.Visible = false;
         }
     }
 }