Issue #5
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,9 @@ using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Server_Dashboard_Socket {
|
||||
/// <summary>
|
||||
/// Basic echo server to test the socket connection
|
||||
/// </summary>
|
||||
public class EchoServer {
|
||||
public void Start(int port = 9565) {
|
||||
IPEndPoint endPoint = new IPEndPoint(IPAddress.Loopback, port);
|
||||
|
||||
@@ -356,6 +356,5 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
@@ -4,6 +4,11 @@ using System.Text;
|
||||
using System.Windows;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Attached property base class
|
||||
/// </summary>
|
||||
/// <typeparam name="Parent"></typeparam>
|
||||
/// <typeparam name="Property"></typeparam>
|
||||
public abstract class BaseAttachedProperty<Parent, Property>
|
||||
where Parent : BaseAttachedProperty<Parent, Property>, new() {
|
||||
public event Action<DependencyObject, DependencyPropertyChangedEventArgs> ValueChanged = (sender, e) => { };
|
||||
|
||||
@@ -5,8 +5,7 @@ using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Documents;
|
||||
|
||||
namespace Server_Dashboard
|
||||
{
|
||||
namespace Server_Dashboard {
|
||||
public static class HyperlinkExtensions {
|
||||
public static bool GetIsExternal(DependencyObject obj) {
|
||||
return (bool)obj.GetValue(IsExternalProperty);
|
||||
|
||||
@@ -6,19 +6,12 @@
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Views.DashboardPages.ModuleCRUD"
|
||||
xmlns:root="clr-namespace:Server_Dashboard" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}"
|
||||
mc:Ignorable="d"
|
||||
ResizeMode="NoResize"
|
||||
Height="700"
|
||||
Width="500"
|
||||
d:WindowStyle="None"
|
||||
>
|
||||
mc:Ignorable="d" ResizeMode="NoResize" Height="700" Width="500" d:WindowStyle="None">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Border
|
||||
Width="500"
|
||||
Height="700"
|
||||
>
|
||||
<!--Create new Server Form-->
|
||||
<Border Width="500" Height="700">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="#2D2D2D" Opacity="1"/>
|
||||
</Border.Background>
|
||||
@@ -27,10 +20,8 @@
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid
|
||||
Background="{StaticResource BackgroundSurface_04dp}"
|
||||
Grid.Row="0"
|
||||
>
|
||||
<!--Title Bar-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
@@ -40,19 +31,8 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="Create a new Server"
|
||||
Margin="5 0 0 0"
|
||||
Foreground="{StaticResource DeepPurple_A100}"
|
||||
VerticalAlignment="Center"
|
||||
/>
|
||||
<Button
|
||||
Style="{StaticResource CloseButton}"
|
||||
Grid.Column="2"
|
||||
Content="✕"
|
||||
Cursor="Hand"
|
||||
>
|
||||
<TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center"/>
|
||||
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
@@ -60,11 +40,7 @@
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid
|
||||
Background="{StaticResource BackgroundSurface_04dp}"
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
>
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
@@ -76,192 +52,98 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Server Name-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Server Name"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Server Name" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="20"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding ServerName}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="ServerName"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="My Awesome Server"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding ServerName}" Grid.Column="1" Height="40" FontSize="20" x:Name="ServerName"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="My Awesome Server" FontSize="20" Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Password-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="1" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Password"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Password" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="20"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<PasswordBox
|
||||
Width="420"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
root:MonitorPasswordProperty.Value="True"
|
||||
Grid.Column="1"
|
||||
FontSize="20"
|
||||
x:Name="Password"
|
||||
Height="40"
|
||||
>
|
||||
<PasswordBox Width="420" VerticalAlignment="Center" HorizontalAlignment="Left" root:MonitorPasswordProperty.Value="True" Grid.Column="1" FontSize="20" x:Name="Password" Height="40">
|
||||
</PasswordBox>
|
||||
<TextBlock
|
||||
Visibility="{Binding ElementName=Password, Path=(root:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint"
|
||||
Text="********"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="5 0 0 0"
|
||||
FontSize="20"
|
||||
>
|
||||
<TextBlock Visibility="{Binding ElementName=Password, Path=(root:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint" Text="********" Grid.Column="1" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5 0 0 0" FontSize="20">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Username-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="2" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Username"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Username" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="16"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding Username}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="UserName"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="Name"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding Username}" Grid.Column="1" Height="40" FontSize="20" x:Name="UserName"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Name" FontSize="20" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--IP Adress-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="3" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="IP Adress"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="IP Adress" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="16"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding IPAdress}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="IPAdress"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="sample.ssh.com"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding IPAdress}" Grid.Column="1" Height="40" FontSize="20" x:Name="IPAdress"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="sample.ssh.com" FontSize="20" Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Port-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="4" Margin="20 0 20 0">
|
||||
<TextBlock
|
||||
Text="Port"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Port" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
@@ -270,38 +152,16 @@
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding Port}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="Port"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="22"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding Port}" Grid.Column="1" Height="40" FontSize="20" x:Name="Port"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="22" FontSize="20" Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<Button
|
||||
Height="60"
|
||||
Width="350"
|
||||
Command="{Binding CreateModuleCommand}"
|
||||
CommandParameter="{Binding ElementName=CREATE_MODULE}"
|
||||
Grid.Row="5"
|
||||
Content="CREATE MODULE"
|
||||
Grid.ColumnSpan="2"
|
||||
/>
|
||||
<!--Create Module button-->
|
||||
<Button Height="60" Width="350" Command="{Binding CreateModuleCommand}" CommandParameter="{Binding ElementName=CREATE_MODULE}" Grid.Row="5" Content="CREATE MODULE" Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -12,83 +12,13 @@
|
||||
<UserControl.Resources>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle"/>
|
||||
</UserControl.Resources>
|
||||
<!--Circular Prograss bar-->
|
||||
<Grid>
|
||||
<Ellipse
|
||||
x:Name="Background"
|
||||
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=BackgroundBrush
|
||||
}"
|
||||
Margin="0"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=BackgroundBrush
|
||||
}"
|
||||
/>
|
||||
<ed:Arc
|
||||
ArcThickness="8"
|
||||
ArcThicknessUnit="Pixel"
|
||||
EndAngle="{Binding
|
||||
Converter={StaticResource valueToAngle},
|
||||
ElementName=_this,
|
||||
Path=ValueRead
|
||||
}"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=ReadIndicatorBrush
|
||||
}"
|
||||
Stretch="None"
|
||||
StartAngle="0"
|
||||
/>
|
||||
<Ellipse
|
||||
x:Name="Seperator"
|
||||
Fill="Transparent"
|
||||
Margin="7"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
Panel.ZIndex="1"
|
||||
/>
|
||||
<Ellipse
|
||||
x:Name="Seperator2"
|
||||
Fill="Transparent"
|
||||
Margin="8"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
Panel.ZIndex="1"
|
||||
/>
|
||||
<ed:Arc
|
||||
Margin="8"
|
||||
ArcThickness="8"
|
||||
ArcThicknessUnit="Pixel"
|
||||
EndAngle="{Binding
|
||||
Converter={StaticResource valueToAngle},
|
||||
ElementName=_this,
|
||||
Path=ValueWrite
|
||||
}"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=WriteIndicatorBrush
|
||||
}"
|
||||
Stretch="None"
|
||||
StartAngle="0"
|
||||
/>
|
||||
<Ellipse
|
||||
x:Name="Border"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
Margin="16"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
|
||||
/>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/>
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueRead}" Fill="{Binding ElementName=_this, Path=ReadIndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Seperator" Fill="Transparent" Margin="7" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1"/>
|
||||
<Ellipse x:Name="Seperator2" Fill="Transparent" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1"/>
|
||||
<ed:Arc Margin="8" ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueWrite}" Fill="{Binding ElementName=_this, Path=WriteIndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="16" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -13,37 +13,47 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
/// <summary>
|
||||
/// DependencyProperties
|
||||
/// </summary>
|
||||
public partial class DoubleRoundProgressBar : UserControl {
|
||||
|
||||
//Property for the ReadIndicatorBrush
|
||||
public static DependencyProperty ReadIndicatorBrushProperty = DependencyProperty.Register("ReadIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
public Brush ReadIndicatorBrush {
|
||||
get { return (Brush)GetValue(ReadIndicatorBrushProperty); }
|
||||
set { SetValue(ReadIndicatorBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Property for the WriteIndicatorBrush
|
||||
public static DependencyProperty WriteIndicatorBrushProperty = DependencyProperty.Register("WriteIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
public Brush WriteIndicatorBrush {
|
||||
get { return (Brush)GetValue(WriteIndicatorBrushProperty); }
|
||||
set { SetValue(WriteIndicatorBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Property for the BackgroundBrush
|
||||
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
public Brush BackgroundBrush {
|
||||
get { return (Brush)GetValue(BackgroundBrushProperty); }
|
||||
set { SetValue(BackgroundBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Property for the ProgressBorderBrush
|
||||
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
public Brush ProgressBorderBrush {
|
||||
get { return (Brush)GetValue(ProgressBorderBrushProperty); }
|
||||
set { SetValue(ProgressBorderBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Property for the Value Write
|
||||
public static DependencyProperty ValueWriteProperty = DependencyProperty.Register("ValueWrite", typeof(int), typeof(DoubleRoundProgressBar));
|
||||
public int ValueWrite {
|
||||
get { return (int)GetValue(ValueWriteProperty); }
|
||||
set { SetValue(ValueWriteProperty, value); }
|
||||
}
|
||||
|
||||
//Property for the Value Read
|
||||
public static DependencyProperty ValueReadProperty = DependencyProperty.Register("ValueRead", typeof(int), typeof(DoubleRoundProgressBar));
|
||||
public int ValueRead {
|
||||
get { return (int)GetValue(ValueReadProperty); }
|
||||
|
||||
@@ -6,52 +6,14 @@
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
|
||||
xmlns:root="clr-namespace:Server_Dashboard"
|
||||
mc:Ignorable="d"
|
||||
x:Name="_this"
|
||||
d:DesignHeight="50" d:DesignWidth="50">
|
||||
mc:Ignorable="d" x:Name="_this" d:DesignHeight="50" d:DesignWidth="50">
|
||||
<UserControl.Resources>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle"/>
|
||||
</UserControl.Resources>
|
||||
<!--Progress bar but just half round-->
|
||||
<Grid>
|
||||
<Ellipse
|
||||
x:Name="Background"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=BackgroundBrush
|
||||
}"
|
||||
Margin="0"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=BackgroundBrush
|
||||
}"
|
||||
/>
|
||||
<ed:Arc
|
||||
ArcThickness="8"
|
||||
ArcThicknessUnit="Pixel"
|
||||
EndAngle="{Binding
|
||||
Converter={StaticResource valueToAngle},
|
||||
ElementName=_this,
|
||||
Path=Value
|
||||
}"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=IndicatorBrush
|
||||
}"
|
||||
Stretch="None"
|
||||
StartAngle="0"
|
||||
/>
|
||||
<Ellipse
|
||||
x:Name="Border"
|
||||
Fill="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
Margin="8"
|
||||
Stroke="{Binding
|
||||
ElementName=_this,
|
||||
Path=ProgressBorderBrush
|
||||
}"
|
||||
|
||||
/>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/>
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=Value}" Fill="{Binding ElementName=_this, Path=IndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -13,26 +13,33 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
/// <summary>
|
||||
/// Dependency Properties
|
||||
/// </summary>
|
||||
public partial class HalfRoundProgressBar : UserControl {
|
||||
|
||||
//Indicator Brush Property
|
||||
public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
public Brush IndicatorBrush {
|
||||
get { return (Brush)GetValue(IndicatorBrushProperty); }
|
||||
set { SetValue(IndicatorBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Background Brush Property
|
||||
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
public Brush BackgroundBrush {
|
||||
get { return (Brush)GetValue(BackgroundBrushProperty); }
|
||||
set { SetValue(BackgroundBrushProperty, value); }
|
||||
}
|
||||
|
||||
//ProgressBorder Property
|
||||
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
public Brush ProgressBorderBrush {
|
||||
get { return (Brush)GetValue(ProgressBorderBrushProperty); }
|
||||
set { SetValue(ProgressBorderBrushProperty, value); }
|
||||
}
|
||||
|
||||
//Value
|
||||
public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(HalfRoundProgressBar));
|
||||
public int Value {
|
||||
get { return (int)GetValue(ValueProperty); }
|
||||
|
||||
@@ -5,50 +5,27 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls"
|
||||
mc:Ignorable="d"
|
||||
>
|
||||
mc:Ignorable="d">
|
||||
<!--The Loading indicator circle-->
|
||||
<Grid DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
<Path
|
||||
Stroke="Transparent"
|
||||
StrokeThickness=".5"
|
||||
RenderTransformOrigin=".5,.5"
|
||||
Width="60"
|
||||
Height="60"
|
||||
>
|
||||
<Path Stroke="Transparent" StrokeThickness=".5" RenderTransformOrigin=".5,.5" Width="60" Height="60">
|
||||
<Path.Effect>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Opacity="1" Color="#B388FF"/>
|
||||
</Path.Effect>
|
||||
<Path.Data>
|
||||
<CombinedGeometry
|
||||
GeometryCombineMode="Xor"
|
||||
>
|
||||
<CombinedGeometry GeometryCombineMode="Xor">
|
||||
<CombinedGeometry.Geometry1>
|
||||
<EllipseGeometry
|
||||
RadiusX="30"
|
||||
RadiusY="30"
|
||||
Center="30,30"
|
||||
/>
|
||||
<EllipseGeometry RadiusX="30" RadiusY="30" Center="30,30"/>
|
||||
</CombinedGeometry.Geometry1>
|
||||
<CombinedGeometry.Geometry2>
|
||||
<EllipseGeometry
|
||||
RadiusX="24"
|
||||
RadiusY="24"
|
||||
Center="30,30"
|
||||
/>
|
||||
<EllipseGeometry RadiusX="24" RadiusY="24" Center="30,30"/>
|
||||
</CombinedGeometry.Geometry2>
|
||||
</CombinedGeometry>
|
||||
</Path.Data>
|
||||
<Path.Fill>
|
||||
<LinearGradientBrush
|
||||
StartPoint="0,0"
|
||||
EndPoint="1,1"
|
||||
>
|
||||
<GradientStop
|
||||
Color="#B388FF" Offset="0"
|
||||
/>
|
||||
<GradientStop
|
||||
Color="#A7FFEB" Offset="1"
|
||||
/>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
||||
<GradientStop Color="#B388FF" Offset="0"/>
|
||||
<GradientStop Color="#A7FFEB" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Path.Fill>
|
||||
<Path.RenderTransform>
|
||||
@@ -56,17 +33,10 @@
|
||||
<!--This is necessary for the animation not to stop-->
|
||||
</Path.RenderTransform>
|
||||
<Path.Triggers>
|
||||
<EventTrigger
|
||||
RoutedEvent="Loaded"
|
||||
>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)"
|
||||
To="360"
|
||||
Duration="0:0:.8"
|
||||
RepeatBehavior="Forever"
|
||||
/>
|
||||
<DoubleAnimation Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)" To="360" Duration="0:0:.8" RepeatBehavior="Forever"/>
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.ServerModules"
|
||||
xmlns:halfroundprogressbar="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:doubleroundprogressbar="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar"
|
||||
mc:Ignorable="d">
|
||||
xmlns:doubleroundprogressbar="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar" mc:Ignorable="d">
|
||||
<!--Module-->
|
||||
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10" CornerRadius="5">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0"/>
|
||||
@@ -16,11 +16,8 @@
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
CornerRadius="5 5 0 0"
|
||||
Grid.Row="0"
|
||||
Background="{StaticResource BackgroundSurface_08dp}"
|
||||
>
|
||||
<!--Top Bar-->
|
||||
<Border CornerRadius="5 5 0 0" Grid.Row="0" Background="{StaticResource BackgroundSurface_08dp}" >
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -48,11 +45,13 @@
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--Main Content-->
|
||||
<Grid Grid.Row="2" Margin="20" Width="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--Information pannel, left-->
|
||||
<Grid Grid.Row="1" Margin="0 0 25 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -133,6 +132,7 @@
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<!--Graphical Indicators Right-->
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
@@ -143,117 +143,25 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<halfroundprogressbar:HalfRoundProgressBar
|
||||
Margin="5"
|
||||
Grid.Row="0"
|
||||
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
Value="{Binding ServerInfo.CpuUsage}"
|
||||
IndicatorBrush="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
Foreground="{StaticResource Teal_A100}"
|
||||
Grid.Row="0"
|
||||
Text="CPU"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
/>
|
||||
<halfroundprogressbar:HalfRoundProgressBar
|
||||
Margin="5"
|
||||
Grid.Row="1"
|
||||
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
Value="{Binding ServerInfo.GpuUsage}"
|
||||
IndicatorBrush="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
Foreground="{StaticResource Teal_A100}"
|
||||
Grid.Row="1"
|
||||
Text="GPU"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
/>
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.CpuUsage}" IndicatorBrush="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="0" Text="CPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"/>
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.GpuUsage}" IndicatorBrush="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="1" Text="GPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"/>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar
|
||||
ValueRead="70"
|
||||
ValueWrite="60"
|
||||
ReadIndicatorBrush="{StaticResource DeepPurple_A100}"
|
||||
WriteIndicatorBrush="{StaticResource Teal_A100}"
|
||||
Margin="5"
|
||||
Grid.Row="0"
|
||||
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
/>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
TextAlignment="Center"
|
||||
Text="Read"
|
||||
Foreground="{StaticResource DeepPurple_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
TextAlignment="Center"
|
||||
Text="Write"
|
||||
Foreground="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100"/>
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Read" Foreground="{StaticResource DeepPurple_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Write" Foreground="{StaticResource Teal_A100}"/>
|
||||
</StackPanel>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar
|
||||
ValueRead="70"
|
||||
ValueWrite="60"
|
||||
ReadIndicatorBrush="{StaticResource DeepPurple_A100}"
|
||||
WriteIndicatorBrush="{StaticResource Teal_A100}"
|
||||
Margin="5"
|
||||
Grid.Row="1"
|
||||
ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}"
|
||||
BackgroundBrush="{StaticResource BackgroundSurface_08dp}"
|
||||
Height="100"
|
||||
Width="100"
|
||||
/>
|
||||
<StackPanel
|
||||
Grid.Row="1"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
TextAlignment="Center"
|
||||
Text="UP"
|
||||
Foreground="{StaticResource DeepPurple_A100}"
|
||||
/>
|
||||
<TextBlock
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
FontSize="18"
|
||||
TextAlignment="Center"
|
||||
Text="DOWN"
|
||||
Foreground="{StaticResource Teal_A100}"
|
||||
/>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100"/>
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="UP" Foreground="{StaticResource DeepPurple_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="DOWN" Foreground="{StaticResource Teal_A100}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -3,16 +3,31 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Dashboard Module class that holds all the information that gets displayed
|
||||
/// </summary>
|
||||
class DashboardModule {
|
||||
//The name the user gives the module
|
||||
public string ModuleName { get; set; }
|
||||
//The user who created it
|
||||
public string Creator { get; set; }
|
||||
//All the information that the server had
|
||||
public ServerInformation ServerInfo { get; set; }
|
||||
//The status indicator
|
||||
public string StatusIndicator { get; set; }
|
||||
//The background color of the status indicator
|
||||
public string StatusIndicatorBG { get; set; }
|
||||
//If the server is avaibale or not
|
||||
public bool ServerAvailable { get; set; }
|
||||
//The Module icon the user give the server, defaults to a generic server symbol
|
||||
public string ModuleIcon { get; set; }
|
||||
//Creation date with System.DateTime.Now
|
||||
public string CreationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This will set the Module status indicator red or green if the server is available or not
|
||||
/// </summary>
|
||||
/// <param name="serverAvailable"></param>
|
||||
public DashboardModule(bool serverAvailable) {
|
||||
ServerAvailable = serverAvailable;
|
||||
StatusIndicator = ServerAvailable ? "#20c657" : "#e53935";
|
||||
|
||||
@@ -3,10 +3,19 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard.DashboardModules {
|
||||
/// <summary>
|
||||
/// The Information the user puts into the CreateNewModule form
|
||||
/// </summary>
|
||||
class NewModuleInformation {
|
||||
//The Name of the Module
|
||||
public string ModuleName { get; set; }
|
||||
//The Name of the Server
|
||||
public string ServerName { get; set; }
|
||||
//The Username
|
||||
public string Username { get; set; }
|
||||
//IPv4 Adress
|
||||
public string IPAdress { get; set; }
|
||||
//Port, defaults to 22
|
||||
public int Port { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,16 +4,30 @@ using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Server information class, this will probably scale pretty big later on
|
||||
/// This will hold all the information the socket will gather
|
||||
/// </summary>
|
||||
class ServerInformation {
|
||||
//The ServerName
|
||||
public string ServerName { get; set; }
|
||||
//The unix or windows username
|
||||
public string OSUserName { get; set; }
|
||||
//Cpu Temp in C
|
||||
public string CpuTemp { get; set; }
|
||||
//Gpu Temp in C
|
||||
public string GpuTemp { get; set; }
|
||||
//Server uptime
|
||||
public string Uptime { get; set; }
|
||||
//When the server was first deployed
|
||||
public string DeployDate { get; set; }
|
||||
//Public IPv4 Adress
|
||||
public string PublicIpAdress { get; set; }
|
||||
//Private IP adress from the servers network
|
||||
public string PrivateIpAdress { get; set; }
|
||||
//GPU usage in %
|
||||
public string GpuUsage { get; set; }
|
||||
//CPU usage in %
|
||||
public string CpuUsage { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,92 +7,149 @@ using System.Data.SqlClient;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Database class to access the database
|
||||
/// </summary>
|
||||
public static class DatabaseHandler {
|
||||
|
||||
public static DataTable GetServerInformation() {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
#region Public Methods
|
||||
/// <summary>
|
||||
/// Checks the user credentials
|
||||
/// </summary>
|
||||
/// <param name="uname">The username</param>
|
||||
/// <param name="passwd">The plain text password</param>
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int CheckLogin(string uname, string passwd) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@uname", uname);
|
||||
com.Parameters.AddWithValue("@passwd", passwd);
|
||||
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@Valid"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Currently obscolete, would check the Username and Cookie
|
||||
/// </summary>
|
||||
/// <param name="cookie">Locally stored user cookie</param>
|
||||
/// <param name="username">Locally stored username</param>
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int CheckCookie(string cookie, string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@valid", SqlDbType.Bit);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@Valid"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a the cookie from the given user
|
||||
/// </summary>
|
||||
/// <param name="username">User who doesnt deserve any delicious cookies :3</param>
|
||||
public static void DeleteCookie(string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC DeleteUserCookie @Username = @username, @ResponseMessage = @response OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
}
|
||||
} catch (SqlException ex) {
|
||||
//Catch any error, dont return them, why would you?
|
||||
} catch {
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new Cookie to a user
|
||||
/// </summary>
|
||||
/// <param name="cookie">The delicious locally stored cookie</param>
|
||||
/// <param name="username">The User who deserves a cookie :3</param>
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int AddCookie(string cookie, string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username, @ResponseMessage = @response OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@ResponseMessage"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close connection
|
||||
con.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ using System.Security;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Interface that makes a SecurePassword go one way
|
||||
/// </summary>
|
||||
public interface IHavePassword {
|
||||
SecureString SecurePassword { get; }
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Interface to help close a window with a button
|
||||
/// </summary>
|
||||
interface IWindowHelper {
|
||||
Action Close { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
xmlns:loading="clr-namespace:Server_Dashboard.Controls"
|
||||
x:Name="Login"
|
||||
mc:Ignorable="d"
|
||||
Title="Server Dashboard" Height="700" Width="500" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" local:CloseProperty.Value="True">
|
||||
Title="Server Dashboard"
|
||||
Height="700" Width="500" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" local:CloseProperty.Value="True">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<local:LoginViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
<!--#region Login forms main container-->
|
||||
<Border Background="{StaticResource BackgroundSurface_00dp}">
|
||||
<Grid Grid.Row="0">
|
||||
@@ -36,7 +36,6 @@
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<!--#region Custom title bar-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.Effect>
|
||||
@@ -56,37 +55,15 @@
|
||||
</Button>
|
||||
</Grid>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Greeting text-->
|
||||
<Border
|
||||
Height="100"
|
||||
BorderBrush="{StaticResource DeepPurple_400}"
|
||||
BorderThickness="0 2 0 2"
|
||||
Background="{StaticResource BackgroundSurface_00dp}"
|
||||
Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="0 0 0 10"
|
||||
>
|
||||
<StackPanel
|
||||
VerticalAlignment="Center"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock
|
||||
Text="Server Dashboard"
|
||||
FontSize="30"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<Border Height="100" BorderBrush="{StaticResource DeepPurple_400}" BorderThickness="0 2 0 2" Background="{StaticResource BackgroundSurface_00dp}" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="0 0 0 10">
|
||||
<StackPanel VerticalAlignment="Center" Margin="0 0 0 5" >
|
||||
<TextBlock Text="Server Dashboard" FontSize="30" HorizontalAlignment="Center">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="Login"
|
||||
FontSize="30"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<TextBlock Text="Login" FontSize="30" HorizontalAlignment="Center">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
@@ -97,48 +74,19 @@
|
||||
<loading:LoadingIndicator/>
|
||||
</UserControl>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Username form-->
|
||||
<Border
|
||||
CornerRadius="4"
|
||||
Margin="0 10 0 10"
|
||||
Width="350"
|
||||
Height="60"
|
||||
Background="{StaticResource BackgroundSurface_01dp}"
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
>
|
||||
<Border CornerRadius="4" Margin="0 10 0 10" Width="350" Height="60" Background="{StaticResource BackgroundSurface_01dp}" Grid.Row="3" Grid.ColumnSpan="2">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect
|
||||
Direction="0"
|
||||
ShadowDepth="0"
|
||||
BlurRadius="5"
|
||||
/>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
</Border.Effect>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Height="30"
|
||||
Source="Assets/Images/userlogin.png"
|
||||
/>
|
||||
<TextBox
|
||||
Text="{Binding Username}"
|
||||
x:Name="UserName"
|
||||
Grid.Column="1"
|
||||
Margin="0 0 5 0"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="Username"
|
||||
Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
>
|
||||
<Image Grid.Column="0" Height="30" Source="Assets/Images/userlogin.png"/>
|
||||
<TextBox Text="{Binding Username}" x:Name="UserName" Grid.Column="1" Margin="0 0 5 0"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Username" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
@@ -146,17 +94,8 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Password form-->
|
||||
<Border
|
||||
Margin="0 10 0 10"
|
||||
Background="{StaticResource BackgroundSurface_01dp}"
|
||||
Grid.Row="4"
|
||||
Grid.ColumnSpan="2"
|
||||
Width="350"
|
||||
CornerRadius="4"
|
||||
Padding="0 0 5 0"
|
||||
>
|
||||
<Border Margin="0 10 0 10" Background="{StaticResource BackgroundSurface_01dp}" Grid.Row="4" Grid.ColumnSpan="2" Width="350" CornerRadius="4" Padding="0 0 5 0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
</Border.Effect>
|
||||
@@ -166,35 +105,14 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.Column="0" Height="30" Source="Assets/Images/userpasswd.png"/>
|
||||
<PasswordBox
|
||||
Width="290"
|
||||
Height="60"
|
||||
local:MonitorPasswordProperty.Value="True"
|
||||
Grid.Column="1"
|
||||
x:Name="Password"
|
||||
>
|
||||
<PasswordBox Width="290" Height="60" local:MonitorPasswordProperty.Value="True" Grid.Column="1" x:Name="Password">
|
||||
<PasswordBox.InputBindings>
|
||||
<KeyBinding
|
||||
Key="Return"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
/>
|
||||
<KeyBinding Key="Return" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Login}"/>
|
||||
</PasswordBox.InputBindings>
|
||||
</PasswordBox>
|
||||
<TextBlock
|
||||
Visibility="{Binding ElementName=Password, Path=(local:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint"
|
||||
Text="Password"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
>
|
||||
<TextBlock Visibility="{Binding ElementName=Password, Path=(local:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint" Text="Password" Grid.Column="1" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||
<TextBlock.InputBindings>
|
||||
<KeyBinding
|
||||
Key="Return"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
/>
|
||||
<KeyBinding Key="Return" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Login}"/>
|
||||
</TextBlock.InputBindings>
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
@@ -203,29 +121,11 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Login button-->
|
||||
<Button
|
||||
Height="60"
|
||||
Width="350"
|
||||
Command="{Binding LoginCommand}"
|
||||
CommandParameter="{Binding ElementName=Login}"
|
||||
Grid.Row="5"
|
||||
Content="LOGIN"
|
||||
Grid.ColumnSpan="2"
|
||||
/>
|
||||
<Button Height="60" Width="350" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Login}" Grid.Row="5" Content="LOGIN" Grid.ColumnSpan="2"/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Error text-->
|
||||
<TextBlock
|
||||
Text="{Binding ErrorText}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="14"
|
||||
/>
|
||||
<TextBlock Text="{Binding ErrorText}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="6" Grid.Column="1" Foreground="{StaticResource ErrorRed}" FontSize="14"/>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Remember me and Password forgotten link-->
|
||||
@@ -236,37 +136,15 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox
|
||||
IsChecked="{Binding RememberUser}"
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="75 0 0 0"
|
||||
/>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Text="Remember me?"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="10 0 0 0"
|
||||
>
|
||||
<CheckBox IsChecked="{Binding RememberUser}" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="75 0 0 0"/>
|
||||
<TextBlock Grid.Column="1" Text="Remember me?" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Grid.Column="3"
|
||||
FontSize="14"
|
||||
Margin="0 0 75 0"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
>
|
||||
<TextBlock Grid.Column="3" FontSize="14" Margin="0 0 75 0" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<!--Send recovery Email to user, probably replace with a button-->
|
||||
<Hyperlink
|
||||
NavigateUri="https://example.com"
|
||||
local:HyperlinkExtensions.IsExternal="True"
|
||||
>
|
||||
<Hyperlink NavigateUri="https://example.com" local:HyperlinkExtensions.IsExternal="True">
|
||||
Forgot password
|
||||
</Hyperlink>
|
||||
<TextBlock.Foreground>
|
||||
@@ -275,39 +153,19 @@
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Link to register form-->
|
||||
<Grid Grid.Row="8">
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"
|
||||
>
|
||||
<TextBlock
|
||||
Text="Don't have an account?"
|
||||
FontSize="16"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<TextBlock Text="Don't have an account?" FontSize="16" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.64"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<Button
|
||||
Command="{Binding RegisterCommand}"
|
||||
Content="REGISTER"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
FontSize="12"
|
||||
Height="30"
|
||||
Width="80"
|
||||
Margin="10 0 0 0"
|
||||
/>
|
||||
<Button Command="{Binding RegisterCommand}" Content="REGISTER" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="12" Height="30" Width="80" Margin="10 0 0 0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<!--#endregion-->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--#endregion-->
|
||||
|
||||
</Window>
|
||||
@@ -5,12 +5,19 @@ using System.Security;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Secure string helper class to unsecure the Password b4 it goes to the database
|
||||
/// </summary>
|
||||
public static class SecureStringHelpers {
|
||||
//Unsecures a given password
|
||||
public static string Unsecure(this SecureString secureString) {
|
||||
//If empty return nothing
|
||||
if (secureString == null)
|
||||
return string.Empty;
|
||||
//New zero pointer
|
||||
var unmanagedString = IntPtr.Zero;
|
||||
|
||||
//Try to unsecure the string
|
||||
try {
|
||||
unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(secureString);
|
||||
return Marshal.PtrToStringUni(unmanagedString);
|
||||
|
||||
@@ -5,6 +5,9 @@ using System.Text;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Value to angle converter
|
||||
/// </summary>
|
||||
[ValueConversion(typeof(int), typeof(double))]
|
||||
public class ValueToAngleConverter : IValueConverter {
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) => (int)value * 0.01 * 360;
|
||||
|
||||
@@ -4,6 +4,10 @@ using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// Base View Model all the other view models inherit from
|
||||
/// Makes me write the INotifyPropertyChanged only once
|
||||
/// </summary>
|
||||
class BaseViewModel : INotifyPropertyChanged {
|
||||
public event PropertyChangedEventHandler PropertyChanged = (sender, e) => { };
|
||||
|
||||
|
||||
@@ -4,19 +4,14 @@ using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// View Model for the modules
|
||||
/// </summary>
|
||||
class DashboardModuleViewModel : BaseViewModel {
|
||||
//List with all Modules inside
|
||||
public ObservableCollection<DashboardModule> Modules { get; set; }
|
||||
private int gpuUsage;
|
||||
|
||||
public int GPUUsage {
|
||||
get { return gpuUsage; }
|
||||
set {
|
||||
if(value != gpuUsage)
|
||||
gpuUsage = value;
|
||||
OnPropertyChanged(nameof(gpuUsage));
|
||||
}
|
||||
}
|
||||
|
||||
//Creates Default Modules, remove before release and when implementing the actual data comming from the socket
|
||||
public DashboardModuleViewModel() {
|
||||
Modules = new ObservableCollection<DashboardModule>();
|
||||
for (int i = 0; i < 10; i++) {
|
||||
|
||||
@@ -6,10 +6,17 @@ using System.Windows.Input;
|
||||
using Server_Dashboard_Socket;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// View Model for the Dashboard
|
||||
/// </summary>
|
||||
class DashboardViewModel : BaseViewModel {
|
||||
private string userName = "Username";
|
||||
private DashboardModuleViewModel dmvm = new DashboardModuleViewModel();
|
||||
#region Private Values
|
||||
private readonly DashboardModuleViewModel dmvm = new DashboardModuleViewModel();
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
//The Username displayed defaults to Username
|
||||
private string userName = "Username";
|
||||
public string UserName {
|
||||
get { return userName; }
|
||||
set {
|
||||
@@ -19,8 +26,8 @@ namespace Server_Dashboard {
|
||||
}
|
||||
}
|
||||
|
||||
//List that contains every Module
|
||||
private ObservableCollection<DashboardModule> modules;
|
||||
|
||||
public ObservableCollection<DashboardModule> Modules {
|
||||
get { return modules; }
|
||||
set {
|
||||
@@ -29,32 +36,59 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(modules));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public DashboardViewModel() {
|
||||
//Creates a new echo server, remove b4 release
|
||||
EchoServer echoServer = new EchoServer();
|
||||
echoServer.Start();
|
||||
//Command inits
|
||||
OpenLinkCommand = new RelayCommand(OpenLink);
|
||||
OpenNewModuleWindowCommand = new RelayCommand(OpenNewModuleWindow);
|
||||
CreateModuleCommand = new RelayCommand(CreateModule);
|
||||
//Sets the local module to the dashboardviewmodule modules
|
||||
Modules = dmvm.Modules;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ICommands
|
||||
public ICommand OpenLinkCommand { get; set; }
|
||||
public ICommand OpenNewModuleWindowCommand { get; set; }
|
||||
public ICommand CreateModuleCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
/// <summary>
|
||||
/// Opens a given link in the default browser
|
||||
/// </summary>
|
||||
/// <param name="param">The Link to be opened e.g. https://github.com/Crylia/Server-Dashboard </param>
|
||||
private void OpenLink(object param) {
|
||||
Process.Start(new ProcessStartInfo((string)param) { UseShellExecute = true });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new window to create a new Module
|
||||
/// </summary>
|
||||
/// <param name="param">Nothing</param>
|
||||
private void OpenNewModuleWindow(object param) {
|
||||
//Creates a new CreateModulePopup and sets this view model as datacontext
|
||||
CreateModulePopup cmp = new CreateModulePopup {
|
||||
DataContext = this
|
||||
};
|
||||
//Opens it in the middle of the screen, setting the parent window as owner causes the
|
||||
//application to crash when NOT in debug mode(???)
|
||||
cmp.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
cmp.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No function yes
|
||||
/// </summary>
|
||||
/// <param name="param">Nothing</param>
|
||||
private void CreateModule(object param) {
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,13 @@ using System.Windows.Input;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
/// <summary>
|
||||
/// View Model for the Login Window
|
||||
/// </summary>
|
||||
class LoginViewModel : BaseViewModel, IWindowHelper {
|
||||
|
||||
#region Properties
|
||||
//Username Property
|
||||
private string username;
|
||||
|
||||
public string Username {
|
||||
get { return username; }
|
||||
set {
|
||||
@@ -17,9 +20,8 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(username));
|
||||
}
|
||||
}
|
||||
|
||||
//Error Text displays an error to help the user to fill the form
|
||||
private string errorText;
|
||||
|
||||
public string ErrorText {
|
||||
get { return errorText; }
|
||||
set {
|
||||
@@ -28,9 +30,8 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(errorText));
|
||||
}
|
||||
}
|
||||
|
||||
//Remember me button
|
||||
private bool rememberUser;
|
||||
|
||||
public bool RememberUser {
|
||||
get { return rememberUser; }
|
||||
set {
|
||||
@@ -39,9 +40,8 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(rememberUser));
|
||||
}
|
||||
}
|
||||
|
||||
//Loading circle, gets hidden and shown when logging in
|
||||
private string loading;
|
||||
|
||||
public string Loading {
|
||||
get { return loading; }
|
||||
set {
|
||||
@@ -50,76 +50,126 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(loading));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Values
|
||||
//Close action for the Window to close properly
|
||||
public Action Close { get ; set; }
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public LoginViewModel() {
|
||||
//Loading circle is hidden on startup
|
||||
Loading = "Hidden";
|
||||
//Command inits
|
||||
LoginCommand = new RelayCommand(LoginAsync);
|
||||
if (!String.IsNullOrEmpty(Settings.Default.Username)) {
|
||||
//Checks if the Username and Cookie is saved in the Settings.settings
|
||||
if (!String.IsNullOrEmpty(Settings.Default.Username) && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
//Takes the saved Username and Remember me button status and prefills the username and checks the Remember me button
|
||||
Username = Settings.Default.Username;
|
||||
RememberUser = Settings.Default.RememberMe;
|
||||
}
|
||||
AutoLoginAsync();
|
||||
//TODO: Autologin
|
||||
//AutoLoginAsync();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ICommands
|
||||
public ICommand LoginCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Commands
|
||||
/// <summary>
|
||||
/// Async login
|
||||
/// </summary>
|
||||
/// <param name="parameter">Secure password string</param>
|
||||
private async void LoginAsync(object parameter) {
|
||||
//Checks if the Username and Password field has content
|
||||
if (!String.IsNullOrWhiteSpace(Username) && !String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
//Sets loading to true to show the loading icon
|
||||
Loading = "Visible";
|
||||
//Sends the Username and Password to the database and saved the result, 1 successfull, 0 wrong username or password
|
||||
int result = await Task.Run(() => DatabaseHandler.CheckLogin(Username, (parameter as IHavePassword).SecurePassword.Unsecure()));
|
||||
//hides the loading again
|
||||
Loading = "Hidden";
|
||||
/*result can be:
|
||||
0 for Wrong username or password
|
||||
1 for true username or password
|
||||
2 for network or database unreachable
|
||||
default error for everything else
|
||||
*/
|
||||
switch (result) {
|
||||
case 0:
|
||||
//Sets the error text and exits function
|
||||
ErrorText = "Username or password is wrong.";
|
||||
return;
|
||||
case 1:
|
||||
/*No idea why this is here, gonna let it be till the remember me and autologin is 100% done
|
||||
if (RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
DatabaseHandler.CheckCookie(Settings.Default.Cookies, Username);
|
||||
}
|
||||
}*/
|
||||
//If the remember me is not checked and a cookie exists the local storage gets cleared
|
||||
if (!RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
Settings.Default.Cookies = null;
|
||||
Settings.Default.Username = "";
|
||||
Settings.Default.RememberMe = false;
|
||||
Settings.Default.Password = "";
|
||||
Settings.Default.Save();
|
||||
//Also deletes the cookie from the database
|
||||
DatabaseHandler.DeleteCookie(Username);
|
||||
}
|
||||
//If the remember user option is checked and the cookie is not set save everything locally
|
||||
if (RememberUser && String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
var guid = new Guid().ToString() + Username;
|
||||
Settings.Default.Cookies = guid;
|
||||
//Creates a new GUID with the username at the end, this is the cookie
|
||||
var cookie = new Guid().ToString() + Username;
|
||||
//Saves cookie, Username Remember me option to the local storage (Settings.settings)
|
||||
Settings.Default.Cookies = cookie;
|
||||
Settings.Default.Username = Username;
|
||||
Settings.Default.RememberMe = true;
|
||||
Settings.Default.Password = "*****";
|
||||
Settings.Default.Save();
|
||||
DatabaseHandler.AddCookie(Username, guid);
|
||||
//Saves the cookie in the database
|
||||
DatabaseHandler.AddCookie(Username, cookie);
|
||||
}
|
||||
//Creates a new Dashboard window and shows it
|
||||
DashboardWindow window = new DashboardWindow();
|
||||
window.Show();
|
||||
//When closed, close it correctly
|
||||
Close?.Invoke();
|
||||
return;
|
||||
case 2:
|
||||
//Sets the error text
|
||||
ErrorText = "Server unreachable, connection timeout.";
|
||||
return;
|
||||
default:
|
||||
//Sets the error text
|
||||
ErrorText = "An unknown error has occured";
|
||||
return;
|
||||
}
|
||||
//If the Username and password is blank
|
||||
//All these IF's could be one but i made multiple for the different errors so the user knows whats wrong
|
||||
} else if (String.IsNullOrWhiteSpace(Username) && String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
//Sets the error text
|
||||
ErrorText = "Please provide a username and password";
|
||||
return;
|
||||
}
|
||||
//Only if the Username is empty
|
||||
if (String.IsNullOrWhiteSpace(Username)) {
|
||||
//Sets the error text
|
||||
ErrorText = "Username cannot be empty.";
|
||||
return;
|
||||
}
|
||||
//Only if the password is empty
|
||||
if (String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
//Sets the error text
|
||||
ErrorText = "Password cannot be empty.";
|
||||
return;
|
||||
}
|
||||
//If there is no error, clear the error text
|
||||
ErrorText = "";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region private functions
|
||||
//TODO: Add autologin function that locks the UI untill the user hits the abort button or the login completes
|
||||
/*private async void AutoLoginAsync() {
|
||||
if (Settings.Default.RememberMe && !String.IsNullOrEmpty(Settings.Default.Username) && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
@@ -134,5 +184,6 @@ namespace Server_Dashboard {
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Server_Dashboard {
|
||||
class RelayCommand : ICommand {
|
||||
|
||||
//New Action
|
||||
private Action<object> execAction;
|
||||
private readonly Action<object> execAction;
|
||||
|
||||
//Never gets fires, but needs to be implemented
|
||||
public event EventHandler CanExecuteChanged = (sender, e) => { };
|
||||
|
||||
@@ -9,15 +9,11 @@
|
||||
xmlns:root="clr-namespace:Server_Dashboard"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:controls="clr-namespace:Server_Dashboard.Controls.ServerModules"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="920"
|
||||
d:DesignWidth="1600"
|
||||
>
|
||||
mc:Ignorable="d" d:DesignHeight="920" d:DesignWidth="1600">
|
||||
<Grid Background="{StaticResource BackgroundSurface_00dp}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Dashboard and Options-->
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -31,29 +27,11 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button
|
||||
Grid.Row="0"
|
||||
Command="{Binding OpenNewModuleWindowCommand}"
|
||||
Content="New Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0" Cursor="Hand"
|
||||
x:Name="CreateModule"
|
||||
/>
|
||||
<Button
|
||||
Grid.Row="1"
|
||||
Command="{Binding OpenDeleteModuleWindowCommand}"
|
||||
Content="Remove Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0"
|
||||
/>
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Command="{Binding OpenUpdateModuleWindowCommand}"
|
||||
Content="Change Module"
|
||||
Height="50"
|
||||
Margin="5 10 5 0" Cursor="Hand"
|
||||
/>
|
||||
<Button Grid.Row="0" Command="{Binding OpenNewModuleWindowCommand}" Content="New Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="CreateModule"/>
|
||||
<Button Grid.Row="1" Command="{Binding OpenDeleteModuleWindowCommand}" Content="Remove Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="RemoveModule"/>
|
||||
<Button Grid.Row="2" Command="{Binding OpenUpdateModuleWindowCommand}" Content="Change Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="ChangeModule"/>
|
||||
</Grid>
|
||||
<!--ItemsControl list for the Dashboardmodules-->
|
||||
<Grid Grid.Column="1">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding Modules}">
|
||||
|
||||
@@ -8,20 +8,14 @@
|
||||
xmlns:views="clr-namespace:Server_Dashboard.Views.DashboardPages"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
Height="1000"
|
||||
Width="Auto"
|
||||
WindowStyle="None"
|
||||
Background="Transparent"
|
||||
ResizeMode="CanResize"
|
||||
mc:Ignorable="d"
|
||||
d:Height="1000" d:Width="1900"
|
||||
>
|
||||
Height="1000" Width="Auto" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" mc:Ignorable="d" d:Height="1000" d:Width="1900">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<root:DashboardViewModel/>
|
||||
</Window.DataContext>
|
||||
<!--Dashboard Window and Container for the Dashboards-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_00dp}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
@@ -63,20 +57,8 @@
|
||||
<Button Grid.Column="0" >
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
CornerRadius="4"
|
||||
Padding="2"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
>
|
||||
<svgc:SvgViewbox
|
||||
Source="../Assets/Images/Settings.svg"
|
||||
Margin="5"
|
||||
IsHitTestVisible="False"
|
||||
Opacity="0.87"
|
||||
/>
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" >
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Settings.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
@@ -87,13 +69,7 @@
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button
|
||||
Grid.Column="4"
|
||||
Command="{Binding OpenLinkCommand}"
|
||||
Content="{Binding UserName}"
|
||||
Margin="10 0 10 0"
|
||||
Height="40" Cursor="Hand"
|
||||
>
|
||||
<Button Grid.Column="4" Command="{Binding OpenLinkCommand}" Content="{Binding UserName}" Margin="10 0 10 0" Height="40" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
@@ -105,23 +81,8 @@
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<svgc:SvgViewbox
|
||||
Source="../Assets/Images/User.svg"
|
||||
Margin="5"
|
||||
IsHitTestVisible="False"
|
||||
Opacity="0.87"
|
||||
/>
|
||||
<TextBlock
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextAlignment="Center"
|
||||
Padding="0"
|
||||
TextWrapping="Wrap"
|
||||
Text="{TemplateBinding Content}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5 0 10 0"
|
||||
/>
|
||||
<svgc:SvgViewbox Source="../Assets/Images/User.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -151,14 +112,7 @@
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button
|
||||
Grid.Column="3"
|
||||
Command="{Binding OpenLinkCommand}"
|
||||
CommandParameter="https://github.com/Crylia/Server-Dashboard/wiki"
|
||||
Content="Docs"
|
||||
Margin="10 0 10 0"
|
||||
Height="40"
|
||||
>
|
||||
<Button Grid.Column="3" Command="{Binding OpenLinkCommand}" CommandParameter="https://github.com/Crylia/Server-Dashboard/wiki" Content="Docs" Margin="10 0 10 0" Height="40">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
@@ -170,23 +124,8 @@
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<svgc:SvgViewbox
|
||||
Source="../Assets/Images/Docs.svg"
|
||||
Margin="5"
|
||||
IsHitTestVisible="False"
|
||||
Opacity="0.87"
|
||||
/>
|
||||
<TextBlock
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextAlignment="Center"
|
||||
Padding="0"
|
||||
TextWrapping="Wrap"
|
||||
Text="{TemplateBinding Content}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5 0 10 0"
|
||||
/>
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Docs.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -216,15 +155,7 @@
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button
|
||||
Grid.Column="2"
|
||||
Command="{Binding OpenLinkCommand}"
|
||||
CommandParameter="https://github.com/Crylia/Server-Dashboard"
|
||||
Content="GitHub"
|
||||
Margin="10 0 10 0"
|
||||
Height="40"
|
||||
Opacity="0.87" Cursor="Hand"
|
||||
>
|
||||
<Button Grid.Column="2" Command="{Binding OpenLinkCommand}" CommandParameter="https://github.com/Crylia/Server-Dashboard" Content="GitHub" Margin="10 0 10 0" Height="40" Opacity="0.87" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
@@ -236,21 +167,8 @@
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image
|
||||
Source="../Assets/Images/GitHubLight.png"
|
||||
Margin="5"
|
||||
/>
|
||||
<TextBlock
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
TextAlignment="Center"
|
||||
Padding="0"
|
||||
TextWrapping="Wrap"
|
||||
Text="{TemplateBinding Content}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5 0 10 0"
|
||||
/>
|
||||
<Image Source="../Assets/Images/GitHubLight.png" Margin="5"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -281,6 +199,7 @@
|
||||
</Button.Template>
|
||||
</Button>
|
||||
</Grid>
|
||||
<!--UserControl Container for the Dashboard pages-->
|
||||
<UserControl Grid.Row="3">
|
||||
<views:MainDashboardPage/>
|
||||
</UserControl>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8B13C63F73D8B03B1CC973E996B230B95776E3E8"
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "FA6871C28C6B96CD3932405F6C88CE357B9CAC41"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "8B13C63F73D8B03B1CC973E996B230B95776E3E8"
|
||||
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "FA6871C28C6B96CD3932405F6C88CE357B9CAC41"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0EFE1CD6D3BEC2F7CABDA72A79271A24F45A2CA8"
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F45F1E4243C66B9FD96C035A50A8EE4E1CBFCB34"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -48,7 +48,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 105 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 69 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 91 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 156 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 93 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 197 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 114 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 241 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 136 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 278 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 155 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0EFE1CD6D3BEC2F7CABDA72A79271A24F45A2CA8"
|
||||
#pragma checksum "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F45F1E4243C66B9FD96C035A50A8EE4E1CBFCB34"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -48,7 +48,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 105 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 69 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 151 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 91 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 156 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 93 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 197 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 114 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 241 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 136 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 278 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
#line 155 "..\..\..\..\..\..\Controls\Dashboard\CRUD Popup\CreateModulePopup.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E96EB8CBB00924E817B4F6983981D68244368A22"
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B46BE3BAB1BA752DF3E2239D67C2C6B44ED2A3"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 45 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 19 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 20 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator2;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 81 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 22 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E96EB8CBB00924E817B4F6983981D68244368A22"
|
||||
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B46BE3BAB1BA752DF3E2239D67C2C6B44ED2A3"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 45 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 19 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator;
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 55 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 20 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Seperator2;
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 81 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
#line 22 "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "088662625301BAB0ABA31EF9E2688BA689BC4C48"
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F8123F9E313CFC197FD21BBF3619385A6FC8FC20"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -46,7 +46,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
public partial class HalfRoundProgressBar : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 10 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 9 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal Server_Dashboard.Controls.HalfRoundProgressBar.HalfRoundProgressBar _this;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 17 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 15 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Background;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 44 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 17 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "088662625301BAB0ABA31EF9E2688BA689BC4C48"
|
||||
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F8123F9E313CFC197FD21BBF3619385A6FC8FC20"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -46,7 +46,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
public partial class HalfRoundProgressBar : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 10 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 9 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal Server_Dashboard.Controls.HalfRoundProgressBar.HalfRoundProgressBar _this;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 17 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 15 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Background;
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 44 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
#line 17 "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Shapes.Ellipse Border;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B712BFC0DDE46A0CEA17B00250D69DC46AB75992"
|
||||
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "77F7BA13CD156FFDEBCF337792520673841E87F9"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B712BFC0DDE46A0CEA17B00250D69DC46AB75992"
|
||||
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "77F7BA13CD156FFDEBCF337792520673841E87F9"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BC333A5F7B9E8D68E824FFFBFE4539E4AA85365F"
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "506FBD9D5FE875E406F1D55625DC6B00926FECF9"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 130 "..\..\..\LoginWindow.xaml"
|
||||
#line 88 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 174 "..\..\..\LoginWindow.xaml"
|
||||
#line 108 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 185 "..\..\..\LoginWindow.xaml"
|
||||
#line 113 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BC333A5F7B9E8D68E824FFFBFE4539E4AA85365F"
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "506FBD9D5FE875E406F1D55625DC6B00926FECF9"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 130 "..\..\..\LoginWindow.xaml"
|
||||
#line 88 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 174 "..\..\..\LoginWindow.xaml"
|
||||
#line 108 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 185 "..\..\..\LoginWindow.xaml"
|
||||
#line 113 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7F9B87538E0489397D1B928CEE51EE7AE4712B3B"
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "47F667437FD33C591010E2D8FB596082CE45DAC4"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,13 +50,29 @@ namespace Server_Dashboard.Views.DashboardPages {
|
||||
public partial class MainDashboardPage : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 40 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
#line 30 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button CreateModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 31 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button RemoveModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 32 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button ChangeModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -90,6 +106,12 @@ namespace Server_Dashboard.Views.DashboardPages {
|
||||
case 1:
|
||||
this.CreateModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.RemoveModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.ChangeModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7F9B87538E0489397D1B928CEE51EE7AE4712B3B"
|
||||
#pragma checksum "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "47F667437FD33C591010E2D8FB596082CE45DAC4"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,13 +50,29 @@ namespace Server_Dashboard.Views.DashboardPages {
|
||||
public partial class MainDashboardPage : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 40 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
#line 30 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button CreateModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 31 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button RemoveModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 32 "..\..\..\..\..\Views\DashboardPages\MainDashboardPage.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Button ChangeModule;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -90,6 +106,12 @@ namespace Server_Dashboard.Views.DashboardPages {
|
||||
case 1:
|
||||
this.CreateModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 2:
|
||||
this.RemoveModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
case 3:
|
||||
this.ChangeModule = ((System.Windows.Controls.Button)(target));
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2931D9FE448B25CA4843C7DB4CD838F94FDDCEB"
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34F9F280B2CC5ECBFCC6EA0C5845A4B16E3447E7"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,7 +50,7 @@ namespace Server_Dashboard.Views {
|
||||
public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 52 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
#line 46 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid TopBarGrid;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "E2931D9FE448B25CA4843C7DB4CD838F94FDDCEB"
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34F9F280B2CC5ECBFCC6EA0C5845A4B16E3447E7"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,7 +50,7 @@ namespace Server_Dashboard.Views {
|
||||
public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 52 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
#line 46 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid TopBarGrid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user