Skip to content

Commit

Permalink
Code cleaning, set to C# 9.0, other fixes and modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
CatmanFan committed Apr 27, 2024
1 parent a640b5d commit 6972397
Show file tree
Hide file tree
Showing 24 changed files with 475 additions and 320 deletions.
4 changes: 2 additions & 2 deletions FriishProduce/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings>
<FriishProduce.Options.VC_N64>
Expand Down Expand Up @@ -245,4 +245,4 @@
<probing privatePath="libraries;libs;resources\libraries;resources\libs;lib;resources\lib" />
</assemblyBinding>
</runtime>
</configuration>
</configuration>
85 changes: 67 additions & 18 deletions FriishProduce/FriishProduce.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>FriishProduce</RootNamespace>
<AssemblyName>FriishProduce</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
Expand Down Expand Up @@ -72,9 +72,6 @@
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.5.0, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft-WindowsAPICodePack-Core.1.1.5\lib\net472\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Octokit, Version=11.0.1.0, Culture=neutral, PublicKeyToken=0be8860aee462442, processorArchitecture=MSIL">
<HintPath>..\packages\Octokit.11.0.1\lib\netstandard2.0\Octokit.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -146,13 +143,41 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Options\ADOBEFLASH.Designer.cs" />
<Compile Include="Options\FORWARDER.Designer.cs" />
<Compile Include="Options\VC_N64.Designer.cs" />
<Compile Include="Options\VC_NEO.Designer.cs" />
<Compile Include="Options\VC_NES.Designer.cs" />
<Compile Include="Options\VC_PCE.Designer.cs" />
<Compile Include="Options\VC_SEGA.Designer.cs" />
<Compile Include="Options\ADOBEFLASH.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>ADOBEFLASH.settings</DependentUpon>
</Compile>
<Compile Include="Options\FORWARDER.Designer.cs">
<DependentUpon>FORWARDER.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Options\VC_N64.Designer.cs">
<DependentUpon>VC_N64.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Options\VC_NEO.Designer.cs">
<DependentUpon>VC_NEO.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Options\VC_NES.Designer.cs">
<DependentUpon>VC_NES.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Options\VC_PCE.Designer.cs">
<DependentUpon>VC_PCE.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Options\VC_SEGA.Designer.cs">
<DependentUpon>VC_SEGA.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
Expand Down Expand Up @@ -340,13 +365,34 @@
<ItemGroup>
<None Include="App.config" />
<None Include="database.json" />
<None Include="Options\ADOBEFLASH.settings" />
<None Include="Options\FORWARDER.settings" />
<None Include="Options\VC_N64.settings" />
<None Include="Options\VC_NEO.settings" />
<None Include="Options\VC_NES.settings" />
<None Include="Options\VC_PCE.settings" />
<None Include="Options\VC_SEGA.settings" />
<None Include="Options\ADOBEFLASH.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>ADOBEFLASH.Designer.cs</LastGenOutput>
</None>
<None Include="Options\FORWARDER.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>FORWARDER.Designer.cs</LastGenOutput>
</None>
<None Include="Options\VC_N64.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VC_N64.Designer.cs</LastGenOutput>
</None>
<None Include="Options\VC_NEO.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VC_NEO.Designer.cs</LastGenOutput>
</None>
<None Include="Options\VC_NES.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VC_NES.Designer.cs</LastGenOutput>
</None>
<None Include="Options\VC_PCE.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VC_PCE.Designer.cs</LastGenOutput>
</None>
<None Include="Options\VC_SEGA.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>VC_SEGA.Designer.cs</LastGenOutput>
</None>
<None Include="Resources\StaticBase.wad" />
<None Include="Strings\de.json" />
<None Include="Strings\fr.json" />
Expand Down Expand Up @@ -548,4 +594,7 @@ exit /b

:eof</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
</Project>
18 changes: 9 additions & 9 deletions FriishProduce/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions FriishProduce/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private void RefreshForm()
menu_file.Text = Program.Lang.String("file", Name);
menu_project.Text = Program.Lang.String("project", Name);
menu_help.Text = Program.Lang.String("help", Name);
menu_about_app.Text = string.Format(Program.Lang.String("about_app"), Program.Lang.ApplicationTitle);
Text = Program.Lang.ApplicationTitle;

ToolStrip_NewProject.Text = menu_new_project.Text;
Expand Down Expand Up @@ -173,6 +174,7 @@ private void Settings_Click(object sender, EventArgs e)
{
string lang = Properties.Settings.Default.language;

s.Font = Font;
s.ShowDialog(this);

if (lang != Properties.Settings.Default.language) RefreshForm();
Expand Down Expand Up @@ -269,6 +271,7 @@ private void AddProject(object sender, EventArgs e)
private ProjectForm AddTab(Console console, Project x = null)
{
ProjectForm Tab = x == null ? new ProjectForm(console) : new ProjectForm(x);
Tab.Font = Font;
Tab.Parent = this;
Tab.FormClosed += TabChanged;
Tab.ExportCheck += ExportCheck;
Expand Down Expand Up @@ -340,7 +343,7 @@ private void OpenImage_Click(object sender, EventArgs e)

private void Tutorial_Click(object sender, EventArgs e)
{
var tut = new Tutorial() { Text = menu_tutorial.Text };
var tut = new Tutorial() { Text = menu_tutorial.Text, Font = Font };
tut.ShowDialog();
tut.Dispose();
}
Expand Down Expand Up @@ -373,7 +376,7 @@ private void TabContextMenu_Opening(object sender, CancelEventArgs e)

private void CloseTab_Click(object sender, EventArgs e) => (tabControl.SelectedForm as Form).Close();

private void About_Click(object sender, EventArgs e) => new About().ShowDialog();
private void About_Click(object sender, EventArgs e) { using (var about = new About() { Font = Font }) about.ShowDialog(); }

private void MenuItem_Exit_Click(object sender, EventArgs e) => Application.Exit();

Expand Down
Loading

0 comments on commit 6972397

Please sign in to comment.