本文整理汇总了C#中Settings.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Settings.Show方法的具体用法?C# Settings.Show怎么用?C# Settings.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Settings
的用法示例。
在下文中一共展示了Settings.Show方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowSettingsWnd
/// <summary>
/// Shows the settings WND.
/// </summary>
private void ShowSettingsWnd()
{
WNSNotifier.Settings wnd = new Settings();
wnd.WindowStartupLocation = WindowStartupLocation.CenterOwner;
wnd.Owner = App.Current.MainWindow;
wnd.Show();
}
示例2: Initialize
/// <summary>
/// Allows the game to perform any initialization it needs to before starting to run.
/// This is where it can query for any required services and load any non-graphic
/// related content. Calling base.Initialize will enumerate through any components
/// and initialize them as well.
/// </summary>
protected override void Initialize()
{
// TODO: Add your initialization logic here
//Get the Settings to init the game
_settings = new Settings();
// DMC - enhanced ability to exit gracefully.....
// _settings.ShowDialog();
System.Windows.Forms.DialogResult res = _settings.ShowDialog();
if (res != System.Windows.Forms.DialogResult.OK)
{
userCancelled = true;
return;
}
_settings.Show();
//Init the game
_Wumpus = new Game(_settings,this.Content,_settings.posX, _settings.posY);
//Prepare Screen
InitGraphicsMode(500, 500, false);
base.Initialize();
}
示例3: Settings_OnClick
/// <summary>
/// Shows settings window when "settings" button is pressed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Settings_OnClick(object sender, RoutedEventArgs e)
{
settingsw = new Settings();
settingsw.Show();
}
示例4: SettingsBTN_click
private void SettingsBTN_click(object sender, EventArgs e)
{
Settings set = new Settings();
set.Show();
}
示例5: radialMenuitem_Click
private void radialMenuitem_Click(object sender, RoutedEventArgs e)
{
var item = sender as RadialMenuItem;
if (item != null)
{
var bBox = new Rect();
if (item.Name.Contains("Align"))
bBox = Node.GetBoundingBoxOfNodes(HostCanvas.SelectedNodes.ToList());
switch (item.Name)
{
case "MenuNew":
HostCanvas.NewFile();
break;
case "MenuOpen":
HostCanvas.OpenFile();
break;
case "MenuSave":
HostCanvas.SaveFile();
break;
case "MenuSettings":
var window = new Settings();
window.VplPropertyGrid.SelectedObject = HostCanvas.Theme;
window.Show();
break;
case "MenuZoomToFit":
// fit pan
bBox = Node.GetBoundingBoxOfNodes(HostCanvas.NodeCollection.ToList());
var deltaX = (bBox.Left + bBox.Width/2) - HostCanvas.ActualWidth/2;
var deltaY = (bBox.Top + bBox.Height/2) - HostCanvas.ActualHeight/2;
foreach (var node in HostCanvas.NodeCollection)
{
node.Left -= deltaX;
node.Top -= deltaY;
}
HostCanvas.Refresh();
// fit scale
bBox = Node.GetBoundingBoxOfNodes(HostCanvas.NodeCollection.ToList());
var ratioX = bBox.Width/HostCanvas.ActualWidth;
var ratioY = bBox.Height/HostCanvas.ActualHeight;
var ratio = Math.Max(ratioX, ratioY);
//ratio =Math.Ceiling(ratio*10)/10-1;
ratio -= 1;
if (ratio < 0)
{
HostCanvas.DoZoomIn(new Point(HostCanvas.ActualWidth/2, HostCanvas.ActualHeight/2),
Math.Abs(ratio));
}
else
{
HostCanvas.DoZoomOut(new Point(HostCanvas.ActualWidth/2, HostCanvas.ActualHeight/2),
Math.Abs(ratio) + 0.3);
}
HostCanvas.Refresh();
// fit pan
bBox = Node.GetBoundingBoxOfNodes(HostCanvas.NodeCollection.ToList());
deltaX = (bBox.Left + bBox.Width/2) - HostCanvas.ActualWidth/2;
deltaY = (bBox.Top + bBox.Height/2) - HostCanvas.ActualHeight/2;
foreach (var node in HostCanvas.NodeCollection)
{
node.Left -= deltaX;
node.Top -= deltaY;
}
HostCanvas.Refresh();
break;
case "MenuAlign":
InitializeAlignMenuItems();
Items = alignMenuItems;
break;
case "MenuGroup":
HostCanvas.GroupNodes();
break;
case "MenuHelp":
break;
case "AlignLeft":
foreach (var node in HostCanvas.SelectedNodes)
node.Left = bBox.Left;
break;
case "AlignHCenter":
foreach (var node in HostCanvas.SelectedNodes)
node.Left = bBox.Right - bBox.Width/2 - node.ActualWidth/2;
break;
case "AlignRight":
foreach (var node in HostCanvas.SelectedNodes)
node.Left = bBox.Right - node.ActualWidth;
//.........这里部分代码省略.........
示例6: button1_Click
private void button1_Click(object sender, EventArgs e)
{
var setting = new Settings();
setting.Show();
}
示例7: Settings_Click
private void Settings_Click(object sender, RoutedEventArgs e)
{
Settings settingsWindow = new Settings();
settingsWindow.Show();
}
示例8: Option_Click
/// <summary>
/// Click event on Options
/// Opens the option Window
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void Option_Click(object sender, RoutedEventArgs e)
{
Settings set = new Settings(this);
set.Show();
}
示例9: App_Click
/// <summary>
/// FunctionButtons
/// </summary>
/// <param name="sender">MinMaxClose</param>
/// <param name="e"></param>
private void App_Click(object sender, RoutedEventArgs e)
{
Ellipse knop = (Ellipse)sender;
if (knop.Name == "ellClose")
{
Application currentApp = Application.Current;
currentApp.Shutdown();
}
if (knop.Name == "ellMin")
{
WindowState = WindowState.Minimized;
}
if (knop.Name == "ellOptions")
{
Pause_Game(true);
set = new Settings(this);
set.Closed += set_Closed;
set.Owner = this;
set.Show();
}
if (knop.Name == "ellShift")
{
if (MultiPlayer.Visibility == Visibility.Collapsed)
{
MultiPlayer.Visibility = Visibility.Visible;
ellShift.Fill = new ImageBrush(Imaging.CreateBitmapSourceFromHBitmap(Properties.Resources.Knop_Pijl_Links_4.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()));
btnConnect_Click(null,null);
}
else
{
MultiPlayer.Visibility = Visibility.Collapsed;
ellShift.Fill = new ImageBrush(Imaging.CreateBitmapSourceFromHBitmap(Properties.Resources.Knop_Pijl_Rechts_4.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()));
}
}
if (knop.Name == "ellPause")
{
Pause_Game(_xrun);
}
}
示例10: SettingsButton_Click
private void SettingsButton_Click(object sender, RoutedEventArgs e)
{
if (App.Current.Windows.Count == 1)
{
Settings newWindow = new Settings();
newWindow.Show();
}
else
{
App.Current.Windows[1].Focus();
}
}
示例11: SettingsExecute
private void SettingsExecute()
{
Settings s = new Settings();
s.Show();
}
示例12: cmiSettings_Click
private void cmiSettings_Click(object sender, RoutedEventArgs e)
{
Settings settingsWindow = new Settings();
settingsWindow.Show();
settingsWindow.Closed += settingsWindow_Closed;
}
示例13: settings_btn_Click
private void settings_btn_Click(object sender, EventArgs e)
{
Settings settings_form = new Settings(this);
settings_form.Show();
}