Skip to content

Commit 7775c56

Browse files
committed
Add project files.
1 parent a0341bf commit 7775c56

40 files changed

Lines changed: 1541 additions & 0 deletions

ChannelRepacker.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.7.34003.232
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChannelRepacker", "ChannelRepacker\ChannelRepacker.csproj", "{A98AEC86-8329-45AF-B852-DFB703663BAD}"
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+
{A98AEC86-8329-45AF-B852-DFB703663BAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{A98AEC86-8329-45AF-B852-DFB703663BAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{A98AEC86-8329-45AF-B852-DFB703663BAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{A98AEC86-8329-45AF-B852-DFB703663BAD}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {3F3F88DB-04B5-4491-BDDE-EA23CBB4222D}
24+
EndGlobalSection
25+
EndGlobal

ChannelRepacker/App.xaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<Application
2+
x:Class="NullSoftware.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="clr-namespace:NullSoftware"
6+
xmlns:cv="clr-namespace:NullSoftware.Converters"
7+
StartupUri="MainWindow.xaml"
8+
Startup="Application_Startup">
9+
<Application.Resources>
10+
<ResourceDictionary>
11+
<cv:BooleanToBitmapScalingModeConverter x:Key="BooleanToBitmapScalingModeConverter" />
12+
<cv:BooleanToStretchConverter x:Key="BooleanToStretchConverter" />
13+
<cv:BooleanToVerticalAlignmentConverter x:Key="BooleanToVerticalAlignmentConverter" />
14+
<cv:BooleanToHorizontalAlignmentConverter x:Key="BooleanToHorizontalAlignmentConverter" />
15+
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
16+
</ResourceDictionary>
17+
</Application.Resources>
18+
</Application>

ChannelRepacker/App.xaml.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using NodeNetwork;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Configuration;
5+
using System.Data;
6+
using System.Linq;
7+
using System.Threading.Tasks;
8+
using System.Windows;
9+
10+
namespace NullSoftware
11+
{
12+
/// <summary>
13+
/// Interaction logic for App.xaml
14+
/// </summary>
15+
public partial class App : Application
16+
{
17+
private void Application_Startup(object sender, StartupEventArgs e)
18+
{
19+
NNViewRegistrar.RegisterSplat();
20+
}
21+
}
22+
}

ChannelRepacker/AssemblyInfo.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Windows;
2+
3+
[assembly: ThemeInfo(
4+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5+
//(used if a resource is not found in the page,
6+
// or application resource dictionaries)
7+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8+
//(used if a resource is not found in the page,
9+
// app, or any theme specific resource dictionaries)
10+
)]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net6.0-windows</TargetFramework>
6+
<Nullable>enable</Nullable>
7+
<UseWPF>true</UseWPF>
8+
<ApplicationManifest>app.manifest</ApplicationManifest>
9+
<ApplicationIcon>mainicon.ico</ApplicationIcon>
10+
<RootNamespace>NullSoftware</RootNamespace>
11+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
12+
</PropertyGroup>
13+
14+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
15+
<DebugType>none</DebugType>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<Content Include="mainicon.ico" />
20+
</ItemGroup>
21+
22+
<ItemGroup>
23+
<PackageReference Include="NodeNetwork" Version="6.0.0" />
24+
<PackageReference Include="NodeNetworkToolkit" Version="6.0.0" />
25+
<PackageReference Include="UToolKit" Version="1.1.1" />
26+
</ItemGroup>
27+
28+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows.Data;
8+
using System.Windows.Media;
9+
10+
namespace NullSoftware.Converters
11+
{
12+
public class BooleanToBitmapScalingModeConverter : OneWayConverter<bool, BitmapScalingMode>
13+
{
14+
protected override BitmapScalingMode Convert(bool value, object parameter)
15+
{
16+
if (value)
17+
return BitmapScalingMode.HighQuality;
18+
else
19+
return BitmapScalingMode.NearestNeighbor;
20+
}
21+
}
22+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
8+
namespace NullSoftware.Converters
9+
{
10+
public class BooleanToHorizontalAlignmentConverter : OneWayConverter<bool, HorizontalAlignment>
11+
{
12+
protected override HorizontalAlignment Convert(bool value, object parameter)
13+
{
14+
if (value)
15+
return HorizontalAlignment.Stretch;
16+
else
17+
return HorizontalAlignment.Center;
18+
}
19+
}
20+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows.Data;
8+
using System.Windows.Media;
9+
10+
namespace NullSoftware.Converters
11+
{
12+
internal class BooleanToStretchConverter : OneWayConverter<bool, Stretch>
13+
{
14+
protected override Stretch Convert(bool value, object parameter)
15+
{
16+
if (value)
17+
return Stretch.Uniform;
18+
else
19+
return Stretch.None;
20+
}
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
using System.Windows.Data;
9+
10+
namespace NullSoftware.Converters
11+
{
12+
public class BooleanToVerticalAlignmentConverter : OneWayConverter<bool, VerticalAlignment>
13+
{
14+
protected override VerticalAlignment Convert(bool value, object parameter)
15+
{
16+
if (value)
17+
return VerticalAlignment.Stretch;
18+
else
19+
return VerticalAlignment.Center;
20+
}
21+
}
22+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using System.Windows.Data;
8+
#nullable disable
9+
namespace NullSoftware.Converters
10+
{
11+
public abstract class OneWayConverter<TIn, TOut> : IValueConverter
12+
{
13+
public object DefaultValue { get; protected set; }
14+
15+
public virtual object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16+
{
17+
if (value is TIn inValue)
18+
return Convert(inValue, parameter);
19+
else
20+
return DefaultValue;
21+
}
22+
23+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24+
{
25+
throw new NotSupportedException();
26+
}
27+
28+
protected abstract TOut Convert(TIn value, object parameter);
29+
}
30+
}

0 commit comments

Comments
 (0)