Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit e8caa7d

Browse files
author
Stefan Hueg
committed
initial commit
1 parent 4f4a08b commit e8caa7d

30 files changed

Lines changed: 2144 additions & 0 deletions

AdhocManager.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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}") = "AdhocManager", "AdhocManager\AdhocManager.csproj", "{006308E6-0F15-4497-BE28-2655DF2C7127}"
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+
{006308E6-0F15-4497-BE28-2655DF2C7127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{006308E6-0F15-4497-BE28-2655DF2C7127}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{006308E6-0F15-4497-BE28-2655DF2C7127}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{006308E6-0F15-4497-BE28-2655DF2C7127}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
EndGlobal
5.3 KB
Binary file not shown.

AdhocManager/AdhocManager.csproj

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{006308E6-0F15-4497-BE28-2655DF2C7127}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>AdhocManager</RootNamespace>
11+
<AssemblyName>AdhocManager</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<IsWebBootstrapper>false</IsWebBootstrapper>
15+
<TargetFrameworkProfile />
16+
<PublishUrl>publish\</PublishUrl>
17+
<Install>true</Install>
18+
<InstallFrom>Disk</InstallFrom>
19+
<UpdateEnabled>false</UpdateEnabled>
20+
<UpdateMode>Foreground</UpdateMode>
21+
<UpdateInterval>7</UpdateInterval>
22+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
23+
<UpdatePeriodically>false</UpdatePeriodically>
24+
<UpdateRequired>false</UpdateRequired>
25+
<MapFileExtensions>true</MapFileExtensions>
26+
<ApplicationRevision>0</ApplicationRevision>
27+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
28+
<UseApplicationTrust>false</UseApplicationTrust>
29+
<BootstrapperEnabled>true</BootstrapperEnabled>
30+
</PropertyGroup>
31+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
32+
<PlatformTarget>AnyCPU</PlatformTarget>
33+
<DebugSymbols>true</DebugSymbols>
34+
<DebugType>full</DebugType>
35+
<Optimize>false</Optimize>
36+
<OutputPath>bin\Debug\</OutputPath>
37+
<DefineConstants>DEBUG;TRACE</DefineConstants>
38+
<ErrorReport>prompt</ErrorReport>
39+
<WarningLevel>4</WarningLevel>
40+
<Prefer32Bit>false</Prefer32Bit>
41+
</PropertyGroup>
42+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43+
<PlatformTarget>AnyCPU</PlatformTarget>
44+
<DebugType>pdbonly</DebugType>
45+
<Optimize>true</Optimize>
46+
<OutputPath>bin\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<ErrorReport>prompt</ErrorReport>
49+
<WarningLevel>4</WarningLevel>
50+
<Prefer32Bit>false</Prefer32Bit>
51+
</PropertyGroup>
52+
<PropertyGroup>
53+
<ApplicationManifest>app.manifest</ApplicationManifest>
54+
</PropertyGroup>
55+
<PropertyGroup>
56+
<ApplicationIcon>1470956579_wifi_Symbol.ico</ApplicationIcon>
57+
</PropertyGroup>
58+
<PropertyGroup>
59+
<StartupObject>AdhocManager.Program</StartupObject>
60+
</PropertyGroup>
61+
<PropertyGroup>
62+
<SignAssembly>false</SignAssembly>
63+
</PropertyGroup>
64+
<ItemGroup>
65+
<Reference Include="log4net, Version=1.2.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
66+
<HintPath>..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
67+
<Private>True</Private>
68+
</Reference>
69+
<Reference Include="System" />
70+
<Reference Include="System.Core" />
71+
<Reference Include="System.Xml.Linq" />
72+
<Reference Include="System.Data.DataSetExtensions" />
73+
<Reference Include="Microsoft.CSharp" />
74+
<Reference Include="System.Data" />
75+
<Reference Include="System.Deployment" />
76+
<Reference Include="System.Drawing" />
77+
<Reference Include="System.Windows.Forms" />
78+
<Reference Include="System.Xml" />
79+
</ItemGroup>
80+
<ItemGroup>
81+
<Compile Include="AssemblyUtils.cs" />
82+
<Compile Include="Networking\NetshManager.cs" />
83+
<Compile Include="SettingsManager.cs" />
84+
<Compile Include="Networking\ProcessResult.cs" />
85+
<Compile Include="Networking\NetworkAdapterNode.cs" />
86+
<Compile Include="Networking\NetworkIcons.cs" />
87+
<Compile Include="MainForm.cs">
88+
<SubType>Form</SubType>
89+
</Compile>
90+
<Compile Include="MainForm.Designer.cs">
91+
<DependentUpon>MainForm.cs</DependentUpon>
92+
</Compile>
93+
<Compile Include="Program.cs" />
94+
<Compile Include="Properties\AssemblyInfo.cs" />
95+
<Compile Include="StringUtils.cs" />
96+
<EmbeddedResource Include="MainForm.resx">
97+
<DependentUpon>MainForm.cs</DependentUpon>
98+
</EmbeddedResource>
99+
<EmbeddedResource Include="Properties\Resources.resx">
100+
<Generator>ResXFileCodeGenerator</Generator>
101+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
102+
<SubType>Designer</SubType>
103+
</EmbeddedResource>
104+
<Compile Include="Properties\Resources.Designer.cs">
105+
<AutoGen>True</AutoGen>
106+
<DependentUpon>Resources.resx</DependentUpon>
107+
<DesignTime>True</DesignTime>
108+
</Compile>
109+
<None Include="app.manifest" />
110+
<None Include="packages.config" />
111+
<None Include="Properties\Settings.settings">
112+
<Generator>SettingsSingleFileGenerator</Generator>
113+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
114+
</None>
115+
<Compile Include="Properties\Settings.Designer.cs">
116+
<AutoGen>True</AutoGen>
117+
<DependentUpon>Settings.settings</DependentUpon>
118+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
119+
</Compile>
120+
</ItemGroup>
121+
<ItemGroup>
122+
<None Include="App.config" />
123+
</ItemGroup>
124+
<ItemGroup>
125+
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
126+
<Visible>False</Visible>
127+
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
128+
<Install>true</Install>
129+
</BootstrapperPackage>
130+
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
131+
<Visible>False</Visible>
132+
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
133+
<Install>false</Install>
134+
</BootstrapperPackage>
135+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
136+
<Visible>False</Visible>
137+
<ProductName>.NET Framework 3.5 SP1</ProductName>
138+
<Install>false</Install>
139+
</BootstrapperPackage>
140+
</ItemGroup>
141+
<ItemGroup>
142+
<Content Include="1470956426_wifi_Symbol.ico" />
143+
<Content Include="1470956579_wifi_Symbol.ico" />
144+
</ItemGroup>
145+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
146+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
147+
Other similar extension points exist, see Microsoft.Common.targets.
148+
<Target Name="BeforeBuild">
149+
</Target>
150+
<Target Name="AfterBuild">
151+
</Target>
152+
-->
153+
</Project>

AdhocManager/App.config

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
5+
<section name="AdhocManager.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
6+
</sectionGroup>
7+
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
8+
</configSections>
9+
<log4net xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
10+
<root>
11+
<level value="DEBUG"/>
12+
<appender-ref ref="ConsoleAppender"/>
13+
<appender-ref ref="FileAppender"/>
14+
</root>
15+
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
16+
<layout type="log4net.Layout.PatternLayout">
17+
<conversionPattern value="%date %level %logger - %message%newline"/>
18+
</layout>
19+
</appender>
20+
<appender name="FileAppender" type="log4net.Appender.FileAppender">
21+
<file value="AdhocManager.log"/>
22+
<appendToFile value="true"/>
23+
<lockingModel type="log4net.Appender.FileAppender+MinimalLock"/>
24+
<layout type="log4net.Layout.PatternLayout">
25+
<conversionPattern value="%date %level %logger - %message%newline"/>
26+
</layout>
27+
<param name="Threshold" value="INFO"/>
28+
</appender>
29+
</log4net>
30+
<startup>
31+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
32+
</startup>
33+
<userSettings>
34+
<AdhocManager.Properties.Settings>
35+
<setting name="SSID" serializeAs="String">
36+
<value/>
37+
</setting>
38+
<setting name="Password" serializeAs="String">
39+
<value/>
40+
</setting>
41+
</AdhocManager.Properties.Settings>
42+
</userSettings>
43+
</configuration>

AdhocManager/AssemblyUtils.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using System;
2+
using System.Reflection;
3+
4+
namespace AdhocManager
5+
{
6+
internal class AssemblyUtils
7+
{
8+
public static string GetMajorMinorRevisionVersion(Assembly assembly)
9+
{
10+
return GetMajorMinorRevisionVersion(assembly.GetName().Version);
11+
}
12+
13+
public static string GetMajorMinorRevisionVersion(Version version)
14+
{
15+
string[] parts =
16+
{
17+
version.Major.ToString(),
18+
version.Minor.ToString(),
19+
version.Revision.ToString()
20+
};
21+
22+
return string.Join(".", parts);
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)