AuthWindow.xaml の相互作用ロジック
        private static void AuthStart()
        {
            try
            {
                AuthWindow w = new AuthWindow();
                w.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error");
            }
            if (Settings.Default.token == "")
            {
#if DEBUG
                MessageBox.Show("認証が完了していません");
#else
                MessageBoxResult result = MessageBox.Show(Properties.Resources.MsgUnAuth, Properties.Resources.Attention,
                    MessageBoxButton.YesNo, MessageBoxImage.Warning);
                if (result == MessageBoxResult.Yes)
                {
                    AuthStart();
                }
                else
                {
                    MessageBox.Show(Properties.Resources.MsgExit);
                    Environment.Exit(2);
                }
#endif
            }
        }
Ejemplo n.º 2
0
        private static void AuthStart()
        {
            try
            {
                AuthWindow w = new AuthWindow();
                w.ShowDialog();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Error");
            }
            if (Settings.Default.token == "")
            {
#if DEBUG
                MessageBox.Show("認証が完了していません");
#else
                MessageBoxResult result = MessageBox.Show(Properties.Resources.MsgUnAuth, Properties.Resources.Attention,
                                                          MessageBoxButton.YesNo, MessageBoxImage.Warning);
                if (result == MessageBoxResult.Yes)
                {
                    AuthStart();
                }
                else
                {
                    MessageBox.Show(Properties.Resources.MsgExit);
                    Environment.Exit(2);
                }
#endif
            }
        }