/// <summary> /// Contrôle la licence /// </summary> /// <param name="fromMain"></param> /// <returns></returns> public static InfoRegistration CheckRegistration(bool fromMain) { LabCommonLog.Log.Debug("Vérification de l'activation"); InfoRegistration _rInfo = new InfoRegistration(); string _pathData = ClassOutils.GetPathStart; if (!Directory.Exists(_pathData)) { Directory.CreateDirectory(_pathData); } // On fait un premier Test pour savoir si le niveau est MASTER TrialMaker t = new TrialMaker(AssemblyAccess.AssemblyProduct, LibLabo.LabRegistration.Constantes.NB_DAYS, LibLabo.LabRegistration.Constantes.NB_RUNS, ClassOutils.GetMailTo, LibLabo.LabRegistration.Constantes.ID_PLFULL, LibLabo.LabRegistration.Constantes.ID_PLLIGHT, fromMain); byte[] MyOwnKey = { 97, 250, 1, 5, 84, 21, 7, 63, 4, 54, 87, 56, 123, 10, 3, 62, 7, 9, 20, 36, 37, 21, 101, 57}; t.TripleDESKey = MyOwnKey; _rInfo.RType = t.ShowDialog(); _rInfo.ComputerID = t.GetcomputerID(); _rInfo.RegType = t.RegType; if (_rInfo.RType != TrialMaker.RunTypes.Expired) { if (_rInfo.RType == TrialMaker.RunTypes.Registered) { _rInfo.ModeTrial = false; } else { _rInfo.ModeTrial = true; } } return _rInfo; }
public static InfoRegistration CheckRegistration(bool fromMain) { Log.Info("Registration Control"); InfoRegistration _rInfo = new InfoRegistration(); string _pathData = ClassOutils.GetPathStart; if (!Directory.Exists(_pathData)) { Directory.CreateDirectory(_pathData); } TrialMaker t = new TrialMaker(AssemblyAccess.AssemblyProduct, LibLabo.LabRegistration.Constantes.NB_DAYS, LibLabo.LabRegistration.Constantes.NB_RUNS, ClassOutils.GetMailTo, LibLabo.LabRegistration.Constantes.ID_SLFULL, LibLabo.LabRegistration.Constantes.ID_SLLIGHT, fromMain); byte[] MyOwnKey = { 97, 250, 1, 5, 84, 21, 7, 63, 4, 54, 87, 56, 123, 10, 3, 62, 7, 9, 20, 36, 37, 21, 101, 57}; t.TripleDESKey = MyOwnKey; _rInfo.RType = t.ShowDialog(); _rInfo.ComputerID = t.GetcomputerID(); _rInfo.RegType = t.RegType; _rInfo.DateExp = t.GetDateExp; if (_rInfo.RType != TrialMaker.RunTypes.Expired) { if (_rInfo.RType == TrialMaker.RunTypes.Registered) { _rInfo.ModeTrial = false; } else { _rInfo.ModeTrial = true; } } Log.Debug("RunType : " + _rInfo.RType.ToString()); Log.Debug("RegType : " + _rInfo.RegType.ToString()); return _rInfo; }