Skip to content

Commit

Permalink
Bug fixes with the update process.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickeManarin committed Feb 19, 2017
1 parent f7eedd9 commit 41e3abf
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ScreenToGif/Resources/Localization/StringResources.en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<s:String x:Key="Update">Update</s:String>
<s:String x:Key="Update.NewRelease">New release!</s:String>
<s:String x:Key="Download">Download</s:String>
<s:String x:Key="Update.CloseThis">Do you want to close this app?</s:String>
<s:String x:Key="Update.CloseThis.Detail">This is the old version. You have already downloaded the new version.</s:String>

<!--Options Page-->
<s:String x:Key="Title.Options">ScreenToGif - Options</s:String>
Expand Down
2 changes: 2 additions & 0 deletions ScreenToGif/Resources/Localization/StringResources.pt-BR.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
<s:String x:Key="Update">Atualização</s:String>
<s:String x:Key="Update.NewRelease">Nova versão!</s:String>
<s:String x:Key="Download">Download</s:String>
<s:String x:Key="Update.CloseThis">Você deseja fechar este aplicativo?</s:String>
<s:String x:Key="Update.CloseThis.Detail">Esta é a versão antiga. Você já baixou a versão nova.</s:String>

<!--Options Page-->
<s:String x:Key="Title.Options">Screen To Gif - Opções</s:String>
Expand Down
43 changes: 43 additions & 0 deletions ScreenToGif/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,49 @@
</Style.Triggers>
</Style>

<!--DoubleBox Style-->
<Style TargetType="{x:Type n:HexadecimalBox}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Height" Value="23"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#FFABABAB"/>
<Setter Property="MaxLength" Value="9"/>

<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type n:HexadecimalBox}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>

<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" Value="#FF7EB4EA"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter Property="Background" Value="WhiteSmoke"/>
<Setter Property="BorderBrush" Value="#FF569DE5"/>
</Trigger>
<Trigger Property="IsReadOnly" Value="True">
<Setter Property="Background" Value="#ECECEC"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.56"/>
</Trigger>
</Style.Triggers>
</Style>

<!--Image RadioButton Style-->
<Style BasedOn="{StaticResource {x:Type RadioButton}}" TargetType="{x:Type n:ImageRadioButton}">
<Setter Property="Template">
Expand Down
2 changes: 1 addition & 1 deletion ScreenToGif/Windows/Other/DownloadDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private async void DownloadButton_Click(object sender, RoutedEventArgs e)

var save = new Microsoft.Win32.SaveFileDialog
{
FileName = "ScreenToGif " + Element.XPathSelectElement("tag_name").Value,
FileName = "ScreenToGif", // + Element.XPathSelectElement("tag_name").Value,
DefaultExt = ".exe",
Filter = "ScreenToGif executable (.exe)|*.exe"
};
Expand Down
4 changes: 2 additions & 2 deletions ScreenToGif/Windows/Other/Startup.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private void Update_Executed(object sender, ExecutedRoutedEventArgs e)

if (result.HasValue && result.Value)
{
if (Dialog.Ask("Screen To Gif", "Do you want to close this app?", "This is the old release, you downloaded the new version already."))
if (Dialog.Ask("Screen To Gif", FindResource("Update.CloseThis").ToString(), FindResource("Update.CloseThis.Detail").ToString()))
Environment.Exit(25);
}
}
Expand Down Expand Up @@ -221,7 +221,7 @@ private async void CheckLatestRelease()
var current = Assembly.GetExecutingAssembly().GetName().Version;
var internet = new Version(major, minor, build);

if (current > internet)
if (current >= internet)
{
UpdateTextBlock.Visibility = Visibility.Collapsed;
return;
Expand Down

0 comments on commit 41e3abf

Please sign in to comment.