From 1586917a2cb33ffbcfb5d96db9c7e0f7efc7691b Mon Sep 17 00:00:00 2001 From: Tichau Date: Tue, 3 May 2016 08:15:22 +0200 Subject: [PATCH] Create about section with donation button --- Application/FileConverter/Application.xaml.cs | 2 +- .../CancelConversionJobCommand.cs | 3 +- .../FileConverter/Commands/DelegateCommand.cs | 46 ++ .../FileConverter/Commands/OpenUrlCommand.cs | 33 ++ .../ConversionJobs/ConversionJob.cs | 1 + .../FileConverter/FileConverter.csproj | 16 +- .../Resources/GitHub-Documentation-Icon.png | Bin 0 -> 976 bytes .../FileConverter/Resources/GitHub-Icon.png | Bin 0 -> 2079 bytes .../Resources/GitHub-Issue-Icon.png | Bin 0 -> 2581 bytes .../FileConverter/Resources/Pledge-icon.png | Bin 0 -> 1160 bytes .../FileConverter/Windows/SettingsWindow.xaml | 462 +++++++++++++----- .../Windows/SettingsWindow.xaml.cs | 77 +++ FileConverter.sln | 2 +- 13 files changed, 503 insertions(+), 139 deletions(-) rename Application/FileConverter/{ConversionJobs => Commands}/CancelConversionJobCommand.cs (92%) create mode 100644 Application/FileConverter/Commands/DelegateCommand.cs create mode 100644 Application/FileConverter/Commands/OpenUrlCommand.cs create mode 100644 Application/FileConverter/Resources/GitHub-Documentation-Icon.png create mode 100644 Application/FileConverter/Resources/GitHub-Icon.png create mode 100644 Application/FileConverter/Resources/GitHub-Issue-Icon.png create mode 100644 Application/FileConverter/Resources/Pledge-icon.png diff --git a/Application/FileConverter/Application.xaml.cs b/Application/FileConverter/Application.xaml.cs index e89a2d6..7ded5c8 100644 --- a/Application/FileConverter/Application.xaml.cs +++ b/Application/FileConverter/Application.xaml.cs @@ -1,7 +1,7 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. /* File Converter - This program allow you to convert file format to another. - Copyright (C) 2015 Adrien Allard + Copyright (C) 2016 Adrien Allard email: adrien.allard.pro@gmail.com This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs b/Application/FileConverter/Commands/CancelConversionJobCommand.cs similarity index 92% rename from Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs rename to Application/FileConverter/Commands/CancelConversionJobCommand.cs index 7fb2ef5..1244ea9 100644 --- a/Application/FileConverter/ConversionJobs/CancelConversionJobCommand.cs +++ b/Application/FileConverter/Commands/CancelConversionJobCommand.cs @@ -1,9 +1,10 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. -namespace FileConverter.ConversionJobs +namespace FileConverter.Commands { using System; using System.Windows.Input; + using FileConverter.ConversionJobs; public class CancelConversionJobCommand : ICommand { diff --git a/Application/FileConverter/Commands/DelegateCommand.cs b/Application/FileConverter/Commands/DelegateCommand.cs new file mode 100644 index 0000000..31569ca --- /dev/null +++ b/Application/FileConverter/Commands/DelegateCommand.cs @@ -0,0 +1,46 @@ +// License: http://www.gnu.org/licenses/gpl.html GPL version 3. + +namespace FileConverter.Commands +{ + using System; + using System.Windows.Input; + + public class DelegateCommand : ICommand + { + private Action executeMethod; + private Func canExecuteMethod; + + public DelegateCommand(Action executeMethod) + { + if (executeMethod == null) + { + throw new ArgumentNullException(nameof(executeMethod)); + } + + this.executeMethod = executeMethod; + } + + public DelegateCommand(Action executeMethod, Func canExecuteMethod) + { + this.executeMethod = executeMethod; + this.canExecuteMethod = canExecuteMethod; + } + + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + if (this.canExecuteMethod != null) + { + return this.canExecuteMethod.Invoke(); + } + + return true; + } + + public void Execute(object parameter) + { + this.executeMethod.Invoke(); + } + } +} \ No newline at end of file diff --git a/Application/FileConverter/Commands/OpenUrlCommand.cs b/Application/FileConverter/Commands/OpenUrlCommand.cs new file mode 100644 index 0000000..4c8fe92 --- /dev/null +++ b/Application/FileConverter/Commands/OpenUrlCommand.cs @@ -0,0 +1,33 @@ +// License: http://www.gnu.org/licenses/gpl.html GPL version 3. + +namespace FileConverter.Commands +{ + using System; + using System.Diagnostics; + using System.Windows.Input; + + public class OpenUrlCommand : ICommand + { + public OpenUrlCommand() + { + } + + public event EventHandler CanExecuteChanged; + + public bool CanExecute(object parameter) + { + return true; + } + + public void Execute(object parameter) + { + string url = parameter as string; + if (string.IsNullOrEmpty(url)) + { + return; + } + + Process.Start(url); + } + } +} \ No newline at end of file diff --git a/Application/FileConverter/ConversionJobs/ConversionJob.cs b/Application/FileConverter/ConversionJobs/ConversionJob.cs index 63cc122..d7b12af 100644 --- a/Application/FileConverter/ConversionJobs/ConversionJob.cs +++ b/Application/FileConverter/ConversionJobs/ConversionJob.cs @@ -7,6 +7,7 @@ namespace FileConverter.ConversionJobs using System.Runtime.CompilerServices; using System.Text; + using FileConverter.Commands; using FileConverter.Diagnostics; public class ConversionJob : INotifyPropertyChanged diff --git a/Application/FileConverter/FileConverter.csproj b/Application/FileConverter/FileConverter.csproj index 3210eb6..3dbe087 100644 --- a/Application/FileConverter/FileConverter.csproj +++ b/Application/FileConverter/FileConverter.csproj @@ -88,10 +88,12 @@ Designer + + EncodingQualitySliderControl.xaml - + @@ -247,6 +249,18 @@ + + + + + + + + + + + + copy /Y "$(SolutionDir)Middleware\ffmpeg.exe" "$(TargetDir)ffmpeg.exe" diff --git a/Application/FileConverter/Resources/GitHub-Documentation-Icon.png b/Application/FileConverter/Resources/GitHub-Documentation-Icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dfebc8d2651601d308853dabd3f2f9deaded0f33 GIT binary patch literal 976 zcmV;>126oEP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y13^hdK~#8N?V8JL6Hye#M|_*MlTMl;Z8B*{ zlVyky7tPS5i&{ft1%(t5LH`9;E(Ki_K`6Kt`Y-6xjkptEo30cWid$bOD1x*#elt1K zOr}?6GMQ^>JU{rLbMC$8%Y5@}8--yQhG7`SVq|0_S+CbO$H&LFWN317ax0t7ny@<1 zaqKcbKYyrNt*)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N6ueUQwWM-AQp!3uaXvDM6T@a0$N=6W~p<^wqK=odTWf|_hJwIwbYLYQ76DnI6FNw zJj;%20D29NMNY}JtbW7~^!`HNNNXx}6T7Yiu8R)^gX6eeoL~LX3k3|ltwO&FLg)}G zy&M1bS(f!6oBKw}an@p@?MFfPfv2SyVTc^}aftD7O;a2N;4s8I!QBXP$Fe>U`iU$* zd<+Pj_0^KE$r9@x`Rtzq&hAdhkcc9z<8JgyI*DT^y?wky#SgMcU|{roCHV|X=-v1fYmfg_RwG0#EGW1`KGw?jS2#Zh!K-(p0v7-pk2#JrHKP)a=b*YDNr6>_S=|ai+ETM;hnw&M zpo#z6jIZr8`q!fXL%7w^2hsI=R+-D?x^TZgB#5aXx=v{UFys%C7Vckn#Ib9;A0m!O z;)v8|v}-6R3qUckw56vylks00(B2<2|4N9ecrArH#2GYCM&L9pk@$P8Pl|z+=ZacB zZ>TA-`RT&C`vve|m~F5Z7-0`#iG9entbT07Zsf!Nqc(`e{sSG2%*`E)nL7Xg002ov JPDHLkV1mJ+;7I@g literal 0 HcmV?d00001 diff --git a/Application/FileConverter/Resources/GitHub-Issue-Icon.png b/Application/FileConverter/Resources/GitHub-Issue-Icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c4a560f263071cd48406915feed4b4034d294f1 GIT binary patch literal 2581 zcmV+w3hMQVP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y35H2TK~#8N?OR(ybQKmBx|T0r{*Kbq(_Lj{Wv=S#YFBr6w`*{4&?Sa0T->{N@5{!pUqb zDc>A8a6s9yV~4V7(lo{MMVXF_drn|x7+O* z9v;pWV&^|jo;>N;zJ2=>yWRfx#*G`5vS!ViXLWUTPh2k7C*m{n z4?{ykzhHMKR;*a@2X|Dqpje2?z^Rzb&(EL0x4svjogct1jjvj@D(G07Mf}F<)vKpB zZ{B=WeBOGDjg2jCX=zD5eE9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xVrBy|)M!Kl1YOJbY^pWTv&`6SZJjaKPL(=`i0EVcWFzfXkOJd+c_55HpGI^L(Nf zY%u{>sthuFLQz6Of*}vA?d|RL2f#!Gi?B7L1yjnkPK=fdhDFaF-^fb+iZpd6p>P#*G_oTeog~ zu9l6YPpPY`lNUt^_Tgc{lj?y?mD!vi*rEnxS)u?e^cq8XwQRWc>xg+i5^Qq7aA+Pz zNbJl&T%9P`q5|ZYt^j0zPUQR3YPqZsBjOGHFhZ~i5!%xTAh9z8EK#?kL58UcC@3gc zf`zup zEsbGiWo5+89C2(vWe28ADE%wjQrMXx*uw&>@W+VE_+q0=VEgbbcX;69w{6>|+bo53 zMAsq%EMog9J1}K}FFw=hA93_x=VfMQ=1aYg)YjH2 z?92eGHO3y zPh5)$C~X{zcq)d64J2T{GM{HkE6eKCM1yD8ou3P^z9sCyR99PML~jAUH}LO1K2$m! z4j){o57yb|cDrY&v$NC3>Mf4A569R?UdrZJnan`qsi3Qi+1f`6`qt{|>aW;@h#lAc zKLj%336YVEHw3+6gvTH!T0d_X5NAKc?oEetRAVJxE!u;KV|%l~CPa9NKDMICTGV1C z`h4c|OliZ;>i!R~509;A?8ah45_@uF3z~~~C76A(hQ~4%D>-u(Gv*UmLSr`;8tjD7aPr^#e0~AxVZlSXzjPNiEL`900000NkvXXu0mjfDHF#D literal 0 HcmV?d00001 diff --git a/Application/FileConverter/Resources/Pledge-icon.png b/Application/FileConverter/Resources/Pledge-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a032ffb24ebfa0ad0e1ca9d0822c9c8e9675b2db GIT binary patch literal 1160 zcmV;31b6$1P)<@-00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y1NlirK~z{r?N~`nQ&ALkOq^#EH%@Vk(YP>i zV>B`9&V`A(FuD*F1O<(PA`y*2!3fbffTCitP{cx|GFQP0Dk4aw%p#+usI&}HL57yr z)4t#G`4svKzp&xvv?1@`d*11L_uY3t6DIJS#vb@gp~xe;5NSEXrGv^P5%_3h1N ztqtK7SsUUn^@-S-db6~(!7#d}H|WzFN|y`0DG~8?GV00bTCZO3ohPJ3)c#dd!;UeX zzW00EZ;7%vS5@7v?V?6a_OM(!iRWw-fqkOJSesU_t88l&*U9deWrTfumr`E{68tji zG0nPkTFkUg2aC^mirqnm5>C5Cy!!EVW~4C*Y+{+vtEio3fsY@2%PVI8TaU1L*ra-3{EV^E1~J>WSI~IZrOY+9>*eZvQcN~ zTtfpj1E+~&5n#MkEHReY{)|?E{6&pI6vsIML&C3!HC=kPustPE-Kjwc$14HD9tX&i zrbHa0GY$mq2(%_xIfQU80*2pr^nJK7tUs>>xJ{4^xU`7BLqx!!fDJqU{&uVK#VOR+(@uS)47h$$O5on6Y z(CCW@Da)Y#UG$(_N;-6_@7<0Qfu zDzfGYOtqMJqlI_=@Dy*GQzMR(5exQ6f&s=LOMvZ2*5km!WCpIu6Aws3@tQ<=S^~xl aJg5IhguyiVx;t$E0000 + + + + + + + + + + + + + + + + + + + + + @@ -474,14 +585,13 @@ - + - - + @@ -496,158 +606,240 @@ - - - - - - - - - - - - - - - - - - + + + +