Skip to content

Commit 0a17e38

Browse files
committed
Replace ModApi.{Installers,UI,UpdateManager} with a single ModApi.common library
1 parent 031bc9b commit 0a17e38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+535
-817
lines changed

ModAPI Installers/ModAPI Installers.csproj

Lines changed: 0 additions & 74 deletions
This file was deleted.

ModAPI Installers/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

ModAPI Installers/CommonStrings.Designer.cs renamed to ModApi.Common/CommonStrings.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using System.Text;
55
using System.Threading.Tasks;
66

7-
namespace ModAPI_Installers
7+
namespace ModApi.Common
88
{
99
public enum GameVersionType
1010
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.IO;
88
using System.Xml;
99

10-
namespace ModAPI_Installers
10+
namespace ModApi.Common
1111
{
1212

1313
public class InstalledFile
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
using System.Xml;
1010

11-
namespace ModAPI_Installers
11+
namespace ModApi.Common
1212
{
1313
public static class LauncherSettings
1414
{

ModApi.Common/ModApi.Common.csproj

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" 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>{2204F49D-0129-4522-8EF0-16702153E915}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>ModApi.Common</RootNamespace>
11+
<AssemblyName>ModApi.Common</AssemblyName>
12+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="PresentationCore" />
35+
<Reference Include="PresentationFramework" />
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Drawing" />
39+
<Reference Include="System.IO.Compression" />
40+
<Reference Include="System.IO.Compression.FileSystem" />
41+
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
42+
<Reference Include="System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL" />
43+
<Reference Include="System.Windows.Forms" />
44+
<Reference Include="System.Xaml" />
45+
<Reference Include="System.Xml.Linq" />
46+
<Reference Include="System.Data.DataSetExtensions" />
47+
<Reference Include="Microsoft.CSharp" />
48+
<Reference Include="System.Data" />
49+
<Reference Include="System.Net.Http" />
50+
<Reference Include="System.Xml" />
51+
<Reference Include="WindowsBase" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<Compile Include="..\VersionInfo\AssemblyVersionInfo.cs">
55+
<Link>AssemblyVersionInfo.cs</Link>
56+
</Compile>
57+
<Compile Include="CommonStrings.Designer.cs">
58+
<DependentUpon>CommonStrings.resx</DependentUpon>
59+
<AutoGen>True</AutoGen>
60+
<DesignTime>True</DesignTime>
61+
</Compile>
62+
<Compile Include="GameVersion.cs" />
63+
<Compile Include="InstalledMods.cs" />
64+
<Compile Include="LauncherSettings.cs" />
65+
<Compile Include="PathDialogs.cs" />
66+
<Compile Include="Permissions.cs" />
67+
<Compile Include="Properties\AssemblyInfo.cs" />
68+
<Compile Include="SporePath.cs" />
69+
<Compile Include="Types.cs" />
70+
<Compile Include="UI\AnimatedScrollViewer.cs" />
71+
<Compile Include="UI\Converters.cs" />
72+
<Compile Include="UI\CutCornerBorder.cs" />
73+
<Compile Include="UI\LoadingPanel.cs" />
74+
<Compile Include="UI\ModenaWindow.cs" />
75+
<Compile Include="UI\NativeMethods.cs" />
76+
<Compile Include="UI\ShadowWindow.xaml.cs">
77+
<DependentUpon>ShadowWindow.xaml</DependentUpon>
78+
</Compile>
79+
<Compile Include="UI\SystemScaling.cs" />
80+
<Compile Include="UI\ToggleSwitch.cs" />
81+
<Compile Include="UI\Windows\CompositingWindow.cs" />
82+
<Compile Include="UI\Windows\DecoratableWindow.cs" />
83+
<Compile Include="Update\DllsUpdater.cs" />
84+
<Compile Include="Update\DownloadClient.cs" />
85+
<Compile Include="Update\ProgressDialog.cs">
86+
<SubType>Form</SubType>
87+
</Compile>
88+
<Compile Include="Update\ProgressDialog.Designer.cs">
89+
<DependentUpon>ProgressDialog.cs</DependentUpon>
90+
</Compile>
91+
<Compile Include="Update\UpdateManager.cs" />
92+
</ItemGroup>
93+
<ItemGroup>
94+
<EmbeddedResource Include="CommonStrings.resx">
95+
<Generator>PublicResXFileCodeGenerator</Generator>
96+
<LastGenOutput>CommonStrings.Designer.cs</LastGenOutput>
97+
<SubType>Designer</SubType>
98+
</EmbeddedResource>
99+
<EmbeddedResource Include="Update\ProgressDialog.resx">
100+
<DependentUpon>ProgressDialog.cs</DependentUpon>
101+
</EmbeddedResource>
102+
</ItemGroup>
103+
<ItemGroup>
104+
<Page Include="UI\ShadowWindow.xaml">
105+
<Generator>MSBuild:Compile</Generator>
106+
<SubType>Designer</SubType>
107+
</Page>
108+
<Page Include="UI\Themes\AlterMod.xaml">
109+
<Generator>MSBuild:Compile</Generator>
110+
<SubType>Designer</SubType>
111+
</Page>
112+
<Page Include="UI\Themes\Colors\AlterModBaseLight.xaml">
113+
<Generator>MSBuild:Compile</Generator>
114+
<SubType>Designer</SubType>
115+
</Page>
116+
<Page Include="UI\Themes\Colors\AlterModBlue.xaml">
117+
<Generator>MSBuild:Compile</Generator>
118+
<SubType>Designer</SubType>
119+
</Page>
120+
</ItemGroup>
121+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
122+
</Project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
using System.IO;
99
using System.Windows.Forms;
1010

11-
namespace ModAPI_Installers
11+
namespace ModApi.Common
1212
{
1313
public static class PathDialogs
1414
{
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Diagnostics;
43
using System.IO;
54
using System.Linq;
65
using System.Security.AccessControl;
76
using System.Security.Principal;
8-
using System.Text;
97

10-
namespace ModAPI_Installers
8+
namespace ModApi.Common
119
{
1210
public static class Permissions
1311
{
1412
public static bool IsAdministrator()
1513
{
16-
/*if (Environment.OSVersion.Version.Major <= 5)
17-
return true;
18-
else
19-
{*/
2014
WindowsIdentity identity = WindowsIdentity.GetCurrent();
2115
WindowsPrincipal principal = new WindowsPrincipal(identity);
2216
return principal.IsInRole(WindowsBuiltInRole.Administrator);
23-
//}
2417
}
2518

2619
public static Process RerunAsAdministrator()

0 commit comments

Comments
 (0)