All new options dialog and new ClickOnce deployment...
I could really use some help with refactoring and testing...any volunteers? The code is getting sloppy again.
This commit is contained in:
Родитель
ff7fb65d65
Коммит
aba002a411
|
@ -37,7 +37,7 @@
|
|||
<PublisherName>BabySmash</PublisherName>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<ApplicationRevision>57</ApplicationRevision>
|
||||
<ApplicationRevision>74</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
|
@ -61,6 +61,9 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationFramework.Luna">
|
||||
<RequiredTargetFramework>3.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
|
|
|
@ -40,6 +40,12 @@ namespace BabySmash
|
|||
|
||||
void deployment_CheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e)
|
||||
{
|
||||
if (e.Error != null)
|
||||
{
|
||||
Debug.WriteLine(e.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
ClickOnceUpdateAvailable = e.UpdateAvailable;
|
||||
if (ClickOnceUpdateAvailable)
|
||||
{
|
||||
|
@ -59,8 +65,15 @@ namespace BabySmash
|
|||
if (ApplicationDeployment.IsNetworkDeployed)
|
||||
{
|
||||
ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment;
|
||||
deployment.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(deployment_CheckForUpdateCompleted);
|
||||
deployment.CheckForUpdateAsync();
|
||||
deployment.CheckForUpdateCompleted += deployment_CheckForUpdateCompleted;
|
||||
try
|
||||
{
|
||||
deployment.CheckForUpdateAsync();
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
Debug.WriteLine(e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
foreach (WinForms.Screen s in WinForms.Screen.AllScreens)
|
||||
|
@ -91,7 +104,7 @@ namespace BabySmash
|
|||
//m.Height = 600;
|
||||
//m.Left = 900;
|
||||
//m.Top = 500;
|
||||
//////TODO: END - COMMENT IN for Debugging
|
||||
////////TODO: END - COMMENT IN for Debugging
|
||||
|
||||
//TODO: Start - COMMENT OUT for Debugging
|
||||
m.WindowState = WindowState.Maximized;
|
||||
|
@ -111,7 +124,7 @@ namespace BabySmash
|
|||
//if someone made us a screensaver, then don't show the options dialog.
|
||||
if ((args != null && args[0] != "/s") && String.CompareOrdinal(ext, ".SCR") != 0)
|
||||
{
|
||||
ShowOptionsDialog(ClickOnceUpdateAvailable);
|
||||
ShowOptionsDialog(!ApplicationDeployment.CurrentDeployment.IsFirstRun);
|
||||
}
|
||||
}
|
||||
timer.Start();
|
||||
|
@ -317,6 +330,7 @@ namespace BabySmash
|
|||
o.Topmost = true;
|
||||
o.Focus();
|
||||
o.updateButton.Visibility = UpdateAvailable ? Visibility.Visible : Visibility.Collapsed;
|
||||
//o.updateProgress.Visibility = UpdateAvailable ? Visibility.Visible : Visibility.Collapsed;
|
||||
o.ShowDialog();
|
||||
Debug.Write("test");
|
||||
foreach (MainWindow m in this.windows)
|
||||
|
|
|
@ -6,24 +6,24 @@
|
|||
Height="500" Width="500" WindowStyle="None" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
AllowsTransparency="True">
|
||||
|
||||
<Window.Resources>
|
||||
<Storyboard x:Key="Timeline1" Timeline.DesiredFrameRate="10">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever"
|
||||
AutoReverse="True" Storyboard.TargetName="UpdateGlow"
|
||||
Storyboard.TargetProperty="GlowColor" >
|
||||
<SplineColorKeyFrame Value="#FFCDCDCD" KeyTime="00:00:00"/>
|
||||
<SplineColorKeyFrame Value="#FFB92121" KeyTime="00:00:01"/>
|
||||
<SplineColorKeyFrame Value="#FF2921B9" KeyTime="00:00:02"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Window.Resources>
|
||||
<Window.Resources>
|
||||
<Storyboard x:Key="Timeline1" Timeline.DesiredFrameRate="10">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever"
|
||||
AutoReverse="True" Storyboard.TargetName="UpdateGlow"
|
||||
Storyboard.TargetProperty="GlowColor" >
|
||||
<SplineColorKeyFrame Value="#FFCDCDCD" KeyTime="00:00:00"/>
|
||||
<SplineColorKeyFrame Value="#FFB92121" KeyTime="00:00:01"/>
|
||||
<SplineColorKeyFrame Value="#FF2921B9" KeyTime="00:00:02"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</Window.Resources>
|
||||
|
||||
<Window.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
|
||||
</Window.Triggers>
|
||||
<Window.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
|
||||
</Window.Triggers>
|
||||
|
||||
|
||||
<!--<Window.Triggers>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<LineBreak/>
|
||||
<Bold>Ctrl-Shift-Alt-O</Bold> for options, <Bold>ALT-F4</Bold> to exit
|
||||
</TextBlock>
|
||||
<TextBlock x:Name="UpdateAvailableLabel" Visibility="Collapsed" Margin="15,0,0,0" FontSize="12">
|
||||
<TextBlock x:Name="UpdateAvailableLabel" Visibility="Collapsed" Margin="15,0,0,0" FontSize="12">
|
||||
<TextBlock.BitmapEffect>
|
||||
<BitmapEffectGroup>
|
||||
<OuterGlowBitmapEffect x:Name="UpdateGlow" GlowColor="Red" GlowSize="3"/>
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace BabySmash
|
|||
|
||||
private UserControl customCursor;
|
||||
public UserControl CustomCursor { get { return customCursor; } set { customCursor = value; } }
|
||||
|
||||
|
||||
public void AddFigure(UserControl c)
|
||||
{
|
||||
this.figuresCanvas.Children.Add(c);
|
||||
|
|
851
Options.xaml
851
Options.xaml
|
@ -1,150 +1,729 @@
|
|||
<Window x:Class="BabySmash.Options"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:BabySmash.Properties"
|
||||
xmlns:l="clr-namespace:BabySmash"
|
||||
Title="Baby Smash! - Options"
|
||||
Height="383" Width="638"
|
||||
ShowInTaskbar="True"
|
||||
<Window
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="BabySmash.Options"
|
||||
x:Name="Window"
|
||||
Title="BabySmash! - Options"
|
||||
Width="640" Height="480"
|
||||
xmlns:local="clr-namespace:BabySmash.Properties"
|
||||
xmlns:l="clr-namespace:BabySmash"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"
|
||||
ShowInTaskbar="True"
|
||||
Topmost="True"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
WindowStyle="ThreeDBorderWindow"
|
||||
ResizeMode="NoResize">
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
|
||||
>
|
||||
<Window.Resources>
|
||||
<SolidColorBrush x:Key="Brush1" Color="#FF3F3F3F"/>
|
||||
|
||||
<local:Settings x:Key="settings" />
|
||||
<CollectionViewSource Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}" x:Key="myFonts"/>
|
||||
|
||||
<Storyboard x:Key="Timeline1">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" AutoReverse="True" Storyboard.TargetName="updateButton" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
|
||||
<SplineColorKeyFrame Value="#FFCDCDCD" KeyTime="00:00:00"/>
|
||||
<SplineColorKeyFrame Value="#FFB92121" KeyTime="00:00:01"/>
|
||||
<SplineColorKeyFrame Value="#FF2921B9" KeyTime="00:00:02"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" RepeatBehavior="Forever" AutoReverse="True" Storyboard.TargetName="updateButton" Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
|
||||
<SplineColorKeyFrame Value="#FFCDCDCD" KeyTime="00:00:00"/>
|
||||
<SplineColorKeyFrame Value="#FFB92121" KeyTime="00:00:01"/>
|
||||
<SplineColorKeyFrame Value="#FF2921B9" KeyTime="00:00:02"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<!-- Brushes -->
|
||||
<RadialGradientBrush x:Key="blueBrush" MappingMode="Absolute" GradientOrigin="410.416016,182.5" Center="410.416016,182.5" RadiusX="118.077667" RadiusY="118.077667">
|
||||
<RadialGradientBrush.Transform>
|
||||
<MatrixTransform Matrix="1,0,-0,-1,-255.808105,264.916992" />
|
||||
</RadialGradientBrush.Transform>
|
||||
<GradientStop Offset="0" Color="#ff00ffff"/>
|
||||
<GradientStop Offset="1" Color="#ff0000ff"/>
|
||||
</RadialGradientBrush>
|
||||
<RadialGradientBrush x:Key="orangeBrush" MappingMode="Absolute" GradientOrigin="664.333008,431.5" Center="664.333008,431.5" RadiusX="104.916328" RadiusY="104.916328">
|
||||
<RadialGradientBrush.Transform>
|
||||
<MatrixTransform Matrix="1,0,-0,-1,-546.399414,533.633789" />
|
||||
</RadialGradientBrush.Transform>
|
||||
<GradientStop Offset="0" Color="#ffffff00"/>
|
||||
<GradientStop Offset="1" Color="#fff05923"/>
|
||||
</RadialGradientBrush>
|
||||
<RadialGradientBrush x:Key="purpleBrush" MappingMode="Absolute" GradientOrigin="110.185547,455" Center="110.185547,455" RadiusX="98.5" RadiusY="98.5">
|
||||
<RadialGradientBrush.Transform>
|
||||
<MatrixTransform Matrix="1,0,-0,-1,-6.685547,558.5" />
|
||||
</RadialGradientBrush.Transform>
|
||||
<GradientStop Offset="0" Color="#ffff00ff"/>
|
||||
<GradientStop Offset="1" Color="#ff9d005c"/>
|
||||
</RadialGradientBrush>
|
||||
<RadialGradientBrush x:Key="greenBrush" MappingMode="Absolute" GradientOrigin="390.395508,448.130371" Center="390.395508,448.130371" RadiusX="113.034821" RadiusY="113.034821">
|
||||
<RadialGradientBrush.Transform>
|
||||
<MatrixTransform Matrix="1,0,-0,-1,-263.816895,569.592773" />
|
||||
</RadialGradientBrush.Transform>
|
||||
<GradientStop Offset="0" Color="#ff00ff00"/>
|
||||
<GradientStop Offset="1" Color="#ff006736"/>
|
||||
</RadialGradientBrush>
|
||||
<RadialGradientBrush x:Key="redBrush" MappingMode="Absolute" GradientOrigin="123,198" Center="123,198" RadiusX="102" RadiusY="102">
|
||||
<RadialGradientBrush.Transform>
|
||||
<MatrixTransform Matrix="1,0,-0,-1,-16,305" />
|
||||
</RadialGradientBrush.Transform>
|
||||
<GradientStop Offset="0" Color="#ffff0000"/>
|
||||
<GradientStop Offset="1" Color="#ff980000"/>
|
||||
</RadialGradientBrush>
|
||||
|
||||
|
||||
<!-- DROPDOWN based on SimpleStyles -->
|
||||
|
||||
<Style x:Key="babySmashComboBox" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Grid>
|
||||
<!-- The ToggleButton is databound to the ComboBox itself to toggle IsDropDownOpen -->
|
||||
<ToggleButton Grid.Column="2" Template="{DynamicResource BSToggleButtonControlTemplate}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
|
||||
<ContentPresenter HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>
|
||||
|
||||
<!-- The TextBox must be named PART_EditableTextBox or ComboBox will not recognize it -->
|
||||
<TextBox Visibility="Hidden" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}"/>
|
||||
|
||||
<!-- The Popup shows the list of items in the ComboBox. IsOpen is databound to IsDropDownOpen which is toggled via the ComboBoxToggleButton -->
|
||||
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
|
||||
<Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
|
||||
<Border x:Name="DropDownBorder" BorderThickness="1" Background="#FFA7A7A7"/>
|
||||
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
|
||||
|
||||
<!-- The StackPanel is used to display the children by setting IsItemsHost to be True -->
|
||||
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>
|
||||
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!-- This forces the DropDown to have a minimum size if it is empty -->
|
||||
<Trigger Property="IsGrouping" Value="true">
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</Trigger>
|
||||
<Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
|
||||
<Setter Property="CornerRadius" Value="4" TargetName="DropDownBorder"/>
|
||||
<Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEditable" Value="true">
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox"/>
|
||||
<Setter Property="Visibility" Value="Hidden" TargetName="ContentSite"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="BorderBrush" Value="{x:Null}"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF"/>
|
||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontWeight" Value="Normal"/>
|
||||
<Setter Property="Margin" Value="0,2,0,2"/>
|
||||
<Setter Property="Padding" Value="5,1,1,1"/>
|
||||
</Style>
|
||||
|
||||
<!-- Simple ComboBox Toggle Button - This is used in ComboBox to expand and collapse the ComboBox Popup-->
|
||||
<ControlTemplate x:Key="BSToggleButtonControlTemplate" TargetType="{x:Type ToggleButton}">
|
||||
<Grid x:Name="grid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="1" RadiusY="1">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush EndPoint="0.5,-2.453" StartPoint="0.5,2.847">
|
||||
<GradientStop Color="#FF000000" Offset="0"/>
|
||||
<GradientStop Color="#FFFFFFFF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Rectangle Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="1" RadiusY="1"/>
|
||||
<Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="#FFF7F7F7"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="Fill" TargetName="Rectangle">
|
||||
<Setter.Value>
|
||||
<LinearGradientBrush EndPoint="0.498,-2.887" StartPoint="0.498,2.413">
|
||||
<GradientStop Color="#FF000000" Offset="0"/>
|
||||
<GradientStop Color="#FFFFFFFF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="true"/>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Opacity" TargetName="grid" Value="0.3"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<!-- Simple ComboBox
|
||||
This uses the ComboBoxToggleButton to expand and collapse a Popup control
|
||||
SimpleScrollViewer to allow items to be scrolled and SimpleComboBoxItem to define the look of each item
|
||||
The Popup shows a list of items in a StackPanel-->
|
||||
|
||||
<Style x:Key="BSComboBoxStyle" TargetType="{x:Type ComboBox}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="true"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBox}">
|
||||
<Grid>
|
||||
<!-- The ToggleButton is databound to the ComboBox itself to toggle IsDropDownOpen -->
|
||||
<ToggleButton Grid.Column="2" Template="{DynamicResource BSToggleButtonControlTemplate}" x:Name="ToggleButton" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"/>
|
||||
<TextBlock>
|
||||
<ContentPresenter HorizontalAlignment="Left" Margin="3,0,23,3" x:Name="ContentSite" VerticalAlignment="Center" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" IsHitTestVisible="False"/>
|
||||
</TextBlock>
|
||||
|
||||
<!-- The TextBox must be named PART_EditableTextBox or ComboBox will not recognize it -->
|
||||
<TextBox Visibility="Hidden" Template="{DynamicResource ComboBoxTextBox}" HorizontalAlignment="Left" Margin="3,3,23,3" x:Name="PART_EditableTextBox" Style="{x:Null}" VerticalAlignment="Center" Focusable="True" Background="Transparent" IsReadOnly="{TemplateBinding IsReadOnly}" d:IsHidden="True"/>
|
||||
|
||||
<!-- The Popup shows the list of items in the ComboBox. IsOpen is databound to IsDropDownOpen which is toggled via the ComboBoxToggleButton -->
|
||||
<Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
|
||||
<Grid MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
|
||||
<Border x:Name="DropDownBorder" BorderThickness="1" Background="#FFA7A7A7"/>
|
||||
<ScrollViewer Margin="4,6,4,6" Style="{DynamicResource bsScrollViewerStyle}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
|
||||
|
||||
<!-- The StackPanel is used to display the children by setting IsItemsHost to be True -->
|
||||
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained"/>
|
||||
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Popup>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!-- This forces the DropDown to have a minimum size if it is empty -->
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="MinHeight" Value="95" TargetName="DropDownBorder"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsGrouping" Value="true">
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
|
||||
</Trigger>
|
||||
<Trigger Property="AllowsTransparency" SourceName="Popup" Value="true">
|
||||
<Setter Property="CornerRadius" Value="4" TargetName="DropDownBorder"/>
|
||||
<Setter Property="Margin" Value="0,2,0,0" TargetName="DropDownBorder"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEditable" Value="true">
|
||||
<Setter Property="IsTabStop" Value="false"/>
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="PART_EditableTextBox"/>
|
||||
<Setter Property="Visibility" Value="Hidden" TargetName="ContentSite"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type ComboBoxItem}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="False"/>
|
||||
</Style.Triggers>
|
||||
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
|
||||
<Setter Property="Padding" Value="3,3,3,3"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||
<Border x:Name="Bd" SnapsToDevicePixels="true" Padding="5,5,5,5">
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsHighlighted" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Foreground" Value="#FF464646"/>
|
||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
<Style x:Key="bsScrollViewerStyle" TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollContentPresenter Grid.Column="0" Grid.Row="0" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" CanContentScroll="{TemplateBinding CanContentScroll}"/>
|
||||
|
||||
<!-- The visibility of the ScrollBars is controlled by the implementation fo the control -->
|
||||
<ScrollBar Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Grid.Column="0" Grid.Row="1" x:Name="PART_HorizontalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Horizontal" Value="{Binding Path=HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}" Minimum="0" Maximum="{TemplateBinding ScrollableWidth}" AutomationProperties.AutomationId="HorizontalScrollBar"/>
|
||||
<ScrollBar Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Grid.Column="1" Grid.Row="0" x:Name="PART_VerticalScrollBar" Style="{DynamicResource SimpleScrollBar}" Orientation="Vertical" Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Minimum="0" Maximum="{TemplateBinding ScrollableHeight}" AutomationProperties.AutomationId="VerticalScrollBar"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- EOF dropdown -->
|
||||
<Style x:Key="ButtonFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="3" SnapsToDevicePixels="true"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<LinearGradientBrush x:Key="ButtonNormalBackgroundFill" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="White" Offset="0"/>
|
||||
<GradientStop Color="#FFE3E5F0" Offset="0.5"/>
|
||||
<GradientStop Color="#FFC6C5D7" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
<SolidColorBrush x:Key="ButtonBorder" Color="#FF003C74"/>
|
||||
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ButtonNormalBackgroundFill}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Width="Auto" Height="Auto" Cursor="Hand">
|
||||
<Rectangle Stroke="#FF393939" RadiusX="1" RadiusY="1" HorizontalAlignment="Stretch" Width="Auto" x:Name="rectangle" StrokeThickness="3">
|
||||
<Rectangle.Fill>
|
||||
<LinearGradientBrush EndPoint="0.5,-1.074" StartPoint="0.5,2.191">
|
||||
<GradientStop Color="#FF000000" Offset="0"/>
|
||||
<GradientStop Color="#FFFFFFFF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<ContentPresenter HorizontalAlignment="Center" Margin="10,10,10,10" VerticalAlignment="Center">
|
||||
<ContentPresenter.Resources>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="16"/>
|
||||
<Setter Property="Foreground" Value="#fff"/>
|
||||
<Setter Property="FontWeight" Value="Bold"/>
|
||||
<Setter Property="FontFamily" Value="Segoe UI"/>
|
||||
</Style>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
</Grid>
|
||||
<ControlTemplate.Resources>
|
||||
<Storyboard x:Key="OnMouseEnter1">
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,2.191"/>
|
||||
<SplinePointKeyFrame KeyTime="00:00:00.3000000" Value="0.5,1.901"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,-1.074"/>
|
||||
<SplinePointKeyFrame KeyTime="00:00:00.3000000" Value="0.5,-1.364"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="OnMouseEnter_Copy1">
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,1.901"/>
|
||||
<SplinePointKeyFrame KeyTime="00:00:00.3000000" Value="0.5,2.191"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,-1.364"/>
|
||||
<SplinePointKeyFrame KeyTime="00:00:00.3000000" Value="0.5,-1.074"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="click">
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,-0.421"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
<PointAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
|
||||
<SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,2.844"/>
|
||||
</PointAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<ControlTemplate.Triggers>
|
||||
<EventTrigger RoutedEvent="ButtonBase.Click">
|
||||
<BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="Mouse.MouseEnter">
|
||||
<BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="Mouse.MouseLeave">
|
||||
<BeginStoryboard x:Name="OnMouseEnter_Copy1_BeginStoryboard" Storyboard="{StaticResource OnMouseEnter_Copy1}"/>
|
||||
</EventTrigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true"/>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="true"/>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<ControlTemplate x:Key="roundButton" TargetType="{x:Type Button}">
|
||||
<Grid>
|
||||
<Ellipse Fill="#FF3F3F3F" Stroke="#FF999999" HorizontalAlignment="Left" VerticalAlignment="Top" Width="50" Height="50" StrokeThickness="3"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
<Style x:Key="RoundButtonStyle2" TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
|
||||
<Setter Property="Background" Value="{StaticResource ButtonNormalBackgroundFill}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<ControlTemplate.Resources>
|
||||
<Storyboard x:Key="OnMouseEnter1"/>
|
||||
<Storyboard x:Key="OnMouseEnter_Copy1"/>
|
||||
<Storyboard x:Key="click"/>
|
||||
<Storyboard x:Key="rbOver">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
|
||||
<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF3F3F3F"/>
|
||||
<SplineColorKeyFrame KeyTime="00:00:00.4000000" Value="#FF313131"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="rbOver_Copy1">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
|
||||
<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF313131"/>
|
||||
<SplineColorKeyFrame KeyTime="00:00:00.4000000" Value="#FF3F3F3F"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="rbClick">
|
||||
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
|
||||
<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF1A1A1A"/>
|
||||
<SplineColorKeyFrame KeyTime="00:00:00.2000000" Value="#FF3F3F3F"/>
|
||||
</ColorAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<Grid Width="Auto" Height="Auto" Cursor="Hand">
|
||||
<Ellipse Stroke="#FF999999" StrokeThickness="3" x:Name="rectangle" Width="50" Height="50" Fill="#FF3F3F3F"/>
|
||||
<Path Fill="#ff999999" Data="F1 M 13.479492,9.236328 L 17.595703,5.120117 C 18.767578,3.948730 18.767578,2.049805 17.595703,0.878418 C 16.423828,-0.292969 14.523438,-0.292969 13.351563,0.878418 L 9.236328,4.993164 L 5.122070,0.878418 C 3.950195,-0.292969 2.049805,-0.292969 0.877930,0.878418 C -0.292969,2.049805 -0.292969,3.948730 0.877930,5.120117 L 4.994141,9.236328 L 0.877930,13.352539 C -0.292969,14.523438 -0.292969,16.422852 0.877930,17.593750 C 1.463867,18.179688 2.231445,18.471680 3.000000,18.471680 C 3.768555,18.471680 4.536133,18.179688 5.122070,17.593750 L 9.236328,13.479492 L 13.351563,17.593750 C 13.937500,18.179688 14.705078,18.471680 15.473633,18.471680 C 16.242188,18.471680 17.009766,18.179688 17.595703,17.593750 C 18.767578,16.422852 18.767578,14.523438 17.595703,13.352539 L 13.479492,9.236328 Z" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<EventTrigger RoutedEvent="ButtonBase.Click">
|
||||
<BeginStoryboard Storyboard="{StaticResource rbClick}" x:Name="rbClick_BeginStoryboard"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="Mouse.MouseEnter">
|
||||
<BeginStoryboard Storyboard="{StaticResource rbOver}" x:Name="rbOver_BeginStoryboard"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="Mouse.MouseLeave">
|
||||
<BeginStoryboard x:Name="OnMouseEnter_Copy1_BeginStoryboard" Storyboard="{StaticResource rbOver_Copy1}"/>
|
||||
</EventTrigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true"/>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="true"/>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<LinearGradientBrush x:Key="CheckRadioFillNormal">
|
||||
<GradientStop Color="#FFD2D4D2" Offset="0"/>
|
||||
<GradientStop Color="#FFFFFFFF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<LinearGradientBrush x:Key="CheckRadioStrokeNormal">
|
||||
<GradientStop Color="#FF004C94" Offset="0"/>
|
||||
<GradientStop Color="#FF003C74" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
<Style x:Key="EmptyCheckBoxFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="1" SnapsToDevicePixels="true"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="CheckRadioFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="14,0,0,0" SnapsToDevicePixels="true"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="BSCheckBoxStyle1" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="Background" Value="{StaticResource CheckRadioFillNormal}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource CheckRadioStrokeNormal}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<BulletDecorator SnapsToDevicePixels="true" Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Microsoft_Windows_Themes:BulletChrome Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" IsChecked="{TemplateBinding IsChecked}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Margin="5,0,0,0"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="true">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="2,0,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<SolidColorBrush x:Key="ListBorder" Color="#FFA5ACB2"/>
|
||||
<Style x:Key="BSTextBoxStyle1" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="Padding" Value="2"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="AllowDrop" Value="true"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="Bd" SnapsToDevicePixels="true" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="#FF3D3D3D" CornerRadius="1,1,1,1">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,0.67" StartPoint="0.5,-0.955">
|
||||
<GradientStop Color="#FF000000" Offset="0"/>
|
||||
<GradientStop Color="#FFFFFFFF" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
|
||||
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="#FFB5B5B5"/>
|
||||
<Setter Property="Opacity" TargetName="Bd" Value="0.2"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
</Window.Resources>
|
||||
|
||||
<Window.Triggers>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
||||
<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
|
||||
</EventTrigger>
|
||||
<EventTrigger RoutedEvent="FrameworkElement.Loaded"/>
|
||||
</Window.Triggers>
|
||||
|
||||
<Grid DataContext="{StaticResource settings}" Width="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="119" />
|
||||
<ColumnDefinition Width="Auto" MinWidth="58" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="43" />
|
||||
<RowDefinition Height="Auto" MinHeight="43" />
|
||||
<RowDefinition Height="Auto" MinHeight="43" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="Auto" MinHeight="20" />
|
||||
<RowDefinition Height="*" MinHeight="34" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="3" Grid.RowSpan="9" TextWrapping="Wrap" FontSize="18" TextAlignment="Center" Grid.ColumnSpan="1" >
|
||||
<TextBlock.BitmapEffect>
|
||||
<BitmapEffectGroup>
|
||||
<OuterGlowBitmapEffect GlowColor="Yellow" GlowSize="15"/>
|
||||
</BitmapEffectGroup>
|
||||
</TextBlock.BitmapEffect>
|
||||
<Bold>Welcome to BabySmash!</Bold><LineBreak/>We're adding new features weekly.
|
||||
This week added click animations and all new graphics!
|
||||
<LineBreak/><Bold>Try the many options and find the ones that are right for your baby!</Bold><LineBreak/>
|
||||
<Italic>There's even more fun coming soon!</Italic>
|
||||
</TextBlock >
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2" Height="43" VerticalAlignment="Top">
|
||||
<Label Margin="10,15,0,0" >Start removing after</Label>
|
||||
<TextBox Text="{Binding Path=Default.ClearAfter}"
|
||||
Height="20" Width="30" Margin="0,15,0,0" />
|
||||
<Label Margin="0,15,0,0" >Shapes</Label>
|
||||
</StackPanel>
|
||||
<Label Height="23" Grid.Row="1" Margin="10">Sounds</Label>
|
||||
<ComboBox
|
||||
SelectedValue="{Binding Path=Default.Sounds}"
|
||||
SelectedValuePath="Content" Grid.Row="1" Height="23" Margin="70,10,7,0" Grid.ColumnSpan="2" VerticalAlignment="Top">
|
||||
<ComboBoxItem>None</ComboBoxItem>
|
||||
<ComboBoxItem>Laughter</ComboBoxItem>
|
||||
<ComboBoxItem>Speech</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<Label Height="23" Grid.Row="2" Margin="10">Cursor</Label>
|
||||
<ComboBox
|
||||
SelectedValue="{Binding Path=Default.CursorType}"
|
||||
SelectedValuePath="Content" Grid.Row="2" Height="23" Margin="70,10,7,0" Grid.ColumnSpan="2" VerticalAlignment="Top">
|
||||
<ComboBoxItem>Hand</ComboBoxItem>
|
||||
<ComboBoxItem>Arrow</ComboBoxItem>
|
||||
</ComboBox>
|
||||
<Grid DataContext="{StaticResource settings}" x:Name="LayoutRoot" Background="Transparent">
|
||||
<!-- #CC000000-->
|
||||
|
||||
|
||||
<Label Height="23" Grid.Row="3" Margin="10">Font</Label>
|
||||
<ComboBox MaxDropDownHeight="150" x:Name="FontChooser" Grid.Row="3" Margin="70,10,7,0"
|
||||
ItemsSource="{Binding Source={StaticResource myFonts}}"
|
||||
SelectedValue="{Binding Path=Default.FontFamily}" SelectedValuePath="Source" Height="23" VerticalAlignment="Top" Grid.ColumnSpan="2">
|
||||
<ComboBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ComboBox.ItemsPanel>
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontFamily="{Binding}" Height="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.ColumnSpan="2" Grid.Column="0" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.ForceUppercase,Mode=TwoWay}" >
|
||||
Force Letters to UPPERCASE
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Row="5" Grid.ColumnSpan="2" Grid.Column="0" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.FacesOnShapes,Mode=TwoWay}" >
|
||||
Faces on Shapes
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.BitmapEffects,Mode=TwoWay}" IsEnabled="False">
|
||||
Hardware Effects (DISABLED FOR NOW)
|
||||
</CheckBox>
|
||||
<CheckBox Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.MouseDraw,Mode=TwoWay}" >
|
||||
Clickless Mouse Drawing
|
||||
</CheckBox>
|
||||
<CheckBox x:Name="TransparentCheckBox" Grid.Row="8" Grid.ColumnSpan="3" Grid.Column="0" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.TransparentBackground,Mode=TwoWay}" >
|
||||
Transparent Background (Requires Application Restart)
|
||||
</CheckBox>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Grid.Row="9" Grid.ColumnSpan="2" HorizontalAlignment="Stretch">
|
||||
<CheckBox x:Name="FadeChecked" Margin="15,0,0,0"
|
||||
IsChecked="{Binding Path=Default.FadeAway,Mode=TwoWay}" >
|
||||
Fade Shapes Away in</CheckBox>
|
||||
<TextBox Margin="5,0,0,0"
|
||||
Text="{Binding Path=Default.FadeAfter}"
|
||||
IsEnabled="{Binding ElementName=FadeChecked,Path=IsChecked,Mode=OneWay}"
|
||||
Height="20" Width="30" />
|
||||
<TextBlock Margin="5,0,0,0">secs.</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Grid.Row="10" VerticalAlignment="Bottom" Margin="0,0,5,5" HorizontalAlignment="Right" Grid.Column="3"><Bold>Thoughts or ideas?<LineBreak/><Hyperlink x:Name="FeedbackLink" Hyperlink.Click="FeedbackLink_Click">http://feedback.babysmash.com</Hyperlink></Bold></TextBlock>
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="600" Height="370" Background="{x:Null}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="39.5"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="55.5"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Fill="{DynamicResource Brush1}" Stroke="#FF999999" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" StrokeThickness="3" RadiusX="5" RadiusY="5" Grid.ColumnSpan="2" Grid.RowSpan="3" >
|
||||
<Rectangle.BitmapEffect>
|
||||
<OuterGlowBitmapEffect GlowColor="#7F000000" GlowSize="15" Opacity="0.3"/>
|
||||
</Rectangle.BitmapEffect>
|
||||
</Rectangle>
|
||||
<Viewbox Margin="-4,-57,-25.157,0" x:Name="shapes1" VerticalAlignment="Top" Height="135.469" Clip="M7.5,-253 C7.5,-255.76142 9.7385763,-258 12.5,-258 L599.5,-258 C602.26142,-258 604.5,-255.76142 604.5,-253 L604.5,104 C604.5,106.76142 602.26142,109 599.5,109 L12.5,109 C9.7385763,109 7.5,106.76142 7.5,104 z" RenderTransformOrigin="0.5,0.5" Grid.Row="2" Stretch="Fill">
|
||||
<Viewbox.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="0"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Viewbox.RenderTransform>
|
||||
<Canvas x:Name="shapes" Width="999.894" Height="424.367">
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="10" Grid.ColumnSpan="2" HorizontalAlignment="Right">
|
||||
<Button Name="okButton" IsDefault="True" Margin="0,7,10,7" Padding="30,0,30,0" Click="OK_Click" >OK</Button>
|
||||
<Button IsCancel="True" Margin="5,7,7,7" Padding="15,0,15,0" Click="Cancel_Click" Width="77">Cancel</Button>
|
||||
</StackPanel>
|
||||
<Button x:Name="updateButton" Visibility="Collapsed" Click="updateButton_Click" Grid.Row="4" Grid.Column="3" Grid.RowSpan="3" Margin="80,7,60,7" Padding="30,0,30,0" >
|
||||
<Bold>Update BabySmash!</Bold>
|
||||
</Button>
|
||||
|
||||
<!-- BOF Parellelogram -->
|
||||
<Canvas x:Name="Parellelogram" Width="320" Height="170" RenderTransformOrigin="0.5,0.5" Canvas.Left="300" Canvas.Top="207.75">
|
||||
<Canvas.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="0"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Canvas.RenderTransform>
|
||||
<Path StrokeThickness="10" Stroke="#ff000000" StrokeMiterLimit="1" Data="F1 M 302.564941,159.833984 L 6.651855,159.833984 L 51.451172,5 L 257.766113,5 L 302.564941,159.833984 Z" x:Name="shape" Fill="{DynamicResource blueBrush}"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 172.153809,102.869141 C 172.137207,112.559570 164.296387,120.399414 154.608887,120.416016 L 154.608887,120.416016 C 144.918457,120.399414 137.077637,112.559570 137.061035,102.869141 L 137.061035,102.869141 C 137.061035,100.108398 134.821777,97.869141 132.061035,97.869141 L 132.061035,97.869141 C 129.300293,97.869141 127.061035,100.108398 127.061035,102.869141 L 127.061035,102.869141 C 127.064941,118.084961 139.393066,130.413086 154.608887,130.416992 L 154.608887,130.416992 C 169.822754,130.413086 182.151855,118.084961 182.154785,102.869141 L 182.154785,102.869141 C 182.154785,100.108398 179.916504,97.869141 177.153809,97.869141 L 177.153809,97.869141 C 174.393066,97.869141 172.153809,100.108398 172.153809,102.869141 L 172.153809,102.869141 Z" x:Name="mouth"/>
|
||||
<Path Fill="#ff000000" Stretch="Fill" x:Name="ParallelEyes" Width="30" Height="34" Canvas.Left="139.608" Canvas.Top="34.417" Data="M23.5,0 C27.089844,0 30,2.9101563 30,6.5 L30,27.5 C30,31.089844 27.089844,34 23.5,34 19.910156,34 17,31.089844 17,27.5 L17,6.5 C17,2.9101563 19.910156,0 23.5,0 z M6.5,0 C10.089844,0 13,2.9101563 13,6.5 L13,27.5 C13,31.089844 10.089844,34 6.5,34 2.9101563,34 0,31.089844 0,27.5 L0,6.5 C0,2.9101563 2.9101563,0 6.5,0 z"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- BOF Square -->
|
||||
<Canvas x:Name="Square" Width="210" Height="210" RenderTransformOrigin="0.5,0.5" Canvas.Left="551.667" Canvas.Top="177.75">
|
||||
<Canvas.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="-7.336"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Canvas.RenderTransform>
|
||||
<Rectangle StrokeThickness="10" Stroke="#ff000000" Width="207" Height="207" Fill="{DynamicResource purpleBrush}"/>
|
||||
<Path Fill="#ff000000" Stretch="Fill" Width="61.591" Height="37.387" Canvas.Left="72.705" Canvas.Top="53.613" Data="M46.313477,0 L56.276855,0 C59.211914,0 61.59082,2.3793945 61.59082,5.3139648 L61.59082,37.386719 41,37.386719 41,5.3139648 C41,2.3793945 43.378906,0 46.313477,0 z M5.3134766,0 L15.276855,0 C18.211914,0 20.59082,2.3793945 20.59082,5.3139648 L20.59082,37.386719 0,37.386719 0,5.3139648 C0,2.3793945 2.3789063,0 5.3134766,0 z" x:Name="SquareEyes"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 122.779297,145.530762 C 122.779297,156.178223 114.147461,164.810059 103.5,164.810059 C 92.852539,164.810059 84.220703,156.178223 84.220703,145.530762 C 84.220703,134.883301 92.852539,145.530762 103.5,145.530762 C 114.147461,145.530762 122.779297,134.883301 122.779297,145.530762 Z" x:Name="mouth2"/>
|
||||
</Canvas>
|
||||
|
||||
<!-- BOF Star -->
|
||||
<Canvas x:Name="Star" Width="260" Height="240" RenderTransformOrigin="0.5,0.5" Canvas.Left="700" Canvas.Top="175.5">
|
||||
<Canvas.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="10.421"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Canvas.RenderTransform>
|
||||
<Path StrokeThickness="10" Stroke="#ff000000" StrokeMiterLimit="1" Data="F1 M 126.578613,11.297852 L 162.373535,83.825684 L 242.412598,95.456055 L 184.495605,151.911133 L 198.167480,231.626953 L 126.578613,193.990234 L 54.988770,231.626953 L 68.661621,151.911133 L 10.744629,95.456055 L 90.783691,83.825684 L 126.578613,11.297852 Z" x:Name="starShape" Fill="{DynamicResource greenBrush}"/>
|
||||
<Path Fill="#ff000000" Stretch="Fill" Width="56" Height="23" Canvas.Left="98.579" Canvas.Top="103.093" Data="M44.5,0 C50.851563,0 56,5.1489258 56,11.5 56,17.851074 50.851563,23 44.5,23 38.148438,23 33,17.851074 33,11.5 33,5.1489258 38.148438,0 44.5,0 z M11.5,0 C17.850586,0 23,5.1489258 23,11.5 23,17.851074 17.850586,23 11.5,23 5.1484375,23 0,17.851074 0,11.5 0,5.1489258 5.1484375,0 11.5,0 z" x:Name="StarEyes"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 139.507324,154.020020 C 139.507324,161.159668 133.717773,166.948242 126.578125,166.948242 C 119.438477,166.948242 113.649902,161.159668 113.649902,154.020020 C 113.649902,146.879883 119.438477,154.020020 126.578125,154.020020 C 133.717773,154.020020 139.507324,146.879883 139.507324,154.020020 Z" x:Name="mouth3"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
<!-- BOF Circle -->
|
||||
<Canvas x:Name="Circle" Width="215" Height="215" RenderTransformOrigin="0.5,0.5" Canvas.Left="-9.333" Canvas.Top="170.75" d:LayoutOverrides="Height">
|
||||
<Canvas.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="0"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Canvas.RenderTransform>
|
||||
<Ellipse StrokeThickness="10" Stroke="#ff000000" Width="212.176" Height="212.176" Fill="{DynamicResource redBrush}"/>
|
||||
<Path StrokeThickness="10" Stroke="#ff000000" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeMiterLimit="1" Data="F1 M 58.970703,66.372070 C 64.513184,62.001953 71.509277,59.393555 79.114258,59.393555 C 86.719727,59.393555 93.715820,62.001953 99.258301,66.372070" x:Name="CircleEye1"/>
|
||||
<Path StrokeThickness="10" Stroke="#ff000000" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeMiterLimit="1" Data="F1 M 114.742188,66.372070 C 120.284180,62.001953 127.280273,59.393555 134.885742,59.393555 C 142.491211,59.393555 149.487305,62.001953 155.029297,66.372070" x:Name="CircleEye2"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 124.545898,151.451172 C 124.529297,161.141602 116.688477,168.981445 107.000977,168.998047 L 107.000977,168.998047 C 97.310547,168.981445 89.469727,161.141602 89.453125,151.451172 L 89.453125,151.451172 C 89.453125,148.690430 87.213867,146.451172 84.453125,146.451172 L 84.453125,146.451172 C 81.692383,146.451172 79.453125,148.690430 79.453125,151.451172 L 79.453125,151.451172 C 79.457031,166.666992 91.785156,178.995117 107.000977,178.999023 L 107.000977,178.999023 C 122.214844,178.995117 134.543945,166.666992 134.546875,151.451172 L 134.546875,151.451172 C 134.546875,148.690430 132.308594,146.451172 129.545898,146.451172 L 129.545898,146.451172 C 126.785156,146.451172 124.545898,148.690430 124.545898,151.451172 L 124.545898,151.451172 Z" x:Name="mouth4"/>
|
||||
</Canvas>
|
||||
|
||||
|
||||
|
||||
<!-- BOF Hexagon -->
|
||||
<Canvas x:Name="Hexagon" Width="240" Height="210" RenderTransformOrigin="0.5,0.5" Canvas.Left="150.667" Canvas.Top="192.75">
|
||||
<Canvas.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform ScaleX="1" ScaleY="1"/>
|
||||
<SkewTransform AngleX="0" AngleY="0"/>
|
||||
<RotateTransform Angle="0"/>
|
||||
<TranslateTransform X="0" Y="0"/>
|
||||
</TransformGroup>
|
||||
</Canvas.RenderTransform>
|
||||
<Path StrokeThickness="10" Stroke="#ff000000" StrokeMiterLimit="1" Data="F1 M 61.853516,199.267578 L 5.773438,102.133789 L 61.853516,5 L 174.013672,5 L 230.093750,102.133789 L 174.013672,199.267578 L 61.853516,199.267578 Z" x:Name="hexagon" Fill="{DynamicResource orangeBrush}"/>
|
||||
<Path Fill="#ff000000" Stretch="Fill" Width="55.59" Height="36.947" Canvas.Left="90.139" Canvas.Top="52.747" Data="M40.3125,0 L50.275391,0 C53.210938,0 55.589844,2.3793945 55.589844,5.3139648 L55.589844,36.946777 C52.250977,36.327637 48.813477,35.988281 45.294922,35.988281 41.776367,35.988281 38.338867,36.327637 35,36.946777 L35,5.3139648 C35,2.3793945 37.378906,0 40.3125,0 z M5.3125,0 L15.275391,0 C18.210938,0 20.589844,2.3793945 20.589844,5.3139648 L20.589844,36.946777 C17.250977,36.327637 13.813477,35.988281 10.294922,35.988281 6.7763672,35.988281 3.3388672,36.327637 0,36.946777 L0,5.3139648 C0,2.3793945 2.3789063,0 5.3125,0 z" x:Name="HexagonEyes"/>
|
||||
<Path Fill="#ff000000" Data="F1 M 117.933594,135.528809 C 112.938477,135.528809 93.465820,133.640625 88.424805,132.747559 L 96.684570,165.867188 C 97.222656,168.024414 100.017578,169.694336 102.953125,169.694336 L 132.916016,169.694336 C 135.849609,169.694336 138.644531,168.024414 139.182617,165.867188 L 147.442383,132.747559 C 142.402344,133.640625 122.929688,135.528809 117.933594,135.528809 Z" x:Name="mouth1"/>
|
||||
</Canvas>
|
||||
</Canvas>
|
||||
</Viewbox>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="20,0,0,0" VerticalAlignment="Bottom" FontFamily="Segoe UI" FontSize="18" FontWeight="Bold" Foreground="#FFFFFFFF" Text="Welcome to BabySmash!" TextWrapping="Wrap"/>
|
||||
<TextBlock FontFamily="Segoe UI" FontSize="18" FontWeight="Bold" Foreground="#FFFFFFFF" Text="Options" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" HorizontalAlignment="Left" VerticalAlignment="Bottom" Grid.Column="1" Margin="20,0,0,0"/>
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" Foreground="#FFD1D1D1" Grid.Row="1" Margin="20,10,20,0" FontSize="14" FontFamily="Segoe UI"><Run Text="We're adding new features weekly. "/><LineBreak/><Run Text="This week added click animations and all new graphics! "/><LineBreak/><Run Text=""/><LineBreak/><Run Text="Try the many options and find the ones that are right for your baby!"/><LineBreak/><Run Text=""/><LineBreak/><Run Text="There's even more fun coming soon!"/><LineBreak/><LineBreak/><Run Text=""/><Bold><Run Text="Thoughts or ideas?"/><LineBreak/><Hyperlink TextDecorations="" Click="FeedbackLink_Click" x:Name="FeedbackLink"><Run Foreground="#FFeeeeee" Text="http://feedback.babysmash.com"/></Hyperlink></Bold></TextBlock>
|
||||
<Button x:Name="updateButton" Visibility="Hidden" Click="updateButton_Click" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Content="Update BabySmash!" Grid.Row="1" Margin="20,0,20,8.723" Style="{DynamicResource ButtonStyle1}"/>
|
||||
<ProgressBar x:Name="updateProgress" Minimum="0" Maximum="100" Visibility="Hidden" Grid.Row="1" Margin="20,0,20,8.723" VerticalAlignment="Bottom" Height="40" />
|
||||
|
||||
<Grid HorizontalAlignment="Stretch" Margin="20,10,20,0" VerticalAlignment="Top" Width="Auto" Height="Auto" Grid.Row="1" Grid.Column="1" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.497*"/>
|
||||
<ColumnDefinition Width="0.503*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
<RowDefinition Height="29"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="#FFD1D1D1" Text="Start removing after" Margin="0,0,0,0" FontSize="14" FontFamily="Segoe UI" Grid.Row="0" d:LayoutOverrides="Height" />
|
||||
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="1" >
|
||||
<TextBox Foreground="#FF252525" FontSize="14" FontFamily="Segoe UI" Text="{Binding Path=Default.ClearAfter}" VerticalAlignment="Top" Width="40" Style="{DynamicResource BSTextBoxStyle1}" Background="#FF3A3A3A" FontWeight="Bold" />
|
||||
<TextBlock TextWrapping="Wrap" Foreground="#FFD1D1D1" Text="shapes" FontSize="14" FontFamily="Segoe UI" d:LayoutOverrides="Width, Height" Margin="5,0,0,0" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" Foreground="#FFD1D1D1" Text="Sounds" Grid.Row="1" Margin="0,0,0,0" FontSize="14" FontFamily="Segoe UI" />
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" Foreground="#FFD1D1D1" Text="Cursor" Grid.Row="2" Margin="0,0,0,0" FontSize="14" FontFamily="Segoe UI" />
|
||||
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" Foreground="#FFD1D1D1" Text="Font" Grid.Row="3" Margin="0,0,0,0" FontSize="14" FontFamily="Segoe UI" />
|
||||
|
||||
|
||||
<ComboBox
|
||||
SelectedValue="{Binding Path=Default.Sounds}"
|
||||
SelectedValuePath="Content" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Style="{DynamicResource babySmashComboBox}" Grid.ColumnSpan="2" Width="170" HorizontalAlignment="Right">
|
||||
<ComboBoxItem Content="None"/>
|
||||
<ComboBoxItem Content="Laughter"/>
|
||||
<ComboBoxItem Content="Speech"/>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox
|
||||
SelectedValue="{Binding Path=Default.CursorType}"
|
||||
SelectedValuePath="Content" Grid.Row="2" Grid.Column="0" VerticalAlignment="Top" Style="{DynamicResource babySmashComboBox}" Grid.ColumnSpan="2" Width="170" HorizontalAlignment="Right">
|
||||
<ComboBoxItem Content="Hand"/>
|
||||
<ComboBoxItem Content="Arrow"/>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
<ComboBox x:Name="FontChooser" ItemsSource="{Binding Source={StaticResource myFonts}}" Style="{DynamicResource babySmashComboBox}"
|
||||
SelectedValue="{Binding Path=Default.FontFamily}" SelectedValuePath="Source" Grid.Row="3" Grid.Column="0" VerticalAlignment="Top" Grid.ColumnSpan="2" Width="170" HorizontalAlignment="Right">
|
||||
<ComboBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ComboBox.ItemsPanel>
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontFamily="{Binding}" Height="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.ColumnSpan="2" Grid.Column="0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.ForceUppercase, Mode=TwoWay}" Content="Force Letters to UPPERCASE" />
|
||||
<CheckBox Grid.Row="5" Grid.ColumnSpan="2" Grid.Column="0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.FacesOnShapes, Mode=TwoWay}" Content="Faces on Shapes" />
|
||||
<CheckBox Grid.Row="6" Grid.ColumnSpan="2" Grid.Column="0" Foreground="#4CD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.BitmapEffects, Mode=TwoWay}" IsEnabled="False" Content="Hardware Effects (DISABLED FOR NOW)"/>
|
||||
<CheckBox Grid.Row="7" Grid.ColumnSpan="2" Grid.Column="0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.MouseDraw, Mode=TwoWay}" Content="Clickless Mouse Drawing" />
|
||||
<CheckBox x:Name="TransparentCheckBox" Grid.Row="8" Grid.ColumnSpan="3" Grid.Column="0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.TransparentBackground, Mode=TwoWay}" Content="Transparent Background (Requires App Restart)" />
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="9" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" VerticalAlignment="Top">
|
||||
|
||||
<CheckBox x:Name="FadeChecked" Margin="0,0,0,0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI"
|
||||
IsChecked="{Binding Path=Default.FadeAway, Mode=TwoWay}" Content="Fade Shapes Away in" VerticalAlignment="Center" />
|
||||
|
||||
<TextBox Foreground="#FF252525" FontSize="14" FontFamily="Segoe UI" Width="40" Style="{DynamicResource BSTextBoxStyle1}" Background="#FF3A3A3A" FontWeight="Bold" Text="{Binding Path=Default.FadeAfter}"
|
||||
IsEnabled="{Binding Path=IsChecked, ElementName=FadeChecked, Mode=OneWay}" Height="25" Margin="5,0,0,0" VerticalAlignment="Center" />
|
||||
<TextBlock Margin="5,0,0,0" Foreground="#FFD1D1D1" FontSize="14" FontFamily="Segoe UI" VerticalAlignment="Center"><Run Text="secs."/></TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
<Button x:Name="okButton" Click="OK_Click" HorizontalAlignment="Right" Margin="0,-15,-15,0" VerticalAlignment="Top" Content="Button" Grid.Column="1" Style="{DynamicResource RoundButtonStyle2}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
|
@ -2,6 +2,8 @@
|
|||
using BabySmash.Properties;
|
||||
using System.Diagnostics;
|
||||
using System.Deployment.Application;
|
||||
using System.Windows.Controls;
|
||||
using System;
|
||||
|
||||
namespace BabySmash
|
||||
{
|
||||
|
@ -44,14 +46,26 @@ namespace BabySmash
|
|||
if (res == MessageBoxResult.Yes)
|
||||
{
|
||||
// Do the update
|
||||
deployment.Update();
|
||||
MessageBoxResult res2 = MessageBox.Show("Update complete, do you want to restart the application to apply the update?",
|
||||
"Application Updater", MessageBoxButton.YesNo);
|
||||
if (res2 == MessageBoxResult.Yes)
|
||||
try
|
||||
{
|
||||
// Restart the application to apply the update
|
||||
Application.Current.Shutdown();
|
||||
System.Windows.Forms.Application.Restart();
|
||||
|
||||
deployment.UpdateProgressChanged += deployment_UpdateProgressChanged;
|
||||
deployment.UpdateCompleted += deployment_UpdateCompleted;
|
||||
|
||||
Canvas.SetZIndex(updateProgress, (int)9999);
|
||||
Canvas.SetZIndex(updateButton, (int)1);
|
||||
updateProgress.Value = 0;
|
||||
updateButton.Visibility = Visibility.Collapsed;
|
||||
updateProgress.Visibility = Visibility.Visible;
|
||||
updateButton.IsEnabled = false;
|
||||
okButton.IsEnabled = false;
|
||||
|
||||
deployment.UpdateAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
MessageBox.Show("Sorry, but an error has occurred while updating. Please try again or contact us a http://feedback.babysmash.com. We're still learning!",
|
||||
"Application Updater", MessageBoxButton.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,5 +80,37 @@ namespace BabySmash
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
void deployment_UpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
||||
{
|
||||
MessageBoxResult res2 = MessageBoxResult.None;
|
||||
if (e.Error == null)
|
||||
{
|
||||
res2 = MessageBox.Show("Update complete, do you want to restart the application to apply the update?",
|
||||
"Application Updater", MessageBoxButton.YesNo);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Sorry, but an error has occured while updating. Please try again or contact us a http://feedback.babysmash.com. We're still learning!",
|
||||
"Application Updater", MessageBoxButton.OK);
|
||||
}
|
||||
if (res2 == MessageBoxResult.Yes)
|
||||
{
|
||||
// Restart the application to apply the update
|
||||
Application.Current.Shutdown();
|
||||
System.Windows.Forms.Application.Restart();
|
||||
}
|
||||
Canvas.SetZIndex(updateProgress, (int)1);
|
||||
Canvas.SetZIndex(updateButton, (int)9999);
|
||||
updateButton.Visibility = Visibility.Visible;
|
||||
updateProgress.Visibility = Visibility.Collapsed;
|
||||
updateButton.IsEnabled = true;
|
||||
okButton.IsEnabled = true;
|
||||
}
|
||||
|
||||
void deployment_UpdateProgressChanged(object sender, DeploymentProgressChangedEventArgs e)
|
||||
{
|
||||
this.updateProgress.Value = e.ProgressPercentage;
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче