示例#1
0
        private void ShowSettingsForm(ServerSettingsConfigElement setting)
        {
            FormSettings formSettings = new FormSettings(setting.Alias != string.Empty);

            formSettings.CurrentSetting = setting;
            int num = (int)formSettings.ShowDialog();

            if (formSettings.DialogResult == DialogResult.OK)
            {
                ServerRegistry.AddElement(setting);
                ServerRegistry.StoreSettings();
            }
            this.ReloadServerlist();
        }
        private void ShowSettingsForm(ServerSettingsConfigElement setting)
        {
            using (var form = new FormSettings(setting.Alias != string.Empty))
            {
                form.CurrentSetting = setting;

                if (form.ShowDialog() == DialogResult.OK)
                {
                    ServerRegistry.AddElement(setting);

                    ServerRegistry.StoreSettings();
                }
            }

            ReloadServerlist();
        }