Commit works in progress
This commit is contained in:
parent
2cb2479d63
commit
62cbad0d8f
@ -4,10 +4,6 @@
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AAXClean.Codecs" Version="0.2.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
@ -18,6 +14,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\..\OneDrive\Projects\AaxClean\AaxTest\AAXClean.Codecs\src\AAXClean.Codecs.csproj" />
|
||||
<ProjectReference Include="..\FileManager\FileManager.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media;
|
||||
using LibationFileManager;
|
||||
using LibationWinForms.AvaloniaUI.Views;
|
||||
using System;
|
||||
|
||||
namespace LibationWinForms.AvaloniaUI
|
||||
{
|
||||
@ -24,6 +25,10 @@ namespace LibationWinForms.AvaloniaUI
|
||||
{
|
||||
LoadStyles();
|
||||
|
||||
var SEGOEUI = new Typeface(new FontFamily(new Uri("avares://Libation/AvaloniaUI/Assets/WINGDING.TTF"), "SEGOEUI_Local"));
|
||||
var gtf = FontManager.Current.GetOrAddGlyphTypeface(SEGOEUI);
|
||||
|
||||
|
||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
var mainWindow = new MainWindow();
|
||||
|
||||
BIN
Source/LibationWinForms/AvaloniaUI/Assets/SEGOEUI.TTF
Normal file
BIN
Source/LibationWinForms/AvaloniaUI/Assets/SEGOEUI.TTF
Normal file
Binary file not shown.
BIN
Source/LibationWinForms/AvaloniaUI/Assets/WINGDING.TTF
Normal file
BIN
Source/LibationWinForms/AvaloniaUI/Assets/WINGDING.TTF
Normal file
Binary file not shown.
@ -0,0 +1,50 @@
|
||||
<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"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="LibationWinForms.AvaloniaUI.Views.Dialogs.EditReplacementChars"
|
||||
Title="EditReplacementChars">
|
||||
|
||||
<DataGrid
|
||||
GridLinesVisibility="All"
|
||||
AutoGenerateColumns="False"
|
||||
Items="{Binding replacements}">
|
||||
|
||||
<DataGrid.Columns>
|
||||
|
||||
<DataGridTemplateColumn Width="Auto" Header="Char to
Replace">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextPresenter
|
||||
Height="18"
|
||||
Margin="10,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="avares://Libation/AvaloniaUI/Assets/SEGOEUI.TTF"
|
||||
FontStyle="Normal"
|
||||
FontWeight="Normal"
|
||||
Text="{Binding CharacterToReplace}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn IsReadOnly="False" Width="Auto" Header="Replacement Text">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox
|
||||
GotFocus="Tb_GotFocus"
|
||||
Height="18"
|
||||
Margin="10,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
FontFamily="Arial"
|
||||
FontStyle="Normal"
|
||||
FontWeight="Normal"
|
||||
Text="{Binding ReplacementString}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
</Window>
|
||||
@ -0,0 +1,42 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using FileManager;
|
||||
using LibationFileManager;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace LibationWinForms.AvaloniaUI.Views.Dialogs
|
||||
{
|
||||
public partial class EditReplacementChars : DialogWindow
|
||||
{
|
||||
Configuration config = Configuration.Instance;
|
||||
public ObservableCollection<Replacement> replacements { get; }
|
||||
public EditReplacementChars()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (Design.IsDesignMode)
|
||||
AudibleUtilities.AudibleApiStorage.EnsureAccountsSettingsFileExists();
|
||||
|
||||
replacements = new(config.ReplacementCharacters.Replacements);
|
||||
DataContext = this;
|
||||
}
|
||||
|
||||
public void Tb_GotFocus(object sender, Avalonia.Input.GotFocusEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
|
||||
|
||||
private void LoadTable(IReadOnlyList<Replacement> replacements)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,10 @@
|
||||
<DataGridTemplateColumn Width="*" Header="Description">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextPresenter Height="18" Margin="10,0,10,0" VerticalAlignment="Center" Text="{Binding Description}" />
|
||||
<TextPresenter
|
||||
Height="18"
|
||||
Margin="10,0,10,0"
|
||||
VerticalAlignment="Center" Text="{Binding Description}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
@ -67,8 +67,8 @@ namespace LibationWinForms.AvaloniaUI.Views
|
||||
|
||||
private async void MainWindow_Opened(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new EditTemplateDialog(Templates.ChapterFile, "<title>");
|
||||
await dialog.ShowDialog(this);
|
||||
//var dialog = new EditReplacementChars();
|
||||
//await dialog.ShowDialog(this);
|
||||
}
|
||||
|
||||
public void ProductsDisplay_Initialized1(object sender, EventArgs e)
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Include="AvaloniaUI\Assets\**" />
|
||||
<AvaloniaResource Remove="AvaloniaUI\Assets\SEGOEUI.TTF" />
|
||||
<None Remove=".gitignore" />
|
||||
<None Remove="AvaloniaUI\Assets\Asterisk.png" />
|
||||
<None Remove="AvaloniaUI\Assets\cancel.png" />
|
||||
@ -60,7 +61,9 @@
|
||||
<None Remove="AvaloniaUI\Assets\MBIcons\Question.png" />
|
||||
<None Remove="AvaloniaUI\Assets\Question.png" />
|
||||
<None Remove="AvaloniaUI\Assets\queued.png" />
|
||||
<None Remove="AvaloniaUI\Assets\SEGOEUI.TTF" />
|
||||
<None Remove="AvaloniaUI\Assets\up.png" />
|
||||
<None Remove="AvaloniaUI\Assets\WINGDING.TTF" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -151,4 +154,8 @@
|
||||
<UpToDateCheckInput Remove="AvaloniaUI\Controls\GroupBox.axaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="AvaloniaUI\Assets\SEGOEUI.TTF" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Loading…
x
Reference in New Issue
Block a user