-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
1,168 additions
and
68 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
<Application xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:themes="clr-namespace:Material.Styles.Themes;assembly=Material.Styles" | ||
x:Class="AvaloniaMisterDoctor.App"> | ||
<Application.Styles> | ||
<FluentTheme Mode="Light"/> | ||
<themes:MaterialTheme BaseTheme="Dark" PrimaryColor="Purple" SecondaryColor="Lime" /> | ||
<StyleInclude Source="avares://Material.Icons.Avalonia/App.xaml"></StyleInclude> | ||
|
||
</Application.Styles> | ||
</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,24 @@ | ||
using Avalonia; | ||
using Avalonia.Controls.ApplicationLifetimes; | ||
using Avalonia.Markup.Xaml; | ||
|
||
namespace AvaloniaMisterDoctor | ||
{ | ||
public partial class App : Application | ||
{ | ||
public override void Initialize() | ||
{ | ||
AvaloniaXamlLoader.Load(this); | ||
} | ||
|
||
public override void OnFrameworkInitializationCompleted() | ||
{ | ||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) | ||
{ | ||
desktop.MainWindow = new MainWindow(); | ||
} | ||
|
||
base.OnFrameworkInitializationCompleted(); | ||
} | ||
} | ||
} |
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,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 --> | ||
<TrimMode>copyused</TrimMode> | ||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Remove=".gitignore" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<!--This helps with theme dll-s trimming. | ||
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa. | ||
https://github.com/AvaloniaUI/Avalonia/issues/5593 --> | ||
<TrimmableAssembly Include="Avalonia.Themes.Fluent" /> | ||
<TrimmableAssembly Include="Avalonia.Themes.Default" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Avalonia" Version="0.10.16" /> | ||
<PackageReference Include="Avalonia.Desktop" Version="0.10.14" /> | ||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.--> | ||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.14" /> | ||
<PackageReference Include="Material.Avalonia" Version="3.0.0-rc0.98-nightly" /> | ||
<PackageReference Include="Material.Icons.Avalonia" Version="1.1.10" /> | ||
<PackageReference Include="XamlNameReferenceGenerator" Version="1.3.4" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\EngineDoctor\EngineDoctor.csproj" /> | ||
</ItemGroup> | ||
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> | ||
<Exec Command="xcopy "$(ProjectDir)Dependencies\nounlist.txt" "$(TargetDir)" /Y /I" /> | ||
</Target> | ||
</Project> |
File renamed without changes.
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,55 @@ | ||
<Window xmlns="https://github.com/avaloniaui" | ||
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:material="using:Material.Icons.Avalonia" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="AvaloniaMisterDoctor.MainWindow" | ||
Title="AvaloniaMisterDoctor"> | ||
<Panel> | ||
<!-- Add button to panel --> | ||
<TabControl> | ||
<TabItem VerticalContentAlignment="Center"> | ||
<TabItem.Header> | ||
<TextBlock VerticalAlignment="Center">Main</TextBlock> | ||
</TabItem.Header> | ||
<StackPanel > | ||
<TextBlock Text="This is the landing page for the bot! Configure you login if not setup." HorizontalAlignment="Left" VerticalAlignment="Center"/> | ||
|
||
<Button Margin="5"> | ||
<WrapPanel> | ||
<TextBlock Text="Login" HorizontalAlignment="Left" VerticalAlignment="Center"/> | ||
<material:MaterialIcon Kind="Login"></material:MaterialIcon> | ||
</WrapPanel> | ||
</Button> | ||
<Button Name="BtnBotStart" Margin="5" Click="BtnBotStart_OnClick"> | ||
<WrapPanel> | ||
<TextBlock Text="Start Bot" HorizontalAlignment="Left" VerticalAlignment="Center"/> | ||
<material:MaterialIcon Kind="Login"></material:MaterialIcon> | ||
</WrapPanel> | ||
</Button> | ||
</StackPanel> | ||
</TabItem> | ||
<TabItem> | ||
<TabItem.Header> | ||
<TextBlock VerticalAlignment="Center">Plugins</TextBlock> | ||
</TabItem.Header> | ||
<StackPanel> | ||
<TextBlock Text="I am in the triangle page ! I'll put a button to show you that each page contains what you want." HorizontalAlignment="Left" VerticalAlignment="Center"/> | ||
<Button>A button in the triangle page !</Button> | ||
<material:MaterialIcon Kind="Abacus"></material:MaterialIcon> | ||
</StackPanel> | ||
</TabItem> | ||
<TabItem> | ||
<TabItem.Header> | ||
<TextBlock VerticalAlignment="Center">Options</TextBlock> | ||
</TabItem.Header> | ||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="Square : " HorizontalAlignment="Left" VerticalAlignment="Center"/> | ||
<Rectangle Fill="Blue" Width="63" Height="41"/> | ||
</StackPanel> | ||
</TabItem> | ||
</TabControl> | ||
</Panel> | ||
|
||
</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,24 @@ | ||
using Avalonia.Controls; | ||
using Avalonia.Interactivity; | ||
using EngineDoctor; | ||
using EngineDoctor.Helpers; | ||
|
||
namespace AvaloniaMisterDoctor | ||
{ | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
var appSettings = DbHelper.ReadConnectionSettings(); | ||
Engine.Setup(appSettings); | ||
} | ||
|
||
private void BtnBotStart_OnClick(object? sender, RoutedEventArgs e) | ||
{ | ||
// Button Bot Start Click event handler | ||
|
||
Engine.Connect(); | ||
} | ||
} | ||
} |
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,21 @@ | ||
using Avalonia; | ||
using System; | ||
|
||
namespace AvaloniaMisterDoctor | ||
{ | ||
class Program | ||
{ | ||
// Initialization code. Don't use any Avalonia, third-party APIs or any | ||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized | ||
// yet and stuff might break. | ||
[STAThread] | ||
public static void Main(string[] args) => BuildAvaloniaApp() | ||
.StartWithClassicDesktopLifetime(args); | ||
|
||
// Avalonia configuration, don't remove; also used by visual designer. | ||
public static AppBuilder BuildAvaloniaApp() | ||
=> AppBuilder.Configure<App>() | ||
.UsePlatformDetect() | ||
.LogToTrace(); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
MisterDoctor/Classes/ConnectionDto.cs → EngineDoctor/Classes/ConnectionDto.cs
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
2 changes: 1 addition & 1 deletion
2
MisterDoctor/Classes/ConnectionSettings.cs → EngineDoctor/Classes/ConnectionSettings.cs
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace MisterDoctor.Classes | ||
namespace EngineDoctor.Classes | ||
{ | ||
public class ConnectionSettings | ||
{ | ||
|
4 changes: 1 addition & 3 deletions
4
MisterDoctor/Classes/IgnoredUser.cs → EngineDoctor/Classes/IgnoredUser.cs
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
using System; | ||
|
||
namespace MisterDoctor.Classes | ||
namespace EngineDoctor.Classes | ||
{ | ||
public class IgnoredUser | ||
{ | ||
|
4 changes: 1 addition & 3 deletions
4
MisterDoctor/Classes/PluginState.cs → EngineDoctor/Classes/PluginState.cs
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
using System; | ||
|
||
namespace MisterDoctor.Classes | ||
namespace EngineDoctor.Classes | ||
{ | ||
public class PluginState | ||
{ | ||
|
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,6 @@ | ||
namespace EngineDoctor.Classes | ||
{ | ||
public class PluginStates : List<PluginState> | ||
{ | ||
} | ||
} |
5 changes: 2 additions & 3 deletions
5
MisterDoctor/Classes/SettingsDto.cs → EngineDoctor/Classes/SettingsDto.cs
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
Oops, something went wrong.