Exemple #1
0
        public override void ShowModule(IWin32Window owner)
        {
            // terminal last session
            try
            {
                var clientInfos = CachedUtils.GetCacheOf <ClientInfo>("LastSession");
                if (clientInfos.Count > 0)
                {
                    App.Environment.ClientInfo.SessionKey = clientInfos[0].SessionKey;
                    using (var ctrlSA = new SAController())
                    {
                        ctrlSA.TerminalCurrentSession();
                    }
                }
            }
            catch
            {
            }
            // login
            var frmOwner = (XtraForm)Parent;

            InitializeModuleData();

            App.Environment.ClientInfo.SessionKey = null;
            frmOwner.ShowDialog(owner);

            if (App.Environment.ClientInfo.SessionKey == null)
            {
                MainProcess.Close();
            }
        }