Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
zamgi authored and zamgi committed Nov 17, 2024
1 parent ba66d43 commit e85dbdf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 33 deletions.
23 changes: 12 additions & 11 deletions m3u8.download.manager/WinForms/UI/UC/StatusBarUC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,11 @@ private void parallelismLabel_EnabledChanged( object sender, EventArgs e )
{
if ( GetSettings().UseCrossDownloadInstanceParallelism )
{
parallelismLabel.BackColor = (parallelismLabel.Enabled ? _parallelismLabel_BackColor : Color.FromKnownColor( KnownColor.Control ));
#if NETCOREAPP
parallelismLabel.BackColor = (parallelismLabel.Enabled ? Color.FromKnownColor( KnownColor.Control ) : Color.FromKnownColor( KnownColor.Control ));
#else
parallelismLabel.BackColor = (parallelismLabel.Enabled ? Color.DimGray : Color.FromKnownColor( KnownColor.Control ));
#endif
}
}
private void exceptionWordsLabel_Click( object sender, EventArgs e ) => ShowDialog_FileNameExcludesWordsEditor();
Expand All @@ -261,9 +265,13 @@ private void parallelismLabel_set()
parallelismLabel.Text = $"degree of parallelism: {st.MaxDegreeOfParallelism} " +
(st.MaxCrossDownloadInstance.HasValue ? $"\r\ndownload-instances: {st.MaxCrossDownloadInstance.Value} " : null);
parallelismLabel.ToolTipText = $"use cross download-instance parallelism: {st.UseCrossDownloadInstanceParallelism.ToString().ToLower()}";

parallelismLabel.ForeColor = (st.UseCrossDownloadInstanceParallelism ? _parallelismLabel_ForeColor : Color.FromKnownColor( KnownColor.ControlText ));
parallelismLabel.BackColor = (st.UseCrossDownloadInstanceParallelism ? _parallelismLabel_BackColor : Color.FromKnownColor( KnownColor.Control ));
#if NETCOREAPP
parallelismLabel.ForeColor = (st.UseCrossDownloadInstanceParallelism ? Color.FromKnownColor( KnownColor.ControlText ) : Color.DimGray);
parallelismLabel.BackColor = (st.UseCrossDownloadInstanceParallelism ? Color.FromKnownColor( KnownColor.Control ) : Color.FromKnownColor( KnownColor.Control ));
#else
parallelismLabel.ForeColor = (st.UseCrossDownloadInstanceParallelism ? Color.White : Color.FromKnownColor( KnownColor.ControlText ));
parallelismLabel.BackColor = (st.UseCrossDownloadInstanceParallelism ? Color.DimGray : Color.FromKnownColor( KnownColor.Control ));
#endif
//--------------------------------------------//

exceptionWordsLabel.Text = (st.MaxCrossDownloadInstance.HasValue ? "file name exception\r\nword editor" : "file name exceptions");
Expand All @@ -274,13 +282,6 @@ private void settingsLabel_set()
settingsLabel.ToolTipText = $"other settings =>\r\n attempt request count by part: {st.AttemptRequestCountByPart}" +
$"\r\n request timeout by part: {st.RequestTimeoutByPart}";
}
#if NETCOREAPP
private static Color _parallelismLabel_ForeColor => Color.DimGray;
private static Color _parallelismLabel_BackColor => Color.FromKnownColor( KnownColor.Control );
#else
private static Color _parallelismLabel_ForeColor => Color.White;
private static Color _parallelismLabel_BackColor => Color.DimGray;
#endif
#endregion
}
}
11 changes: 7 additions & 4 deletions m3u8.download.manager/WinForms/m3u8.download.manager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@

<PropertyGroup Condition=" '$(TargetFramework)' == 'net481' ">
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<ProjectConfigFileName>App.net481.config</ProjectConfigFileName>
<OutputPath>..\..\m3u8-browser-extensions\_m3u8-downloader-host\m3u8.download.manager.host\bin\</OutputPath>
<ProjectConfigFileName>App.net481.config</ProjectConfigFileName>
<!--<OutputPath>..\..\m3u8-browser-extensions\_m3u8-downloader-host\m3u8.download.manager.host\bin\</OutputPath>-->
<OutputPath>bin\</OutputPath>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0-windows' ">
<ProjectConfigFileName>App.net9.0-windows.config</ProjectConfigFileName>
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
<OutputPath>bin\</OutputPath>
<!--<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>-->
<!--<OutputPath>bin\</OutputPath>-->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\m3u8-browser-extensions\_m3u8-downloader-host\m3u8.download.manager.host\bin\</OutputPath>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0-windows</TargetFrameworks>
<TargetFrameworks>net9.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net481</TargetFrameworks>
<UseWindowsForms>true</UseWindowsForms>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
Expand Down Expand Up @@ -34,7 +34,7 @@
<ItemGroup>
<None Remove=".gitignore" />
<None Remove="App.net481.config" />
<None Remove="App.net8.0-windows.config" />
<None Remove="App.net9.0-windows.config" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -91,20 +91,4 @@
</None>
</ItemGroup>

<!--
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll" />
<Target AfterTargets="PostBuildEvent" Name="PostBuildEvent">
<TransformXml Source="app.config" Destination="$(IntermediateOutputPath)$(TargetFileName).config" Transform="app.$(TargetFramework).config" />
<ItemGroup>
<AppConfigWithTargetPath Remove="app.config" />
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config">
<TargetPath>$(TargetFileName).config</TargetPath>
</AppConfigWithTargetPath>
<AppConfigWithTargetPath Include="$(IntermediateOutputPath)$(TargetFileName).config">
<TargetPath>$(TargetName).vshost$(TargetExt).config</TargetPath>
</AppConfigWithTargetPath>
</ItemGroup>
</Target>
-->

</Project>

0 comments on commit e85dbdf

Please sign in to comment.