Пример #1
0
        private void Load_Click(object sender, RoutedEventArgs e)
        {
            PlayButtonSound.Play();
            var dialog = new DialogWindow.DialogWindow(
                Properties.Resources.LayoutWindowLoadTitle,
                Properties.Resources.LayoutWindowLoadMessage,
                DialogWindow.DialogWindow.DialogStyle.ORIGINAL);

            if (!vLayoutControl.LayoutFileExists(1))
            {
                dialog.Botton1.IsEnabled = false;
            }
            if (!vLayoutControl.LayoutFileExists(2))
            {
                dialog.Botton2.IsEnabled = false;
            }
            var result = dialog.ShowDialog();
            var ret    = dialog.result;

            switch (ret)
            {
            case 1:
            case 2:
                layoutDic = vLayoutControl.LoadLayout((int)ret);
                // 現在のレイアウトをいったん保存しておく
                vLayoutControl.SaveLayout(9, layoutDic);
                SetButtonLayout();
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void Cancel_Click(object sender, RoutedEventArgs e)
        {
            PlayButtonSound.Play();
            var dialog = new DialogWindow.DialogWindow(
                Properties.Resources.LayoutWindowCloseTitle,
                Properties.Resources.LayoutWindowCloseMessage,
                DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
            var result = dialog.ShowDialog();

            if (result == true)
            {
                DialogResult = true;
            }
        }
Пример #3
0
        private void Reset_Click(object sender, RoutedEventArgs e)
        {
            PlayButtonSound.Play();
            var dialog = new DialogWindow.DialogWindow(
                Properties.Resources.LayoutWindowResetTitle,
                Properties.Resources.LayoutWindowResetMessage,
                DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
            var result = dialog.ShowDialog();

            if (result == true)
            {
                layoutDic = vLayoutControl.LoadLayout(9);
                SetButtonLayout();
            }
        }
Пример #4
0
        // クローズ
        public void ExitUp(object sender, vGamePadEventArgs e)
        {
            DefaultUp(sender, e);
            // 確認ダイアログを表示する
            DialogWindow.DialogWindow dialog = new DialogWindow.DialogWindow(
                Properties.Resources.DialogTitle,
                Properties.Resources.ExitApplication,
                DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
            Hide();
            bool?result = dialog.ShowDialog();

            if (result == true)
            {
                Close();
                return;
            }
            Show();
        }
Пример #5
0
 private void Create_Click(object sender, RoutedEventArgs e)
 {
     PlayButtonSound.Play();
     // レイアウトモードに移行してもよいかの確認
     var dialog = new DialogWindow.DialogWindow(
         Properties.Resources.LayoutSelectTitle,
         Properties.Resources.LayoutSelectMessage,
         DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
     var ret = dialog.ShowDialog();
     if (ret == true)
     {
         var configWindow = (ConfigWindow)Window.GetWindow(this);
         configWindow.ConfigGrid.Visibility = System.Windows.Visibility.Hidden;
         // レイアウト作成モードに移行
         // レイアウトモードは上にコマンドエリアを表示
         var layoutWindow = new LayoutWindow();
         layoutWindow.ShowDialog();
         configWindow.ConfigGrid.Visibility = System.Windows.Visibility.Visible;
     }
 }
Пример #6
0
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            PlayButtonSound.Play();
            var dialog = new DialogWindow.DialogWindow(
                Properties.Resources.LayoutWindowSaveTitle,
                Properties.Resources.LayoutWindowSaveMessage,
                DialogWindow.DialogWindow.DialogStyle.ORIGINAL);
            var result = dialog.ShowDialog();
            var ret    = dialog.result;

            switch (ret)
            {
            case 1:
            case 2:
                vLayoutControl.SaveLayout((int)ret, layoutDic);
                break;

            default:
                break;
            }
        }
Пример #7
0
        private void Create_Click(object sender, RoutedEventArgs e)
        {
            PlayButtonSound.Play();
            // レイアウトモードに移行してもよいかの確認
            var dialog = new DialogWindow.DialogWindow(
                Properties.Resources.LayoutSelectTitle,
                Properties.Resources.LayoutSelectMessage,
                DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
            var ret = dialog.ShowDialog();

            if (ret == true)
            {
                var configWindow = (ConfigWindow)Window.GetWindow(this);
                configWindow.ConfigGrid.Visibility = System.Windows.Visibility.Hidden;
                // レイアウト作成モードに移行
                // レイアウトモードは上にコマンドエリアを表示
                var layoutWindow = new LayoutWindow();
                layoutWindow.ShowDialog();
                configWindow.ConfigGrid.Visibility = System.Windows.Visibility.Visible;
            }
        }
Пример #8
0
 private void Save_Click(object sender, RoutedEventArgs e)
 {
     PlayButtonSound.Play();
     var dialog = new DialogWindow.DialogWindow(
         Properties.Resources.LayoutWindowSaveTitle,
         Properties.Resources.LayoutWindowSaveMessage,
         DialogWindow.DialogWindow.DialogStyle.ORIGINAL);
     var result = dialog.ShowDialog();
     var ret = dialog.result;
     switch (ret)
     {
         case 1:
         case 2:
             vLayoutControl.SaveLayout((int)ret, layoutDic);
             break;
         default:
             break;
     }
 }
Пример #9
0
 private void Reset_Click(object sender, RoutedEventArgs e)
 {
     PlayButtonSound.Play();
     var dialog = new DialogWindow.DialogWindow(
         Properties.Resources.LayoutWindowResetTitle,
         Properties.Resources.LayoutWindowResetMessage,
         DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
     var result = dialog.ShowDialog();
     if (result == true)
     {
         layoutDic = vLayoutControl.LoadLayout(9);
         SetButtonLayout();
     }
 }
Пример #10
0
 private void Load_Click(object sender, RoutedEventArgs e)
 {
     PlayButtonSound.Play();
     var dialog = new DialogWindow.DialogWindow(
         Properties.Resources.LayoutWindowLoadTitle,
         Properties.Resources.LayoutWindowLoadMessage,
         DialogWindow.DialogWindow.DialogStyle.ORIGINAL);
     if (!vLayoutControl.LayoutFileExists(1))
         dialog.Botton1.IsEnabled = false;
     if (!vLayoutControl.LayoutFileExists(2))
         dialog.Botton2.IsEnabled = false;
     var result = dialog.ShowDialog();
     var ret = dialog.result;
     switch (ret)
     {
         case 1:
         case 2:
             layoutDic = vLayoutControl.LoadLayout((int)ret);
             // 現在のレイアウトをいったん保存しておく
             vLayoutControl.SaveLayout(9, layoutDic);
             SetButtonLayout();
             break;
         default:
             break;
     }
 }
Пример #11
0
 private void Cancel_Click(object sender, RoutedEventArgs e)
 {
     PlayButtonSound.Play();
     var dialog = new DialogWindow.DialogWindow(
         Properties.Resources.LayoutWindowCloseTitle,
         Properties.Resources.LayoutWindowCloseMessage,
         DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
     var result = dialog.ShowDialog();
     if (result == true)
         DialogResult = true;
 }
Пример #12
0
 // クローズ
 public void ExitUp(object sender, vGamePadEventArgs e)
 {
     DefaultUp(sender, e);
     // 確認ダイアログを表示する
     DialogWindow.DialogWindow dialog = new DialogWindow.DialogWindow(
         Properties.Resources.DialogTitle,
         Properties.Resources.ExitApplication,
         DialogWindow.DialogWindow.DialogStyle.OKCANCEL);
     Hide();
     bool? result = dialog.ShowDialog();
     if (result == true)
     {
         Close();
         return;
     }
     Show();
 }