Beispiel #1
0
 public void Start()
 {
     try
     {
         if (_mLicConnector != null)
         {
             _mLicConnector.Close();
             _mLicConnector = null;
         }
         _mLicConnector        = new LicConnector();
         _mLicConnector.Debug += OnDebug;
         _mLicConnector.ServerConnectionEvent += LicConnector_ServerConnectionEvent;
         _mLicConnector.MessageReceivedEvent  += LicConnector_MessageReceivedEvent;
         _mLicConnector.EncryptObject          = this;
         _mLicConnector.Client = "License Demo - 0";
         _mLicConnector.Host   = _mHost;
         _mLicConnector.Port   = _mPort;
         _mLicConnector.BeginConnect();
         _mLicMgeNum = MConnectError;
         OnDebug(LogMode.Info, string.Format("LicenseHelper started.\t{0}\t{1}", _mHost, _mPort));
     }
     catch (Exception ex)
     {
         OnDebug(LogMode.Error, string.Format("LicenseHelper start fail.\t{0}", ex.Message));
     }
 }
Beispiel #2
0
        public void Start()
        {
            try
            {
                if (mLicConnector != null)
                {
                    mLicConnector.Close();
                    mLicConnector = null;
                }
                mLicConnector        = new LicConnector();
                mLicConnector.Debug += OnDebug;
                mLicConnector.ServerConnectionEvent += LicConnector_ServerConnectionEvent;
                mLicConnector.MessageReceivedEvent  += LicConnector_MessageReceivedEvent;
                mLicConnector.EncryptObject          = this;
                mLicConnector.Client = string.Format("{0}:{1}", CurrentApp.Session.UserID, CurrentApp.Session.UserInfo.UserName);
                mLicConnector.Host   = mHost;
                mLicConnector.Port   = mPort;
                mLicConnector.BeginConnect();

                OnDebug(LogMode.Info, string.Format("LicenseHelper started.\t{0}\t{1}", mHost, mPort));
            }
            catch (Exception ex)
            {
                OnDebug(LogMode.Error, string.Format("LicenseHelper start fail.\t{0}", ex.Message));
            }
        }
Beispiel #3
0
 void MainWindow_Closing(object sender, CancelEventArgs e)
 {
     if (mLicConnector != null)
     {
         mLicConnector.Close();
         mLicConnector = null;
     }
 }
Beispiel #4
0
 void MainWindow_Closing(object sender, CancelEventArgs e)
 {
     if (mLicConnector != null)
     {
         mLicConnector.Close();
         mLicConnector = null;
     }
     if (mLicChecker != null)
     {
         mLicChecker.Close();
         mLicChecker = null;
     }
     if (mLicHelper != null)
     {
         mLicHelper.Stop();
         mLicHelper = null;
     }
 }