/// <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;
        }
Esempio n. 2
0
        /// <summary>
        /// Constructeur de l'application
        /// </summary>
        public frmAppli(InfoRegistration _infoReg)
        {
            p_applClass = new ApplClass();
            p_applClass.InfoReg = _infoReg;
            p_fileSchool = new SchoolFileFormat();
            p_listEcole = new SchoolCollection();

            InitializeComponent();

            // Créer une instance d'une méthode de trie de la colonne ListView et l'attribuer
            // au contrôle ListView.
            lvwColumnSorter = new SchoolCollectionSorter();
            this.lstToSchedule.ListViewItemSorter = lvwColumnSorter;
            this.lstToSchedule.ContextMenuStrip = contextMenuStrip1;
        }