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; } }
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; } }
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(); } }
// クローズ 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(); }
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; } }
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; } }
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; } }
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; }
// クローズ 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(); }