Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c79965cc5 | |||
| cdf71c8fd7 |
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.13.35825.156 d17.13
|
VisualStudioVersion = 17.13.35825.156
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceBus98", "ServiceBus98\ServiceBus98.csproj", "{70EC8B33-8F08-4B6D-B386-2C2747AF61F0}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceBus95", "ServiceBus98\ServiceBus95.csproj", "{70EC8B33-8F08-4B6D-B386-2C2747AF61F0}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -1,67 +1,893 @@
|
|||||||
<Application x:Class="ServiceBus98.App"
|
<Application x:Class="ServiceBus95.App"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:ServiceBus98"
|
xmlns:local="clr-namespace:ServiceBus95"
|
||||||
|
xmlns:controls="clr-namespace:ServiceBus95.Controls"
|
||||||
StartupUri="MainWindow.xaml">
|
StartupUri="MainWindow.xaml">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<BooleanToVisibilityConverter x:Key="booleanToVisibilityConverter" />
|
||||||
|
|
||||||
|
<ImageBrush x:Key="ScrollBarTrack" ImageSource="/Resources/ScrollBarTrack.png" TileMode="Tile" Viewport="0,0,16,16" ViewportUnits="Absolute" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
|
||||||
|
|
||||||
|
<Brush x:Key="Teal">#008080</Brush>
|
||||||
|
<Brush x:Key="LightBlue">#1084D0</Brush>
|
||||||
|
<Brush x:Key="Blue">#000080</Brush>
|
||||||
|
<Brush x:Key="LightGray">#DFDFDF</Brush>
|
||||||
|
<Brush x:Key="Yellow">#FFFFE3</Brush>
|
||||||
|
<Brush x:Key="Gray">#C0C0C0</Brush>
|
||||||
|
<Brush x:Key="SecondaryGray">#B5B5B5</Brush>
|
||||||
|
<Brush x:Key="MediumGray">#808080</Brush>
|
||||||
|
|
||||||
|
<Color x:Key="ColorLightBlue">#1084D0</Color>
|
||||||
|
<Color x:Key="ColorBlue">#000080</Color>
|
||||||
|
<Color x:Key="ColorSecondaryGray">#B5B5B5</Color>
|
||||||
|
<Color x:Key="ColorMediumGray">#808080</Color>
|
||||||
|
|
||||||
|
<Style x:Key="Header" TargetType="{x:Type TextBlock}">
|
||||||
|
<Setter Property="Foreground" Value="Teal" />
|
||||||
|
<Setter Property="FontSize" Value="24" />
|
||||||
|
<Setter Property="FontWeight" Value="Bold" />
|
||||||
|
<Setter Property="FontStyle" Value="Italic" />
|
||||||
|
<Setter Property="FontFamily" Value="Comic Sans MS" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,8" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="Image">
|
||||||
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="NearestNeighbor" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Window9x" TargetType="Window">
|
||||||
|
<Setter Property="WindowStyle" Value="None" />
|
||||||
|
<Setter Property="ResizeMode" Value="CanResize" />
|
||||||
|
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||||
|
<Setter Property="AllowsTransparency" Value="True" />
|
||||||
|
<Setter Property="FontFamily" Value="Microsoft Sans Serif"/>
|
||||||
|
<Setter Property="FontSize" Value="11" />
|
||||||
|
<Setter Property="TextOptions.TextRenderingMode" Value="Aliased"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolWindow9x" TargetType="Window" BasedOn="{StaticResource Window9x}">
|
||||||
|
<Setter Property="ShowInTaskbar" Value="False" />
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="TitlebarButton9x" TargetType="Button">
|
||||||
|
<Setter Property="Margin" Value="2,0" />
|
||||||
|
<Setter Property="Width" Value="16" />
|
||||||
|
<Setter Property="Height" Value="14" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolbarButton9x" TargetType="Button">
|
||||||
|
<Setter Property="Width" Value="23" />
|
||||||
|
<Setter Property="Height" Value="22" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolWindowButton9x" TargetType="Button">
|
||||||
|
<Setter Property="Width" Value="75" />
|
||||||
|
<Setter Property="Height" Value="23" />
|
||||||
|
<Setter Property="Margin" Value="6,0,0,0" />
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="ToolTip">
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="ToolTip">
|
||||||
|
<Border Background="{StaticResource Yellow}" BorderThickness="1" BorderBrush="#000000">
|
||||||
|
<ContentPresenter Margin="3" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type Separator}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Separator}">
|
||||||
|
<DockPanel Height="2">
|
||||||
|
<Border DockPanel.Dock="Top" Height="1" Background="{StaticResource MediumGray}" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Height="1" Background="{StaticResource LightGray}" />
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MenuSeparator" TargetType="{x:Type Separator}">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Separator}">
|
||||||
|
<DockPanel Height="2" Margin="2,2">
|
||||||
|
<Border DockPanel.Dock="Top" Height="1" Background="{StaticResource MediumGray}" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Height="1" Background="{StaticResource LightGray}" />
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style TargetType="{x:Type Menu}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="FormField" TargetType="{x:Type StackPanel}">
|
<Style x:Key="FormField" TargetType="{x:Type StackPanel}">
|
||||||
<Setter Property="Margin" Value="5" />
|
<Setter Property="Margin" Value="5" />
|
||||||
<Setter Property="Orientation" Value="Horizontal" />
|
<Setter Property="Orientation" Value="Horizontal" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Header" TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type Hyperlink}">
|
||||||
<Setter Property="Foreground" Value="#008080" />
|
<Setter Property="Foreground" Value="{StaticResource Blue}" />
|
||||||
<Setter Property="FontSize" Value="36" />
|
|
||||||
<Setter Property="FontWeight" Value="Bold" />
|
|
||||||
<Setter Property="FontStyle" Value="Italic" />
|
|
||||||
<Setter Property="FontFamily" Value="Comic Sans MS" />
|
|
||||||
<Setter Property="Margin" Value="10" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type TextBox}">
|
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type Label}">
|
|
||||||
<Setter Property="Width" Value="120" />
|
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="{x:Type StatusBar}">
|
<Style TargetType="{x:Type StatusBar}">
|
||||||
<Setter Property="Width" Value="640" />
|
|
||||||
<Setter Property="Height" Value="24" />
|
|
||||||
<Setter Property="Background" Value="#C3C3C3" />
|
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type Button}">
|
|
||||||
<Setter Property="Background" Value="#008080"/>
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type StatusBar}">
|
||||||
<Border Background="{TemplateBinding Background}" BorderBrush="Black" BorderThickness="2">
|
<DockPanel LastChildFill="True">
|
||||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
<Border DockPanel.Dock="Right" Width="1" Background="#FFFFFF" />
|
||||||
</Border>
|
<Border DockPanel.Dock="Bottom" Height="1" Background="#FFFFFF" />
|
||||||
|
<Border DockPanel.Dock="Left" Width="1" Background="{StaticResource MediumGray}" />
|
||||||
|
<Border DockPanel.Dock="Top" Height="1" Background="{StaticResource MediumGray}" />
|
||||||
|
<ItemsPresenter />
|
||||||
|
</DockPanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style.Triggers>
|
</Style>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
|
||||||
<Setter Property="Background" Value="#010081"/>
|
<Style x:Key="ScrollBarButton9x" TargetType="{x:Type ButtonBase}">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<!-- This child DockPanel needs to have Background set or the button is clickable on the text itself :shrug: -->
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border Name="Border" Background="{StaticResource Gray}">
|
||||||
|
<Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#000000" Data="{Binding Path=Content, RelativeSource={RelativeSource TemplatedParent}}" />
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter TargetName="OuterRightBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterBottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterLeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterTopBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerRightBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerLeftBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerTopBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="Border" Property="Margin" Value="1,1,0,0" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsMouseCaptured" Value="True">
|
</ControlTemplate.Triggers>
|
||||||
<Setter Property="Background" Value="#FF0081"/>
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarTrack9x" TargetType="{x:Type RepeatButton}">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||||
|
<Border Background="{StaticResource ScrollBarTrack}" />
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ScrollBarThumb9x" TargetType="{x:Type Thumb}">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Setter Property="IsTabStop" Value="false"/>
|
||||||
|
<Setter Property="Focusable" Value="false"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="LogViewer" TargetType="ScrollViewer">
|
||||||
|
<Setter Property="Background" Value="#FFFFFF" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="LogViewerTemplate" TargetType="ScrollViewer">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
|
<Grid Background="{TemplateBinding Background}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalAlignment}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Display listbox content here -->
|
||||||
|
<ScrollContentPresenter Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
|
Grid.Row="0" Grid.RowSpan="2"
|
||||||
|
KeyboardNavigation.DirectionalNavigation="Local"
|
||||||
|
CanContentScroll="True"
|
||||||
|
CanHorizontallyScroll="False"
|
||||||
|
CanVerticallyScroll="True"/>
|
||||||
|
|
||||||
|
<!-- Display Vertical Scrollbar to the right -->
|
||||||
|
<ScrollBar Name="PART_VerticalScrollBar"
|
||||||
|
Grid.Column="1" Grid.RowSpan="2"
|
||||||
|
Value="{TemplateBinding VerticalOffset}"
|
||||||
|
Maximum="{TemplateBinding ScrollableHeight}"
|
||||||
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||||
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
|
||||||
|
|
||||||
|
<DockPanel Grid.Column="1" Grid.Row="1"
|
||||||
|
LastChildFill="false"
|
||||||
|
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ScrollBarThumb9xTemplate" TargetType="{x:Type Thumb}">
|
||||||
|
<DockPanel Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<Rectangle />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||||
|
<Grid Width="16">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="16"/>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition Height="16"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<RepeatButton Grid.Row="0" Style="{StaticResource ScrollBarButton9x}" Height="16" Width="16" Command="ScrollBar.LineUpCommand" Content="M 0 4 L 8 4 L 4 0 Z" />
|
||||||
|
<Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="true">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Style="{StaticResource ScrollBarTrack9x}" Command="ScrollBar.PageUpCommand" />
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Template="{StaticResource ScrollBarThumb9xTemplate}" Style="{StaticResource ScrollBarThumb9x}" Width="16" Height="Auto" />
|
||||||
|
</Track.Thumb>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Style="{StaticResource ScrollBarTrack9x}" Command="ScrollBar.PageDownCommand" />
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
</Track>
|
||||||
|
<RepeatButton Grid.Row="3" Style="{StaticResource ScrollBarButton9x}" Height="16" Width="16" Command="ScrollBar.LineDownCommand" Content="M 0 0 L 4 4 L 8 0 Z"/>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition MaxWidth="16"/>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition MaxWidth="16"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<RepeatButton Grid.Column="0" Style="{StaticResource ScrollBarButton9x}" Height="16" Width="16" Command="ScrollBar.LineLeftCommand" Content="M 4 0 L 4 8 L 0 4 Z" />
|
||||||
|
<Track Name="PART_Track" Grid.Column="1" IsDirectionReversed="False">
|
||||||
|
<Track.DecreaseRepeatButton>
|
||||||
|
<RepeatButton Style="{StaticResource ScrollBarTrack9x}" Command="ScrollBar.PageLeftCommand" />
|
||||||
|
</Track.DecreaseRepeatButton>
|
||||||
|
<Track.Thumb>
|
||||||
|
<Thumb Template="{StaticResource ScrollBarThumb9xTemplate}" Style="{StaticResource ScrollBarThumb9x}" Width="Auto" Height="16" />
|
||||||
|
</Track.Thumb>
|
||||||
|
<Track.IncreaseRepeatButton>
|
||||||
|
<RepeatButton Style="{StaticResource ScrollBarTrack9x}" Command="ScrollBar.PageRightCommand" />
|
||||||
|
</Track.IncreaseRepeatButton>
|
||||||
|
</Track>
|
||||||
|
<RepeatButton Grid.Column="3" Style="{StaticResource ScrollBarButton9x}" Height="16" Width="16" Command="ScrollBar.LineRightCommand" Content="M 0 0 L 4 4 L 0 8 Z"/>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
|
||||||
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="true"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="Orientation" Value="Horizontal">
|
||||||
|
<Setter Property="Width" Value="Auto"/>
|
||||||
|
<Setter Property="Height" Value="16" />
|
||||||
|
<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="Orientation" Value="Vertical">
|
||||||
|
<Setter Property="Width" Value="16"/>
|
||||||
|
<Setter Property="Height" Value="Auto" />
|
||||||
|
<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="Button9xTemplate" TargetType="{x:Type Button}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<!-- This child DockPanel needs to have Background set or the button is only clickable on the text itself :shrug: -->
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border x:Name="FocusBorder" BorderBrush="{x:Null}" BorderThickness="1" Margin="2">
|
||||||
|
<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="Center" VerticalAlignment="Top" />
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseCaptured" Value="True">
|
||||||
|
<Setter TargetName="OuterRightBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="OuterBottomBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="OuterLeftBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="OuterTopBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="InnerRightBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerLeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerTopBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="ContentPresenter" Property="Margin" Value="2,1,0,0" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True">
|
||||||
|
<Setter TargetName="FocusBorder" Property="BorderBrush">
|
||||||
|
<Setter.Value>
|
||||||
|
<DrawingBrush Viewport="0,0,3,3" ViewportUnits="Absolute" TileMode="Tile">
|
||||||
|
<DrawingBrush.Drawing>
|
||||||
|
<DrawingGroup>
|
||||||
|
<GeometryDrawing Brush="Black">
|
||||||
|
<GeometryDrawing.Geometry>
|
||||||
|
<GeometryGroup>
|
||||||
|
<RectangleGeometry Rect="0,0,50,50" />
|
||||||
|
<RectangleGeometry Rect="50,50,50,50" />
|
||||||
|
</GeometryGroup>
|
||||||
|
</GeometryDrawing.Geometry>
|
||||||
|
</GeometryDrawing>
|
||||||
|
</DrawingGroup>
|
||||||
|
</DrawingBrush.Drawing>
|
||||||
|
</DrawingBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ToolbarButton9xTemplate" TargetType="{x:Type Button}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<!-- This child DockPanel needs to have Background set or the button is clickable on the text itself :shrug: -->
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="Center" VerticalAlignment="Top" />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="IsMouseCaptured" Value="True">
|
||||||
|
<Setter TargetName="OuterRightBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="OuterBottomBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="OuterLeftBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="OuterTopBorder" Property="Background" Value="#000000" />
|
||||||
|
<Setter TargetName="InnerRightBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerLeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerTopBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="ContentPresenter" Property="Margin" Value="1,1,0,0" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="Window9xTemplate" TargetType="Window">
|
||||||
|
<DockPanel LastChildFill="True" Background="{StaticResource Gray}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
|
||||||
|
<Grid Margin="2">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="18" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<DockPanel x:Name="Titlebar" LastChildFill="True" MouseDown="TitlebarMouseDown">
|
||||||
|
<DockPanel.Background>
|
||||||
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||||
|
<GradientStop Color="{StaticResource ColorBlue}" Offset="0.0" />
|
||||||
|
<GradientStop Color="{StaticResource ColorLightBlue}" Offset="1.0" />
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</DockPanel.Background>
|
||||||
|
<Image Source="/Resources/NewLetter.ico" Width="16" Height="16" Margin="4,0" DockPanel.Dock="Left"/>
|
||||||
|
|
||||||
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
|
||||||
|
<Button Margin="0" x:Name="MinimizeButton" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource TitlebarButton9x}" Click="MinimizeButtonClick">-</Button>
|
||||||
|
<Button Margin="0" x:Name="MaximizeButton" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource TitlebarButton9x}" Click="MaximizeButtonClick">+</Button>
|
||||||
|
|
||||||
|
<Button DockPanel.Dock="Right" x:Name="CloseButton" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource TitlebarButton9x}" Click="CloseButtonClick">
|
||||||
|
<Grid Margin="1">
|
||||||
|
<Rectangle Fill="#000000" Width="9" Height="1">
|
||||||
|
<Rectangle.LayoutTransform>
|
||||||
|
<RotateTransform Angle="-45"/>
|
||||||
|
</Rectangle.LayoutTransform>
|
||||||
|
</Rectangle>
|
||||||
|
<Rectangle Fill="#000000" Width="9" Height="1">
|
||||||
|
<Rectangle.LayoutTransform>
|
||||||
|
<RotateTransform Angle="45"/>
|
||||||
|
</Rectangle.LayoutTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock x:Name="TitlebarText" Foreground="#FFFFFF" FontWeight="Bold" Padding="0,2,0,0" Text="{TemplateBinding Title}"></TextBlock>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ContentPresenter Grid.Row="1" />
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="ResizeMode" Value="NoResize">
|
||||||
|
<Setter TargetName="MinimizeButton" Property="Visibility" Value="Collapsed" />
|
||||||
|
<Setter TargetName="MaximizeButton" Property="Visibility" Value="Collapsed" />
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="ResizeMode" Value="CanMinimize">
|
||||||
|
<Setter TargetName="MaximizeButton" Property="IsEnabled" Value="False" />
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="WindowState" Value="Maximized">
|
||||||
|
<Setter TargetName="MaximizeButton" Property="Content" Value="*" />
|
||||||
|
</Trigger>
|
||||||
|
|
||||||
|
<Trigger Property="IsActive" Value="False">
|
||||||
|
<Setter TargetName="Titlebar" Property="Background">
|
||||||
|
<Setter.Value>
|
||||||
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||||
|
<GradientStop Color="{StaticResource ColorMediumGray}" Offset="0.0" />
|
||||||
|
<GradientStop Color="{StaticResource ColorSecondaryGray}" Offset="1.0" />
|
||||||
|
</LinearGradientBrush>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Setter TargetName="TitlebarText" Property="Foreground" Value="{StaticResource Gray}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TopMenuItem" TargetType="MenuItem">
|
||||||
|
<StackPanel Margin="0,1">
|
||||||
|
<!-- label, icons, etc. -->
|
||||||
|
<DockPanel x:Name="MenuItem" LastChildFill="True" Height="18">
|
||||||
|
<Border x:Name="BottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border x:Name="RightBorder" DockPanel.Dock="Right" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="LeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Label x:Name="MenuItemLabel" Content="{TemplateBinding Header}" Padding="6,0" BorderBrush="{StaticResource Gray}" BorderThickness="0,1,0,0" />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<!-- sub items -->
|
||||||
|
<Popup IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="False">
|
||||||
|
<DockPanel LastChildFill="True" Background="{StaticResource Gray}">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
|
||||||
|
<ItemsPresenter />
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Popup>
|
||||||
|
</StackPanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsHighlighted" Value="True" />
|
||||||
|
<Condition Property="IsSubmenuOpen" Value="False" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
|
||||||
|
<Setter TargetName="BottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="RightBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="LeftBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="MenuItemLabel" Property="BorderBrush" Value="#FFFFFF" />
|
||||||
|
</MultiTrigger>
|
||||||
|
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsHighlighted" Value="True" />
|
||||||
|
<Condition Property="IsSubmenuOpen" Value="True" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
|
||||||
|
<Setter TargetName="BottomBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="RightBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="LeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="MenuItemLabel" Property="BorderBrush" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="MenuItemLabel" Property="Padding" Value="7,1,5,0" />
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="NestedMenuItem" TargetType="MenuItem">
|
||||||
|
<DockPanel x:Name="panel" Background="{StaticResource Gray}" Margin="1" >
|
||||||
|
<!-- label, icons, etc. -->
|
||||||
|
<Image Source="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}" Width="20" />
|
||||||
|
<Label x:Name="MenuItemLabel" Padding="0,0,0,1" Content="{TemplateBinding Header}" Foreground="Black" />
|
||||||
|
|
||||||
|
<Label x:Name="MenuItemGestureText" DockPanel.Dock="Right" Padding="0,0,0,1" Content="{TemplateBinding InputGestureText}" Foreground="Black" />
|
||||||
|
|
||||||
|
<!-- draw the right arrow only if this menu item has sub items -->
|
||||||
|
<TextBlock Text="->" DockPanel.Dock="Right" Visibility="{Binding HasItems, Converter={StaticResource booleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="20" />
|
||||||
|
|
||||||
|
<!-- sub items -->
|
||||||
|
<Popup IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" Placement="Right" >
|
||||||
|
<DockPanel LastChildFill="True" Background="{StaticResource Gray}">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
|
||||||
|
<ItemsPresenter />
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Popup>
|
||||||
|
</DockPanel>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems" Value="False">
|
||||||
|
<Setter TargetName="MenuItemLabel" Property="Margin" Value="0,0,20,0" />
|
||||||
|
<Setter TargetName="MenuItemGestureText" Property="Margin" Value="0,0,20,0" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsHighlighted" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="panel" Value="{StaticResource Blue}" />
|
||||||
|
<Setter Property="Foreground" TargetName="MenuItemLabel" Value="#FFFFFF" />
|
||||||
|
<Setter Property="Foreground" TargetName="MenuItemGestureText" Value="#FFFFFF" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TextBox9x" TargetType="{x:Type TextBoxBase}">
|
||||||
|
<DockPanel Grid.Row="2" Grid.Column="2" Margin="0,2" LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True" Background="#FFFFFF">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
|
|
||||||
|
<ScrollViewer Margin="0,2" Background="#FFFFFF" x:Name="PART_ContentHost" />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition Width="20" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True" Grid.Column="1">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<!-- This child DockPanel needs to have Background set or the button is clickable on the text itself :shrug: -->
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border Name="Border" Background="{StaticResource Gray}">
|
||||||
|
<Path x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="#000000" />
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter TargetName="OuterRightBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterBottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterLeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="OuterTopBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="InnerRightBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerLeftBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="InnerTopBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="Border" Property="Margin" Value="1,1,0,0" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="ComboBox9x" TargetType="{x:Type ComboBox}">
|
||||||
|
<DockPanel Grid.Row="2" Grid.Column="2" Margin="0,2" LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
|
||||||
|
<DockPanel LastChildFill="True" Background="#FFFFFF">
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
<ToggleButton x:Name="ToggleButton"
|
||||||
|
Template="{StaticResource ComboBoxToggleButton}"
|
||||||
|
Grid.Column="2"
|
||||||
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay,
|
||||||
|
RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
|
<ContentPresenter x:Name="ContentSite"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
Content="{TemplateBinding SelectionBoxItem}"
|
||||||
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
||||||
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
||||||
|
Margin="0,0,20,0"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
</ContentPresenter>
|
||||||
|
|
||||||
|
|
||||||
|
<TextBox x:Name="PART_EditableTextBox" Margin="0,2,20,2" BorderThickness="0" IsReadOnly="{TemplateBinding IsReadOnly}" />
|
||||||
|
|
||||||
|
|
||||||
|
<Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False">
|
||||||
|
<Grid x:Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
|
||||||
|
<Border x:Name="DropDownBorder" BorderThickness="1">
|
||||||
|
<Border.BorderBrush>
|
||||||
|
<SolidColorBrush Color="{DynamicResource ColorBlue}" />
|
||||||
|
</Border.BorderBrush>
|
||||||
|
<Border.Background>
|
||||||
|
<SolidColorBrush Color="{DynamicResource ColorLightBlue}" />
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
<ScrollViewer SnapsToDevicePixels="True">
|
||||||
|
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
|
||||||
|
</ScrollViewer>
|
||||||
|
</Grid>
|
||||||
|
</Popup>
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="HasItems"
|
||||||
|
Value="false">
|
||||||
|
<Setter TargetName="DropDownBorder"
|
||||||
|
Property="MinHeight"
|
||||||
|
Value="95" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsGrouping"
|
||||||
|
Value="true">
|
||||||
|
<Setter Property="ScrollViewer.CanContentScroll"
|
||||||
|
Value="false" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger SourceName="Popup"
|
||||||
|
Property="AllowsTransparency"
|
||||||
|
Value="true">
|
||||||
|
<Setter TargetName="DropDownBorder"
|
||||||
|
Property="CornerRadius"
|
||||||
|
Value="4" />
|
||||||
|
<Setter TargetName="DropDownBorder"
|
||||||
|
Property="Margin"
|
||||||
|
Value="0,2,0,0" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Type ComboBoxItem}"
|
||||||
|
TargetType="{x:Type ComboBoxItem}">
|
||||||
|
<Setter Property="SnapsToDevicePixels"
|
||||||
|
Value="true" />
|
||||||
|
<Setter Property="OverridesDefaultStyle"
|
||||||
|
Value="true" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
|
||||||
|
<Border x:Name="Border"
|
||||||
|
Padding="2"
|
||||||
|
SnapsToDevicePixels="true"
|
||||||
|
Background="Transparent">
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="SelectionStates">
|
||||||
|
<VisualState x:Name="Unselected" />
|
||||||
|
<VisualState x:Name="Selected">
|
||||||
|
<Storyboard>
|
||||||
|
<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||||
|
Storyboard.TargetProperty="(Panel.Background).
|
||||||
|
(SolidColorBrush.Color)">
|
||||||
|
<EasingColorKeyFrame KeyTime="0"
|
||||||
|
Value="{StaticResource ColorBlue}" />
|
||||||
|
</ColorAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="SelectedUnfocused">
|
||||||
|
<Storyboard>
|
||||||
|
<ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
|
||||||
|
Storyboard.TargetProperty="(Panel.Background).
|
||||||
|
(SolidColorBrush.Color)">
|
||||||
|
<EasingColorKeyFrame KeyTime="0"
|
||||||
|
Value="{StaticResource ColorMediumGray}" />
|
||||||
|
</ColorAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<ContentPresenter />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TabControl9x" TargetType="{x:Type TabControl}">
|
||||||
|
<Grid KeyboardNavigation.TabNavigation="Local" Margin="8">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<TabPanel Grid.Row="0"
|
||||||
|
Panel.ZIndex="1"
|
||||||
|
Margin="0,0,4,-3"
|
||||||
|
IsItemsHost="True"
|
||||||
|
KeyboardNavigation.TabIndex="1"
|
||||||
|
Background="Transparent" />
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="1" Margin="0,2" LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<!-- This child DockPanel needs to have Background set or the button is only clickable on the text itself :shrug: -->
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" Margin="4" ContentSource="SelectedContent" />
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<ControlTemplate x:Key="TabItem9x" TargetType="{x:Type TabItem}">
|
||||||
|
<Border x:Name="TabItemPadding" Padding="0, 2, 0, 0">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border x:Name="OuterRightBorder" DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border x:Name="OuterBottomBorder" DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
|
<Border x:Name="OuterLeftBorder" DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border x:Name="OuterTopBorder" DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border x:Name="InnerRightBorder" DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerBottomBorder" DockPanel.Dock="Bottom" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border x:Name="InnerLeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
|
||||||
|
<Border Padding="2, 2, 0, 2">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="Header" Margin="0,0,8,0"/>
|
||||||
|
<Button x:Name="TabCloseButton" BorderThickness="0" Background="{StaticResource Gray}" Click="TabCloseButton_Click">
|
||||||
|
<Grid Margin="4,0">
|
||||||
|
<Rectangle Fill="#000000" Width="8" Height="1">
|
||||||
|
<Rectangle.LayoutTransform>
|
||||||
|
<RotateTransform Angle="-45"/>
|
||||||
|
</Rectangle.LayoutTransform>
|
||||||
|
</Rectangle>
|
||||||
|
<Rectangle Fill="#000000" Width="8" Height="1">
|
||||||
|
<Rectangle.LayoutTransform>
|
||||||
|
<RotateTransform Angle="45"/>
|
||||||
|
</Rectangle.LayoutTransform>
|
||||||
|
</Rectangle>
|
||||||
|
</Grid>
|
||||||
|
<Button.Style>
|
||||||
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="Button">
|
||||||
|
<Border Background="{TemplateBinding Background}">
|
||||||
|
<ContentPresenter />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
</Button.Style>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="TabItemPadding" Property="Padding" Value="0" />
|
||||||
|
<Setter TargetName="InnerBottomBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter TargetName="OuterBottomBorder" Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsFocused" Value="True"></Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
@@ -1,13 +1,60 @@
|
|||||||
using System.Configuration;
|
using System.Windows;
|
||||||
using System.Data;
|
using System.Windows.Controls;
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
namespace ServiceBus98;
|
namespace ServiceBus95;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for App.xaml
|
/// Interaction logic for App.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
private void TitlebarMouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
Window parent = Window.GetWindow((DockPanel)sender);
|
||||||
|
if (e.ChangedButton == System.Windows.Input.MouseButton.Left)
|
||||||
|
{
|
||||||
|
parent.DragMove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window parent = Window.GetWindow((Button)sender);
|
||||||
|
parent.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MinimizeButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window parent = Window.GetWindow((Button)sender);
|
||||||
|
parent.WindowState = WindowState.Minimized;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MaximizeButtonClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window parent = Window.GetWindow((Button)sender);
|
||||||
|
|
||||||
|
|
||||||
|
if (parent.WindowState == WindowState.Normal)
|
||||||
|
{
|
||||||
|
// TODO: This actually goes fullscreen. Manually setting width and height to fixed values just as an indication that it is working.
|
||||||
|
parent.WindowState = WindowState.Maximized;
|
||||||
|
parent.Width = 1280;
|
||||||
|
parent.Height = 720;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
parent.WindowState = WindowState.Normal;
|
||||||
|
parent.Width = 800;
|
||||||
|
parent.Height = 600;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TabCloseButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show("You close the tab");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
47
ServiceBus98/Controls/ServiceBusMessageControl.xaml
Normal file
47
ServiceBus98/Controls/ServiceBusMessageControl.xaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<UserControl x:Class="ServiceBus95.Controls.ServiceBusMessageControl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:ServiceBus95.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style x:Key="MessageDetailsLabel" TargetType="{x:Type Label}">
|
||||||
|
<Setter Property="Width" Value="100" />
|
||||||
|
<Setter Property="Margin" Value="0,1,0,3" />
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label Style="{StaticResource MessageDetailsLabel}">Connection String:</Label>
|
||||||
|
<TextBox Template="{StaticResource TextBox9x}" Width="454" x:Name="ConnectionString"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label Style="{StaticResource MessageDetailsLabel}">Queue Name:</Label>
|
||||||
|
<TextBox Template="{StaticResource TextBox9x}" Width="454" x:Name="QueueName"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label Style="{StaticResource MessageDetailsLabel}">Content Type:</Label>
|
||||||
|
<ComboBox Template="{StaticResource ComboBox9x}" IsEditable="True" x:Name="ContentType" Width="454">
|
||||||
|
<ComboBoxItem>application/json</ComboBoxItem>
|
||||||
|
<ComboBoxItem>text/plain</ComboBoxItem>
|
||||||
|
<ComboBoxItem>text/xml</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
<!--<TextBox Template="{StaticResource TextBox9x}" Text="text/plain"/>-->
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label Style="{StaticResource MessageDetailsLabel}">Message:</Label>
|
||||||
|
<TextBox Template="{StaticResource TextBox9x}" Padding="0, 3" FontFamily="Lucida Console" AcceptsReturn="True" FontSize="12" x:Name="Message" Width="454" Height="193" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<Border Padding="5" HorizontalAlignment="Right">
|
||||||
|
<Button x:Name="Send" Click="Send_Click" Template="{StaticResource Button9xTemplate}" Style="{StaticResource ToolWindowButton9x}">Send</Button>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
</UserControl>
|
||||||
77
ServiceBus98/Controls/ServiceBusMessageControl.xaml.cs
Normal file
77
ServiceBus98/Controls/ServiceBusMessageControl.xaml.cs
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using Azure.Messaging.ServiceBus;
|
||||||
|
|
||||||
|
namespace ServiceBus95.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ServiceBusMessage.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ServiceBusMessageControl : UserControl
|
||||||
|
{
|
||||||
|
public ServiceBusMessageControl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void Send_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(ConnectionString.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Enter a connection string.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(QueueName.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Enter a queue name.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(Message.Text))
|
||||||
|
{
|
||||||
|
MessageBoxResult result = MessageBox.Show("You did not enter a message. Do you want to send an empty message?", "Empty Message", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
|
if (result == MessageBoxResult.Cancel)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//StatusText.Text = "Status: Sending";
|
||||||
|
|
||||||
|
await using ServiceBusClient serviceBusClient = new ServiceBusClient(ConnectionString.Text);
|
||||||
|
await using ServiceBusSender serviceBusSender = serviceBusClient.CreateSender(QueueName.Text);
|
||||||
|
using ServiceBusMessageBatch messageBatch = await serviceBusSender.CreateMessageBatchAsync();
|
||||||
|
|
||||||
|
ServiceBusMessage serviceBusMessage = new ServiceBusMessage(Message.Text ?? string.Empty)
|
||||||
|
{
|
||||||
|
ContentType = ContentType.Text ?? "text/plain"
|
||||||
|
};
|
||||||
|
|
||||||
|
messageBatch.TryAddMessage(serviceBusMessage);
|
||||||
|
|
||||||
|
await serviceBusSender.SendMessagesAsync(messageBatch);
|
||||||
|
|
||||||
|
MessageBox.Show("Message sent successfully.", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
string errorMessage = ex.Message;
|
||||||
|
if (ex is ServiceBusException)
|
||||||
|
{
|
||||||
|
errorMessage = $"Service Bus returned an error. Ensure that the connection string is valid and the queue exists.\n\nAdditional Details:\n{errorMessage}";
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
//StatusText.Text = "Status: Idle";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,60 +1,89 @@
|
|||||||
<Window x:Class="ServiceBus98.MainWindow"
|
<Window x:Class="ServiceBus95.MainWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:ServiceBus98"
|
xmlns:local="clr-namespace:ServiceBus95" xmlns:controls="clr-namespace:ServiceBus95.Controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Service Bus 98" Height="480" Width="640"
|
Title="Service Bus 95" Height="500" Width="600"
|
||||||
Background="#C3C3C3"
|
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
|
Template="{StaticResource Window9xTemplate}"
|
||||||
|
Style="{StaticResource Window9x}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<StackPanel>
|
<Window.CommandBindings>
|
||||||
|
<CommandBinding Command="ApplicationCommands.New" Executed="NewCommandExecuted" />
|
||||||
|
<CommandBinding Command="ApplicationCommands.Open" Executed="OpenCommandExecuted" />
|
||||||
|
<CommandBinding Command="ApplicationCommands.Save" Executed="SaveCommandExecuted" />
|
||||||
|
<CommandBinding Command="ApplicationCommands.SaveAs" Executed="SaveAsCommandExecuted" />
|
||||||
|
<CommandBinding Command="ApplicationCommands.Close" Executed="CloseCommandExecuted" />
|
||||||
|
</Window.CommandBindings>
|
||||||
|
|
||||||
<TextBlock Text="Service Bus 98" Style="{StaticResource Header}">
|
<Grid>
|
||||||
<TextBlock.Effect>
|
<Grid.RowDefinitions>
|
||||||
<DropShadowEffect ShadowDepth="2" Direction="315" Color="Black" Opacity="1" BlurRadius="0"/>
|
<RowDefinition Height="21" />
|
||||||
</TextBlock.Effect>
|
<RowDefinition Height="28" />
|
||||||
</TextBlock>
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="24" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
<Menu Grid.Row="0" BorderBrush="{StaticResource MediumGray}" BorderThickness="0,0,0,1">
|
||||||
<Label>Connection String:</Label>
|
<MenuItem Header="_File" Template="{StaticResource TopMenuItem}">
|
||||||
<local:TextBox9x Width="490" x:Name="ConnectionString"/>
|
<MenuItem Header="_New" Template="{StaticResource NestedMenuItem}" InputGestureText="Ctrl+N" Command="ApplicationCommands.New" />
|
||||||
|
<MenuItem Header="_Open" Template="{StaticResource NestedMenuItem}" InputGestureText="Ctrl+O" Command="ApplicationCommands.Open" />
|
||||||
|
<MenuItem Header="_Save" Template="{StaticResource NestedMenuItem}" InputGestureText="Ctrl+S" Command="ApplicationCommands.Save" />
|
||||||
|
<MenuItem Header="Save _As" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.SaveAs" />
|
||||||
|
<Separator Style="{StaticResource MenuSeparator}"/>
|
||||||
|
<MenuItem Header="E_xit" Template="{StaticResource NestedMenuItem}" InputGestureText="Alt+F4" Command="ApplicationCommands.Close"/>
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_View" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_Logs" Template="{StaticResource NestedMenuItem}" />
|
||||||
|
<MenuItem Header="_Status Bar" Template="{StaticResource NestedMenuItem}" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Tools" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_Options" Template="{StaticResource NestedMenuItem}" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Help" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_About Service Bus 98" Template="{StaticResource NestedMenuItem}" Click="HelpAboutClick" />
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="1" Grid.ColumnSpan="3" LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||||
|
<StackPanel Orientation="Horizontal" Margin="6,0">
|
||||||
|
<Button ToolTip="New" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource ToolbarButton9x}" Command="ApplicationCommands.New">
|
||||||
|
<Image Width="16" Height="16" Source="/Resources/BlankSheet.ico" RenderOptions.BitmapScalingMode="NearestNeighbor"/>
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Open" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource ToolbarButton9x}" Command="ApplicationCommands.Open">
|
||||||
|
<Image Width="16" Height="16" Source="/Resources/OpenedFolder.ico" RenderOptions.BitmapScalingMode="NearestNeighbor" />
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Save" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource ToolbarButton9x}" Command="ApplicationCommands.Save">
|
||||||
|
<Image Width="16" Height="16" Source="/icons/connect.ico" />
|
||||||
|
</Button>
|
||||||
|
<Button ToolTip="Save As" Template="{StaticResource ToolbarButton9xTemplate}" Style="{StaticResource ToolbarButton9x}" Command="ApplicationCommands.SaveAs">
|
||||||
|
<Image Width="16" Height="16" Source="/icons/envelope.ico" />
|
||||||
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
|
||||||
<Label>Queue Name:</Label>
|
|
||||||
<local:TextBox9x Width="490" x:Name="QueueName"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
|
||||||
<Label>Content Type:</Label>
|
|
||||||
<local:TextBox9x Width="490" x:Name="ContentType" Text="text/plain"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
|
||||||
<Label>Message:</Label>
|
|
||||||
<local:MultilineTextBox9x x:Name="Message" Width="490" Height="170" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<Button Margin="124,10,10,10" Foreground="White" BorderThickness="2" BorderBrush="Black" FontFamily="Comic Sans MS" FontSize="16" Width="490" Height="30" x:Name="Send" Click="Send_Click">Send</Button>
|
|
||||||
|
|
||||||
|
|
||||||
<StatusBar Height="40">
|
|
||||||
<DockPanel LastChildFill="True" Width="618" Height="24">
|
|
||||||
<Border DockPanel.Dock="Left" Background="#818181" Width="1" />
|
|
||||||
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
|
||||||
<Border DockPanel.Dock="Top" Background="#818181" Height="1" />
|
|
||||||
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
|
||||||
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
|
||||||
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
|
||||||
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
|
||||||
<Border DockPanel.Dock="Bottom" Background="#C3C3C3" Height="1" />
|
|
||||||
<TextBlock Padding="3" x:Name="StatusText">Status: Idle</TextBlock>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
|
<TabControl Grid.Row="2" Template="{StaticResource TabControl9x}">
|
||||||
|
<TabItem Template="{StaticResource TabItem9x}" Header="Farts.sb98">
|
||||||
|
<controls:ServiceBusMessageControl />
|
||||||
|
</TabItem>
|
||||||
|
|
||||||
|
<TabItem Template="{StaticResource TabItem9x}" Header="Turbo Gas.sb98">
|
||||||
|
<controls:ServiceBusMessageControl />
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
|
|
||||||
|
|
||||||
|
<StatusBar Grid.Row="3">
|
||||||
|
<StatusBarItem>
|
||||||
|
<TextBlock Padding="3" x:Name="StatusText">Status: Idle</TextBlock>
|
||||||
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using Azure.Messaging.ServiceBus;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace ServiceBus98;
|
namespace ServiceBus95;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for MainWindow.xaml
|
/// Interaction logic for MainWindow.xaml
|
||||||
@@ -13,63 +13,60 @@ public partial class MainWindow : Window
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void Send_Click(object sender, RoutedEventArgs e)
|
private void NewCommandExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(ConnectionString.Text))
|
MessageBox.Show("New command executed");
|
||||||
{
|
|
||||||
MessageBox.Show("Enter a connection string.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(QueueName.Text))
|
private void OpenCommandExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Enter a queue name.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||||
return;
|
openFileDialog.ShowDialog(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(Message.Text))
|
private void SaveCommandExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
MessageBoxResult result = MessageBox.Show("You did not enter a message. Do you want to send an empty message?", "Empty Message", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
if (!WarnOnSave())
|
||||||
if (result == MessageBoxResult.Cancel)
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||||
|
saveFileDialog.ShowDialog(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
private void SaveAsCommandExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
StatusText.Text = "Status: Sending";
|
if (!WarnOnSave())
|
||||||
|
|
||||||
await using ServiceBusClient serviceBusClient = new ServiceBusClient(ConnectionString.Text);
|
|
||||||
await using ServiceBusSender serviceBusSender = serviceBusClient.CreateSender(QueueName.Text);
|
|
||||||
using ServiceBusMessageBatch messageBatch = await serviceBusSender.CreateMessageBatchAsync();
|
|
||||||
|
|
||||||
ServiceBusMessage serviceBusMessage = new ServiceBusMessage(Message.Text ?? string.Empty)
|
|
||||||
{
|
{
|
||||||
ContentType = ContentType.Text ?? "text/plain"
|
return;
|
||||||
};
|
|
||||||
|
|
||||||
messageBatch.TryAddMessage(serviceBusMessage);
|
|
||||||
|
|
||||||
await serviceBusSender.SendMessagesAsync(messageBatch);
|
|
||||||
|
|
||||||
MessageBox.Show("Message sent successfully.", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception ex)
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||||
|
saveFileDialog.ShowDialog(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseCommandExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string errorMessage = ex.Message;
|
// TODO: prompt to save
|
||||||
if (ex is ServiceBusException)
|
Close();
|
||||||
{
|
|
||||||
errorMessage = $"Service Bus returned an error. Ensure that the connection string is valid and the queue exists.\n\nAdditional Details:\n{errorMessage}";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
|
private void CheckIfDirty(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finally
|
private bool WarnOnSave()
|
||||||
{
|
{
|
||||||
StatusText.Text = "Status: Idle";
|
return MessageBoxWindow.Show(this, "All data will be saved in plain text. Do not save this request if it contains sensitive data.", "Sensitive Data Warning") == MessageBoxResult.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HelpAboutClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
AboutWindow aboutWindow = new AboutWindow();
|
||||||
|
aboutWindow.Owner = this;
|
||||||
|
|
||||||
|
aboutWindow.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
<UserControl x:Class="ServiceBus98.MultilineTextBox9x"
|
<UserControl x:Class="ServiceBus95.MultilineTextBox9x"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:ServiceBus98"
|
xmlns:local="clr-namespace:ServiceBus95"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
<Border DockPanel.Dock="Left" Background="#818181" Width="1" />
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
<Border DockPanel.Dock="Top" Background="#818181" Height="1" />
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
using System;
|
using System.Windows.Controls;
|
||||||
using System.Collections.Generic;
|
|
||||||
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.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ServiceBus98
|
namespace ServiceBus95
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for MultilineTextBox9x.xaml
|
/// Interaction logic for MultilineTextBox9x.xaml
|
||||||
|
|||||||
BIN
ServiceBus98/Resources/BlankSheet.ico
Normal file
BIN
ServiceBus98/Resources/BlankSheet.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
BIN
ServiceBus98/Resources/Chord.wav
Normal file
BIN
ServiceBus98/Resources/Chord.wav
Normal file
Binary file not shown.
BIN
ServiceBus98/Resources/NewLetter.ico
Normal file
BIN
ServiceBus98/Resources/NewLetter.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 318 B |
BIN
ServiceBus98/Resources/OpenedFolder.ico
Normal file
BIN
ServiceBus98/Resources/OpenedFolder.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
ServiceBus98/Resources/ScrollBarTrack.png
Normal file
BIN
ServiceBus98/Resources/ScrollBarTrack.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 550 B |
BIN
ServiceBus98/Resources/Warning.ico
Normal file
BIN
ServiceBus98/Resources/Warning.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
36
ServiceBus98/ServiceBus95.csproj
Normal file
36
ServiceBus98/ServiceBus95.csproj
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<UseWPF>true</UseWPF>
|
||||||
|
<ApplicationIcon>Resources\NewLetter.ico</ApplicationIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Resources\Chord.wav" />
|
||||||
|
<None Remove="Resources\ScrollBarTrack.png" />
|
||||||
|
<None Remove="Resources\warning.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\BlankSheet.ico" />
|
||||||
|
<Content Include="Resources\Chord.wav">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
<Resource Include="Resources\NewLetter.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="Resources\OpenedFolder.ico" />
|
||||||
|
<Resource Include="Resources\ScrollBarTrack.png" />
|
||||||
|
<Resource Include="Resources\Warning.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<UseWPF>true</UseWPF>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<UserControl x:Class="ServiceBus98.TextBox9x"
|
<UserControl x:Class="ServiceBus95.TextBox9x"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:ServiceBus98"
|
xmlns:local="clr-namespace:ServiceBus95"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
using System;
|
using System.Windows.Controls;
|
||||||
using System.Collections.Generic;
|
|
||||||
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.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace ServiceBus98
|
namespace ServiceBus95
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for TextBox9x.xaml
|
/// Interaction logic for TextBox9x.xaml
|
||||||
|
|||||||
53
ServiceBus98/Windows/AboutWindow.xaml
Normal file
53
ServiceBus98/Windows/AboutWindow.xaml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<Window x:Class="ServiceBus95.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:local="clr-namespace:ServiceBus95"
|
||||||
|
xmlns:controls="clr-namespace:ServiceBus95.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="About Service Bus 98"
|
||||||
|
Width="360"
|
||||||
|
Height="180"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Template="{StaticResource Window9xTemplate}"
|
||||||
|
Style="{StaticResource ToolWindow9x}">
|
||||||
|
|
||||||
|
|
||||||
|
<Window.Resources>
|
||||||
|
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
|
<Window.CommandBindings>
|
||||||
|
<CommandBinding Command="ApplicationCommands.Close" CanExecute="CloseCanExecute" Executed="CloseExecuted" />
|
||||||
|
</Window.CommandBindings>
|
||||||
|
|
||||||
|
|
||||||
|
<Grid Margin="8">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="38" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0">
|
||||||
|
<TextBlock Style="{StaticResource Header}" Text="Service Bus 95">
|
||||||
|
<!--<TextBlock.RenderTransform>
|
||||||
|
<RotateTransform Angle="270" />
|
||||||
|
</TextBlock.RenderTransform>-->
|
||||||
|
<TextBlock.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="2" Direction="315" Color="Black" Opacity="1" BlurRadius="0"/>
|
||||||
|
</TextBlock.Effect>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBlock>
|
||||||
|
Copyright (C) 1995-2025 <Hyperlink NavigateUri="https://tomraterman.com" Click="HyperlinkClick">Tommy</Hyperlink>
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="1">
|
||||||
|
<Separator DockPanel.Dock="Top" Margin="0,6"/>
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
|
<Button IsDefault="True" Template="{StaticResource Button9xTemplate}" Style="{StaticResource ToolWindowButton9x}" x:Name="OkButton" Command="ApplicationCommands.Close">OK</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
38
ServiceBus98/Windows/AboutWindow.xaml.cs
Normal file
38
ServiceBus98/Windows/AboutWindow.xaml.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using System.Diagnostics;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace ServiceBus95
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for About.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AboutWindow : Window
|
||||||
|
{
|
||||||
|
public AboutWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseCanExecute(object sender, CanExecuteRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
e.CanExecute = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseExecuted(object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HyperlinkClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Hyperlink hyperlink = (Hyperlink)sender;
|
||||||
|
Process.Start(new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = hyperlink.NavigateUri.ToString(),
|
||||||
|
UseShellExecute = true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
32
ServiceBus98/Windows/MessageBoxWindow.xaml
Normal file
32
ServiceBus98/Windows/MessageBoxWindow.xaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<Window x:Class="ServiceBus95.MessageBoxWindow"
|
||||||
|
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:local="clr-namespace:ServiceBus95"
|
||||||
|
xmlns:controls="clr-namespace:ServiceBus95.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title=""
|
||||||
|
SizeToContent="WidthAndHeight"
|
||||||
|
WindowStartupLocation="CenterOwner"
|
||||||
|
Template="{StaticResource Window9xTemplate}"
|
||||||
|
Style="{StaticResource ToolWindow9x}"
|
||||||
|
DataContext="{Binding Source=this}" >
|
||||||
|
|
||||||
|
<Grid Margin="8">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="38" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||||
|
<Image Source="/Resources/Warning.ico" Width="32" Height="32" Margin="2, 4, 16, 4" />
|
||||||
|
<TextBlock x:Name="MessageBoxText" VerticalAlignment="Center" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
|
<Button IsDefault="True" Template="{StaticResource Button9xTemplate}" Style="{StaticResource ToolWindowButton9x}" x:Name="OkButton" Click="OkButton_Click">OK</Button>
|
||||||
|
<Button IsDefault="False" Template="{StaticResource Button9xTemplate}" Style="{StaticResource ToolWindowButton9x}" x:Name="CancelButton" Click="CancelButton_Click">Cancel</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</Window>
|
||||||
48
ServiceBus98/Windows/MessageBoxWindow.xaml.cs
Normal file
48
ServiceBus98/Windows/MessageBoxWindow.xaml.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using System.Media;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace ServiceBus95
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for About.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class MessageBoxWindow : Window
|
||||||
|
{
|
||||||
|
public MessageBoxWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
SoundPlayer player = new SoundPlayer("Resources/Chord.wav");
|
||||||
|
player.Play();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MessageBoxResult MessageBoxResult { get; set; }
|
||||||
|
|
||||||
|
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption)
|
||||||
|
{
|
||||||
|
MessageBoxWindow window = new MessageBoxWindow
|
||||||
|
{
|
||||||
|
Owner = owner,
|
||||||
|
Title = caption,
|
||||||
|
WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||||
|
};
|
||||||
|
|
||||||
|
window.MessageBoxText.Text = messageBoxText;
|
||||||
|
window.ShowDialog();
|
||||||
|
|
||||||
|
return window.MessageBoxResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OkButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBoxResult = MessageBoxResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBoxResult = MessageBoxResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user