コード例 #1
0
ファイル: Main.cs プロジェクト: burstas/rmps
        private void DoSignIn(string view)
        {
            DefaultApp = new TApp { Id = "WPwd", Type = "app", NeedAuth = true };
            //Pcs.WPcs wPwd = new Pcs.WPcs(this, _UserModel);
            Pwd.WPwd wPwd = new Pwd.WPwd(this, _UserModel);
            wPwd.Show();
            wPwd.Init();
            DefaultApp.App = wPwd;
            //DefaultApp.App.Show();
            CurrentApp = DefaultApp;

            Visible = false;

            if (Settings.Default.Pattern == CApp.PATTERN_TRAY)
            {
                ShowTray();
            }
            else
            {
                ShowGuid();
            }

            if (DefaultApp.App != null)
            {
                DefaultApp.App.Focus();
            }

            LoadApps();
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: burstas/rmps
        /// <summary>
        /// 应用加载
        /// </summary>
        private void LoadApps()
        {
            _Apps = new List<TApp>();

            string path = Path.Combine(_UserModel.DatHome, "App.xml");
            if (!File.Exists(path))
            {
                return;
            }

            StreamReader reader = File.OpenText(path);
            XmlDocument doc = new XmlDocument();
            doc.Load(reader);
            reader.Close();

            TApp tApp;
            foreach (XmlNode node in doc.SelectNodes("/Amon/Apps/App"))
            {
                tApp = new TApp();
                tApp.FromXml(node);
                if (!tApp.IsDefault)
                {
                    _Apps.Add(tApp);
                }
            }

            _Amon.LoadMenu(_Apps);
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: burstas/rmps
        public void ShowIApp(TApp tApp)
        {
            if (tApp == null)
            {
                return;
            }

            IApp iApp = tApp.App;
            if (iApp != null && iApp.Visible)
            {
                iApp.Activate();
                return;
            }

            _TApp = tApp;
            if (!tApp.NeedAuth)
            {
                DoShowIApp("");
                return;
            }

            CheckUser(new AmonHandler<string>(DoShowIApp));
        }