private static void CloseSplashScreenAndCheckRegistration()
        {
            if (_splashForm != null)
            {
                if (RegistrationDialog.ShouldWeShowRegistrationDialog())
                {
                    _splashForm.Hide();             //the fading was getting stuck when we showed the registration.
                }
                _splashForm.FadeAndClose();         //it's going to hang around while it fades,
                _splashForm = null;                 //but we are done with it
            }

            if (RegistrationDialog.ShouldWeShowRegistrationDialog())
            {
                using (var dlg = new RegistrationDialog(false))
                {
                    if (_projectContext != null && _projectContext.ProjectWindow != null)
                    {
                        dlg.ShowDialog(_projectContext.ProjectWindow);
                    }
                    else
                    {
                        dlg.ShowDialog();
                    }
                }
            }
        }
 private void OnRegistrationMenuItem_Click(object sender, EventArgs e)
 {
     using (var dlg = new RegistrationDialog(true))
     {
         dlg.ShowDialog();
     }
 }
Exemple #3
0
        public MainWindow()
        {
            InitializeComponent();
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
            if (UserRepository.IsUserRegistered())
            {
                var login       = new LoginDialog();
                var loginResult = login.ShowDialog();
                if (loginResult == null || loginResult == false)
                {
                    Application.Current.Shutdown();
                }
            }
            else
            {
                var registration       = new RegistrationDialog();
                var registrationResult = registration.ShowDialog();
                if (registrationResult == null || registrationResult == false)
                {
                    Application.Current.Shutdown();
                }
            }

            model       = new MainWindowModel(new Clock());
            DataContext = model;
        }
Exemple #4
0
 private void HandleShowRegistrationDialog(ApiRequest request)
 {
     using (var dlg = new RegistrationDialog(false))
     {
         dlg.ShowDialog();
     }
     request.PostSucceeded();
 }
Exemple #5
0
 private void HandleShowRegistrationDialog(ApiRequest request)
 {
     using (var dlg = new RegistrationDialog(false, _tcManager.UserMayChangeEmail))
     {
         dlg.ShowDialog();
     }
     request.PostSucceeded();
 }
 /*************************************/
 /*   Register User                   */
 /*************************************/
 public void register()
 {
     RegistrationDialog reg = new RegistrationDialog(currForumId);
     reg.ShowDialog();
     if (reg.getUserName() != null)
     {
         loginLevel = 0;
         updateVisibilty();
         setStatusMsg("New User Was Registered!");
     }
 }