Compare commits
2 Commits
52c458836d
...
MOAR-98
| Author | SHA1 | Date | |
|---|---|---|---|
| e20cc09a60 | |||
| f1f3cd2859 |
@@ -2,44 +2,156 @@
|
|||||||
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:ServiceBus98"
|
||||||
|
xmlns:controls="clr-namespace:ServiceBus98.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">
|
||||||
|
|
||||||
|
<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="Gray">#C0C0C0</Brush>
|
||||||
|
<Brush x:Key="MediumGray">#808080</Brush>
|
||||||
|
|
||||||
|
<Color x:Key="ColorLightBlue">#1084D0</Color>
|
||||||
|
<Color x:Key="ColorBlue">#000080</Color>
|
||||||
|
|
||||||
|
<!--<Style TargetType="{x:Type MenuItem}">
|
||||||
|
<Setter Property="ItemsPanel">
|
||||||
|
<Setter.Value>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Background="{StaticResource Gray}" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</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 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 LightGray}" Width="1" />
|
||||||
|
<Border x:Name="InnerTopBorder" DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
|
</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="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="24" />
|
||||||
|
<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="../icons/envelope.ico" Width="16" Height="16" Margin="4,0" DockPanel.Dock="Left"/>
|
||||||
|
<Button x:Name="CloseButton" Template="{StaticResource Button9xTemplate}" DockPanel.Dock="Right" Width="19" Height="18" Margin="4,0" Click="CloseButtonClick">X</Button>
|
||||||
|
<TextBlock x:Name="TitlebarText" Foreground="#FFFFFF" FontWeight="Bold" Padding="0,3" Text="{TemplateBinding Title}"></TextBlock>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<ContentPresenter Grid.Row="1" />
|
||||||
|
</Grid>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<Style x:Key="Window9x" TargetType="Window">
|
||||||
|
<Setter Property="WindowStyle" Value="None" />
|
||||||
|
<Setter Property="ResizeMode" Value="CanMinimize" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ToolWindow9x" TargetType="Window" BasedOn="{StaticResource Window9x}">
|
||||||
|
<Setter Property="ShowInTaskbar" Value="False" />
|
||||||
|
<Setter Property="ResizeMode" Value="NoResize" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MenuSeparator" 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 TargetType="{x:Type Menu}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter Property="BorderThickness" Value="0,0,0,1" />
|
||||||
|
</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 x:Key="Header" TargetType="{x:Type TextBlock}">
|
|
||||||
<Setter Property="Foreground" Value="#008080" />
|
|
||||||
<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>
|
||||||
|
|
||||||
<Style TargetType="{x:Type TextBox}">
|
<Style TargetType="{x:Type TextBox}">
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="{x:Type Label}">
|
|
||||||
<Setter Property="Width" Value="120" />
|
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style TargetType="{x:Type StatusBar}">
|
<Style TargetType="{x:Type StatusBar}">
|
||||||
<Setter Property="Width" Value="640" />
|
<Setter Property="Template">
|
||||||
<Setter Property="Height" Value="24" />
|
<Setter.Value>
|
||||||
<Setter Property="Background" Value="#C3C3C3" />
|
<ControlTemplate TargetType="{x:Type StatusBar}">
|
||||||
<Setter Property="FontFamily" Value="Tahoma" />
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Width="1" Background="#FFFFFF" />
|
||||||
|
<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>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="{x:Type Button}">
|
<!--<Style TargetType="{x:Type Button}">
|
||||||
<Setter Property="Background" Value="#008080"/>
|
<Setter Property="Background" Value="#008080"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -58,7 +170,20 @@
|
|||||||
<Setter Property="Background" Value="#FF0081"/>
|
<Setter Property="Background" Value="#FF0081"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>-->
|
||||||
|
|
||||||
|
<!--<Style TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Gray}"/>
|
||||||
|
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" Value="#010081"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseCaptured" Value="True">
|
||||||
|
<Setter Property="Background" Value="#FF0081"/>
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>-->
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
|
||||||
namespace ServiceBus98;
|
namespace ServiceBus98;
|
||||||
|
|
||||||
@@ -9,5 +10,19 @@ namespace ServiceBus98;
|
|||||||
/// </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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
25
ServiceBus98/Controls/BeveledPresenter.xaml
Normal file
25
ServiceBus98/Controls/BeveledPresenter.xaml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<UserControl x:Class="ServiceBus98.Controls.BeveledPresenter"
|
||||||
|
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:ServiceBus98.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<ContentPresenter />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
28
ServiceBus98/Controls/BeveledPresenter.xaml.cs
Normal file
28
ServiceBus98/Controls/BeveledPresenter.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
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.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for BeveledPresenter.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class BeveledPresenter : UserControl
|
||||||
|
{
|
||||||
|
public BeveledPresenter()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
73
ServiceBus98/Controls/Button9x.xaml
Normal file
73
ServiceBus98/Controls/Button9x.xaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<UserControl x:Class="ServiceBus98.Controls.Button9x"
|
||||||
|
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:ServiceBus98.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
>
|
||||||
|
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Background" Value="#008080"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border 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 DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource LightGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseCaptured" Value="True">
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<DockPanel LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Right" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="#000000" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
|
<DockPanel Background="{StaticResource Gray}" LastChildFill="True">
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Trigger>
|
||||||
|
<!--<Trigger Property="IsMouseCaptured" Value="True">
|
||||||
|
<Setter Property="Background" Value="#FF0081"/>
|
||||||
|
</Trigger>-->
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</UserControl.Resources>
|
||||||
|
|
||||||
|
<UserControl.Template>
|
||||||
|
<ControlTemplate TargetType="UserControl">
|
||||||
|
<Button Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Click="Button_Click">
|
||||||
|
<ContentPresenter />
|
||||||
|
</Button>
|
||||||
|
</ControlTemplate>
|
||||||
|
</UserControl.Template>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
35
ServiceBus98/Controls/Button9x.xaml.cs
Normal file
35
ServiceBus98/Controls/Button9x.xaml.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
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.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for Button9x.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class Button9x : UserControl
|
||||||
|
{
|
||||||
|
public Button9x()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
public event EventHandler Click = null!;
|
||||||
|
|
||||||
|
private void Button_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Click?.Invoke(this, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,58 +3,236 @@
|
|||||||
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:controls="clr-namespace:ServiceBus98.Controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Service Bus 98" Height="480" Width="640"
|
Title="Service Bus 98" Height="600" Width="800"
|
||||||
Background="#C3C3C3"
|
Background="{StaticResource Gray}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ResizeMode="NoResize"
|
Template="{StaticResource Window9xTemplate}"
|
||||||
|
Style="{StaticResource Window9x}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<StackPanel>
|
<Window.CommandBindings>
|
||||||
|
<CommandBinding Command="ApplicationCommands.New" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute" />
|
||||||
|
<CommandBinding Command="ApplicationCommands.Help" Executed="CommandBinding_Executed_1" CanExecute="CommandBinding_CanExecute" />
|
||||||
|
|
||||||
<TextBlock Text="Service Bus 98" Style="{StaticResource Header}">
|
</Window.CommandBindings>
|
||||||
<TextBlock.Effect>
|
|
||||||
<DropShadowEffect ShadowDepth="2" Direction="315" Color="Black" Opacity="1" BlurRadius="0"/>
|
|
||||||
</TextBlock.Effect>
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
<Window.Resources>
|
||||||
<Label>Connection String:</Label>
|
<BooleanToVisibilityConverter x:Key="btv" />
|
||||||
<local:TextBox9x Width="490" x:Name="ConnectionString"/>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
<!-- style a top level menu item -->
|
||||||
<Label>Queue Name:</Label>
|
<ControlTemplate x:Key="TopMenuItem" TargetType="MenuItem">
|
||||||
<local:TextBox9x Width="490" x:Name="QueueName"/>
|
<StackPanel Margin="1">
|
||||||
</StackPanel>
|
<!-- label, icons, etc. -->
|
||||||
|
<DockPanel x:Name="MenuItem" LastChildFill="True">
|
||||||
|
<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="TopBorder" DockPanel.Dock="Top" Background="{StaticResource Gray}" Height="1" />
|
||||||
|
<Border x:Name="LeftBorder" DockPanel.Dock="Left" Background="{StaticResource Gray}" Width="1" />
|
||||||
|
<Label Content="{TemplateBinding Header}" Padding="6,3"/>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
<!-- sub items -->
|
||||||
<Label>Content Type:</Label>
|
<Popup IsOpen="{TemplateBinding IsSubmenuOpen}" Focusable="False">
|
||||||
<local:TextBox9x Width="490" x:Name="ContentType" Text="text/plain"/>
|
<DockPanel LastChildFill="True" Background="{StaticResource Gray}">
|
||||||
</StackPanel>
|
<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" />
|
||||||
|
|
||||||
<StackPanel Style="{StaticResource FormField}">
|
<DockPanel LastChildFill="True">
|
||||||
<Label>Message:</Label>
|
<Border DockPanel.Dock="Right" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
<local:MultilineTextBox9x x:Name="Message" Width="490" Height="170" />
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
</StackPanel>
|
<Border DockPanel.Dock="Left" Background="#FFFFFF" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="#FFFFFF" Height="1" />
|
||||||
|
|
||||||
<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>
|
<ItemsPresenter />
|
||||||
|
|
||||||
|
</DockPanel>
|
||||||
<StatusBar Height="40">
|
</DockPanel>
|
||||||
<DockPanel LastChildFill="True" Width="618" Height="24">
|
</Popup>
|
||||||
<Border DockPanel.Dock="Left" Background="#818181" Width="1" />
|
</StackPanel>
|
||||||
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
<ControlTemplate.Triggers>
|
||||||
<Border DockPanel.Dock="Top" Background="#818181" Height="1" />
|
<MultiTrigger>
|
||||||
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
<MultiTrigger.Conditions>
|
||||||
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
<Condition Property="IsHighlighted" Value="True" />
|
||||||
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
<Condition Property="IsSubmenuOpen" Value="False" />
|
||||||
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
</MultiTrigger.Conditions>
|
||||||
<Border DockPanel.Dock="Bottom" Background="#C3C3C3" Height="1" />
|
|
||||||
<TextBlock Padding="3" x:Name="StatusText">Status: Idle</TextBlock>
|
<Setter TargetName="BottomBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="RightBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="TopBorder" Property="Background" Value="#FFFFFF" />
|
||||||
|
<Setter TargetName="LeftBorder" Property="Background" 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="TopBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
<Setter TargetName="LeftBorder" Property="Background" Value="{StaticResource MediumGray}" />
|
||||||
|
</MultiTrigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<!-- style a non-top level menu item -->
|
||||||
|
<ControlTemplate x:Key="NestedMenuItem" TargetType="MenuItem">
|
||||||
|
<DockPanel x:Name="panel" Background="{StaticResource Gray}" Margin="2" >
|
||||||
|
<!-- label, icons, etc. -->
|
||||||
|
<Image Source="{Binding Icon, RelativeSource={RelativeSource TemplatedParent}}" Width="20" />
|
||||||
|
<Label x:Name="MenuItemLabel" Padding="0,3" Content="{TemplateBinding Header}" Foreground="Black" />
|
||||||
|
|
||||||
|
<Label x:Name="MenuItemGestureText" DockPanel.Dock="Right" Padding="0,3" Content="{TemplateBinding InputGestureText}" Foreground="Black" />
|
||||||
|
|
||||||
|
<!-- draw the right arrow only if this menu item has sub items -->
|
||||||
|
<Image Source="/icons/envelope.ico" Visibility="{Binding HasItems, Converter={StaticResource btv}, 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>
|
</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>
|
||||||
|
|
||||||
|
<!-- style the separator -->
|
||||||
|
<ControlTemplate x:Key="VsMenuSep" TargetType="Separator">
|
||||||
|
<DockPanel Height="2" Margin="2,0">
|
||||||
|
<Border DockPanel.Dock="Top" Height="1" Background="{StaticResource MediumGray}" />
|
||||||
|
<Border DockPanel.Dock="Bottom" Height="1" Background="{StaticResource LightGray}" />
|
||||||
|
</DockPanel>
|
||||||
|
</ControlTemplate>
|
||||||
|
|
||||||
|
<!-- style the VSOnline -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- some base stuff -->
|
||||||
|
<Style TargetType="Menu">
|
||||||
|
<Setter Property="Background" Value="{StaticResource Gray}" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="27" />
|
||||||
|
<RowDefinition Height="26" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="24" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="240" MinWidth="180" MaxWidth="360" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Menu Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="{StaticResource MediumGray}" BorderThickness="0,0,0,1">
|
||||||
|
<MenuItem Header="_File" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_New Connection" InputGestureText="Ctrl+N" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.New" />
|
||||||
|
<Separator Style="{StaticResource MenuSeparator}"/>
|
||||||
|
<MenuItem Header="E_xit" InputGestureText="Alt+F4" Template="{StaticResource NestedMenuItem}" Click="MenuItem_Click_1" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Tools" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_Options" Template="{StaticResource NestedMenuItem}" />
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem Header="_Help" Template="{StaticResource TopMenuItem}">
|
||||||
|
<MenuItem Header="_Help Topics" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.Help" />
|
||||||
|
<Separator Style="{StaticResource MenuSeparator}"/>
|
||||||
|
<MenuItem Header="_About Service Bus 98" Template="{StaticResource NestedMenuItem}" Click="HelpAboutClick" />
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="1" Grid.ColumnSpan="3">
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
|
<StackPanel />
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<DockPanel Grid.Row="2" Grid.Column="0" 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">
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<TreeView BorderThickness="0">
|
||||||
|
<TreeViewItem Header="localhost">
|
||||||
|
<TreeViewItem Header="Queues">
|
||||||
|
ServiceBusQueue
|
||||||
|
</TreeViewItem>
|
||||||
|
<TreeViewItem Header="Topics" />
|
||||||
|
<TreeViewItem Header="Subscriptions" />
|
||||||
|
</TreeViewItem>
|
||||||
|
|
||||||
|
</TreeView>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<GridSplitter Grid.Row="2" Grid.Column="1"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
Background="{StaticResource Gray}"
|
||||||
|
ShowsPreview="True"
|
||||||
|
Width="3"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<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" />
|
||||||
|
|
||||||
|
<TextBlock>More Service Bus Action</TextBlock>
|
||||||
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
<StatusBar Grid.Row="3" Grid.ColumnSpan="3">
|
||||||
|
<StatusBarItem>
|
||||||
|
Status: Idle
|
||||||
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
</StackPanel>
|
|
||||||
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using Azure.Messaging.ServiceBus;
|
using Azure.Messaging.ServiceBus;
|
||||||
|
|
||||||
namespace ServiceBus98;
|
namespace ServiceBus98;
|
||||||
@@ -13,6 +14,47 @@ public partial class MainWindow : Window
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MenuItem_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Clicked");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CommandBinding_Executed(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show("New Connection");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CommandBinding_CanExecute(object sender, System.Windows.Input.CanExecuteRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Control target = (Control)e.Source;
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
e.CanExecute = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
e.CanExecute = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MenuItem_Click_1(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CommandBinding_Executed_1(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Open git.ratermania.net");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HelpAboutClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
AboutWindow aboutWindow = new AboutWindow();
|
||||||
|
aboutWindow.ShowDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
private async void Send_Click(object sender, RoutedEventArgs e)
|
private async void Send_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(ConnectionString.Text))
|
if (string.IsNullOrEmpty(ConnectionString.Text))
|
||||||
@@ -72,4 +114,5 @@ public partial class MainWindow : Window
|
|||||||
StatusText.Text = "Status: Idle";
|
StatusText.Text = "Status: Idle";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
xmlns:local="clr-namespace:ServiceBus98"
|
xmlns:local="clr-namespace:ServiceBus98"
|
||||||
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" />
|
||||||
|
|||||||
@@ -8,8 +8,16 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="icons\envelope.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
|
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="icons\envelope.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
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" />
|
||||||
|
|||||||
45
ServiceBus98/Windows/AboutWindow.xaml
Normal file
45
ServiceBus98/Windows/AboutWindow.xaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<Window x:Class="ServiceBus98.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:ServiceBus98"
|
||||||
|
xmlns:controls="clr-namespace:ServiceBus98.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
Title="About Service Bus 98"
|
||||||
|
Width="360"
|
||||||
|
Height="240"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
Template="{StaticResource Window9xTemplate}"
|
||||||
|
Style="{StaticResource ToolWindow9x}">
|
||||||
|
|
||||||
|
|
||||||
|
<Window.Resources>
|
||||||
|
<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" />
|
||||||
|
</Style>
|
||||||
|
</Window.Resources>
|
||||||
|
|
||||||
|
<Window.CommandBindings>
|
||||||
|
<CommandBinding Command="ApplicationCommands.Close" CanExecute="CloseCanExecute" Executed="CloseExecuted" />
|
||||||
|
</Window.CommandBindings>
|
||||||
|
|
||||||
|
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Style="{StaticResource Header}" Text="Service Bus 98">
|
||||||
|
<!--<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) 1998-2025 Tommy</TextBlock>
|
||||||
|
<Button Command="ApplicationCommands.Close">OK</Button>
|
||||||
|
</StackPanel>
|
||||||
|
</Window>
|
||||||
37
ServiceBus98/Windows/AboutWindow.xaml.cs
Normal file
37
ServiceBus98/Windows/AboutWindow.xaml.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
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.Shapes;
|
||||||
|
|
||||||
|
namespace ServiceBus98
|
||||||
|
{
|
||||||
|
/// <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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
ServiceBus98/icons/envelope.ico
Normal file
BIN
ServiceBus98/icons/envelope.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
46
ServiceBus98/original.txt
Normal file
46
ServiceBus98/original.txt
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<StackPanel>
|
||||||
|
|
||||||
|
<TextBlock Text="Service Bus 98" Style="{StaticResource Header}">
|
||||||
|
<TextBlock.Effect>
|
||||||
|
<DropShadowEffect ShadowDepth="2" Direction="315" Color="Black" Opacity="1" BlurRadius="0"/>
|
||||||
|
</TextBlock.Effect>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label>Connection String:</Label>
|
||||||
|
<local:TextBox9x Width="490" x:Name="ConnectionString"/>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<StackPanel Style="{StaticResource FormField}">
|
||||||
|
<Label>Queue Name:</Label>
|
||||||
|
<local:TextBox9x Width="490" x:Name="QueueName"/>
|
||||||
|
</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="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" 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>
|
||||||
|
|
||||||
|
</StatusBar>
|
||||||
|
</StackPanel>
|
||||||
Reference in New Issue
Block a user