Inheritance: System.Windows.Window
        private void ShowLoginWindowIfNeeded()
        {
            Messenger.Default.Register<CloseLoginWindow>(this, (msg) =>
            {
                _loginWindow.Close();
                _loginWindow = null;

                if(msg.ContinueProcessing)
                {
                    var clipboardService = ServiceLocator.Current.GetInstance<IClipboardService>();
                    clipboardService.GetPublicLinkAndStore();
                }
            });

            var configurationService = ServiceLocator.Current.GetInstance<IConfigurationService>();
            if(configurationService.GetValue<int>("IsConfigured") == 0)
            {
                _loginWindow = new LoginWindow();
                _loginWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                _loginWindow.ShowDialog();
            }
        }
Exemple #2
0
        private void ShowLoginWindowIfNeeded()
        {
            Messenger.Default.Register <CloseLoginWindow>(this, (msg) =>
            {
                _loginWindow.Close();
                _loginWindow = null;

                if (msg.ContinueProcessing)
                {
                    var clipboardService = ServiceLocator.Current.GetInstance <IClipboardService>();
                    clipboardService.GetPublicLinkAndStore();
                }
            });

            var configurationService = ServiceLocator.Current.GetInstance <IConfigurationService>();

            if (configurationService.GetValue <int>("IsConfigured") == 0)
            {
                _loginWindow = new LoginWindow();
                _loginWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                _loginWindow.ShowDialog();
            }
        }