1
0
Fork 0
mirror of https://github.com/wagesj45/butterflow-ui.git synced 2024-11-13 21:33:34 -06:00

Localizations. User Settings. About and Options Menu.

This commit is contained in:
Jordan Wages 2018-07-05 00:01:11 -05:00
parent 0ffd5c401b
commit 5083716c05
16 changed files with 865 additions and 21 deletions

View file

@ -0,0 +1,58 @@
<Window x:Class="butterflow_ui.AboutWindow"
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:butterflow_ui="clr-namespace:butterflow_ui"
xmlns:loc="clr-namespace:butterflow_ui.Localization"
mc:Ignorable="d"
x:Name="butterflowUIAboutWindow"
Title="{x:Static loc:Localization.AboutWindowTitle}" SizeToContent="WidthAndHeight"
Icon="./Icon/icon.ico">
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="32">
<StackPanel HorizontalAlignment="Center">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" Height="128">
<ContentControl VerticalAlignment="Center" Template="{StaticResource ButterflowUIIcon}" />
<TextBox VerticalAlignment="Center" Text="{x:Static loc:Localization.Title}" FontSize="64" FontFamily="Segoe UI Black" />
</StackPanel>
<TextBlock Text="{x:Static loc:Localization.AboutWindowDescription}" TextAlignment="Center" />
<Separator Margin="0,15" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.DevelopersLabel}" />
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center">
<Hyperlink NavigateUri="https://github.com/wagesj45" RequestNavigate="Hyperlink_RequestNavigate">Jordan Wages</Hyperlink>
</TextBlock>
</StackPanel>
<Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Content="{x:Static loc:Localization.OpenSourceCreditsLabel}" />
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center">
butterflow
| <Hyperlink NavigateUri="https://github.com/dthpham/butterflow" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/dthpham/butterflow/blob/master/LICENSE" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
<TextBlock HorizontalAlignment="Center">
cs-mic
| <Hyperlink NavigateUri="https://github.com/wagesj45/cs-mic" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/wagesj45/cs-mic/blob/master/LICENSE" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
<TextBlock HorizontalAlignment="Center">
Gu.Wpf.Media
| <Hyperlink NavigateUri="https://github.com/JohanLarsson/Gu.Wpf.Media" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowGithubLinkLabel}" /></Hyperlink>
| <Hyperlink NavigateUri="https://github.com/JohanLarsson/Gu.Wpf.Media/blob/master/LICENSE.md" RequestNavigate="Hyperlink_RequestNavigate"><TextBlock Text="{x:Static loc:Localization.AboutWindowLicenseLinkLabel}" /></Hyperlink>
</TextBlock>
</StackPanel>
</Grid>
<Separator Margin="0,10" />
<Button Name="btnOK" MaxWidth="50" Content="{x:Static loc:Localization.OKLabel}" Click="btnOK_Click"/>
</StackPanel>
</DockPanel>
</Window>

View file

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
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.Shapes;
namespace butterflow_ui
{
/// <summary>
/// Interaction logic for AboutWindow.xaml
/// </summary>
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
}
/// <summary> Event handler. Called by Hyperlink for request navigate events. </summary>
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> Request navigate event information. </param>
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
Process.Start(e.Uri.AbsoluteUri);
e.Handled = true;
}
/// <summary> Event handler. Called by btnOK for click events. </summary>
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> Routed event information. </param>
private void btnOK_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
}
}

View file

@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="butterflow_ui.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.1" />
</startup>
<userSettings>
<butterflow_ui.Properties.Settings>
<setting name="Language" serializeAs="String">
<value>en-US</value>
</setting>
</butterflow_ui.Properties.Settings>
</userSettings>
</configuration>

View file

@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@ -13,5 +15,16 @@ namespace butterflow_ui
/// </summary>
public partial class App : Application
{
/// <summary> Raises the <see cref="E:System.Windows.Application.Startup" /> event. </summary>
/// <param name="e"> A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event
/// data. </param>
protected override void OnStartup(StartupEventArgs e)
{
// Set our localization to the users perfered language
Thread.CurrentThread.CurrentCulture = butterflow_ui.Properties.Settings.Default.Language;
Thread.CurrentThread.CurrentUICulture = butterflow_ui.Properties.Settings.Default.Language;
base.OnStartup(e);
}
}
}

View file

@ -1,6 +1,46 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:butterflow_ui">
<ControlTemplate x:Key="ButterflowUIIcon">
<Viewbox>
<Canvas Width="64" Height="64">
<Canvas.Resources>
<LinearGradientBrush x:Key="linearGradient1386" MappingMode="RelativeToBoundingBox" StartPoint="0,0" EndPoint="1,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFFFDC3F" Offset="0"/>
<GradientStop Color="#FFFFC820" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="linearGradient1388" MappingMode="Absolute" StartPoint="12,-9" EndPoint="53,-30">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFFFDC3F" Offset="0"/>
<GradientStop Color="#FFFFC820" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
<LinearGradientBrush.Transform>
<MatrixTransform Matrix="1.060401 0 0 1.2239724 -1.8709853 6.7167357"/>
</LinearGradientBrush.Transform>
</LinearGradientBrush>
</Canvas.Resources>
<Canvas Name="layer1">
<Canvas.RenderTransform>
<TranslateTransform X="0" Y="48"/>
</Canvas.RenderTransform>
<Path Name="rect1380" Fill="{StaticResource linearGradient1388}" StrokeThickness="1" Stroke="#FF000000" StrokeMiterLimit="4" StrokeStartLineCap="Round" StrokeEndLineCap="Round" Opacity="1">
<Path.Data>
<PathGeometry Figures="m 10.313536 -31.470442 c 0 0 23.745103 -0.995305 21.686464 6.68764 -1.957898 7.306975 21.686464 -6.68764 21.686464 -6.68764 v 30.94088382 c 0 0 -23.644362 0.61933472 -21.686464 -6.68764042 2.469776 -9.2173294 -21.686464 6.68764042 -21.686464 6.68764042 z" FillRule="NonZero"/>
</Path.Data>
</Path>
<TextBlock FontSize="21.84967232" FontWeight="Bold" FontFamily="Liberation Sans" FontStyle="normal" Foreground="#FFFFECB4" Canvas.Left="35.388515" Canvas.Top="-14.3" Name="text1378">
<Span Foreground="#FFFFECB4" FontSize="21.84967232">UI</Span>
</TextBlock>
</Canvas>
</Canvas>
</Viewbox>
</ControlTemplate>
<ControlTemplate x:Key="InfoIcon">
<Viewbox>
<Canvas Width="24" Height="24">
@ -166,4 +206,13 @@
</Path>
</Viewbox>
</ControlTemplate>
<ControlTemplate x:Key="OptionsIcon">
<Viewbox>
<Path Fill="#000000">
<Path.Data>
<PathGeometry Figures="M19 0h-14c-2.762 0-5 2.239-5 5v14c0 2.761 2.238 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-4 4h2v3h-2v-3zm-8 0h2v8h-2v-8zm4 13h-2v3h-2v-3h-2v-3h6v3zm8-5h-2v8h-2v-8h-2v-3h6v3z" FillRule="NonZero"/>
</Path.Data>
</Path>
</Viewbox>
</ControlTemplate>
</ResourceDictionary>

View file

@ -150,6 +150,42 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to buttterflow-ui is a graphical user interface for the butterflow video processor. .
/// </summary>
public static string AboutWindowDescription {
get {
return ResourceManager.GetString("AboutWindowDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to github.
/// </summary>
public static string AboutWindowGithubLinkLabel {
get {
return ResourceManager.GetString("AboutWindowGithubLinkLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to license.
/// </summary>
public static string AboutWindowLicenseLinkLabel {
get {
return ResourceManager.GetString("AboutWindowLicenseLinkLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to About butterflow-ui.
/// </summary>
public static string AboutWindowTitle {
get {
return ResourceManager.GetString("AboutWindowTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Advanced Options.
/// </summary>
@ -195,6 +231,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Copy butterflow arguments.
/// </summary>
public static string CopyArgumentsMenu {
get {
return ResourceManager.GetString("CopyArgumentsMenu", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Custom Rate.
/// </summary>
@ -204,6 +249,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Developers and Contributors.
/// </summary>
public static string DevelopersLabel {
get {
return ResourceManager.GetString("DevelopersLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Edit.
/// </summary>
@ -366,6 +420,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Language.
/// </summary>
public static string LanguageLabel {
get {
return ResourceManager.GetString("LanguageLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Levels.
/// </summary>
@ -402,6 +465,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to OK.
/// </summary>
public static string OKLabel {
get {
return ResourceManager.GetString("OKLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Open....
/// </summary>
@ -411,6 +483,42 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Open Source Libraries.
/// </summary>
public static string OpenSourceCreditsLabel {
get {
return ResourceManager.GetString("OpenSourceCreditsLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Application Options....
/// </summary>
public static string OptionsMenu {
get {
return ResourceManager.GetString("OptionsMenu", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Note: Changing the user language will require a restart of the program..
/// </summary>
public static string OptionsWindowLanguageChangeNotice {
get {
return ResourceManager.GetString("OptionsWindowLanguageChangeNotice", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Options.
/// </summary>
public static string OptionsWindowTitle {
get {
return ResourceManager.GetString("OptionsWindowTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pixel Neighborhood.
/// </summary>
@ -519,6 +627,15 @@ namespace butterflow_ui.Localization {
}
}
/// <summary>
/// Looks up a localized string similar to Save.
/// </summary>
public static string SaveLabel {
get {
return ResourceManager.GetString("SaveLabel", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Save Configuration....
/// </summary>

View file

@ -0,0 +1,357 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AboutButterflowMenu" xml:space="preserve">
<value>butterflow en github ...</value>
</data>
<data name="AboutButterflowUIMenu" xml:space="preserve">
<value>butterflow-ui en github ...</value>
</data>
<data name="AboutMenu" xml:space="preserve">
<value>Acerca de butterflow-ui</value>
</data>
<data name="AdvancedOptionsGroupBox" xml:space="preserve">
<value>Opciones avanzadas</value>
</data>
<data name="ClipTooltip" xml:space="preserve">
<value>Clip una subregión en el video.</value>
</data>
<data name="CommonOptionsGroupBox" xml:space="preserve">
<value>Opciones Comunes</value>
</data>
<data name="CustomPlaybackRateLabel" xml:space="preserve">
<value>Tarifa personalizada</value>
</data>
<data name="EditMenu" xml:space="preserve">
<value>_Editar</value>
</data>
<data name="EndLabel" xml:space="preserve">
<value>mi</value>
</data>
<data name="FileInputGroupBox" xml:space="preserve">
<value>Entrada</value>
</data>
<data name="FileLabel" xml:space="preserve">
<value>Archivo de vídeo</value>
</data>
<data name="FileMenu" xml:space="preserve">
<value>_Archivo</value>
</data>
<data name="HeightLabel" xml:space="preserve">
<value>Altura</value>
</data>
<data name="HelpMenu" xml:space="preserve">
<value>_Ayuda</value>
</data>
<data name="KeepAudioDescription" xml:space="preserve">
<value>Representa el video de salida con el audio del video original. Sin marcar, no se incluirá sonido en el video de salida.</value>
</data>
<data name="KeepAudioLabel" xml:space="preserve">
<value>Mantener el audio</value>
</data>
<data name="LosslessDescription" xml:space="preserve">
<value>Renderiza el video sin compresión con pérdida. El video no perderá ninguna calidad visual, pero dará como resultado un archivo de salida muy grande.</value>
</data>
<data name="LosslessLabel" xml:space="preserve">
<value>Calidad sin pérdida</value>
</data>
<data name="PlaybackRateDescription" xml:space="preserve">
<value>Controla el nuevo framerate del video de salida. Esto se puede establecer en términos absolutos y relativos.</value>
</data>
<data name="PlaybackRateLabel" xml:space="preserve">
<value>Velocidad de reproducción</value>
</data>
<data name="PlayPauseTooltip" xml:space="preserve">
<value>Reproducir / Pausar el video</value>
</data>
<data name="RenderingLabel" xml:space="preserve">
<value>Representación de video</value>
</data>
<data name="ResolutionLabel" xml:space="preserve">
<value>Resolución de salida</value>
</data>
<data name="SkipBackTooltip" xml:space="preserve">
<value>Salte hacia atrás en el video.</value>
</data>
<data name="SkipForwardTooltip" xml:space="preserve">
<value>Salta hacia adelante en el video.</value>
</data>
<data name="StartLabel" xml:space="preserve">
<value>S</value>
</data>
<data name="StopTooltip" xml:space="preserve">
<value>Detener el video</value>
</data>
<data name="SubregionsDescription" xml:space="preserve">
<value>Regiones individuales del video a procesar.</value>
</data>
<data name="SubregionsLabel" xml:space="preserve">
<value>Subregiones</value>
</data>
<data name="Title" xml:space="preserve">
<value>butterflow-ui</value>
</data>
<data name="ToEndLabel" xml:space="preserve">
<value>Para terminar</value>
</data>
<data name="WidthLabel" xml:space="preserve">
<value>Anchura</value>
</data>
<data name="_120fpsLabel" xml:space="preserve">
<value>120 fps</value>
</data>
<data name="_24fpsLabel" xml:space="preserve">
<value>24 fps</value>
</data>
<data name="_2xLabel" xml:space="preserve">
<value>2x</value>
</data>
<data name="_30fpsLabel" xml:space="preserve">
<value>30 fps</value>
</data>
<data name="_3xLabel" xml:space="preserve">
<value>3x</value>
</data>
<data name="_4xLabel" xml:space="preserve">
<value>4x</value>
</data>
<data name="_60fpsLabel" xml:space="preserve">
<value>60 fps</value>
</data>
<data name="CancelLabel" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="CancelTooltip" xml:space="preserve">
<value>Cancele la operación de flujo de mantequilla actual.</value>
</data>
<data name="FastPyramidsLabel" xml:space="preserve">
<value>Usa pirámides rápidas</value>
</data>
<data name="FastPyramidsTooltip" xml:space="preserve">
<value />
</data>
<data name="FileOutputGroupBox" xml:space="preserve">
<value>Salida</value>
</data>
<data name="FlowFilterLabel" xml:space="preserve">
<value>Filtro de flujo</value>
</data>
<data name="FlowFilterTooltip" xml:space="preserve">
<value>Filtro utilizado para la estimación del flujo óptico.</value>
</data>
<data name="IterationsLabel" xml:space="preserve">
<value>Iteraciones de pirámide</value>
</data>
<data name="IterationsTooltip" xml:space="preserve">
<value>El número de iteraciones a usar para cada capa de pirámide.</value>
</data>
<data name="KeepSubregionsLabel" xml:space="preserve">
<value>Mantener subregiones</value>
</data>
<data name="KeepSubregionsTooltip" xml:space="preserve">
<value>Renderiza subregiones no especificadas explícitamente.</value>
</data>
<data name="LevelsLabel" xml:space="preserve">
<value>Niveles</value>
</data>
<data name="LevelsTooltip" xml:space="preserve">
<value>El número de capas de pirámide.</value>
</data>
<data name="OpenMenuItem" xml:space="preserve">
<value>_Abierto...</value>
</data>
<data name="PixelNeighborhoodLabel" xml:space="preserve">
<value>Barrio de píxeles</value>
</data>
<data name="PixelNeighborhoodTooltip" xml:space="preserve">
<value>Tamaño del vecindario de píxeles.</value>
</data>
<data name="ProcessLabel" xml:space="preserve">
<value>Proceso</value>
</data>
<data name="ProcessTooltip" xml:space="preserve">
<value>Procesar el video Este puede ser un proceso largo.</value>
</data>
<data name="PyramidScaleLabel" xml:space="preserve">
<value>Factor de escala de pirámide</value>
</data>
<data name="PyramidScaleTooltip" xml:space="preserve">
<value />
</data>
<data name="SaveAsMenuItem" xml:space="preserve">
<value>Guardar configuración _Como ...</value>
</data>
<data name="SaveMenuItem" xml:space="preserve">
<value>_Guardar configuración ...</value>
</data>
<data name="SmoothDerivativeLabel" xml:space="preserve">
<value>Derivado suave</value>
</data>
<data name="SmoothDerivativeTooltip" xml:space="preserve">
<value>Tamaño de la desviación estándar utilizada para derivados suaves.</value>
</data>
<data name="SmoothMotionLabel" xml:space="preserve">
<value>Movimiento suave</value>
</data>
<data name="SmoothMotionTooltip" xml:space="preserve">
<value>Ajuste para sintonizar para un movimiento suave. Este modo produce cuadros sin artefactos al enfatizar los cuadros combinados sobre los píxeles de deformación.</value>
</data>
<data name="WindowSizeLabel" xml:space="preserve">
<value>Tamaño de ventana</value>
</data>
<data name="WindowSizeTooltip" xml:space="preserve">
<value />
</data>
<data name="AboutWindowDescription" xml:space="preserve">
<value>buttterflow-ui es una interfaz gráfica de usuario para el procesador de video butterflow.</value>
</data>
<data name="AboutWindowGithubLinkLabel" xml:space="preserve">
<value>github</value>
</data>
<data name="AboutWindowLicenseLinkLabel" xml:space="preserve">
<value>licencia</value>
</data>
<data name="AboutWindowTitle" xml:space="preserve">
<value>Acerca de butterflow-ui</value>
</data>
<data name="CopyArgumentsMenu" xml:space="preserve">
<value>Copie los argumentos de butterflow</value>
</data>
<data name="DevelopersLabel" xml:space="preserve">
<value>Desarrolladores y colaboradores</value>
</data>
<data name="LanguageLabel" xml:space="preserve">
<value>Idioma</value>
</data>
<data name="OKLabel" xml:space="preserve">
<value>DE ACUERDO</value>
</data>
<data name="OpenSourceCreditsLabel" xml:space="preserve">
<value>Bibliotecas de código abierto</value>
</data>
<data name="OptionsMenu" xml:space="preserve">
<value>Opciones de aplicación ...</value>
</data>
<data name="OptionsWindowTitle" xml:space="preserve">
<value>Opciones</value>
</data>
<data name="SaveLabel" xml:space="preserve">
<value>Salvar</value>
</data>
</root>

View file

@ -318,4 +318,43 @@
<data name="WindowSizeTooltip" xml:space="preserve">
<value />
</data>
<data name="AboutWindowDescription" xml:space="preserve">
<value>buttterflow-ui is a graphical user interface for the butterflow video processor. </value>
</data>
<data name="AboutWindowGithubLinkLabel" xml:space="preserve">
<value>github</value>
</data>
<data name="AboutWindowLicenseLinkLabel" xml:space="preserve">
<value>license</value>
</data>
<data name="AboutWindowTitle" xml:space="preserve">
<value>About butterflow-ui</value>
</data>
<data name="CopyArgumentsMenu" xml:space="preserve">
<value>Copy butterflow arguments</value>
</data>
<data name="DevelopersLabel" xml:space="preserve">
<value>Developers and Contributors</value>
</data>
<data name="LanguageLabel" xml:space="preserve">
<value>Language</value>
</data>
<data name="OKLabel" xml:space="preserve">
<value>OK</value>
</data>
<data name="OpenSourceCreditsLabel" xml:space="preserve">
<value>Open Source Libraries</value>
</data>
<data name="OptionsMenu" xml:space="preserve">
<value>Application Options...</value>
</data>
<data name="OptionsWindowLanguageChangeNotice" xml:space="preserve">
<value>Note: Changing the user language will require a restart of the program.</value>
</data>
<data name="OptionsWindowTitle" xml:space="preserve">
<value>Options</value>
</data>
<data name="SaveLabel" xml:space="preserve">
<value>Save</value>
</data>
</root>

View file

@ -9,7 +9,7 @@
xmlns:butterflow_ui="clr-namespace:butterflow_ui"
mc:Ignorable="d"
x:Name="butterflowUIWindow"
Title="{x:Static loc:Localization.Title}" Height="600" Width="800"
Title="{x:Static loc:Localization.Title}" Width="Auto" Height="Auto"
Icon="./Icon/icon.ico">
<Window.Resources>
<ObjectDataProvider x:Key="enumRegionTypeDataProvider" MethodName="GetValues"
@ -45,7 +45,19 @@
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="{x:Static loc:Localization.EditMenu}" />
<MenuItem Header="{x:Static loc:Localization.EditMenu}">
<MenuItem Name="menuCopyArguments" Header="{x:Static loc:Localization.CopyArgumentsMenu}" Click="btnCopyArguments_Click">
<MenuItem.Icon>
<ContentControl Template="{StaticResource CopyIcon}" />
</MenuItem.Icon>
</MenuItem>
<Separator />
<MenuItem Name="menuOptions" Header="{x:Static loc:Localization.OptionsMenu}" Click="menuOptions_Click">
<MenuItem.Icon>
<ContentControl Template="{StaticResource OptionsIcon}" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="{x:Static loc:Localization.HelpMenu}">
<MenuItem Name="menuButterflowGithub" Header="{x:Static loc:Localization.AboutButterflowMenu}" Click="menuButterflowGithub_Click" >
<MenuItem.Icon>

View file

@ -380,7 +380,19 @@ namespace butterflow_ui
/// <param name="e"> Routed event information. </param>
private void menuAboutButterflowUI_Click(object sender, RoutedEventArgs e)
{
var aboutWindow = new AboutWindow();
aboutWindow.Show();
}
/// <summary> Event handler. Called by menuOptions for click events. </summary>
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> Routed event information. </param>
private void menuOptions_Click(object sender, RoutedEventArgs e)
{
var optionsWindow = new OptionsWindow();
optionsWindow.Show();
}
#endregion

View file

@ -0,0 +1,22 @@
<Window x:Class="butterflow_ui.OptionsWindow"
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:butterflow_ui="clr-namespace:butterflow_ui"
xmlns:settings="clr-namespace:butterflow_ui.Properties"
xmlns:loc="clr-namespace:butterflow_ui.Localization"
mc:Ignorable="d"
Title="{x:Static loc:Localization.OptionsWindowTitle}" SizeToContent="WidthAndHeight">
<DockPanel Margin="32">
<StackPanel>
<WrapPanel>
<Label Content="{x:Static loc:Localization.LanguageLabel}" />
<ComboBox DisplayMemberPath="DisplayName" ItemsSource="{Binding SupportedLanguages, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type butterflow_ui:OptionsWindow}}, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding Source={x:Static settings:Settings.Default}, Path=Language}" />
</WrapPanel>
<TextBlock Text="{x:Static loc:Localization.OptionsWindowLanguageChangeNotice}" />
<Separator Margin="0,10" />
<Button Name="btnSave" MaxWidth="45" Content="{x:Static loc:Localization.SaveLabel}" Click="btnSave_Click" />
</StackPanel>
</DockPanel>
</Window>

View file

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
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.Shapes;
namespace butterflow_ui
{
/// <summary>
/// Interaction logic for OptionsWindow.xaml
/// </summary>
public partial class OptionsWindow : Window
{
#region Properties
/// <summary> Gets or sets the supported languages. </summary>
/// <value> The supported languages. </value>
public List<CultureInfo> SupportedLanguages { get; set; } = new List<CultureInfo>(new[] { CultureInfo.CreateSpecificCulture("en-US"), CultureInfo.CreateSpecificCulture("es-ES") });
#endregion
#region Constructors
/// <summary> Default constructor. </summary>
public OptionsWindow()
{
InitializeComponent();
}
#endregion
#region Methods
/// <summary> Event handler. Called by btnSave for click events. </summary>
/// <param name="sender"> Source of the event. </param>
/// <param name="e"> Routed event information. </param>
private void btnSave_Click(object sender, RoutedEventArgs e)
{
Properties.Settings.Default.Save();
this.Close();
}
#endregion
}
}

View file

@ -8,23 +8,31 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace butterflow_ui.Properties
{
namespace butterflow_ui.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("en-US")]
public global::System.Globalization.CultureInfo Language {
get {
return ((global::System.Globalization.CultureInfo)(this["Language"]));
}
set {
this["Language"] = value;
}
}
}
}

View file

@ -1,7 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="butterflow_ui.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="Language" Type="System.Globalization.CultureInfo" Scope="User">
<Value Profile="(Default)">en-US</Value>
</Setting>
</Settings>
</SettingsFile>

28
butterflow-ui/Settings.cs Normal file
View file

@ -0,0 +1,28 @@
namespace butterflow_ui.Properties {
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
public sealed partial class Settings {
public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}

View file

@ -63,10 +63,21 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
<Compile Include="FlowFilterType.cs" />
<Compile Include="InverseBoolConverter.cs" />
<Compile Include="OptionsWindow.xaml.cs">
<DependentUpon>OptionsWindow.xaml</DependentUpon>
</Compile>
<Compile Include="PropertyChangedAlerter.cs" />
<Compile Include="RegionType.cs" />
<Compile Include="Settings.cs" />
<Page Include="AboutWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Icons.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -95,6 +106,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="OptionsWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="OptionsConfiguration.cs" />
@ -111,6 +126,7 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Localization\Localization.es.resx" />
<EmbeddedResource Include="Localization\Localization.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Localization.Designer.cs</LastGenOutput>
@ -121,7 +137,7 @@
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<Generator>PublicSettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="ThirdPartyCompiled\array.pyd" />