Пример #1
0
        private async void UserLogin(object sender, EventArgs e)
        {
            /*
             * 使用内置登录
             * var View = new LoginDialog() {
             *  DataContext = new User()
             * };
             *
             * var result = await DialogHost.Show(View, "RootDialog");
             * Console.WriteLine(result);
             */
            if (Session.ConfExists())
            {
                await Session.Restore();

                MainWindow view = new MainWindow();
                view.Show();
            }
            else
            {
                System.IO.FileStream f = System.IO.File.Create(Path.Combine(AppContext.ConfFolder, AppContext.ConfigurationFileName));
                f.Close();
                f.Dispose();
                SignInWebBrowser signIn = new SignInWebBrowser();
                signIn.Show();
            }
            this.Close();
        }
Пример #2
0
 public SignInWebBrowser()
 {
     Instance = this;
     InitializeComponent();
 }