-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add foundation for Kh2 Battle Editor
- Loading branch information
Showing
7 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="OpenKh.Tools.Kh2BattleEditor.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:OpenKh.Tools.Kh2BattleEditor" | ||
StartupUri="Views/MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace OpenKh.Tools.Kh2BattleEditor | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
OpenKh.Tools.Kh2BattleEditor/OpenKh.Tools.Kh2BattleEditor.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="MSBuild.Sdk.Extras/1.6.65"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net472</TargetFramework> | ||
<UseWPF>true</UseWPF> | ||
<OutputPath>..\bin\$(Configuration)\</OutputPath> | ||
<ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup> | ||
<AssemblyTitle>KH2 Battle Editor</AssemblyTitle> | ||
<Product>KH2 Battle Editor - OpenKh</Product> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System.Xaml" /> | ||
<Reference Include="WindowsBase" /> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\OpenKh.Common\OpenKh.Common.csproj" /> | ||
<ProjectReference Include="..\OpenKh.Kh2\OpenKh.Kh2.csproj" /> | ||
<ProjectReference Include="..\OpenKh.Tools.Common\OpenKh.Tools.Common.csproj" /> | ||
<ProjectReference Include="..\XeEngine.Tools.Public\Xe.Tools.Wpf\Xe.Tools.Wpf.csproj" /> | ||
<ProjectReference Include="..\XeEngine.Tools.Public\Xe.Tools\Xe.Tools.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Linq; | ||
using System.Windows; | ||
using OpenKh.Tools.Common; | ||
using Xe.Tools; | ||
|
||
namespace OpenKh.Tools.Kh2BattleEditor.ViewModels | ||
{ | ||
public class MainViewModel : BaseNotifyPropertyChanged | ||
{ | ||
private static string ApplicationName = Utilities.GetApplicationName(); | ||
private Window Window => Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.IsActive); | ||
private string _fileName; | ||
|
||
public string Title => $"{FileName ?? "untitled"} | {ApplicationName}"; | ||
|
||
private string FileName | ||
{ | ||
get => _fileName; | ||
set | ||
{ | ||
_fileName = value; | ||
OnPropertyChanged(nameof(Title)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Window x:Class="OpenKh.Tools.Kh2BattleEditor.Views.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:local="clr-namespace:OpenKh.Tools.Kh2BattleEditor.Views" | ||
mc:Ignorable="d" | ||
Title="{Binding Title}" Height="450" Width="800"> | ||
<Grid> | ||
|
||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Windows; | ||
using OpenKh.Tools.Kh2BattleEditor.ViewModels; | ||
|
||
namespace OpenKh.Tools.Kh2BattleEditor.Views | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
DataContext = new MainViewModel(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters