Blueprint loading works

This commit is contained in:
2021-01-30 22:46:48 +01:00
parent 295f63669d
commit 1ab244f7c5
21 changed files with 710 additions and 2 deletions

9
EveCalc.Tests/App.xaml Normal file
View File

@@ -0,0 +1,9 @@
<Application x:Class="EveCalc.Tests.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:EveCalc.Tests"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

17
EveCalc.Tests/App.xaml.cs Normal file
View File

@@ -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 EveCalc.Tests
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

View File

@@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EveCalc.Shared\EveCalc.Shared.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,21 @@
<Window x:Class="EveCalc.Tests.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:EveCalc.Tests"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel>
<Button Grid.Row="0" Height="25" Width="100" Content="Login" Click="Button_Click"/>
<Button Grid.Row="0" Height="25" Width="100" Content="Get Token" Click="Button_Click_1"/>
</StackPanel>
<TextBox x:Name="TxtResponse" Grid.Row="1"/>
</Grid>
</Window>

View File

@@ -0,0 +1,51 @@
using EveCalc.Shared;
using EveCalc.Shared.Logic;
using EveCalc.Shared.StaticData;
using EveCalc.Shared.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace EveCalc.Tests
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly EsiClientWrapper client = new EsiClientWrapper();
public MainWindow()
{
this.InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
var url = this.client.GetLoginUrl();
var browser = new BrowserView(url);
if (browser.ShowDialog() == true)
{
this.client.SetAuthCode(browser.AuthCode);
}
}
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
//var result = await this.client.GetCorpMats();
//var bla = await this.client.Search("tritanium");
var bla = new StaticDataProvider();
}
}
}