cause everyone in the universe to rage because we added a NuGet dependency (MaterialDesignThemes 5); refactor all XAML to use MaterialDesignThemes;

pull/2/head
Bryan Biedenkapp 11 months ago
parent 4959dce400
commit 64682a5f0a

@ -1,86 +1,15 @@
<Application x:Class="dvmconsole.App" <Application x:Class="dvmconsole.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Startup="Application_Startup" Startup="Application_Startup"
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>
<!-- Default Button Style --> <ResourceDictionary>
<Style TargetType="Button" x:Key="FlatButton"> <ResourceDictionary.MergedDictionaries>
<Setter Property="OverridesDefaultStyle" Value="True"/> <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="Blue" SecondaryColor="Green" />
<Setter Property="Background" Value="#DDDDDD"/> <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />
<!-- Solid Light Gray --> </ResourceDictionary.MergedDictionaries>
<Setter Property="BorderBrush" Value="Black"/> </ResourceDictionary>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="0">
<!-- No Rounded Edges -->
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<!-- Darker background when hovered -->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="#CCCCCC"/>
</Trigger>
<!-- Even darker when pressed -->
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Background" Value="#AAAAAA"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Button">
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFE3E3E3" Offset="0.517"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="#FFACACAC"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
</Border>
<ControlTemplate.Triggers>
<!-- Subtle transparency & slight darkening on hover -->
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Opacity" Value="0.9"/>
</Trigger>
<!-- Slightly darker when pressed -->
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources> </Application.Resources>
</Application> </Application>

@ -1,7 +1,10 @@
<Window x:Class="dvmconsole.AudioSettingsWindow" <Window x:Class="dvmconsole.AudioSettingsWindow"
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"
Title="Audio Settings" Height="400" Width="450" Icon="/dvmconsole;component/Assets/audio.png" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
Title="Audio Settings" Height="400" MinHeight="400" Width="450" MinWidth="450" MaxWidth="450" Icon="/dvmconsole;component/Assets/audio.png"
WindowStartupLocation="CenterOwner"> WindowStartupLocation="CenterOwner">
<Grid Margin="10"> <Grid Margin="10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -12,16 +15,18 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="Global Audio Input Device" FontWeight="Bold" Margin="0,0,0,5"/> <TextBlock Text="Global Audio Input Device" FontWeight="Bold" Margin="0,0,0,5"/>
<ComboBox x:Name="InputDeviceComboBox" Width="350" Margin="0,5,0,15" Grid.Row="1"/> <ComboBox x:Name="InputDeviceComboBox" Margin="0,5,0,0" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Center" Width="410"/>
<TextBlock Text="Per-Channel Output Devices" FontWeight="Bold" Grid.Row="2" Margin="0,0,0,5"/> <TextBlock Text="Per-Channel Output Devices" FontWeight="Bold" Grid.Row="2" Margin="0,0,0,5"/>
<ScrollViewer Grid.Row="2" Margin="0,30,0,30"> <ScrollViewer Grid.Row="2" Margin="10,30,10,16">
<StackPanel x:Name="ChannelOutputStackPanel"/> <StackPanel x:Name="ChannelOutputStackPanel"/>
</ScrollViewer> </ScrollViewer>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3" Margin="0,20,0,0"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="3" Margin="0,0,0,0">
<Button x:Name="SaveButton" Content="Save" Width="100" Margin="0,0,10,0" Click="SaveButton_Click"/> <Button x:Name="SaveButton" Content="Save" Width="100" Margin="0,0,10,0" Click="SaveButton_Click"
<Button x:Name="CancelButton" Content="Cancel" Width="100" Click="CancelButton_Click"/> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}" />
<Button x:Name="CancelButton" Content="Cancel" Width="100" Click="CancelButton_Click"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

@ -4,6 +4,9 @@
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:dvmconsole" xmlns:local="clr-namespace:dvmconsole"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
mc:Ignorable="d" Icon="/dvmconsole;component/Assets/history.png" mc:Ignorable="d" Icon="/dvmconsole;component/Assets/history.png"
Title="Call History" Height="450" Width="551" WindowStartupLocation="CenterOwner"> Title="Call History" Height="450" Width="551" WindowStartupLocation="CenterOwner">
<Grid> <Grid>

@ -1,6 +1,7 @@
<UserControl x:Class="dvmconsole.Controls.AlertTone" <UserControl x:Class="dvmconsole.Controls.AlertTone"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Height="55" Width="105" Height="55" Width="105"
DataContext="{Binding RelativeSource={RelativeSource Self}}"> DataContext="{Binding RelativeSource={RelativeSource Self}}">
<UserControl.Effect> <UserControl.Effect>
@ -13,21 +14,11 @@
<RowDefinition Height="39*"/> <RowDefinition Height="39*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Button Click="PlayAlert_Click" VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="46,20,0,0" VerticalAlignment="Top" Height="28" Width="48" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" FontSize="10" FontFamily="Arial" Grid.RowSpan="2"> <Button Click="PlayAlert_Click" Height="28" Width="48" Margin="46,20,0,0" Padding="0" Grid.RowSpan="2"
<Button.Resources> Style="{StaticResource MaterialDesignPaperDarkButton}">
<Style TargetType="{x:Type Border}"> <Image Height="28" Width="48" Source="/dvmconsole;component/Assets/page.png" />
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFE3E3E3" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image Height="40" Width="63" Source="/dvmconsole;component/Assets/page.png" Margin="0,-8,0,0"/>
</Button> </Button>
<TextBlock HorizontalAlignment="Center" FontWeight="Bold" FontSize="10" TextWrapping="Wrap" Text="{Binding AlertFileName}" TextAlignment="Center" VerticalAlignment="Top" Width="100" Background="{x:Null}" Height="24" Margin="0,4,0,0" Grid.RowSpan="2" Foreground="White"/> <TextBlock Width="100" Height="24" HorizontalAlignment="Center" VerticalAlignment="Top" FontWeight="Bold" FontSize="10" TextWrapping="Wrap" TextAlignment="Center" Text="{Binding AlertFileName}" Background="{x:Null}" Margin="0,4,0,0" Grid.RowSpan="2" Foreground="White" />
</Grid> </Grid>
</Border> </Border>
</UserControl> </UserControl>

@ -2,12 +2,13 @@
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:dvmconsole.Controls" xmlns:local="clr-namespace:dvmconsole.Controls"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Width="220" Height="110"> Width="220" Height="110">
<UserControl.Effect> <UserControl.Effect>
<DropShadowEffect ShadowDepth="1" BlurRadius="16" Color="#FF686767" Opacity="0.3" /> <DropShadowEffect ShadowDepth="1" BlurRadius="16" Color="#FF686767" Opacity="0.3" />
</UserControl.Effect> </UserControl.Effect>
<!-- Border wraps the entire Grid --> <!-- Border wraps the entire Grid -->
<Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="1,1,1,1" CornerRadius="8"> <Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="2,2,2,2" CornerRadius="8">
<Grid Margin="0"> <Grid Margin="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="41"/> <ColumnDefinition Width="41"/>
@ -23,7 +24,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- Volume Meter --> <!-- Volume Meter -->
<local:VuMeterControl x:Name="VolumeMeter" HorizontalAlignment="Center" Width="219" Height="10" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="0,-58,0,0" /> <local:VuMeterControl x:Name="VolumeMeter" HorizontalAlignment="Center" Width="220" Height="10" Grid.RowSpan="2" Grid.ColumnSpan="3" Margin="0,-60,0,0" />
<!-- Main Info Section --> <!-- Main Info Section -->
<StackPanel Grid.Column="1" HorizontalAlignment="Left" Width="147" Height="50" Margin="22,5,0,4" Grid.ColumnSpan="2" Grid.Row="1"> <StackPanel Grid.Column="1" HorizontalAlignment="Left" Width="147" Height="50" Margin="22,5,0,4" Grid.ColumnSpan="2" Grid.Row="1">
@ -40,14 +41,14 @@
</StackPanel> </StackPanel>
<!-- PTT Button --> <!-- PTT Button -->
<Button x:Name="PttButton" HorizontalAlignment="Left" Width="42" Height="42" Margin="12,5,0,4" Grid.ColumnSpan="2" BorderThickness="0,0,0,0" BorderBrush="#FFC1C1C1" UseLayoutRounding="False" Grid.RowSpan="2" Background="#FFEEA400" <Button x:Name="PttButton" Width="42" Height="42" HorizontalAlignment="Left" Margin="12,5,0,4" Grid.ColumnSpan="2" BorderThickness="0,0,0,0" BorderBrush="#FFC1C1C1" UseLayoutRounding="False" Grid.RowSpan="2" Background="#FFEEA400"
ToolTip="Push To Talk"> ToolTip="Push To Talk" Padding="0">
<Button.Resources> <Button.Resources>
<Style TargetType="{x:Type Border}"> <Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/> <Setter Property="CornerRadius" Value="2"/>
</Style> </Style>
</Button.Resources> </Button.Resources>
<Image Source="/dvmconsole;component/Assets/instantptt.png" Width="39" Height="40" Stretch="Fill" Margin="0,0,0,1"/> <Image Source="/dvmconsole;component/Assets/instantptt.png" Width="39" Height="40" Stretch="Fill" Margin="0,1,0,1"/>
</Button> </Button>
<!-- Volume Slider Background --> <!-- Volume Slider Background -->
@ -101,22 +102,12 @@
<!-- Bottom Buttons --> <!-- Bottom Buttons -->
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Margin="87,-8,-2,0" Grid.RowSpan="2" Grid.ColumnSpan="2"> <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" Margin="87,-8,-2,0" Grid.RowSpan="2" Grid.ColumnSpan="2">
<Button Width="40" Height="40" x:Name="PageSelectButton" Click="PageSelectButton_Click" BorderThickness="0,0,0,0" <Button x:Name="PageSelectButton" Width="40" Height="40" Click="PageSelectButton_Click" ToolTip="Select for Alert Tone" Padding="0"
ToolTip="Select for Alert Tone"> Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Image Source="/dvmconsole;component/Assets/pageselect.png" Width="39" Height="39" Margin="1.5,2,0,0"/> <Image Source="/dvmconsole;component/Assets/pageselect.png" Width="39" Height="39" Margin="1.5,2,0,0"/>
</Button> </Button>
<Button Width="40" Height="40" x:Name="ChannelMarkerBtn" Click="ChannelMarkerBtn_Click" BorderThickness="0,0,0,0" Margin="5,0,0,0" <Button x:Name="ChannelMarkerBtn" Width="40" Height="40" Click="ChannelMarkerBtn_Click" Margin="5,0,0,0" ToolTip="Transmit Channel Marker" Padding="0"
ToolTip="Transmit Channel Marker"> Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Image Source="/dvmconsole;component/Assets/channelmarker.png" Width="36" Height="40"/> <Image Source="/dvmconsole;component/Assets/channelmarker.png" Width="36" Height="40"/>
</Button> </Button>
</StackPanel> </StackPanel>

@ -32,7 +32,9 @@ namespace dvmconsole.Controls
{ {
public readonly static Border BORDER_DEFAULT; public readonly static Border BORDER_DEFAULT;
public readonly static Border BORDER_GREEN; public readonly static Border BORDER_GREEN;
public readonly static LinearGradientBrush GRAY_GRADIENT; public readonly static LinearGradientBrush GRAY_GRADIENT;
public readonly static LinearGradientBrush DARK_GRAY_GRADIENT; // Delected/Disconnected Color public readonly static LinearGradientBrush DARK_GRAY_GRADIENT; // Delected/Disconnected Color
public readonly static LinearGradientBrush BLUE_GRADIENT; // Selected Channel Color public readonly static LinearGradientBrush BLUE_GRADIENT; // Selected Channel Color
public readonly static LinearGradientBrush RED_GRADIENT; // Playback Selected Color public readonly static LinearGradientBrush RED_GRADIENT; // Playback Selected Color
@ -547,6 +549,7 @@ namespace dvmconsole.Controls
if (SystemName == MainWindow.PLAYBACKSYS || ChannelName == MainWindow.PLAYBACKCHNAME || DstId == MainWindow.PLAYBACKTG) if (SystemName == MainWindow.PLAYBACKSYS || ChannelName == MainWindow.PLAYBACKCHNAME || DstId == MainWindow.PLAYBACKTG)
{ {
ControlBorder.Background = IsSelected ? RED_GRADIENT : DARK_GRAY_GRADIENT; ControlBorder.Background = IsSelected ? RED_GRADIENT : DARK_GRAY_GRADIENT;
SetVolumeMeterBg(ControlBorder.Background);
return; return;
} }

@ -7,8 +7,8 @@
</UserControl.Effect> </UserControl.Effect>
<Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="1,1,1,1" CornerRadius="6"> <Border x:Name="ControlBorder" BorderBrush="LightGray" BorderThickness="1,1,1,1" CornerRadius="6">
<StackPanel Margin="2,2,2,2"> <StackPanel Margin="2,2,2,2">
<TextBlock Text="{Binding ConnectionState}" Margin="0,2,0,0" Foreground="Gold" FontSize="10" TextAlignment="Center" /> <TextBlock Text="{Binding SystemName}" Margin="0,1,0,0" FontWeight="Bold" Foreground="White" FontSize="16" TextAlignment="Center" />
<TextBlock Text="{Binding SystemName}" Margin="0,4,0,0" FontWeight="Bold" Foreground="White" FontSize="16" TextAlignment="Center" /> <TextBlock Text="{Binding ConnectionState}" Margin="0,4,0,0" Foreground="Gold" FontSize="10" TextAlignment="Center" />
</StackPanel> </StackPanel>
</Border> </Border>
</UserControl> </UserControl>

@ -98,6 +98,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="MaterialDesignThemes" Version="5.2.1" />
<PackageReference Include="NAudio" Version="2.2.1" /> <PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NWaves" Version="0.9.6" /> <PackageReference Include="NWaves" Version="0.9.6" />

@ -4,15 +4,32 @@
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:dvmconsole" xmlns:local="clr-namespace:dvmconsole"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
mc:Ignorable="d" Icon="/dvmconsole;component/Assets/page.png" mc:Ignorable="d" Icon="/dvmconsole;component/Assets/page.png"
Title="Page Subscriber" Height="141" Width="330" WindowStartupLocation="CenterOwner"> Title="Page Subscriber" Height="181" Width="340" WindowStartupLocation="CenterOwner">
<Grid> <Grid>
<Button Name="SendPageButton" HorizontalAlignment="Left" Margin="108,66,0,0" VerticalAlignment="Top" Click="SendPageButton_Click" Width="120" Height="24"> <Grid.ColumnDefinitions>
<TextBlock TextAlignment="Center" Margin="0,-21,0,0">Send</TextBlock> <ColumnDefinition Width="100"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Content="System:" HorizontalAlignment="Left" Margin="45,16,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
<ComboBox HorizontalAlignment="Left" Name="SystemCombo" Margin="10,16,0,0" VerticalAlignment="Top" Width="150" Grid.Row="0" Grid.Column="1" />
<Label Content="Radio ID:" HorizontalAlignment="Left" Margin="40,46,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
<TextBox HorizontalAlignment="Left" Name="DstIdText" Margin="10,46,0,0" TextWrapping="Wrap" Text="" MaxLength="8" VerticalAlignment="Top" Width="150" Grid.Row="0" Grid.Column="1"/>
<Button x:Name="SendButton" Width="150" Height="24" HorizontalAlignment="Left" Margin="108,20,0,0" VerticalAlignment="Top" Click="SendButton_Click" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}" >
<TextBlock TextAlignment="Center">Send</TextBlock>
</Button> </Button>
<TextBox HorizontalAlignment="Left" Name="DstIdText" Margin="108,43,0,0" TextWrapping="Wrap" Text="" MaxLength="12" VerticalAlignment="Top" Width="120"/>
<Label Content="Radio ID:" HorizontalAlignment="Left" Margin="45,39,0,0" VerticalAlignment="Top"/>
<ComboBox HorizontalAlignment="Left" Name="SystemCombo" Margin="108,16,0,0" VerticalAlignment="Top" Width="120"/>
<Label Content="System:" HorizontalAlignment="Left" Margin="53,14,0,0" VerticalAlignment="Top"/>
</Grid> </Grid>
</Window> </Window>

@ -52,7 +52,7 @@ namespace dvmconsole
/// </summary> /// </summary>
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void SendPageButton_Click(object sender, RoutedEventArgs e) private void SendButton_Click(object sender, RoutedEventArgs e)
{ {
RadioSystem = SystemCombo.SelectedItem as Codeplug.System; RadioSystem = SystemCombo.SelectedItem as Codeplug.System;
DstId = DstIdText.Text; DstId = DstIdText.Text;

@ -3,16 +3,18 @@
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"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
mc:Ignorable="d" Icon="/dvmconsole;component/Assets/key.png" mc:Ignorable="d" Icon="/dvmconsole;component/Assets/key.png"
Title="Key Status Window" Height="450" Width="800" WindowStartupLocation="CenterOwner"> Title="Key Status Window" Height="450" Width="800" WindowStartupLocation="CenterOwner">
<Grid> <Grid>
<ListView x:Name="KeyStatusListView" ItemsSource="{Binding KeyStatusItems}" Margin="10"> <ListView x:Name="KeyStatusListView" ItemsSource="{Binding KeyStatusItems}">
<ListView.View> <ListView.View>
<GridView> <GridView>
<GridViewColumn Header="Channel Name" DisplayMemberBinding="{Binding ChannelName}" Width="200"/> <GridViewColumn Header="Channel Name" DisplayMemberBinding="{Binding ChannelName}" Width="200" />
<GridViewColumn Header="Algorithm ID" DisplayMemberBinding="{Binding AlgId}" Width="100"/> <GridViewColumn Header="Algorithm ID" DisplayMemberBinding="{Binding AlgId}" Width="150" />
<GridViewColumn Header="Key ID" DisplayMemberBinding="{Binding KeyId}" Width="100"/> <GridViewColumn Header="Key ID" DisplayMemberBinding="{Binding KeyId}" Width="120" />
<GridViewColumn Header="Status" DisplayMemberBinding="{Binding KeyStatus}" Width="150"/> <GridViewColumn Header="Status" DisplayMemberBinding="{Binding KeyStatus}" Width="150" />
</GridView> </GridView>
</ListView.View> </ListView.View>
</ListView> </ListView>

@ -2,35 +2,29 @@
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:dvmconsole.Controls" xmlns:local="clr-namespace:dvmconsole.Controls"
Title="Digital Voice Modem - Desktop Dispatch Console" Height="600" Width="875" Background="#FFF2F2F2" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
Title="Digital Voice Modem - Desktop Dispatch Console" Height="600" Width="1024"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
Icon="/dvmconsole;component/Assets/AppIcon.ico"> Icon="/dvmconsole;component/Assets/AppIcon.ico">
<Grid Background="#FFF2F2F2"> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="497*"/> <ColumnDefinition Width="497*"/>
<ColumnDefinition Width="3*"/> <ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="24"/>
<RowDefinition Height="52" /> <RowDefinition Height="52" />
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border BorderBrush="#FFB7B7B7" BorderThickness="1" Grid.Row="1" Grid.ColumnSpan="2"> <Menu materialDesign:MenuAssist.TopLevelMenuItemHeight="24" Grid.ColumnSpan="2">
<Border.Background> <MenuItem Header="_File">
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White"/>
<GradientStop Color="#FFDFDFDF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<Menu VerticalAlignment="Center" Height="25" Background="White" Grid.ColumnSpan="2">
<MenuItem Header="File">
<MenuItem Header="_Open Codeplug..." Click="OpenCodeplug_Click" /> <MenuItem Header="_Open Codeplug..." Click="OpenCodeplug_Click" />
<Separator /> <Separator />
<MenuItem Header="_Exit" Click="Exit_Click" /> <MenuItem Header="_Exit" Click="Exit_Click" />
</MenuItem> </MenuItem>
<MenuItem Header="Commands"> <MenuItem Header="_Commands">
<MenuItem Header="_Page Subscriber" Click="PageRID_Click" x:Name="menuPageSubscriber" /> <MenuItem Header="_Page Subscriber" Click="PageRID_Click" x:Name="menuPageSubscriber" />
<MenuItem Header="Radio _Check Subscriber" Click="RadioCheckRID_Click" x:Name="menuRadioCheckSubscriber" /> <MenuItem Header="Radio _Check Subscriber" Click="RadioCheckRID_Click" x:Name="menuRadioCheckSubscriber" />
<Separator /> <Separator />
@ -39,7 +33,7 @@
<Separator /> <Separator />
<MenuItem Header="_QuickCall II" Click="ManualPage_Click" x:Name="menuQuickCall2" /> <MenuItem Header="_QuickCall II" Click="ManualPage_Click" x:Name="menuQuickCall2" />
</MenuItem> </MenuItem>
<MenuItem Header="Settings"> <MenuItem Header="_Settings">
<MenuItem Header="_Toggle Push To Talk Mode" IsCheckable="True" Checked="TogglePTTMode_Click" Unchecked="TogglePTTMode_Click" x:Name="menuTogglePTTMode" /> <MenuItem Header="_Toggle Push To Talk Mode" IsCheckable="True" Checked="TogglePTTMode_Click" Unchecked="TogglePTTMode_Click" x:Name="menuTogglePTTMode" />
<Separator /> <Separator />
<MenuItem Header="_Audio Settings" Click="AudioSettings_Click" /> <MenuItem Header="_Audio Settings" Click="AudioSettings_Click" />
@ -51,7 +45,7 @@
<MenuItem Header="Add Alert Tone" Click="AddAlertTone_Click" /> <MenuItem Header="Add Alert Tone" Click="AddAlertTone_Click" />
</MenuItem> </MenuItem>
</MenuItem> </MenuItem>
<MenuItem Header="View"> <MenuItem Header="_View">
<MenuItem Header="Select _User Background..." Click="OpenUserBackground_Click" x:Name="menuUserBackground" /> <MenuItem Header="Select _User Background..." Click="OpenUserBackground_Click" x:Name="menuUserBackground" />
<Separator /> <Separator />
<MenuItem Header="_Dark Mode" IsCheckable="True" Checked="ToggleDarkMode_Click" Unchecked="ToggleDarkMode_Click" x:Name="menuDarkMode" /> <MenuItem Header="_Dark Mode" IsCheckable="True" Checked="ToggleDarkMode_Click" Unchecked="ToggleDarkMode_Click" x:Name="menuDarkMode" />
@ -62,434 +56,117 @@
</MenuItem> </MenuItem>
</Menu> </Menu>
<!-- Channel Widget Canvas --> <ToolBarTray Grid.Row="1">
<ScrollViewer x:Name="canvasScrollViewer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Grid.Row="2" Grid.ColumnSpan="2"> <ToolBar ClipToBounds="False" Style="{StaticResource MaterialDesignToolBar}">
<Canvas x:Name="channelsCanvas" VerticalAlignment="Top"> <!-- Application Banner -->
<Canvas.Background> <Image Width="224" Height="50" VerticalAlignment="Center" HorizontalAlignment="Left" Source="/dvmconsole;component/Assets/logo.png" Stretch="UniformToFill">
<ImageBrush x:Name="channelsCanvasBg" ImageSource="/dvmconsole;component/Assets/bg_main_hd_light.png" Stretch="UniformToFill" /> <Image.RenderTransform>
</Canvas.Background> <TransformGroup>
</Canvas> <ScaleTransform/>
</ScrollViewer> <SkewTransform AngleY="-0.164"/>
<RotateTransform/>
<TranslateTransform Y="-0.247"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<!-- Application Banner --> <Separator />
<Image Height="50" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Source="/dvmconsole;component/Assets/logo.png" Stretch="UniformToFill" Margin="5,0,0,0" RenderTransformOrigin="0.5,0.5" Width="224">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform AngleY="-0.164"/>
<RotateTransform/>
<TranslateTransform Y="-0.247"/>
</TransformGroup>
</Image.RenderTransform>
</Image>
<!-- Open Codeplug --> <!-- Open Codeplug -->
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="238,0,0,0" VerticalAlignment="Center" Height="46" Width="45" Click="OpenCodeplug_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial" <Button Height="42" Width="42" Click="OpenCodeplug_Click" ToolTip="Open Codeplug" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
ToolTip="Open Codeplug"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Style> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/config.png" IsHitTestVisible="False" />
<Style TargetType="Button"> </Button>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="41" Source="/dvmconsole;component/Assets/config.png" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.598" Height="46"/>
</Button>
<!-- Global PTT --> <Separator />
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" x:Name="btnGlobalPtt" VerticalAlignment="Center" Height="46" Width="82" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial" Margin="285,0,0,0"
ToolTip="Global PTT">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Center" Width="62" Source="/dvmconsole;component/Assets/instantptt.png" IsHitTestVisible="False" Height="45" >
<Image.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Image.OpacityMask>
</Image>
</Button>
<!-- Alert Tone 1, 2 and 3 --> <!-- Global PTT -->
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="369,0,0,0" VerticalAlignment="Center" Height="46" Width="45" x:Name="btnAlert1" Click="btnAlert1_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial" <Button x:Name="btnGlobalPtt" Height="42" Width="110" ToolTip="Global PTT" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
ToolTip="Alert Tone 1"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Style> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Width="64" Height="48" Source="/dvmconsole;component/Assets/instantptt.png" IsHitTestVisible="False">
<Style TargetType="Button"> <Image.OpacityMask>
<Setter Property="Template"> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<Setter.Value> <GradientStop Color="Black"/>
<ControlTemplate TargetType="Button"> <GradientStop Color="White" Offset="1"/>
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" </LinearGradientBrush>
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> </Image.OpacityMask>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Image>
</Border> </Button>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<StackPanel>
<Image HorizontalAlignment="Center" Width="37" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" Height="32"/>
<TextBlock TextAlignment="Center">1</TextBlock>
</StackPanel>
</Button>
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="416,0,0,0" VerticalAlignment="Center" Height="46" Width="45" x:Name="btnAlert2" Click="btnAlert2_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial"
ToolTip="Alert Tone 2">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<StackPanel>
<Image HorizontalAlignment="Center" Width="37" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" Height="32"/>
<TextBlock TextAlignment="Center">2</TextBlock>
</StackPanel>
</Button>
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="463,0,0,0" VerticalAlignment="Center" x:Name="btnAlert3" Height="46" Width="45" Click="btnAlert3_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial"
ToolTip="Alert Tone 3">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<StackPanel>
<Image HorizontalAlignment="Center" Width="37" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" Height="32"/>
<TextBlock TextAlignment="Center">3</TextBlock>
</StackPanel>
</Button>
<!-- Page Subscriber --> <Separator />
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="510,0,0,0" VerticalAlignment="Center" Height="46" Width="44" x:Name="btnPageSub" Click="PageRID_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial"
ToolTip="Page Subscriber">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="38" Source="/dvmconsole;component/Assets/page.png" IsHitTestVisible="False" Height="46"/>
</Button>
<!-- Clear Emergency (disabled) --> <!-- Alert Tone 1, 2 and 3 -->
<Button VerticalContentAlignment="Bottom" HorizontalAlignment="Left" Margin="559,0,0,0" VerticalAlignment="Center" Height="46" Width="45" x:Name="btnClearEmergency" Click="ClearEmergency_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial" <Button x:Name="btnAlert1" Height="42" Width="42" Click="btnAlert1_Click" FontSize="10" FontFamily="Arial" ToolTip="Alert Tone 1" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
ToolTip="Clear Emergency" Visibility="Hidden"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Style> <StackPanel Width="42">
<Style TargetType="Button"> <Image HorizontalAlignment="Center" Width="32" Height="30" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" />
<Setter Property="Template"> <TextBlock TextAlignment="Center">1</TextBlock>
<Setter.Value> </StackPanel>
<ControlTemplate TargetType="Button"> </Button>
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" <Button x:Name="btnAlert2" Height="42" Width="42" Click="btnAlert2_Click" FontSize="10" FontFamily="Arial" ToolTip="Alert Tone 2" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> <StackPanel Width="42">
</Border> <Image HorizontalAlignment="Center" Width="32" Height="30" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" />
<ControlTemplate.Triggers> <TextBlock TextAlignment="Center">2</TextBlock>
<Trigger Property="IsMouseOver" Value="True"> </StackPanel>
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/> </Button>
</Trigger> <Button x:Name="btnAlert3" Height="42" Width="42" Click="btnAlert3_Click" FontSize="10" FontFamily="Arial" ToolTip="Alert Tone 3" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
</ControlTemplate.Triggers> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
</ControlTemplate> <StackPanel Width="42">
</Setter.Value> <Image HorizontalAlignment="Center" Width="32" Height="30" Source="/dvmconsole;component/Assets/alerttone.png" IsHitTestVisible="False" />
</Setter> <TextBlock TextAlignment="Center">3</TextBlock>
</Style> </StackPanel>
</Button.Style> </Button>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background> <Separator />
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="37" Source="/dvmconsole;component/Assets/clearemerg.png" IsHitTestVisible="False" Height="46"/>
</Button>
<!-- Select/Unselect All --> <!-- Page Subscriber -->
<Button VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="609,0,0,0" VerticalAlignment="Center" Height="46" x:Name="btnSelectAll" Click="SelectAll_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" FontSize="10" FontFamily="Arial" Grid.Row="1" <Button x:Name="btnPageSub" Height="42" Width="42" Click="PageRID_Click" ToolTip="Page Subscriber" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
ToolTip="Select All/Unselect All"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Style> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/page.png" IsHitTestVisible="False" />
<Style TargetType="Button"> </Button>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="41" Source="/dvmconsole;component/Assets/select.png" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.598" Height="46"/>
</Button>
<!-- Encryption Key Information --> <Separator />
<Button VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="656,0,0,0" VerticalAlignment="Center" Height="46" Width="44" x:Name="btnKeyStatus" Click="KeyStatus_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" FontSize="10" FontFamily="Arial" Grid.Row="1"
ToolTip="Encryption Key Information"> <!-- Select/Unselect All -->
<Button.Style> <Button x:Name="btnSelectAll" Height="42" Width="42" Click="SelectAll_Click" ToolTip="Select All/Unselect All" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
<Style TargetType="Button"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Setter Property="Template"> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/select.png" IsHitTestVisible="False" />
<Setter.Value> </Button>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="41" Source="/dvmconsole;component/Assets/key.png" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.598" Height="46"/>
</Button>
<!-- Call History --> <Separator />
<Button VerticalContentAlignment="Center" HorizontalAlignment="Left" Margin="703,0,0,0" VerticalAlignment="Center" Height="46" Width="44" x:Name="btnCallHistory" Click="CallHist_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" FontSize="10" FontFamily="Arial" Grid.Row="1"
ToolTip="Call History">
<Button.Style>
<Style TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/>
</Style>
</Button.Resources>
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFF0F0F0" Offset="0.485"/>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/>
</LinearGradientBrush>
</Button.Background>
<Image HorizontalAlignment="Left" Width="41" Source="/dvmconsole;component/Assets/history.png" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.598" Height="46"/>
</Button>
<!-- Audio Settings --> <!-- Encryption Key Information -->
<Button VerticalContentAlignment="Bottom" VerticalAlignment="Center" Height="46" x:Name="btnAudioSettings" Click="AudioSettings_Click" BorderBrush="#FFC1C1C1" BorderThickness="1,1,1,1" Grid.Row="1" FontSize="10" FontFamily="Arial" <Button x:Name="btnKeyStatus" Height="42" Width="42" Click="KeyStatus_Click" ToolTip="Encryption Key Information" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
ToolTip="Audio Settings" HorizontalAlignment="Left" Width="54" Margin="800,0,0,0"> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button.Style> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/key.png" IsHitTestVisible="False" />
<Style TargetType="Button"> </Button>
<Setter Property="Template">
<Setter.Value> <Separator />
<ControlTemplate TargetType="Button">
<Border x:Name="OpenCodeplugBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" <!-- Call History -->
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"> <Button x:Name="btnCallHistory" Height="42" Width="42" Click="CallHist_Click" ToolTip="Call History" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
</Border> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/history.png" IsHitTestVisible="False" />
<ControlTemplate.Triggers> </Button>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OpenCodeplugBorder" Property="BorderBrush" Value="#FF0AC6FB"/> <Separator />
</Trigger>
</ControlTemplate.Triggers> <!-- Audio Settings -->
</ControlTemplate> <Button x:Name="btnAudioSettings" Height="42" Width="42" Click="AudioSettings_Click" ToolTip="Audio Settings" materialDesign:ButtonAssist.CornerRadius="5" Padding="0"
</Setter.Value> IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}">
</Setter> <Image HorizontalAlignment="Left" VerticalAlignment="Center" Width="32" Height="32" Source="/dvmconsole;component/Assets/audio.png" IsHitTestVisible="False" />
</Style> </Button>
</Button.Style> </ToolBar>
<Button.Resources> </ToolBarTray>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="2"/> <!-- Channel Widget Canvas -->
</Style> <ScrollViewer x:Name="canvasScrollViewer" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Grid.Row="3" Grid.ColumnSpan="2">
</Button.Resources> <Canvas x:Name="channelsCanvas" VerticalAlignment="Top">
<Button.Background> <Canvas.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <ImageBrush x:Name="channelsCanvasBg" ImageSource="/dvmconsole;component/Assets/bg_main_hd_light.png" Stretch="UniformToFill" />
<GradientStop Color="#FFF0F0F0" Offset="0.485"/> </Canvas.Background>
<GradientStop Color="#FFDBDBDB" Offset="0.517"/> </Canvas>
</LinearGradientBrush> </ScrollViewer>
</Button.Background>
<Image HorizontalAlignment="Left" Width="42" Source="/dvmconsole;component/Assets/audio.png" IsHitTestVisible="False" Height="46"/>
</Button>
</Grid> </Grid>
</Window> </Window>

@ -19,6 +19,7 @@ using System.Timers;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using Microsoft.Win32; using Microsoft.Win32;
@ -26,6 +27,8 @@ using Microsoft.Win32;
using NAudio.Wave; using NAudio.Wave;
using NWaves.Signals; using NWaves.Signals;
using MaterialDesignThemes.Wpf;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NamingConventions;
@ -101,6 +104,8 @@ namespace dvmconsole
private FlashingBackgroundManager flashingManager; private FlashingBackgroundManager flashingManager;
private WaveFilePlaybackManager emergencyAlertPlayback; private WaveFilePlaybackManager emergencyAlertPlayback;
private Brush btnGlobalPttDefaultBg;
private ChannelBox playbackChannelBox; private ChannelBox playbackChannelBox;
CallHistoryWindow callHistoryWindow = new CallHistoryWindow(); CallHistoryWindow callHistoryWindow = new CallHistoryWindow();
@ -856,6 +861,17 @@ namespace dvmconsole
/// </summary> /// </summary>
private void UpdateBackground() private void UpdateBackground()
{ {
// set the UI theme
PaletteHelper paletteHelper = new PaletteHelper();
Theme theme = paletteHelper.GetTheme();
if (settingsManager.DarkMode)
theme.SetBaseTheme(BaseTheme.Dark);
else
theme.SetBaseTheme(BaseTheme.Light);
paletteHelper.SetTheme(theme);
BitmapImage bg = new BitmapImage(); BitmapImage bg = new BitmapImage();
// do we have a user defined background? // do we have a user defined background?
@ -1111,6 +1127,8 @@ namespace dvmconsole
menuDarkMode.IsChecked = settingsManager.DarkMode; menuDarkMode.IsChecked = settingsManager.DarkMode;
UpdateBackground(); UpdateBackground();
btnGlobalPttDefaultBg = btnGlobalPtt.Background;
// set window configuration // set window configuration
if (settingsManager.Maximized) if (settingsManager.Maximized)
{ {
@ -1184,7 +1202,14 @@ namespace dvmconsole
if (pageWindow.ShowDialog() == true) if (pageWindow.ShowDialog() == true)
{ {
PeerSystem handler = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name); // throw an error if the user does the dumb...
if (pageWindow.DstId == string.Empty)
{
MessageBox.Show($"Must supply a destination ID.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
PeerSystem fne = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name);
IOSP_CALL_ALRT callAlert = new IOSP_CALL_ALRT(uint.Parse(pageWindow.DstId), uint.Parse(pageWindow.RadioSystem.Rid)); IOSP_CALL_ALRT callAlert = new IOSP_CALL_ALRT(uint.Parse(pageWindow.DstId), uint.Parse(pageWindow.RadioSystem.Rid));
RemoteCallData callData = new RemoteCallData RemoteCallData callData = new RemoteCallData
@ -1198,7 +1223,7 @@ namespace dvmconsole
callAlert.Encode(ref tsbk); callAlert.Encode(ref tsbk);
handler.SendP25TSBK(callData, tsbk); fne.SendP25TSBK(callData, tsbk);
} }
} }
@ -1215,7 +1240,14 @@ namespace dvmconsole
if (pageWindow.ShowDialog() == true) if (pageWindow.ShowDialog() == true)
{ {
PeerSystem handler = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name); // throw an error if the user does the dumb...
if (pageWindow.DstId == string.Empty)
{
MessageBox.Show($"Must supply a destination ID.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
PeerSystem fne = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name);
IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.CHECK, uint.Parse(pageWindow.RadioSystem.Rid), uint.Parse(pageWindow.DstId)); IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.CHECK, uint.Parse(pageWindow.RadioSystem.Rid), uint.Parse(pageWindow.DstId));
RemoteCallData callData = new RemoteCallData RemoteCallData callData = new RemoteCallData
@ -1229,7 +1261,7 @@ namespace dvmconsole
extFunc.Encode(ref tsbk); extFunc.Encode(ref tsbk);
handler.SendP25TSBK(callData, tsbk); fne.SendP25TSBK(callData, tsbk);
} }
} }
@ -1246,7 +1278,14 @@ namespace dvmconsole
if (pageWindow.ShowDialog() == true) if (pageWindow.ShowDialog() == true)
{ {
PeerSystem handler = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name); // throw an error if the user does the dumb...
if (pageWindow.DstId == string.Empty)
{
MessageBox.Show($"Must supply a destination ID.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
PeerSystem fne = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name);
IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.INHIBIT, P25Defines.WUID_FNE, uint.Parse(pageWindow.DstId)); IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.INHIBIT, P25Defines.WUID_FNE, uint.Parse(pageWindow.DstId));
RemoteCallData callData = new RemoteCallData RemoteCallData callData = new RemoteCallData
@ -1260,7 +1299,7 @@ namespace dvmconsole
extFunc.Encode(ref tsbk); extFunc.Encode(ref tsbk);
handler.SendP25TSBK(callData, tsbk); fne.SendP25TSBK(callData, tsbk);
} }
} }
@ -1277,7 +1316,14 @@ namespace dvmconsole
if (pageWindow.ShowDialog() == true) if (pageWindow.ShowDialog() == true)
{ {
PeerSystem handler = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name); // throw an error if the user does the dumb...
if (pageWindow.DstId == string.Empty)
{
MessageBox.Show($"Must supply a destination ID.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
return;
}
PeerSystem fne = fneSystemManager.GetFneSystem(pageWindow.RadioSystem.Name);
IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.UNINHIBIT, P25Defines.WUID_FNE, uint.Parse(pageWindow.DstId)); IOSP_EXT_FNCT extFunc = new IOSP_EXT_FNCT((ushort)ExtendedFunction.UNINHIBIT, P25Defines.WUID_FNE, uint.Parse(pageWindow.DstId));
RemoteCallData callData = new RemoteCallData RemoteCallData callData = new RemoteCallData
@ -1291,7 +1337,7 @@ namespace dvmconsole
extFunc.Encode(ref tsbk); extFunc.Encode(ref tsbk);
handler.SendP25TSBK(callData, tsbk); fne.SendP25TSBK(callData, tsbk);
} }
} }
@ -2015,7 +2061,7 @@ namespace dvmconsole
if (globalPttState) if (globalPttState)
btnGlobalPtt.Background = ChannelBox.RED_GRADIENT; btnGlobalPtt.Background = ChannelBox.RED_GRADIENT;
else else
btnGlobalPtt.Background = ChannelBox.GRAY_GRADIENT; btnGlobalPtt.Background = btnGlobalPttDefaultBg;
}); });
primaryChannel.PttButton_Click(sender, e); primaryChannel.PttButton_Click(sender, e);
@ -2069,7 +2115,7 @@ namespace dvmconsole
{ {
Dispatcher.Invoke(() => Dispatcher.Invoke(() =>
{ {
btnGlobalPtt.Background = ChannelBox.GRAY_GRADIENT; btnGlobalPtt.Background = btnGlobalPttDefaultBg;
channel.PttState = false; channel.PttState = false;
}); });

@ -74,6 +74,8 @@ namespace dvmconsole
string software = $"CONSOLE_R{_SEM_VERSION.Major.ToString("D2")}A{_SEM_VERSION.Minor.ToString("D2")}"; string software = $"CONSOLE_R{_SEM_VERSION.Major.ToString("D2")}A{_SEM_VERSION.Minor.ToString("D2")}";
if (system.Identity == null)
system.Identity = system.PeerId.ToString();
if (system.Identity.Length == 0) if (system.Identity.Length == 0)
system.Identity = system.PeerId.ToString(); system.Identity = system.PeerId.ToString();

@ -4,16 +4,31 @@
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:dvmconsole" xmlns:local="clr-namespace:dvmconsole"
TextElement.Foreground="{DynamicResource MaterialDesignBody}" TextElement.FontWeight="Regular" TextElement.FontSize="13"
Style="{StaticResource MaterialDesignWindow}" Background="{DynamicResource MaterialDesignPaper}" FontFamily="{DynamicResource MaterialDesignFont}"
mc:Ignorable="d" Icon="/dvmconsole;component/Assets/page.png" mc:Ignorable="d" Icon="/dvmconsole;component/Assets/page.png"
Title="QuickCall II Page" Height="146" Width="330" WindowStartupLocation="CenterOwner"> Title="QuickCall II Page" Height="166" Width="340" WindowStartupLocation="CenterOwner">
<Grid> <Grid>
<Button HorizontalAlignment="Left" Margin="111,66,0,0" Name="SendButton" VerticalAlignment="Top" Click="SendButton_Click" Width="120" Height="24"> <Grid.ColumnDefinitions>
<TextBlock TextAlignment="Center" Margin="0,-21,0,0">Send</TextBlock> <ColumnDefinition Width="100"/>
</Button> <ColumnDefinition Width="200"/>
<TextBox HorizontalAlignment="Left" Margin="111,17,0,0" TextWrapping="Wrap" Text="" Name="ToneAText" VerticalAlignment="Top" Width="120"/> </Grid.ColumnDefinitions>
<TextBox HorizontalAlignment="Left" Margin="111,43,0,0" TextWrapping="Wrap" Text="" Name="ToneBText" VerticalAlignment="Top" Width="120"/>
<Label Content="A Tone:" HorizontalAlignment="Left" Margin="57,13,0,0" VerticalAlignment="Top"/> <Grid.RowDefinitions>
<Label Content="B Tone:" HorizontalAlignment="Left" Margin="58,39,0,0" VerticalAlignment="Top"/> <RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Content="A Tone:" HorizontalAlignment="Left" Margin="45,16,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
<TextBox HorizontalAlignment="Left" Margin="10,16,0,0" TextWrapping="Wrap" Text="" Name="ToneAText" VerticalAlignment="Top" Width="120" Grid.Row="0" Grid.Column="1" />
<Label Content="B Tone:" HorizontalAlignment="Left" Margin="45,46,0,0" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
<TextBox HorizontalAlignment="Left" Margin="10,46,0,0" TextWrapping="Wrap" Text="" Name="ToneBText" VerticalAlignment="Top" Width="120" Grid.Row="0" Grid.Column="1" />
<Button x:Name="SendButton" Width="150" Height="24" HorizontalAlignment="Left" Margin="108,20,0,0" VerticalAlignment="Top" Click="SendButton_Click" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" Style="{StaticResource MaterialDesignPaperDarkButton}" >
<TextBlock TextAlignment="Center">Send</TextBlock>
</Button>
</Grid> </Grid>
</Window> </Window>

Loading…
Cancel
Save

Powered by TurnKey Linux.