示例#1
0
        public LoginControl()
        {
            Current = this;
            this.InitializeComponent();

            TitleStr      = InitTitlestr;
            reply_msg     = "";
            LoginUserInfo = "";
            Username      = "";
            Password      = "";
            CurrentState  = LoginUIState.Waiting;

            LoggingSystem.LoggingSystem.SystemControl.ReturnDataEvent += LoginInfoDataHandler;
            UINFOSaver = new UserPassSaver_Roam();
            {
                string username = "", password = "";
                UINFOSaver.Load(ref username, ref password);
                if (username != "" && password != "")
                {
                    Username = username;
                    Password = password;
                    SavePassword.IsChecked = true;
                }
            }
        }
示例#2
0
        protected async override void OnActivated(IActivatedEventArgs args)
        {
            if (ShowInfo.Current == null)
            {
                App.Current.Exit(); return;
            }
            RegisterExceptionHandlingSynchronizationContext();
            if (args.Kind == ActivationKind.Protocol)
            {
                var protocalArgs = (ProtocolActivatedEventArgs)args;
                //check:
                if (protocalArgs.Uri.Scheme != "njuloginapp")
                {
                    return;
                }
                switch (protocalArgs.Uri.Authority.ToLower())
                {
                case "saveofflinecontent":
                    DataFetcher        tempFetcher = new DataFetcher();
                    UserPassSaver_Roam tempUPS_R = new UserPassSaver_Roam();
                    string             uname = "", upass = "";
                    tempUPS_R.Load(ref uname, ref upass);
                    if (uname != null && uname != "")
                    {
                        await tempFetcher.SaveOfflineDebuggingContent(uname, upass);
                    }
                    break;

                case "testmode":
                    ShowSettings.Current.ShowTestModeSetting();
                    break;

                case "toasttest":
                    ToastsDef.SendNotification_TwoString("Test", "通知测试");
                    break;

                default:
                    break;
                }
            }
        }