Пример #1
0
        public static bool RunLauncherDialog(IWin32Window dialogOwner)
        {
            bool bOk;

            using (LaunchCsgoForm frm = new LaunchCsgoForm())
            {
                frm.Config = GlobalConfig.Instance.Settings.LauncherCsgo;

                if (DialogResult.OK == frm.ShowDialog(dialogOwner))
                {
                    CfgLauncherCsgo cfg = frm.Config;

                    if (cfg.RememberChanges)
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo = cfg;
                        GlobalConfig.Instance.BackUp();
                    }
                    else
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo.RememberChanges = cfg.RememberChanges;
                    }

                    bOk = Launch(cfg);
                }
                else
                {
                    bOk = true;
                }
            }

            return(bOk);
        }
Пример #2
0
        public static bool RunLauncherDialog(IWin32Window dialogOwner)
        {
            bool bOk;

            using (LaunchCsgoForm frm = new LaunchCsgoForm())
            {
                frm.Icon          = Program.Icon;
                frm.ShowInTaskbar = false;

                frm.Config = GlobalConfig.Instance.Settings.LauncherCsgo;

                if (DialogResult.OK == frm.ShowDialog(dialogOwner))
                {
                    CfgLauncherCsgo cfg = frm.Config;

                    if (cfg.RememberChanges)
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo = cfg;
                        GlobalConfig.Instance.BackUp();
                    }
                    else
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo.RememberChanges = cfg.RememberChanges;
                    }

                    bOk = Launch(cfg);

                    if (!bOk)
                    {
                        MessageBox.Show("Launching failed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                else
                {
                    bOk = true;
                }
            }

            return(bOk);
        }
Пример #3
0
        public static bool RunLauncherDialog(IWin32Window dialogOwner)
        {
            bool bOk;

            using (LaunchCsgoForm frm = new LaunchCsgoForm())
            {
                frm.Icon = Program.Icon;
                frm.ShowInTaskbar = false;

                frm.Config = GlobalConfig.Instance.Settings.LauncherCsgo;

                if (DialogResult.OK == frm.ShowDialog(dialogOwner))
                {
                    CfgLauncherCsgo cfg = frm.Config;

                    if (cfg.RememberChanges)
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo = cfg;
                        GlobalConfig.Instance.BackUp();
                    }
                    else
                    {
                        GlobalConfig.Instance.Settings.LauncherCsgo.RememberChanges = cfg.RememberChanges;
                    }

                    bOk = Launch(cfg);

                    if (!bOk)
                        MessageBox.Show("Launching failed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                    bOk = true;
            }

            return bOk;
        }