├── WlanNetworksModel.txt ├── Wlan10 ├── Resources │ └── GongSolutions.Wpf.DragDrop.dll ├── packages.config ├── App.config ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── App.xaml ├── App.xaml.cs ├── MainWindow.xaml.cs ├── MainWindow.xaml ├── Controller │ └── Netshell.cs ├── Wlan10.csproj └── Model │ └── WlanNetwork.cs ├── Wlan10.sln ├── README.md ├── .gitignore └── LICENSE /WlanNetworksModel.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Wlan10/Resources/GongSolutions.Wpf.DragDrop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bertware/wlan10/HEAD/Wlan10/Resources/GongSolutions.Wpf.DragDrop.dll -------------------------------------------------------------------------------- /Wlan10/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Wlan10/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Wlan10/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Wlan10/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Wlan10.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wlan10", "Wlan10\Wlan10.csproj", "{B2213BF4-E988-475F-9B63-5238FA0ADF36}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {B2213BF4-E988-475F-9B63-5238FA0ADF36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {B2213BF4-E988-475F-9B63-5238FA0ADF36}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {B2213BF4-E988-475F-9B63-5238FA0ADF36}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {B2213BF4-E988-475F-9B63-5238FA0ADF36}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Wlan10/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Net.Bertware.Wlan10.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Wlan10/App.xaml.cs: -------------------------------------------------------------------------------- 1 | // App.xaml.cs in Wlan10/Wlan10 2 | // Created 2016/07/27 3 | // ©Bertware, visit http://bertware.net 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 6 | // If a copy of the MPL was not distributed with this file, 7 | // you can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | using System; 10 | using System.IO; 11 | using System.Reflection; 12 | using System.Windows; 13 | 14 | namespace Net.Bertware.Wlan10 15 | { 16 | /// 17 | /// Interaction logic for App.xaml 18 | /// 19 | public partial class App : Application 20 | { 21 | public App() 22 | { 23 | try 24 | { 25 | AppDomain.CurrentDomain.AssemblyResolve += LoadDll; 26 | MainWindow w = new MainWindow(); 27 | w.ShowDialog(); 28 | } 29 | catch (Exception e) 30 | { 31 | MessageBox.Show("The application encountered an unexpected error and needs to exit. Please report this error to the developer (\"http://github.com/Bertware/Wlan10/Issues\")\r\n" + 32 | "Error details:\r\n" + 33 | e.Message + "\r\n" 34 | + e.StackTrace,"Unexpected error",MessageBoxButton.OK,MessageBoxImage.Error); 35 | } 36 | } 37 | 38 | public static Assembly LoadDll(object sender, ResolveEventArgs args) 39 | { 40 | //Load embedded DLLs 41 | 42 | String resourceName = "Net.Bertware.Wlan10.Resources." + new AssemblyName(args.Name).Name + ".dll"; 43 | using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) 44 | { 45 | if (stream == null || stream.Length < 1) 46 | { 47 | return null; 48 | } 49 | Byte[] assemblyData = new Byte[stream.Length]; 50 | stream.Read(assemblyData, 0, assemblyData.Length); 51 | 52 | return Assembly.Load(assemblyData); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /Wlan10/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // AssemblyInfo.cs in Wlan10/Wlan10 2 | // Created 2016/07/27 3 | // ©Bertware, visit http://bertware.net 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 6 | // If a copy of the MPL was not distributed with this file, 7 | // you can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | using System.Reflection; 10 | using System.Resources; 11 | using System.Runtime.InteropServices; 12 | using System.Windows; 13 | 14 | // General Information about an assembly is controlled through the following 15 | // set of attributes. Change these attribute values to modify the information 16 | // associated with an assembly. 17 | 18 | [assembly: AssemblyTitle("Wlan10")] 19 | [assembly: AssemblyDescription("Wireless network configuration tool for windows 10")] 20 | [assembly: AssemblyConfiguration("")] 21 | [assembly: AssemblyCompany("Bertware")] 22 | [assembly: AssemblyProduct("Wlan10")] 23 | [assembly: AssemblyCopyright("Copyright ©Bertware 2016")] 24 | [assembly: AssemblyTrademark("")] 25 | [assembly: AssemblyCulture("")] 26 | 27 | // Setting ComVisible to false makes the types in this assembly not visible 28 | // to COM components. If you need to access a type in this assembly from 29 | // COM, set the ComVisible attribute to true on that type. 30 | 31 | [assembly: ComVisible(false)] 32 | 33 | //In order to begin building localizable applications, set 34 | //CultureYouAreCodingWith in your .csproj file 35 | //inside a . For example, if you are using US english 36 | //in your source files, set the to en-US. Then uncomment 37 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 38 | //the line below to match the UICulture setting in the project file. 39 | 40 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 41 | 42 | 43 | [assembly: ThemeInfo( 44 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 45 | //(used if a resource is not found in the page, 46 | // or application resource dictionaries) 47 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 48 | //(used if a resource is not found in the page, 49 | // app, or any theme specific resource dictionaries) 50 | )] 51 | 52 | 53 | // Version information for an assembly consists of the following four values: 54 | // 55 | // Major Version 56 | // Minor Version 57 | // Build Number 58 | // Revision 59 | // 60 | // You can specify all the values or you can default the Build and Revision Numbers 61 | // by using the '*' as shown below: 62 | // [assembly: AssemblyVersion("1.0.*")] 63 | 64 | [assembly: AssemblyVersion("1.1.2.0")] 65 | [assembly: AssemblyFileVersion("1.1.2.0")] 66 | [assembly: NeutralResourcesLanguage("en")] -------------------------------------------------------------------------------- /Wlan10/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | // MainWindow.xaml.cs in Wlan10/Wlan10 2 | // Created 2016/07/27 3 | // ©Bertware, visit http://bertware.net 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. 6 | // If a copy of the MPL was not distributed with this file, 7 | // you can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | using System.Collections.ObjectModel; 10 | using System.Diagnostics; 11 | using System.Windows; 12 | using System.Windows.Controls; 13 | using Net.Bertware.Wlan10.Controller; 14 | using Net.Bertware.Wlan10.Model; 15 | 16 | namespace Net.Bertware.Wlan10 17 | { 18 | /// 19 | /// Interaction logic for MainWindow.xaml 20 | /// 21 | public partial class MainWindow : Window 22 | { 23 | private ObservableCollection networks = Netshell.GetNetworks(); 24 | 25 | public MainWindow() 26 | { 27 | InitializeComponent(); 28 | // bind 29 | lvNetworks.ItemsSource = networks; 30 | } 31 | 32 | private void btnSaveOrder_Click(object sender, RoutedEventArgs e) 33 | { 34 | // Drag and drop will reorder the list (binding with observablelist). So just loop through the list and set the current position. 35 | for (int i = 0; i < networks.Count; i++) 36 | { 37 | networks[i].SetPriority(i + 1); 38 | } 39 | // confirm this to the user, to make sure there is no doubt 40 | MessageBox.Show("The new network order was applied succesfully!"); 41 | } 42 | 43 | private void btnForget_click(object sender, RoutedEventArgs e) 44 | { 45 | WlanNetwork net = (WlanNetwork) ((Button) sender).DataContext; 46 | // Ask politely 47 | if ( 48 | MessageBox.Show("Are you sure you want to forget " + net.Name + "? This cannot be undone.", 49 | "Forget network", 50 | MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) 51 | { 52 | // make windows forget 53 | net.ForgetNetwork(); 54 | // also remove from the list 55 | networks.Remove(net); 56 | } 57 | } 58 | 59 | private void btnDonate_Click(object sender, RoutedEventArgs e) 60 | { 61 | MessageBox.Show("You will now be redirected to the donate page"); 62 | Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K4856LBVQZ25L"); 63 | } 64 | 65 | private void btnCredits_Click(object sender, RoutedEventArgs e) 66 | { 67 | MessageBox.Show( 68 | "Idea and creation by Bertware.\r\n" + 69 | "www.bertware.net www.bertmarcelis.be\r\n\r\n" + 70 | "This program uses the GongSolutions.Wpf.DragDrop library made by Punker79\r\n" + 71 | "Copyright (c) 2015, Jan Karger (Steven Kirk)\r\n" + 72 | "https://github.com/punker76/gong-wpf-dragdrop"); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /Wlan10/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Net.Bertware.Wlan10.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Net.Bertware.Wlan10.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Byte[]. 65 | /// 66 | internal static byte[] GongSolutions_Wpf_DragDrop { 67 | get { 68 | object obj = ResourceManager.GetObject("GongSolutions_Wpf_DragDrop", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Wlan10/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 6 | 7 |