WingMan – Diff between revs 36 and 37

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 36 Rev 37
Line 1... Line 1...
1 using System; 1 using System;
-   2 using System.IO;
-   3 using System.Reflection;
2 using System.Runtime.InteropServices; 4 using System.Runtime.InteropServices;
3 using System.Threading; 5 using System.Threading;
4 using System.Threading.Tasks; 6 using System.Threading.Tasks;
5 using System.Windows.Forms; 7 using System.Windows.Forms;
6 using Mono.Data.Sqlite; 8 using Mono.Data.Sqlite;
Line 29... Line 31...
29   31  
30 public void Dispose() 32 public void Dispose()
31 { 33 {
Line 32... Line -...
32 } -  
33   -  
34 [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] -  
35 [return: MarshalAs(UnmanagedType.Bool)] -  
36 private static extern bool SetDllDirectory(string lpPathName); 34 }
Line 37... Line 35...
37   35  
Line 38... Line 36...
38 public event SaveFailed OnSaveFailed; 36 public event SaveFailed OnSaveFailed;
39   37  
40 public event LoadFailed OnLoadFailed; -  
41   -  
42 public async Task Save(string name, AutoCompleteStringCollection autoCompleteStringCollection) 38 public event LoadFailed OnLoadFailed;
43 { 39  
44 SetDllDirectory(Environment.Is64BitOperatingSystem ? "x64" : "x86"); 40 public async Task Save(string name, AutoCompleteStringCollection autoCompleteStringCollection)
45   41 {
46 try 42 try
Line 114... Line 110...
114 } 110 }
115 } 111 }
Line 116... Line 112...
116   112  
117 public async Task Load(string name, AutoCompleteStringCollection autoCompleteStringCollection) 113 public async Task Load(string name, AutoCompleteStringCollection autoCompleteStringCollection)
118 { -  
119 SetDllDirectory(Environment.Is64BitOperatingSystem ? "x64" : "x86"); -  
120   114 {
121 try 115 try
122 { 116 {
123 using (var sqliteConnection = 117 using (var sqliteConnection =
124 new SqliteConnection($"URI=file:{"Autocomplete.db"}")) 118 new SqliteConnection($"URI=file:{"Autocomplete.db"}"))