From 95636d5c5120b9b324804d2b67ccf558c3b653b5 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 10 Dec 2021 22:50:25 +0100 Subject: [PATCH 1/2] change ui --- .../ViewModels/MainViewModel.cs | 9 +++++++- avifencodergui.wpf/Windows/MainWindow.xaml | 21 ++++++++++++++++--- .../Windows/SettingsWindow.xaml | 8 +++++-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/avifencodergui.wpf/ViewModels/MainViewModel.cs b/avifencodergui.wpf/ViewModels/MainViewModel.cs index 2908595..b0709fd 100644 --- a/avifencodergui.wpf/ViewModels/MainViewModel.cs +++ b/avifencodergui.wpf/ViewModels/MainViewModel.cs @@ -1,8 +1,11 @@ using System; +using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; +using System.Linq; using System.Threading.Tasks; using System.Windows; +using System.Windows.Documents; using avifencodergui.lib; using avifencodergui.wpf.Messenger; using Microsoft.Toolkit.Mvvm.ComponentModel; @@ -37,6 +40,9 @@ public MainViewModel() new RelayCommand(() => this.Messenger.Send(new WindowMessage(WindowEnum.SettingsWindows))); this.OpenEncoderInstallWikiCommand = new RelayCommand(() => this.OpenUrl("https://github.com/dhcgn/avif_encoder_gui/wiki/Install-AVIF-Encoder-and-AVIF-Decoder")); + this.Configs = new List() {"built in"}; + this.SelectedConfig = Configs.First(); + if (InDesignMode()) { this.Jobs.Add(Job.GetDesignDate(Job.JobStateEnum.Pending)); @@ -64,7 +70,8 @@ public string AvifDecVersion public RelayCommand ShowSettingsCommand { get; set; } public RelayCommand OpenEncoderInstallWikiCommand { get; set; } - + public List Configs { get; private set; } + public string SelectedConfig { get; set; } public IAsyncRelayCommand OnLoadCommand { get; } public bool CanEncode diff --git a/avifencodergui.wpf/Windows/MainWindow.xaml b/avifencodergui.wpf/Windows/MainWindow.xaml index 9dfc148..2dd3239 100644 --- a/avifencodergui.wpf/Windows/MainWindow.xaml +++ b/avifencodergui.wpf/Windows/MainWindow.xaml @@ -7,12 +7,24 @@ xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:converter="clr-namespace:avifencodergui.wpf.Converter" mc:Ignorable="d" - Title="AVIF Encoder" Height="369" Width="600"> + Title="AVIF Encoder" + Height="369" Width="600" + MinHeight="369" MinWidth="600" + > + @@ -96,9 +108,12 @@ -