WIP
This commit is contained in:
@@ -2,44 +2,80 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:ServiceBus98"
|
||||
xmlns:controls="clr-namespace:ServiceBus98.Controls"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
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>-->
|
||||
|
||||
|
||||
|
||||
<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}">
|
||||
<Setter Property="Margin" Value="5" />
|
||||
<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 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 TargetType="{x:Type StatusBar}">
|
||||
<Setter Property="Width" Value="640" />
|
||||
<Setter Property="Height" Value="24" />
|
||||
<Setter Property="Background" Value="#C3C3C3" />
|
||||
<Setter Property="FontFamily" Value="Tahoma" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type StatusBar}">
|
||||
<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 TargetType="{x:Type Button}">
|
||||
<!--<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="Background" Value="#008080"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
@@ -58,7 +94,20 @@
|
||||
<Setter Property="Background" Value="#FF0081"/>
|
||||
</Trigger>
|
||||
</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>
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
20
ServiceBus98/Controls/Titlebar9x.xaml
Normal file
20
ServiceBus98/Controls/Titlebar9x.xaml
Normal file
@@ -0,0 +1,20 @@
|
||||
<UserControl x:Class="ServiceBus98.Controls.Titlebar9x"
|
||||
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:controls="clr-namespace:ServiceBus98.Controls"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DockPanel LastChildFill="True" MouseDown="DockPanel_MouseDown">
|
||||
<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"/>
|
||||
<controls:Button9x Click="Button9x_Click" DockPanel.Dock="Right" Width="19" Height="18" Margin="4,0">X</controls:Button9x>
|
||||
<TextBlock x:Name="TitlebarText" Foreground="#FFFFFF" FontWeight="Bold" Padding="0,3"></TextBlock>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
31
ServiceBus98/Controls/Titlebar9x.xaml.cs
Normal file
31
ServiceBus98/Controls/Titlebar9x.xaml.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace ServiceBus98.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Titlebar9x.xaml
|
||||
/// </summary>
|
||||
public partial class Titlebar9x : UserControl
|
||||
{
|
||||
public Titlebar9x()
|
||||
{
|
||||
InitializeComponent();
|
||||
//MessageBox.Show();
|
||||
TitlebarText.Text = Application.Current.MainWindow.Title;
|
||||
}
|
||||
|
||||
private void DockPanel_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.ChangedButton == System.Windows.Input.MouseButton.Left)
|
||||
{
|
||||
Application.Current.MainWindow.DragMove();
|
||||
}
|
||||
}
|
||||
|
||||
private void Button9x_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
ServiceBus98/Controls/Window9x.xaml
Normal file
40
ServiceBus98/Controls/Window9x.xaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<UserControl x:Class="ServiceBus98.Controls.Window9x"
|
||||
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:controls="clr-namespace:ServiceBus98.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
|
||||
<UserControl.Template>
|
||||
<ControlTemplate TargetType="UserControl">
|
||||
<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" />
|
||||
|
||||
<Grid Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="24" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<controls:Titlebar9x Grid.Row="0"></controls:Titlebar9x>
|
||||
|
||||
<ContentPresenter Grid.Row="1" />
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</ControlTemplate>
|
||||
</UserControl.Template>
|
||||
</UserControl>
|
||||
28
ServiceBus98/Controls/Window9x.xaml.cs
Normal file
28
ServiceBus98/Controls/Window9x.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 Window9x.xaml
|
||||
/// </summary>
|
||||
public partial class Window9x : UserControl
|
||||
{
|
||||
public Window9x()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,58 +3,241 @@
|
||||
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="Service Bus 98" Height="480" Width="640"
|
||||
Background="#C3C3C3"
|
||||
Title="Service Bus 98" Height="600" Width="800"
|
||||
Background="{StaticResource Gray}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ResizeMode="NoResize"
|
||||
WindowStyle="None"
|
||||
>
|
||||
|
||||
<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}">
|
||||
<TextBlock.Effect>
|
||||
<DropShadowEffect ShadowDepth="2" Direction="315" Color="Black" Opacity="1" BlurRadius="0"/>
|
||||
</TextBlock.Effect>
|
||||
</TextBlock>
|
||||
</Window.CommandBindings>
|
||||
|
||||
<Window.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="btv" />
|
||||
|
||||
<StackPanel Style="{StaticResource FormField}">
|
||||
<Label>Connection String:</Label>
|
||||
<local:TextBox9x Width="490" x:Name="ConnectionString"/>
|
||||
</StackPanel>
|
||||
<!-- style a top level menu item -->
|
||||
<ControlTemplate x:Key="TopMenuItem" TargetType="MenuItem">
|
||||
<StackPanel Margin="1">
|
||||
<!-- 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}">
|
||||
<Label>Queue Name:</Label>
|
||||
<local:TextBox9x Width="490" x:Name="QueueName"/>
|
||||
</StackPanel>
|
||||
<!-- 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" />
|
||||
|
||||
<StackPanel Style="{StaticResource FormField}">
|
||||
<Label>Content Type:</Label>
|
||||
<local:TextBox9x Width="490" x:Name="ContentType" Text="text/plain"/>
|
||||
</StackPanel>
|
||||
<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" />
|
||||
|
||||
<StackPanel Style="{StaticResource FormField}">
|
||||
<Label>Message:</Label>
|
||||
<local:MultilineTextBox9x x:Name="Message" Width="490" Height="170" />
|
||||
</StackPanel>
|
||||
<ItemsPresenter />
|
||||
|
||||
<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>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Popup>
|
||||
</StackPanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsHighlighted" Value="True" />
|
||||
<Condition Property="IsSubmenuOpen" Value="False" />
|
||||
</MultiTrigger.Conditions>
|
||||
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
</StatusBar>
|
||||
</StackPanel>
|
||||
<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>
|
||||
|
||||
<!-- the real app and real menu -->
|
||||
<controls:Window9x>
|
||||
|
||||
<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}" />
|
||||
</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>
|
||||
|
||||
</Grid>
|
||||
</controls:Window9x>
|
||||
|
||||
</Window>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using Azure.Messaging.ServiceBus;
|
||||
|
||||
namespace ServiceBus98;
|
||||
@@ -13,6 +14,41 @@ public partial class MainWindow : Window
|
||||
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 async void Send_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (string.IsNullOrEmpty(ConnectionString.Text))
|
||||
@@ -72,4 +108,5 @@ public partial class MainWindow : Window
|
||||
StatusText.Text = "Status: Idle";
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -6,9 +6,9 @@
|
||||
xmlns:local="clr-namespace:ServiceBus98"
|
||||
mc:Ignorable="d">
|
||||
<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="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="Right" Background="#FFFFFF" Width="1" />
|
||||
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
||||
|
||||
@@ -8,8 +8,16 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="icons\envelope.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="icons\envelope.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<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="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="Right" Background="#FFFFFF" Width="1" />
|
||||
<Border DockPanel.Dock="Right" Background="#C3C3C3" Width="1" />
|
||||
|
||||
17
ServiceBus98/Windows/About.xaml
Normal file
17
ServiceBus98/Windows/About.xaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<Window x:Class="ServiceBus98.About"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
Title="About" Height="450" Width="800">
|
||||
<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>
|
||||
</Window>
|
||||
27
ServiceBus98/Windows/About.xaml.cs
Normal file
27
ServiceBus98/Windows/About.xaml.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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 About : Window
|
||||
{
|
||||
public About()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
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