Windowing
This commit is contained in:
@@ -28,7 +28,83 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</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 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}">
|
<Style x:Key="MenuSeparator" TargetType="{x:Type Separator}">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<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>
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
Title="Service Bus 98" Height="600" Width="800"
|
Title="Service Bus 98" Height="600" Width="800"
|
||||||
Background="{StaticResource Gray}"
|
Background="{StaticResource Gray}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ResizeMode="NoResize"
|
Template="{StaticResource Window9xTemplate}"
|
||||||
WindowStyle="None"
|
Style="{StaticResource Window9x}"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Window.CommandBindings>
|
<Window.CommandBindings>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<CommandBinding Command="ApplicationCommands.Help" Executed="CommandBinding_Executed_1" CanExecute="CommandBinding_CanExecute" />
|
<CommandBinding Command="ApplicationCommands.Help" Executed="CommandBinding_Executed_1" CanExecute="CommandBinding_CanExecute" />
|
||||||
|
|
||||||
</Window.CommandBindings>
|
</Window.CommandBindings>
|
||||||
|
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<BooleanToVisibilityConverter x:Key="btv" />
|
<BooleanToVisibilityConverter x:Key="btv" />
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
<Label x:Name="MenuItemLabel" Padding="0,3" Content="{TemplateBinding Header}" Foreground="Black" />
|
<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" />
|
<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 -->
|
<!-- 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" />
|
<Image Source="/icons/envelope.ico" Visibility="{Binding HasItems, Converter={StaticResource btv}, RelativeSource={RelativeSource TemplatedParent}}" Width="20" />
|
||||||
|
|
||||||
@@ -143,71 +143,68 @@
|
|||||||
|
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<!-- the real app and real menu -->
|
<Grid>
|
||||||
<controls:Window9x>
|
<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>
|
||||||
|
|
||||||
<Grid>
|
<Menu Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="{StaticResource MediumGray}" BorderThickness="0,0,0,1">
|
||||||
<Grid.RowDefinitions>
|
<MenuItem Header="_File" Template="{StaticResource TopMenuItem}">
|
||||||
<RowDefinition Height="27" />
|
<MenuItem Header="_New Connection" InputGestureText="Ctrl+N" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.New" />
|
||||||
<RowDefinition Height="26" />
|
<Separator Style="{StaticResource MenuSeparator}"/>
|
||||||
<RowDefinition Height="*" />
|
<MenuItem Header="E_xit" InputGestureText="Alt+F4" Template="{StaticResource NestedMenuItem}" Click="MenuItem_Click_1" />
|
||||||
<RowDefinition Height="24" />
|
</MenuItem>
|
||||||
</Grid.RowDefinitions>
|
<MenuItem Header="_Tools" Template="{StaticResource TopMenuItem}">
|
||||||
<Grid.ColumnDefinitions>
|
<MenuItem Header="_Options" Template="{StaticResource NestedMenuItem}" />
|
||||||
<ColumnDefinition Width="240" MinWidth="180" MaxWidth="360" />
|
</MenuItem>
|
||||||
<ColumnDefinition Width="Auto" />
|
<MenuItem Header="_Help" Template="{StaticResource TopMenuItem}">
|
||||||
<ColumnDefinition />
|
<MenuItem Header="_Help Topics" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.Help" />
|
||||||
</Grid.ColumnDefinitions>
|
<Separator Style="{StaticResource MenuSeparator}"/>
|
||||||
|
<MenuItem Header="_About Service Bus 98" Template="{StaticResource NestedMenuItem}" Click="HelpAboutClick" />
|
||||||
|
</MenuItem>
|
||||||
|
</Menu>
|
||||||
|
|
||||||
<Menu Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="{StaticResource MediumGray}" BorderThickness="0,0,0,1">
|
<DockPanel Grid.Row="1" Grid.ColumnSpan="3">
|
||||||
<MenuItem Header="_File" Template="{StaticResource TopMenuItem}">
|
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
||||||
<MenuItem Header="_New Connection" InputGestureText="Ctrl+N" Template="{StaticResource NestedMenuItem}" Command="ApplicationCommands.New" />
|
<StackPanel />
|
||||||
<Separator Style="{StaticResource MenuSeparator}"/>
|
</DockPanel>
|
||||||
<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">
|
<DockPanel Grid.Row="2" Grid.Column="0" Margin="0,2" LastChildFill="True">
|
||||||
<Border DockPanel.Dock="Top" Background="{StaticResource LightGray}" Height="1" />
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
<StackPanel />
|
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
</DockPanel>
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
|
||||||
<DockPanel Grid.Row="2" Grid.Column="0" Margin="0,2" LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
||||||
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
||||||
<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" />
|
||||||
|
|
||||||
<DockPanel LastChildFill="True">
|
<TreeView BorderThickness="0">
|
||||||
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
<TreeViewItem Header="localhost">
|
||||||
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
<TreeViewItem Header="Queues">
|
||||||
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
ServiceBusQueue
|
||||||
<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>
|
</TreeViewItem>
|
||||||
|
<TreeViewItem Header="Topics" />
|
||||||
|
<TreeViewItem Header="Subscriptions" />
|
||||||
|
</TreeViewItem>
|
||||||
|
|
||||||
</TreeView>
|
</TreeView>
|
||||||
</DockPanel>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<GridSplitter Grid.Row="2" Grid.Column="1"
|
<GridSplitter Grid.Row="2" Grid.Column="1"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="{StaticResource Gray}"
|
Background="{StaticResource Gray}"
|
||||||
@@ -215,29 +212,27 @@
|
|||||||
Width="3"
|
Width="3"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<DockPanel Grid.Row="2" Grid.Column="2" Margin="0,2" LastChildFill="True">
|
<DockPanel Grid.Row="2" Grid.Column="2" Margin="0,2" LastChildFill="True">
|
||||||
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
<Border DockPanel.Dock="Right" Background="#FFFFFF" Width="1" />
|
||||||
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
<Border DockPanel.Dock="Bottom" Background="#FFFFFF" Height="1" />
|
||||||
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
<Border DockPanel.Dock="Left" Background="{StaticResource MediumGray}" Width="1" />
|
||||||
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
<Border DockPanel.Dock="Top" Background="{StaticResource MediumGray}" Height="1" />
|
||||||
|
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
<Border DockPanel.Dock="Right" Background="{StaticResource LightGray}" Width="1" />
|
||||||
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
<Border DockPanel.Dock="Bottom" Background="{StaticResource LightGray}" Height="1" />
|
||||||
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
<Border DockPanel.Dock="Left" Background="#000000" Width="1" />
|
||||||
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
<Border DockPanel.Dock="Top" Background="#000000" Height="1" />
|
||||||
|
|
||||||
<TextBlock>More Service Bus Action</TextBlock>
|
<TextBlock>More Service Bus Action</TextBlock>
|
||||||
</DockPanel>
|
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
<StatusBar Grid.Row="3" Grid.ColumnSpan="3">
|
<StatusBar Grid.Row="3" Grid.ColumnSpan="3">
|
||||||
<StatusBarItem>
|
<StatusBarItem>
|
||||||
Status: Idle
|
Status: Idle
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</controls:Window9x>
|
|
||||||
|
|
||||||
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ public partial class MainWindow : Window
|
|||||||
MessageBox.Show("Open git.ratermania.net");
|
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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
<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>
|
|
||||||
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>
|
||||||
@@ -17,11 +17,21 @@ namespace ServiceBus98
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for About.xaml
|
/// Interaction logic for About.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class About : Window
|
public partial class AboutWindow : Window
|
||||||
{
|
{
|
||||||
public About()
|
public AboutWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CloseCanExecute(object sender, CanExecuteRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
e.CanExecute = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CloseExecuted(object sender, ExecutedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user