parent
303521a585
commit
ff685bb5d8
18 changed files with 349 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" /> |
||||||
|
</project> |
||||||
@ -0,0 +1,8 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="UserContentModel"> |
||||||
|
<attachedFolders /> |
||||||
|
<explicitIncludes /> |
||||||
|
<explicitExcludes /> |
||||||
|
</component> |
||||||
|
</project> |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="VcsDirectoryMappings"> |
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
||||||
|
</component> |
||||||
|
</project> |
||||||
@ -0,0 +1,4 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" /> |
||||||
|
</project> |
||||||
@ -0,0 +1,117 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project version="4"> |
||||||
|
<component name="AutoGeneratedRunConfigurationManager"> |
||||||
|
<projectFile>Mystify/Mystify.csproj</projectFile> |
||||||
|
</component> |
||||||
|
<component name="ChangeListManager"> |
||||||
|
<list default="true" id="0221b891-b150-4bbf-813e-d901900db1ad" name="Default Changelist" comment=""> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify.dir/.idea/.gitignore" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify.dir/.idea/encodings.xml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify.dir/.idea/indexLayout.xml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify.dir/.idea/vcs.xml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify/.idea/encodings.xml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/.idea/.idea.Mystify/.idea/workspace.xml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify.sln" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/.gitignore" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/App.axaml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/App.axaml.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/Mystify.csproj" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/Program.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/ViewLocator.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/ViewModels/MainWindowViewModel.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/ViewModels/ViewModelBase.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/Views/MainWindow.axaml" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/Mystify/Views/MainWindow.axaml.cs" afterDir="false" /> |
||||||
|
<change afterPath="$PROJECT_DIR$/MystifyTempIcon.ico" afterDir="false" /> |
||||||
|
</list> |
||||||
|
<option name="SHOW_DIALOG" value="false" /> |
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" /> |
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" /> |
||||||
|
</component> |
||||||
|
<component name="Git.Settings"> |
||||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
||||||
|
</component> |
||||||
|
<component name="GitToolBoxStore"> |
||||||
|
<option name="projectConfigVersion" value="2" /> |
||||||
|
</component> |
||||||
|
<component name="HighlightingSettingsPerFile"> |
||||||
|
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/SourcesCache/783DE5A1-32E6-4CE1-9590-C76447498BD2/1/FluentTheme.cs" root0="SKIP_HIGHLIGHTING" /> |
||||||
|
</component> |
||||||
|
<component name="IdeDocumentHistory"> |
||||||
|
<changedPaths> |
||||||
|
<option value="$PROJECT_DIR$/Mystify/ViewLocator.cs" /> |
||||||
|
<option value="$PROJECT_DIR$/Mystify/Program.cs" /> |
||||||
|
<option value="$PROJECT_DIR$/Mystify/App.axaml.cs" /> |
||||||
|
<option value="$PROJECT_DIR$/Mystify/Views/MainWindow.axaml.cs" /> |
||||||
|
<option value="$PROJECT_DIR$/Mystify/ViewModels/ViewModelBase.cs" /> |
||||||
|
</changedPaths> |
||||||
|
</component> |
||||||
|
<component name="ProjectId" id="1qn67JHYPvsYJveNIpD2b90OIpP" /> |
||||||
|
<component name="ProjectViewState"> |
||||||
|
<option name="autoscrollFromSource" value="true" /> |
||||||
|
<option name="hideEmptyMiddlePackages" value="true" /> |
||||||
|
<option name="showLibraryContents" value="true" /> |
||||||
|
</component> |
||||||
|
<component name="PropertiesComponent"> |
||||||
|
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> |
||||||
|
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> |
||||||
|
<property name="WebServerToolWindowFactoryState" value="false" /> |
||||||
|
<property name="node.js.detected.package.eslint" value="true" /> |
||||||
|
<property name="node.js.detected.package.tslint" value="true" /> |
||||||
|
<property name="node.js.selected.package.eslint" value="(autodetect)" /> |
||||||
|
<property name="node.js.selected.package.tslint" value="(autodetect)" /> |
||||||
|
<property name="vue.rearranger.settings.migration" value="true" /> |
||||||
|
</component> |
||||||
|
<component name="RunManager"> |
||||||
|
<configuration name="Mystify" type="DotNetProject" factoryName=".NET Project"> |
||||||
|
<option name="EXE_PATH" value="" /> |
||||||
|
<option name="PROGRAM_PARAMETERS" value="" /> |
||||||
|
<option name="WORKING_DIRECTORY" value="" /> |
||||||
|
<option name="PASS_PARENT_ENVS" value="1" /> |
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" /> |
||||||
|
<option name="USE_MONO" value="0" /> |
||||||
|
<option name="RUNTIME_ARGUMENTS" value="" /> |
||||||
|
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Mystify/Mystify.csproj" /> |
||||||
|
<option name="PROJECT_EXE_PATH_TRACKING" value="1" /> |
||||||
|
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" /> |
||||||
|
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" /> |
||||||
|
<option name="PROJECT_KIND" value="DotNetCore" /> |
||||||
|
<option name="PROJECT_TFM" value="" /> |
||||||
|
<method v="2"> |
||||||
|
<option name="Build" /> |
||||||
|
</method> |
||||||
|
</configuration> |
||||||
|
</component> |
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" /> |
||||||
|
<component name="TaskManager"> |
||||||
|
<task active="true" id="Default" summary="Default task"> |
||||||
|
<changelist id="0221b891-b150-4bbf-813e-d901900db1ad" name="Default Changelist" comment="" /> |
||||||
|
<created>1617702838043</created> |
||||||
|
<option name="number" value="Default" /> |
||||||
|
<option name="presentableId" value="Default" /> |
||||||
|
<updated>1617702838043</updated> |
||||||
|
<workItem from="1617702840894" duration="1854000" /> |
||||||
|
</task> |
||||||
|
<servers /> |
||||||
|
</component> |
||||||
|
<component name="TypeScriptGeneratedFilesManager"> |
||||||
|
<option name="version" value="3" /> |
||||||
|
</component> |
||||||
|
<component name="UnityProjectConfiguration" hasMinimizedUI="null" /> |
||||||
|
<component name="UnityUnitTestConfiguration" currentTestLauncher="NUnit" /> |
||||||
|
<component name="Vcs.Log.Tabs.Properties"> |
||||||
|
<option name="TAB_STATES"> |
||||||
|
<map> |
||||||
|
<entry key="MAIN"> |
||||||
|
<value> |
||||||
|
<State /> |
||||||
|
</value> |
||||||
|
</entry> |
||||||
|
</map> |
||||||
|
</option> |
||||||
|
</component> |
||||||
|
<component name="VcsManagerConfiguration"> |
||||||
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" /> |
||||||
|
</component> |
||||||
|
</project> |
||||||
@ -0,0 +1,8 @@ |
|||||||
|
.idea/ |
||||||
|
.vscode/ |
||||||
|
.vs/ |
||||||
|
|
||||||
|
bin/ |
||||||
|
obj/ |
||||||
|
|
||||||
|
*.user |
||||||
@ -0,0 +1,12 @@ |
|||||||
|
<Application xmlns="https://github.com/avaloniaui" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:local="using:Mystify" |
||||||
|
x:Class="Mystify.App"> |
||||||
|
<Application.DataTemplates> |
||||||
|
<local:ViewLocator/> |
||||||
|
</Application.DataTemplates> |
||||||
|
|
||||||
|
<Application.Styles> |
||||||
|
<FluentTheme Mode="Light"/> |
||||||
|
</Application.Styles> |
||||||
|
</Application> |
||||||
@ -0,0 +1,26 @@ |
|||||||
|
using Avalonia; |
||||||
|
using Avalonia.Controls.ApplicationLifetimes; |
||||||
|
using Avalonia.Markup.Xaml; |
||||||
|
using Mystify.ViewModels; |
||||||
|
using Mystify.Views; |
||||||
|
|
||||||
|
namespace Mystify |
||||||
|
{ |
||||||
|
public class App : Application |
||||||
|
{ |
||||||
|
public override void Initialize() => AvaloniaXamlLoader.Load(this); |
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted() |
||||||
|
{ |
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) |
||||||
|
{ |
||||||
|
desktop.MainWindow = new MainWindow |
||||||
|
{ |
||||||
|
DataContext = new MainWindowViewModel(), |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
using System; |
||||||
|
using Avalonia.Controls; |
||||||
|
using Avalonia.Controls.Templates; |
||||||
|
using Mystify.ViewModels; |
||||||
|
|
||||||
|
namespace Mystify |
||||||
|
{ |
||||||
|
public class ViewLocator : IDataTemplate |
||||||
|
{ |
||||||
|
public bool SupportsRecycling => false; |
||||||
|
|
||||||
|
public IControl Build(object data) |
||||||
|
{ |
||||||
|
string name = data.GetType().FullName!.Replace("ViewModel", "View"); |
||||||
|
Type? type = Type.GetType(name); |
||||||
|
|
||||||
|
if (type != null) |
||||||
|
return (Control) Activator.CreateInstance(type)!; |
||||||
|
|
||||||
|
return new TextBlock { Text = "Not Found: " + name }; |
||||||
|
} |
||||||
|
|
||||||
|
public bool Match(object data) => data is ViewModelBase; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
<Window xmlns="https://github.com/avaloniaui" |
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||||
|
xmlns:vm="using:Mystify.ViewModels" |
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
||||||
|
x:Class="Mystify.Views.MainWindow" |
||||||
|
Icon="/Assets/avalonia-logo.ico" |
||||||
|
Title="Mystify"> |
||||||
|
|
||||||
|
<Design.DataContext> |
||||||
|
<vm:MainWindowViewModel/> |
||||||
|
</Design.DataContext> |
||||||
|
|
||||||
|
<TextBlock Text="{Binding Greeting}" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
||||||
|
|
||||||
|
</Window> |
||||||
@ -0,0 +1,19 @@ |
|||||||
|
using Avalonia; |
||||||
|
using Avalonia.Controls; |
||||||
|
using Avalonia.Markup.Xaml; |
||||||
|
|
||||||
|
namespace Mystify.Views |
||||||
|
{ |
||||||
|
public class MainWindow : Window |
||||||
|
{ |
||||||
|
public MainWindow() |
||||||
|
{ |
||||||
|
InitializeComponent(); |
||||||
|
#if DEBUG |
||||||
|
this.AttachDevTools(); |
||||||
|
#endif |
||||||
|
} |
||||||
|
|
||||||
|
private void InitializeComponent() => AvaloniaXamlLoader.Load(this); |
||||||
|
} |
||||||
|
} |
||||||
|
After Width: | Height: | Size: 397 B |
Loading…
Reference in new issue