private void LogonOk()
        {
            // flip back - we're not on the right thread...
            this.Dispatcher.BeginInvoke(delegate()
            {
                // save...
                if (this.checkRememberMe.IsChecked.Value)
                {
                    SimpleXmlPropertyBag settings = SixBookmarksRuntime.Current.Settings;
                    settings[UsernameKey]         = this.textUsername.Text.Trim();
                    settings[PasswordKey]         = this.textPassword.Password.Trim();
                    settings.Save();
                }
                else
                {
                    this.ClearCredentials();
                }

                // do sync will come here...
                Sync sync = new Sync();
                sync.DoSync(delegate() {
                    // we worked...
                    Dispatcher.BeginInvoke(delegate()
                    {
                        NavigationService.Navigate(new Uri("/NavigatorPage.xaml", UriKind.RelativeOrAbsolute));
                    });
                }, Alert.GetFailedHandler(this));
            });
        }
        void finish_Click(object sender, EventArgs e)
        {
            // sync...
            Sync sync = new Sync();
            sync.DoSync((Action)delegate()
            {
                Dispatcher.BeginInvoke((Action)delegate()
                {
                    NavigationService.Navigate(new Uri("/NavigatorPage.xaml", UriKind.RelativeOrAbsolute));
                });

            }, Alert.GetFailedHandler(this));
        }
示例#3
0
        void finish_Click(object sender, EventArgs e)
        {
            // sync...
            Sync sync = new Sync();

            sync.DoSync((Action) delegate()
            {
                Dispatcher.BeginInvoke((Action) delegate()
                {
                    NavigationService.Navigate(new Uri("/NavigatorPage.xaml", UriKind.RelativeOrAbsolute));
                });
            }, Alert.GetFailedHandler(this));
        }
        private void LogonOk()
        {
            // flip back - we're not on the right thread...
            this.Dispatcher.BeginInvoke(delegate()
            {
                // save...
                if (this.checkRememberMe.IsChecked.Value)
                {
                    SimpleXmlPropertyBag settings = SixBookmarksRuntime.Current.Settings;
                    settings[UsernameKey] = this.textUsername.Text.Trim();
                    settings[PasswordKey] = this.textPassword.Password.Trim();
                    settings.Save();
                }
                else
                    this.ClearCredentials();

                // do sync will come here...
                Sync sync = new Sync();
                sync.DoSync(delegate() { 

                    // we worked...
                    Dispatcher.BeginInvoke(delegate()
                    {
                        NavigationService.Navigate(new Uri("/NavigatorPage.xaml", UriKind.RelativeOrAbsolute));
                    });

                }, Alert.GetFailedHandler(this));
            });
        }