Inertia – Diff between revs 1 and 2

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 1 Rev 2
Line 1... Line 1...
1 using System; 1 using System;
2 using System.ComponentModel; 2 using System.ComponentModel;
-   3 using System.Configuration;
3 using System.Diagnostics; 4 using System.Diagnostics;
4 using System.Threading; 5 using System.Threading;
5 using System.Threading.Tasks; 6 using System.Threading.Tasks;
6 using System.Windows.Forms; 7 using System.Windows.Forms;
7 using WindowsInput; 8 using WindowsInput;
8 using AutoUpdaterDotNET; 9 using AutoUpdaterDotNET;
9 using Gma.System.MouseKeyHook; 10 using Gma.System.MouseKeyHook;
-   11 using Inertia.Properties;
-   12 using Inertia.Utilities;
Line 10... Line 13...
10   13  
11 namespace Inertia 14 namespace Inertia
12 { 15 {
13 public partial class Form1 : Form 16 public partial class Form1 : Form
Line 41... Line 44...
41 public Form1() 44 public Form1()
42 { 45 {
43 InitializeComponent(); 46 InitializeComponent();
44 AutoUpdater.Start("http://inertia.grimore.org/update/update.xml"); 47 AutoUpdater.Start("http://inertia.grimore.org/update/update.xml");
Line -... Line 48...
-   48  
-   49 // Upgrade settings if required.
-   50 if (!ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).HasFile)
-   51 {
-   52 Settings.Default.Upgrade();
-   53 }
-   54  
-   55 // Bind to settings changed event.
-   56 Settings.Default.SettingsLoaded += DefaultOnSettingsLoaded;
-   57 Settings.Default.SettingsSaving += DefaultOnSettingsSaving;
-   58 Settings.Default.PropertyChanged += DefaultOnPropertyChanged;
45   59  
Line 46... Line 60...
46 _inputSimulator = new InputSimulator(); 60 _inputSimulator = new InputSimulator();
47   61  
Line 71... Line 85...
71   85  
Line 72... Line 86...
72 #endregion 86 #endregion
Line -... Line 87...
-   87  
-   88 #region Event Handlers
-   89  
-   90 private void DefaultOnSettingsSaving(object sender, CancelEventArgs e)
-   91 {
-   92 }
-   93  
-   94 private void DefaultOnSettingsLoaded(object sender, SettingsLoadedEventArgs e)
-   95 {
-   96 }
-   97  
-   98 private void DefaultOnPropertyChanged(object sender, PropertyChangedEventArgs e)
-   99 {
73   100 Settings.Default.Save();
74 #region Event Handlers 101 }
75   102  
Line 76... Line 103...
76 private static void GlobalMouseKeyHookMouseWheel(object sender, MouseEventArgs e) 103 private static void GlobalMouseKeyHookMouseWheel(object sender, MouseEventArgs e)
Line 121... Line 148...
121 private void QuitToolStripMenuItem_Click(object sender, EventArgs e) 148 private void QuitToolStripMenuItem_Click(object sender, EventArgs e)
122 { 149 {
123 Application.Exit(); 150 Application.Exit();
124 } 151 }
Line -... Line 152...
-   152  
-   153 private void LaunchOnBootToolStripMenuItem_Click(object sender, EventArgs e)
-   154 {
-   155 Settings.Default.LaunchOnBoot = ((ToolStripMenuItem) sender).Checked;
-   156  
-   157 LaunchOnBoot.Set(Settings.Default.LaunchOnBoot);
-   158 }
125   159  
Line 126... Line 160...
126 #endregion 160 #endregion
Line 127... Line 161...
127   161