Beispiel #1
0
        /// <summary>
        /// ログイン処理を行います。
        /// </summary>
        private static void ExecuteLogin(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                var data   = (NicoLiveCommandData)e.Parameter;
                var window = new LoginWindow(data.NicoClient);

                window.ShowDialog();
            }
            catch (Exception ex)
            {
                Util.ThrowIfFatal(ex);

                Log.ErrorException(ex,
                                   "ログインに失敗しました。");
            }
        }
        /// <summary>
        /// ログイン処理を行います。
        /// </summary>
        private static void ExecuteLogin(object sender, ExecutedRoutedEventArgs e)
        {
            try
            {
                var data = (NicoLiveCommandData)e.Parameter;
                var window = new LoginWindow(data.NicoClient);

                window.ShowDialog();
            }
            catch (Exception ex)
            {
                Util.ThrowIfFatal(ex);

                Log.ErrorException(ex,
                    "ログインに失敗しました。");
            }
        }
        /// <summary>
        /// ログイン処理
        /// </summary>
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var window = new LoginWindow(this.nicoClient);

                window.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(
                    ex.Message + "\n" +
                    ex.StackTrace,
                    "エラー",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
            }
        }