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


C# Settings.ShowDialog方法代码示例

本文整理汇总了C#中Settings.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Settings.ShowDialog方法的具体用法?C# Settings.ShowDialog怎么用?C# Settings.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Settings的用法示例。


在下文中一共展示了Settings.ShowDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSettings_Click

 private void btnSettings_Click(object sender, EventArgs e)
 {
     Settings settingsForm = new Settings();
      settingsForm.Game = _game;
      DialogResult result = settingsForm.ShowDialog();
      if (result == DialogResult.OK) {
     UpdateSettings();
      }
 }
开发者ID:Cappinator,项目名称:chiiilp-pbem,代码行数:9,代码来源:GameControl.cs

示例2: OnActivate

 protected override void OnActivate()
 {
     try
     {
         using (Settings form = new Settings())
         {
             if (DialogResult.OK == form.ShowDialog())
             {
             }
         }
     }
     catch (SystemException e)
     {
         MessageBox.Show(e.Message);
     }
     finally
     {
         Terminate();
     }
 }
开发者ID:unidevop,项目名称:sjtu-project-pipe,代码行数:20,代码来源:connectionSettingCommand.cs

示例3: 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

示例4: ShowSettingsDialog

 public void ShowSettingsDialog()
 {
     var view = new Settings();
     view.DataContext = this;
     view.ShowDialog();
 }
开发者ID:gitter-badger,项目名称:pecastarter5,代码行数:6,代码来源:Twitter.cs

示例5: settingsButton_Click

        private void settingsButton_Click(object sender, RoutedEventArgs e)
        {
            Settings settings = new Settings();
            if (settings.ShowDialog() == true)
            {
                UserSetting.Speed = settings.getSpeed();
                UserSetting.TimeLimit = settings.getTimeLimit();
                UserSetting.CoverageLimit = settings.getCoverageLimit();

                Console.WriteLine("Speed = " + settings.getSpeed());
                Console.WriteLine("Time = " + settings.getTimeLimit());
                Console.WriteLine("Coverage = " + settings.getCoverageLimit());
                this.timeLimit = UserSetting.TimeLimit;
                if (timeLimit > 10)
                {
                    timeLabel.Content = string.Format("0{0}:{1}", timeLimit / 60, timeLimit % 60);
                }
                else
                {
                    timeLabel.Content = string.Format("0{0}:0{1}", timeLimit / 60, timeLimit % 60);
                }
                this.speedLabel.Content = UserSetting.Speed.ToString();
                this.displayConsoleMessage("User settings changed!");
            }
        }
开发者ID:yikolyk,项目名称:MDP-Jan-2015,代码行数:25,代码来源:MainPage.xaml.cs

示例6: myButton3_Click

        private void myButton3_Click(object sender, EventArgs e)
        {
            //Settings
            Settings settings = new Settings(mp3Player,mp3Path,sp,font,TIMER_GAME,isPlaying);
            DialogResult settingsResult = settings.ShowDialog();
            if (settingsResult == System.Windows.Forms.DialogResult.Cancel)
            {
                isPlaying = settings.playing;
                TIMER_GAME = settings.timer;
                mp3Player = settings.mp3Player;
                mp3Path = settings.path;

            }
        }
开发者ID:Gago993,项目名称:TriGame,代码行数:14,代码来源:StartScreen.cs

示例7: SettingsClickEvent

 private void SettingsClickEvent(object sender, RoutedEventArgs e)
 {
     var settings = new Settings();
     settings.ShowDialog();
 }
开发者ID:aortmannm,项目名称:VideoLibrary,代码行数:5,代码来源:MainWindow.xaml.cs

示例8: ShowSettings

        public void ShowSettings(int tabindex, IWin32Window owner = null)
        {
            int pi = Conf.PreviewItems;
            var settings = new Settings { MainClass = this, InitialTab = tabindex };
            if (settings.ShowDialog(owner ?? this) == DialogResult.OK)
            {
                if (pi != Conf.PreviewItems)
                    NeedsMediaRefresh = Helper.Now;

                _pnlCameras.BackColor = Conf.MainColor.ToColor();
                notifyIcon1.Text = Conf.TrayIconText;

                if (!string.IsNullOrEmpty(Conf.Joystick.id))
                {
                    if (_jst == null)
                    {
                        _jst = new JoystickDevice();
                    }
                    _jst.ReleaseJoystick();
                    if (_tmrJoystick != null)
                    {
                        _tmrJoystick.Stop();
                        _tmrJoystick = null;
                    }

                    bool jsactive = false;
                    string[] sticks = _jst.FindJoysticks();
                    foreach (string js in sticks)
                    {
                        string[] nameid = js.Split('|');
                        if (nameid[1] == Conf.Joystick.id)
                        {
                            Guid g = Guid.Parse(nameid[1]);
                            jsactive = _jst.AcquireJoystick(g);
                        }
                    }

                    if (!jsactive)
                    {
                        _jst.ReleaseJoystick();
                        _jst = null;
                    }
                    else
                    {
                        _tmrJoystick = new Timer(100);
                        _tmrJoystick.Elapsed += TmrJoystickElapsed;
                        _tmrJoystick.Start();
                    }
                }
                else
                {
                    if (_tmrJoystick != null)
                    {
                        _tmrJoystick.Stop();
                        _tmrJoystick = null;
                    }

                    if (_jst != null)
                    {
                        _jst.ReleaseJoystick();
                        _jst = null;
                    }
                }
            }

            if (settings.ReloadResources)
            {
                RenderResources();
                LoadCommands();
            }
            AddressIPv4 = ""; //forces reload
            AddressIPv6 = "";
            settings.Dispose();
            SaveConfig();
            Refresh();
        }
开发者ID:flos-club,项目名称:iSpy,代码行数:76,代码来源:MainForm.cs

示例9: settingsToolStripMenuItem_Click

 private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var settings = new Settings();
     settings.ShowDialog();
 }
开发者ID:CAckad,项目名称:chocolatey-Explorer,代码行数:5,代码来源:PackageManager.cs

示例10: Settings

 private void настройкиToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Settings set1 = new Settings();
     set1.ShowDialog();
 }
开发者ID:NextStalker,项目名称:RegionalReport,代码行数:5,代码来源:RR.cs

示例11: btnSettings_Click

 private void btnSettings_Click(object sender, RoutedEventArgs e)
 {
     //Use this to open the settings page
     Settings SettingsForm = new Settings(this);
     SettingsForm.ShowDialog();
     SettingsForm = null;
 }
开发者ID:TannerMiddleton,项目名称:WinkyMonitor,代码行数:7,代码来源:MainWindow.xaml.cs

示例12: Window_Loaded

        private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            // Check for user settings before settings up form
            if (String.IsNullOrEmpty(SettingHelper.UserName)) {
                Settings SettingsForm = new Settings();
                SettingsForm.ShowDialog();

                if (String.IsNullOrEmpty(SettingHelper.UserName))
                    Close();
                else
                    Setup();
            } else
                Setup();
        }
开发者ID:woodhojuli,项目名称:TwitStripXaml,代码行数:14,代码来源:Main.xaml.cs

示例13: OnShowSettingsWindow

            private void OnShowSettingsWindow(object sender, EventArgs eventArgs)
            {
                if (!_settingsOpen)
                {
                    _settingsOpen = true;
                    var s = new Settings();

                    //When done changing settings, restart the observer
                    s.Closed += (o, args) =>
                        {
                            _settingsOpen = false;
                            ((MainWindow) _window).ResetObserver();
                        };

                    s.ShowDialog();
                }
            }
开发者ID:janierdavila,项目名称:Eagle,代码行数:17,代码来源:TrayMinimizer.cs

示例14: btnSettings_Click

 private void btnSettings_Click(object sender, RoutedEventArgs e)
 {
     Settings SettingsForm = new Settings();
     SettingsForm.ShowDialog();
 }
开发者ID:woodhojuli,项目名称:TwitStripXaml,代码行数:5,代码来源:Main.xaml.cs

示例15: settingsToolStripMenuItem_Click

 private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // Create a new form for editing the maze details.
     Settings settings = new Settings();
     settings.ShowDialog();
 }
开发者ID:riyaan,项目名称:ADS4,代码行数:6,代码来源:Navigator.cs


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