当前位置: 首页>>代码示例>>C#>>正文


C# Settings.Show方法代码示例

本文整理汇总了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();
        }
开发者ID:Injac,项目名称:WNSNotifier,代码行数:13,代码来源:MainViewModel.cs

示例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();
        }
开发者ID:ksucase,项目名称:wumpus,代码行数:30,代码来源:Index.cs

示例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();
 }
开发者ID:GufCab,项目名称:Semester-Projekt---PC-Program,代码行数:10,代码来源:MainWindow.xaml.cs

示例4: SettingsBTN_click

 private void SettingsBTN_click(object sender, EventArgs e)
 {
     Settings set = new Settings();
     set.Show();
 }
开发者ID:returnzork,项目名称:BackupV3,代码行数:5,代码来源:Form1.cs

示例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;
//.........这里部分代码省略.........
开发者ID:Dessix,项目名称:TUM.CMS.VPLControl,代码行数:101,代码来源:RadialContentMenu.cs

示例6: button1_Click

 private void button1_Click(object sender, EventArgs e)
 {
     var setting = new Settings();
     setting.Show();
 }
开发者ID:AlexeyKorkoza,项目名称:Course-Work,代码行数:5,代码来源:Main.cs

示例7: Settings_Click

 private void Settings_Click(object sender, RoutedEventArgs e)
 {
     Settings settingsWindow = new Settings();
       settingsWindow.Show();
 }
开发者ID:naviln,项目名称:Solforge-Helper,代码行数:5,代码来源:MainWindow.xaml.cs

示例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();
 }
开发者ID:Rhatje,项目名称:wpfTetris,代码行数:11,代码来源:MainWindow.xaml.cs

示例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);
            }
        }
开发者ID:Rhatje,项目名称:wpfTetris,代码行数:45,代码来源:MainWindow.xaml.cs

示例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();
     }
 }
开发者ID:shafe123,项目名称:MovieRoulette,代码行数:12,代码来源:MainWindow.xaml.cs

示例11: SettingsExecute

 private void SettingsExecute()
 {
     Settings s = new Settings();
     s.Show();
 }
开发者ID:ruba1987,项目名称:GW2EventMonitor,代码行数:5,代码来源:MainViewModel.cs

示例12: cmiSettings_Click

 private void cmiSettings_Click(object sender, RoutedEventArgs e)
 {
     Settings settingsWindow = new Settings();
     settingsWindow.Show();
     settingsWindow.Closed += settingsWindow_Closed;
 }
开发者ID:yuriCarlos,项目名称:Spofy,代码行数:6,代码来源:MainWindow.xaml.cs

示例13: settings_btn_Click

 private void settings_btn_Click(object sender, EventArgs e)
 {
     Settings settings_form = new Settings(this);
     settings_form.Show();
 }
开发者ID:Ckrag,项目名称:Havecentre,代码行数:5,代码来源:Havecentre.cs


注:本文中的Settings.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。