コード例 #1
0
 public void Execute(IDataContext context, DelegateExecute nextExecute)
 {
     using (var form = new SettingsForm())
     {
         var repository = new SettingsRepository();
         var presenter = new SettingsController(repository, form);
         presenter.Initialize();
         if (form.ShowDialog() == DialogResult.OK)
             Settings.Values = presenter.Settings;
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: cfiet/resharper-jshint
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var settingsForm = new SettingsForm();

            settingsForm.SettingChanged += (sender, args) => Debug.WriteLine(args.Name + ": " + (args.Value ?? "default"));

            settingsForm.SetSetting("browser", true);
            settingsForm.SetSetting("indent", 4);
            settingsForm.SetSetting("R#_priority", true);

            Application.Run(settingsForm);
        }