Merge pull request #18 from Crylia/feature/modules

finish create module form
This commit is contained in:
Kievits Rene
2021-08-09 00:31:08 +02:00
committed by GitHub
62 changed files with 864 additions and 412 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

View File

@@ -0,0 +1,14 @@
<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
<title/>
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<circle stroke-width="2px" stroke-linejoin="round" stroke="#ffffff" fill="none" id="svg_1" r="15" cy="16" cx="16" class="cls-1"/>
<line stroke-width="2px" stroke-linejoin="round" stroke="#ffffff" fill="none" id="svg_2" y2="24" y1="8" x2="16" x1="16" class="cls-1"/>
<line stroke-width="2px" stroke-linejoin="round" stroke="#ffffff" fill="none" id="svg_3" y2="16" y1="16" x2="8" x1="24" class="cls-1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

View File

@@ -10,15 +10,15 @@
x:Name="_this" x:Name="_this"
d:DesignHeight="50" d:DesignWidth="50"> d:DesignHeight="50" d:DesignWidth="50">
<UserControl.Resources> <UserControl.Resources>
<root:ValueToAngleConverter x:Key="valueToAngle"/> <root:ValueToAngleConverter x:Key="valueToAngle" />
</UserControl.Resources> </UserControl.Resources>
<!--Circular Prograss bar--> <!--Circular Prograss bar-->
<Grid> <Grid>
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/> <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"/> <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="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"/> <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"/> <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="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="16" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" />
</Grid> </Grid>
</UserControl> </UserControl>

View File

@@ -13,6 +13,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace Server_Dashboard.Controls.DoubleRoundProgressBar { namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
/// <summary> /// <summary>
/// DependencyProperties /// DependencyProperties
/// </summary> /// </summary>
@@ -20,6 +21,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the ReadIndicatorBrush //Property for the ReadIndicatorBrush
public static DependencyProperty ReadIndicatorBrushProperty = DependencyProperty.Register("ReadIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar)); public static DependencyProperty ReadIndicatorBrushProperty = DependencyProperty.Register("ReadIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
public Brush ReadIndicatorBrush { public Brush ReadIndicatorBrush {
get { return (Brush)GetValue(ReadIndicatorBrushProperty); } get { return (Brush)GetValue(ReadIndicatorBrushProperty); }
set { SetValue(ReadIndicatorBrushProperty, value); } set { SetValue(ReadIndicatorBrushProperty, value); }
@@ -27,6 +29,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the WriteIndicatorBrush //Property for the WriteIndicatorBrush
public static DependencyProperty WriteIndicatorBrushProperty = DependencyProperty.Register("WriteIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar)); public static DependencyProperty WriteIndicatorBrushProperty = DependencyProperty.Register("WriteIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
public Brush WriteIndicatorBrush { public Brush WriteIndicatorBrush {
get { return (Brush)GetValue(WriteIndicatorBrushProperty); } get { return (Brush)GetValue(WriteIndicatorBrushProperty); }
set { SetValue(WriteIndicatorBrushProperty, value); } set { SetValue(WriteIndicatorBrushProperty, value); }
@@ -34,6 +37,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the BackgroundBrush //Property for the BackgroundBrush
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(DoubleRoundProgressBar)); public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
public Brush BackgroundBrush { public Brush BackgroundBrush {
get { return (Brush)GetValue(BackgroundBrushProperty); } get { return (Brush)GetValue(BackgroundBrushProperty); }
set { SetValue(BackgroundBrushProperty, value); } set { SetValue(BackgroundBrushProperty, value); }
@@ -41,6 +45,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the ProgressBorderBrush //Property for the ProgressBorderBrush
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(DoubleRoundProgressBar)); public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
public Brush ProgressBorderBrush { public Brush ProgressBorderBrush {
get { return (Brush)GetValue(ProgressBorderBrushProperty); } get { return (Brush)GetValue(ProgressBorderBrushProperty); }
set { SetValue(ProgressBorderBrushProperty, value); } set { SetValue(ProgressBorderBrushProperty, value); }
@@ -48,6 +53,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the Value Write //Property for the Value Write
public static DependencyProperty ValueWriteProperty = DependencyProperty.Register("ValueWrite", typeof(int), typeof(DoubleRoundProgressBar)); public static DependencyProperty ValueWriteProperty = DependencyProperty.Register("ValueWrite", typeof(int), typeof(DoubleRoundProgressBar));
public int ValueWrite { public int ValueWrite {
get { return (int)GetValue(ValueWriteProperty); } get { return (int)GetValue(ValueWriteProperty); }
set { SetValue(ValueWriteProperty, value); } set { SetValue(ValueWriteProperty, value); }
@@ -55,6 +61,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
//Property for the Value Read //Property for the Value Read
public static DependencyProperty ValueReadProperty = DependencyProperty.Register("ValueRead", typeof(int), typeof(DoubleRoundProgressBar)); public static DependencyProperty ValueReadProperty = DependencyProperty.Register("ValueRead", typeof(int), typeof(DoubleRoundProgressBar));
public int ValueRead { public int ValueRead {
get { return (int)GetValue(ValueReadProperty); } get { return (int)GetValue(ValueReadProperty); }
set { SetValue(ValueReadProperty, value); } set { SetValue(ValueReadProperty, value); }

View File

@@ -8,12 +8,12 @@
xmlns:root="clr-namespace:Server_Dashboard" 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> <UserControl.Resources>
<root:ValueToAngleConverter x:Key="valueToAngle"/> <root:ValueToAngleConverter x:Key="valueToAngle" />
</UserControl.Resources> </UserControl.Resources>
<!--Progress bar but just half round--> <!--Progress bar but just half round-->
<Grid> <Grid>
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/> <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"/> <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="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" />
</Grid> </Grid>
</UserControl> </UserControl>

View File

@@ -13,6 +13,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace Server_Dashboard.Controls.HalfRoundProgressBar { namespace Server_Dashboard.Controls.HalfRoundProgressBar {
/// <summary> /// <summary>
/// Dependency Properties /// Dependency Properties
/// </summary> /// </summary>
@@ -20,6 +21,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
//Indicator Brush Property //Indicator Brush Property
public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar)); public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar));
public Brush IndicatorBrush { public Brush IndicatorBrush {
get { return (Brush)GetValue(IndicatorBrushProperty); } get { return (Brush)GetValue(IndicatorBrushProperty); }
set { SetValue(IndicatorBrushProperty, value); } set { SetValue(IndicatorBrushProperty, value); }
@@ -27,6 +29,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
//Background Brush Property //Background Brush Property
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(HalfRoundProgressBar)); public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(HalfRoundProgressBar));
public Brush BackgroundBrush { public Brush BackgroundBrush {
get { return (Brush)GetValue(BackgroundBrushProperty); } get { return (Brush)GetValue(BackgroundBrushProperty); }
set { SetValue(BackgroundBrushProperty, value); } set { SetValue(BackgroundBrushProperty, value); }
@@ -34,6 +37,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
//ProgressBorder Property //ProgressBorder Property
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(HalfRoundProgressBar)); public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(HalfRoundProgressBar));
public Brush ProgressBorderBrush { public Brush ProgressBorderBrush {
get { return (Brush)GetValue(ProgressBorderBrushProperty); } get { return (Brush)GetValue(ProgressBorderBrushProperty); }
set { SetValue(ProgressBorderBrushProperty, value); } set { SetValue(ProgressBorderBrushProperty, value); }
@@ -41,6 +45,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
//Value //Value
public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(HalfRoundProgressBar)); public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(HalfRoundProgressBar));
public int Value { public int Value {
get { return (int)GetValue(ValueProperty); } get { return (int)GetValue(ValueProperty); }
set { SetValue(ValueProperty, value); } set { SetValue(ValueProperty, value); }

View File

@@ -10,33 +10,33 @@
<Grid DataContext="{Binding RelativeSource={RelativeSource Self}}"> <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> <Path.Effect>
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Opacity="1" Color="#B388FF"/> <DropShadowEffect BlurRadius="5" ShadowDepth="0" Opacity="1" Color="#B388FF" />
</Path.Effect> </Path.Effect>
<Path.Data> <Path.Data>
<CombinedGeometry GeometryCombineMode="Xor"> <CombinedGeometry GeometryCombineMode="Xor">
<CombinedGeometry.Geometry1> <CombinedGeometry.Geometry1>
<EllipseGeometry RadiusX="30" RadiusY="30" Center="30,30"/> <EllipseGeometry RadiusX="30" RadiusY="30" Center="30,30" />
</CombinedGeometry.Geometry1> </CombinedGeometry.Geometry1>
<CombinedGeometry.Geometry2> <CombinedGeometry.Geometry2>
<EllipseGeometry RadiusX="24" RadiusY="24" Center="30,30"/> <EllipseGeometry RadiusX="24" RadiusY="24" Center="30,30" />
</CombinedGeometry.Geometry2> </CombinedGeometry.Geometry2>
</CombinedGeometry> </CombinedGeometry>
</Path.Data> </Path.Data>
<Path.Fill> <Path.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1"> <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#B388FF" Offset="0"/> <GradientStop Color="#B388FF" Offset="0" />
<GradientStop Color="#A7FFEB" Offset="1"/> <GradientStop Color="#A7FFEB" Offset="1" />
</LinearGradientBrush> </LinearGradientBrush>
</Path.Fill> </Path.Fill>
<Path.RenderTransform> <Path.RenderTransform>
<RotateTransform/> <RotateTransform />
<!--This is necessary for the animation not to stop--> <!--This is necessary for the animation not to stop-->
</Path.RenderTransform> </Path.RenderTransform>
<Path.Triggers> <Path.Triggers>
<EventTrigger RoutedEvent="Loaded"> <EventTrigger RoutedEvent="Loaded">
<BeginStoryboard> <BeginStoryboard>
<Storyboard> <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> </Storyboard>
</BeginStoryboard> </BeginStoryboard>
</EventTrigger> </EventTrigger>

View File

@@ -12,10 +12,12 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace Server_Dashboard.Controls { namespace Server_Dashboard.Controls {
/// <summary> /// <summary>
/// Interaction logic for LoadingIndicator.xaml /// Interaction logic for LoadingIndicator.xaml
/// </summary> /// </summary>
public partial class LoadingIndicator : UserControl { public partial class LoadingIndicator : UserControl {
public LoadingIndicator() { public LoadingIndicator() {
InitializeComponent(); InitializeComponent();
} }

View File

@@ -9,37 +9,37 @@
<!--Module--> <!--Module-->
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10" CornerRadius="5"> <Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10" CornerRadius="5">
<Border.Effect> <Border.Effect>
<DropShadowEffect BlurRadius="5" ShadowDepth="0"/> <DropShadowEffect BlurRadius="5" ShadowDepth="0" />
</Border.Effect> </Border.Effect>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"/> <RowDefinition Height="40" />
<RowDefinition Height="*"/> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Top Bar--> <!--Top Bar-->
<Border CornerRadius="5 5 0 0" Grid.Row="0" Background="{StaticResource BackgroundSurface_08dp}" > <Border CornerRadius="5 5 0 0" Grid.Row="0" Background="{StaticResource BackgroundSurface_08dp}">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Margin="7.5 0 7.5 0" Height="25" Width="25" Source="{Binding ModuleIcon}"/> <Image Grid.Column="0" Margin="7.5 0 7.5 0" Height="25" Width="25" Source="{Binding ModuleIcon}" />
<TextBlock Foreground="{StaticResource DeepPurple_A100}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ModulName}"/> <TextBlock Foreground="{StaticResource DeepPurple_A100}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Text="{Binding ModuleName}" />
<Border CornerRadius="0 5 0 0" Background="{Binding StatusIndicator}" Grid.Column="3"> <Border CornerRadius="0 5 0 0" Background="{Binding StatusIndicator}" Grid.Column="3">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition />
<ColumnDefinition/> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Margin="7 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" FontSize="24" Text="Status"> <TextBlock Margin="7 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" FontSize="24" Text="Status">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/> <SolidColorBrush Color="White" Opacity="0.87" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<Border CornerRadius="0 5 0 0" Grid.Column="1" HorizontalAlignment="Right" Background="{Binding StatusIndicatorBG}" Padding="6"> <Border CornerRadius="0 5 0 0" Grid.Column="1" HorizontalAlignment="Right" Background="{Binding StatusIndicatorBG}" Padding="6">
<Ellipse Fill="{Binding StatusIndicator}" StrokeThickness="0" Width="25" Height="25"/> <Ellipse Fill="{Binding StatusIndicator}" StrokeThickness="0" Width="25" Height="25" />
</Border> </Border>
</Grid> </Grid>
</Border> </Border>
@@ -48,86 +48,86 @@
<!--Main Content--> <!--Main Content-->
<Grid Grid.Row="2" Margin="20" Width="Auto"> <Grid Grid.Row="2" Margin="20" Width="Auto">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="1.5*"/> <ColumnDefinition Width="1.5*" />
<ColumnDefinition/> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--Information pannel, left--> <!--Information pannel, left-->
<Grid Grid.Row="1" Margin="0 0 25 0"> <Grid Grid.Row="1" Margin="0 0 25 0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Column="0"> <StackPanel Grid.Column="0">
<TextBlock Text="Servername" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Servername" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="User" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="User" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="Public IP" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Public IP" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="Private IP" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Private IP" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="Uptime" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Uptime" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="Creation Date" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Creation Date" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="Creator" FontSize="16" Margin="2 2 5 10"> <TextBlock Text="Creator" FontSize="16" Margin="2 2 5 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1"> <StackPanel Grid.Column="1">
<TextBlock Text="{Binding ServerInfo.ServerName}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding ServerInfo.ServerName}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding ServerInfo.OSUserName}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding ServerInfo.OSUserName}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding ServerInfo.PublicIpAdress}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding ServerInfo.PublicIpAdress}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding ServerInfo.PrivateIpAdress}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding ServerInfo.PrivateIpAdress}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding ServerInfo.Uptime}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding ServerInfo.Uptime}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding CreationDate}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding CreationDate}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
<TextBlock Text="{Binding Creator}" FontSize="16" Margin="5 2 2 10"> <TextBlock Text="{Binding Creator}" FontSize="16" Margin="5 2 2 10">
<TextBlock.Foreground> <TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.60"/> <SolidColorBrush Color="White" Opacity="0.60" />
</TextBlock.Foreground> </TextBlock.Foreground>
</TextBlock> </TextBlock>
</StackPanel> </StackPanel>
@@ -135,33 +135,33 @@
<!--Graphical Indicators Right--> <!--Graphical Indicators Right-->
<Grid Grid.Row="1" Grid.Column="1"> <Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition />
<ColumnDefinition/> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Grid.Column="0"> <Grid Grid.Column="0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition />
<RowDefinition/> <RowDefinition />
</Grid.RowDefinitions> </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}"/> <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"/> <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}"/> <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"/> <TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="1" Text="GPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" />
</Grid> </Grid>
<Grid Grid.Column="1"> <Grid Grid.Column="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition />
<RowDefinition/> <RowDefinition />
</Grid.RowDefinitions> </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"/> <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"> <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="Read" Foreground="{StaticResource DeepPurple_A100}" />
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Write" Foreground="{StaticResource Teal_A100}"/> <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Write" Foreground="{StaticResource Teal_A100}" />
</StackPanel> </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"/> <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"> <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="UP" Foreground="{StaticResource DeepPurple_A100}" />
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="DOWN" Foreground="{StaticResource Teal_A100}"/> <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="DOWN" Foreground="{StaticResource Teal_A100}" />
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>

View File

@@ -12,10 +12,12 @@ using System.Windows.Navigation;
using System.Windows.Shapes; using System.Windows.Shapes;
namespace Server_Dashboard.Controls.ServerModules { namespace Server_Dashboard.Controls.ServerModules {
/// <summary> /// <summary>
/// Interaktionslogik für ServerModule.xaml /// Interaktionslogik für ServerModule.xaml
/// </summary> /// </summary>
public partial class ServerModule : UserControl { public partial class ServerModule : UserControl {
public ServerModule() { public ServerModule() {
InitializeComponent(); InitializeComponent();
} }

View File

@@ -1,26 +1,36 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Windows.Media.Imaging;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// Dashboard Module class that holds all the information that gets displayed /// Dashboard Module class that holds all the information that gets displayed
/// </summary> /// </summary>
class DashboardModule { internal class DashboardModule {
//The name the user gives the module //The name the user gives the module
public string ModuleName { get; set; } public string ModuleName { get; set; }
//The user who created it //The user who created it
public string Creator { get; set; } public string Creator { get; set; }
//All the information that the server had //All the information that the server had
public ServerInformation ServerInfo { get; set; } public ServerInformation ServerInfo { get; set; }
//The status indicator //The status indicator
public string StatusIndicator { get; set; } public string StatusIndicator { get; set; }
//The background color of the status indicator //The background color of the status indicator
public string StatusIndicatorBG { get; set; } public string StatusIndicatorBG { get; set; }
//If the server is avaibale or not //If the server is avaibale or not
public bool ServerAvailable { get; set; } public bool ServerAvailable { get; set; }
//The Module icon the user give the server, defaults to a generic server symbol //The Module icon the user give the server, defaults to a generic server symbol
public string ModuleIcon { get; set; } public BitmapImage ModuleIcon { get; set; }
//Creation date with System.DateTime.Now //Creation date with System.DateTime.Now
public string CreationDate { get; set; } public string CreationDate { get; set; }

View File

@@ -1,21 +0,0 @@
using System;
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; }
}
}

View File

@@ -4,29 +4,40 @@ using System.Collections.ObjectModel;
using System.Text; using System.Text;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// Server information class, this will probably scale pretty big later on /// Server information class, this will probably scale pretty big later on
/// This will hold all the information the socket will gather /// This will hold all the information the socket will gather
/// </summary> /// </summary>
class ServerInformation { internal class ServerInformation {
//The ServerName //The ServerName
public string ServerName { get; set; } public string ServerName { get; set; }
//The unix or windows username //The unix or windows username
public string OSUserName { get; set; } public string OSUserName { get; set; }
//Cpu Temp in C //Cpu Temp in C
public string CpuTemp { get; set; } public string CpuTemp { get; set; }
//Gpu Temp in C //Gpu Temp in C
public string GpuTemp { get; set; } public string GpuTemp { get; set; }
//Server uptime //Server uptime
public string Uptime { get; set; } public string Uptime { get; set; }
//When the server was first deployed //When the server was first deployed
public string DeployDate { get; set; } public string DeployDate { get; set; }
//Public IPv4 Adress //Public IPv4 Adress
public string PublicIpAdress { get; set; } public string PublicIpAdress { get; set; }
//Private IP adress from the servers network //Private IP adress from the servers network
public string PrivateIpAdress { get; set; } public string PrivateIpAdress { get; set; }
//GPU usage in % //GPU usage in %
public string GpuUsage { get; set; } public string GpuUsage { get; set; }
//CPU usage in % //CPU usage in %
public string CpuUsage { get; set; } public string CpuUsage { get; set; }
} }

View File

@@ -5,13 +5,17 @@ using System.Configuration;
using System.Data; using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Reflection; using System.Reflection;
using System.Windows.Media.Imaging;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// Database class to access the database /// Database class to access the database
/// </summary> /// </summary>
public static class DatabaseHandler { public static class DatabaseHandler {
#region Public Methods #region Public Methods
/// <summary> /// <summary>
/// Checks the user credentials /// Checks the user credentials
/// </summary> /// </summary>
@@ -20,24 +24,30 @@ namespace Server_Dashboard {
/// <returns>[0] is false, [1] is true, [2] connection error</returns> /// <returns>[0] is false, [1] is true, [2] connection error</returns>
public static int CheckLogin(string uname, string passwd) { public static int CheckLogin(string uname, string passwd) {
//Creates the database connection //Creates the database connection
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) { using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
try { try {
//Open the connection //Open the connection
con.Open(); con.Open();
//SQL Query //SQL Query
string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT"; string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT";
//Creates a new command //Creates a new command
using (SqlCommand com = new SqlCommand(query, con)) { using SqlCommand com = new SqlCommand(query, con);//For security reasons the values are added with this function
//For security reasons the values are added with this function
//this will avoid SQL Injections //this will avoid SQL Injections
com.Parameters.AddWithValue("@uname", uname); com.Parameters.AddWithValue("@uname", uname);
com.Parameters.AddWithValue("@passwd", passwd); com.Parameters.AddWithValue("@passwd", passwd);
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250); com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
com.Parameters["@valid"].Direction = ParameterDirection.Output; com.Parameters["@valid"].Direction = ParameterDirection.Output;
//Execute without a return value //Execute query and return number of rows affected
com.ExecuteNonQuery(); int sqlResponse = com.ExecuteNonQuery();
//The Return value from the SQL Stored Procedure will have the answer to life //Checks if there are any rows successful
return Convert.ToInt32(com.Parameters["@Valid"].Value); //If the query returns 0 the query wasn't successful
//if its any number above 0 it was successfull
if (Convert.ToInt32(com.Parameters["@Valid"].Value) == 0) {
//Error, not successful
return 1;
} else {
//Successful
return 0;
} }
//Catch any error //Catch any error
} catch (SqlException ex) { } catch (SqlException ex) {
@@ -47,7 +57,86 @@ namespace Server_Dashboard {
con.Close(); con.Close();
} }
} }
public static DataTable GetUserData(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 = "SELECT UserID, Username, Email, CreationTime, ModuleName, MI.Image FROM UserData LEFT JOIN ModuleData MD on UserData.ID = MD.UserID LEFT JOIN ModuleIcon MI on MD.ID = MI.Module WHERE Username = @username";
//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);
//Execute query and return number of rows affected
DataTable resultTable = new DataTable();
using SqlDataAdapter sda = new SqlDataAdapter(com);
sda.Fill(resultTable);
return resultTable;
//Checks if there are any rows successful
//If the query returns 0 the query wasn't successful
//if its any number above 0 it was successfull
//Catch any error
} catch (SqlException ex) {
return null;
} finally {
//Always close the connection
con.Close();
} }
}
/// <summary>
/// Creates a new Module for the current user
/// </summary>
/// <param name="ipAdress">Server IP Address</param>
/// <param name="moduleName">Module name, default is Module</param>
/// <param name="serverName">Server name, default is Server</param>
/// <param name="username">Username of the current user</param>
/// <param name="moduleIcon">module icon as byte[]</param>
/// <param name="port">port, defalt ist 22</param>
/// <returns></returns>
public static int CreateNewModule(string ipAdress, string moduleName, string serverName, string username, byte[] moduleIcon, string port = "22") {
//Creates the database connection
using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
try {
//Open the connection
con.Open();
//SQL Query
string query = "EXEC AddNewModuleToUser @UserName = @username, @DateTime = @time, @ModuleName = @moduleName, @ServerName = @serverName, @ModuleIcon = @moduleIcon, @IPAddress = @ipAdress, @Port = @port";
//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.AddWithValue("@time", DateTime.Now);
com.Parameters.AddWithValue("@moduleName", moduleName);
com.Parameters.AddWithValue("@serverName", serverName);
com.Parameters.Add("@moduleIcon", SqlDbType.VarBinary, int.MaxValue).Value = moduleIcon;
com.Parameters.AddWithValue("@ipAdress", ipAdress);
com.Parameters.AddWithValue("@port", port);
//Execute query and return number of rows affected
int sqlResponse = com.ExecuteNonQuery();
//Checks if there are any rows successful
//If the query returns 0 the query wasn't successful
//if its any number above 0 it was successfull
if (sqlResponse == 0) {
//Error, not successful
return 1;
} else {
//Successful
return 0;
}
//Catch any error
} catch (SqlException ex) {
return ex.Number;
} finally {
//Always close the connection
con.Close();
}
}
/// <summary> /// <summary>
/// Currently obscolete, would check the Username and Cookie /// Currently obscolete, would check the Username and Cookie
/// </summary> /// </summary>
@@ -56,24 +145,31 @@ namespace Server_Dashboard {
/// <returns>[0] is false, [1] is true, [2] connection error</returns> /// <returns>[0] is false, [1] is true, [2] connection error</returns>
public static int CheckCookie(string cookie, string username) { public static int CheckCookie(string cookie, string username) {
//Creates the database connection //Creates the database connection
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) { using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
try { try {
//Open the connection //Open the connection
con.Open(); con.Open();
//SQL Query //SQL Query
string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT"; string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT";
//Creates a new command //Creates a new command
using (SqlCommand com = new SqlCommand(query, con)) { using SqlCommand com = new SqlCommand(query, con);
//For security reasons the values are added with this function //For security reasons the values are added with this function
//this will avoid SQL Injections //this will avoid SQL Injections
com.Parameters.AddWithValue("@cookie", cookie); com.Parameters.AddWithValue("@cookie", cookie);
com.Parameters.AddWithValue("@username", username); com.Parameters.AddWithValue("@username", username);
com.Parameters.Add("@valid", SqlDbType.Bit); com.Parameters.Add("@valid", SqlDbType.Bit);
com.Parameters["@valid"].Direction = ParameterDirection.Output; com.Parameters["@valid"].Direction = ParameterDirection.Output;
//Execute without a return value //Execute query and return number of rows affected
com.ExecuteNonQuery(); int sqlResponse = com.ExecuteNonQuery();
//The Return value from the SQL Stored Procedure will have the answer to life //Checks if there are any rows successful
return Convert.ToInt32(com.Parameters["@Valid"].Value); //If the query returns 0 the query wasn't successful
//if its any number above 0 it was successfull
if ((int)com.Parameters["@Valid"].Value == 0) {
//Error, not successful
return 1;
} else {
//Successful
return 0;
} }
//Catch any error //Catch any error
} catch (SqlException ex) { } catch (SqlException ex) {
@@ -83,37 +179,45 @@ namespace Server_Dashboard {
con.Close(); con.Close();
} }
} }
}
/// <summary> /// <summary>
/// Deletes a the cookie from the given user /// Deletes a the cookie from the given user
/// </summary> /// </summary>
/// <param name="username">User who doesnt deserve any delicious cookies :3</param> /// <param name="username">User who doesnt deserve any delicious cookies :3</param>
public static void DeleteCookie(string username) { public static int DeleteCookie(string username) {
//Creates the database connection //Creates the database connection
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) { using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
try { try {
//Open the connection //Open the connection
con.Open(); con.Open();
//SQL Query //SQL Query
string query = "EXEC DeleteUserCookie @Username = @username, @ResponseMessage = @response OUTPUT"; string query = "EXEC DeleteUserCookie @Username = @username";
//Creates a new command //Creates a new command
using (SqlCommand com = new SqlCommand(query, con)) { using SqlCommand com = new SqlCommand(query, con);
//For security reasons the values are added with this function //For security reasons the values are added with this function
//this will avoid SQL Injections //this will avoid SQL Injections
com.Parameters.AddWithValue("@username", username); com.Parameters.AddWithValue("@username", username);
com.Parameters.Add("@response", SqlDbType.NVarChar, 250); //Execute query and return number of rows affected
com.Parameters["@response"].Direction = ParameterDirection.Output; int sqlResponse = com.ExecuteNonQuery();
//Execute without a return value //Checks if there are any rows successful
com.ExecuteNonQuery(); //If the query returns 0 the query wasn't successful
//if its any number above 0 it was successfull
if (sqlResponse == 0) {
//Error, not successful
return 1;
} else {
//Successful
return 0;
} }
//Catch any error, dont return them, why would you? //Catch any error
} catch { } catch (SqlException ex) {
return ex.Number;
} finally { } finally {
//Always close the connection //Always close the connection
con.Close(); con.Close();
} }
} }
}
/// <summary> /// <summary>
/// Adds a new Cookie to a user /// Adds a new Cookie to a user
/// </summary> /// </summary>
@@ -122,34 +226,39 @@ namespace Server_Dashboard {
/// <returns>[0] is false, [1] is true, [2] connection error</returns> /// <returns>[0] is false, [1] is true, [2] connection error</returns>
public static int AddCookie(string cookie, string username) { public static int AddCookie(string cookie, string username) {
//Creates the database connection //Creates the database connection
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) { using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
try { try {
//Open the connection //Open the connection
con.Open(); con.Open();
//SQL Query //SQL Query
string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username, @ResponseMessage = @response OUTPUT"; string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username";
//Creates a new command //Creates a new command
using (SqlCommand com = new SqlCommand(query, con)) { using SqlCommand com = new SqlCommand(query, con);
//For security reasons the values are added with this function //For security reasons the values are added with this function
//this will avoid SQL Injections //this will avoid SQL Injections
com.Parameters.AddWithValue("@cookie", cookie); com.Parameters.AddWithValue("@cookie", cookie);
com.Parameters.AddWithValue("@username", username); com.Parameters.AddWithValue("@username", username);
com.Parameters.Add("@response", SqlDbType.NVarChar, 250); //Execute query and return number of rows affected
com.Parameters["@response"].Direction = ParameterDirection.Output; int sqlResponse = com.ExecuteNonQuery();
//Execute without a return value //Checks if there are any rows successful
com.ExecuteNonQuery(); //If the query returns 0 the query wasn't successful
//The Return value from the SQL Stored Procedure will have the answer to life //if its any number above 0 it was successfull
return Convert.ToInt32(com.Parameters["@ResponseMessage"].Value); if (sqlResponse == 0) {
//Error, not successful
return 1;
} else {
//Successful
return 0;
} }
//Catch any error //Catch any error
} catch (SqlException ex) { } catch (SqlException ex) {
return ex.Number; return ex.Number;
} finally { } finally {
//Always close connection //Always close the connection
con.Close(); con.Close();
} }
#endregion Public Methods
} }
} }
#endregion
}
} }

View File

@@ -31,11 +31,6 @@
<RowDefinition Height="80"/> <RowDefinition Height="80"/>
<RowDefinition Height=".3*"/> <RowDefinition Height=".3*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<!--#region Custom title bar--> <!--#region Custom title bar-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0" Grid.ColumnSpan="2"> <Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0" Grid.ColumnSpan="2">
<Grid.Effect> <Grid.Effect>
@@ -45,8 +40,14 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0"/> <TextBlock Grid.Column="0" Text="Login" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center">
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕"> <i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="Click"> <i:EventTrigger EventName="Click">
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/> <i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>

View File

@@ -8,7 +8,7 @@ namespace Server_Dashboard {
/// Base View Model all the other view models inherit from /// Base View Model all the other view models inherit from
/// Makes me write the INotifyPropertyChanged only once /// Makes me write the INotifyPropertyChanged only once
/// </summary> /// </summary>
class BaseViewModel : INotifyPropertyChanged { public class BaseViewModel : INotifyPropertyChanged {
public event PropertyChangedEventHandler PropertyChanged = (sender, e) => { }; public event PropertyChangedEventHandler PropertyChanged = (sender, e) => { };
protected void OnPropertyChanged(string prop) { protected void OnPropertyChanged(string prop) {

View File

@@ -1,24 +1,44 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Data;
using System.IO;
using System.Text; using System.Text;
using System.Windows.Media.Imaging;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// View Model for the modules /// View Model for the modules
/// </summary> /// </summary>
class DashboardModuleViewModel : BaseViewModel { internal class DashboardModuleViewModel : BaseViewModel {
//List with all Modules inside //List with all Modules inside
public ObservableCollection<DashboardModule> Modules { get; set; } public ObservableCollection<DashboardModule> Modules { get; set; }
//Creates Default Modules, remove before release and when implementing the actual data comming from the socket //Creates Default Modules, remove before release and when implementing the actual data comming from the socket
public DashboardModuleViewModel() { public DashboardModuleViewModel(DataTable userdata) {
GetModules(userdata);
}
public void GetModules(DataTable userdata) {
Modules = new ObservableCollection<DashboardModule>(); Modules = new ObservableCollection<DashboardModule>();
for (int i = 0; i < 10; i++) { foreach (DataRow row in userdata.Rows) {
BitmapImage moduleIcon = null;
if (row[5] != DBNull.Value) {
using MemoryStream ms = new MemoryStream((byte[])row[5]);
moduleIcon = new BitmapImage();
moduleIcon.BeginInit();
moduleIcon.StreamSource = ms;
moduleIcon.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
moduleIcon.CacheOption = BitmapCacheOption.OnLoad;
moduleIcon.EndInit();
moduleIcon.Freeze();
}
Modules.Add(new DashboardModule(true) { Modules.Add(new DashboardModule(true) {
ModuleName = "TestModule", ModuleName = (string)row[4],
Creator = "Username", Creator = (string)row[1],
ModuleIcon = "../../Assets/Images/PlaceHolderModuleLight.png", ModuleIcon = moduleIcon,
CreationDate = DateTime.Now.ToString(), CreationDate = DateTime.Now.ToString(),
ServerInfo = new ServerInformation() { ServerInfo = new ServerInformation() {
GpuUsage = "20", GpuUsage = "20",
@@ -27,7 +47,7 @@ namespace Server_Dashboard {
DeployDate = DateTime.Now.ToString(), DeployDate = DateTime.Now.ToString(),
GpuTemp = "69.69", GpuTemp = "69.69",
ServerName = "Ubuntu", ServerName = "Ubuntu",
OSUserName = "crylia " + i, OSUserName = "crylia ",
PrivateIpAdress = "192.168.1.1", PrivateIpAdress = "192.168.1.1",
PublicIpAdress = "85.69.102.58", PublicIpAdress = "85.69.102.58",
Uptime = DateTime.Now.ToString() Uptime = DateTime.Now.ToString()

View File

@@ -5,64 +5,30 @@ using System.Windows;
using System.Windows.Input; using System.Windows.Input;
using Server_Dashboard_Socket; using Server_Dashboard_Socket;
using System; using System;
using System.Data;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// View Model for the Dashboard /// View Model for the Dashboard
/// </summary> /// </summary>
class DashboardViewModel : BaseViewModel { internal class DashboardViewModel : BaseViewModel {
#region Private Values #region Private Values
private readonly DashboardModuleViewModel dmvm = new DashboardModuleViewModel();
#endregion private readonly DashboardModuleViewModel dmvm;
#endregion Private Values
#region Properties #region Properties
private string serverName;
public string ServerName {
get { return serverName; }
set {
if(serverName != value)
serverName = value;
OnPropertyChanged(nameof(serverName));
}
}
private string moduleName;
public string ModuleName {
get { return moduleName; }
set {
if (moduleName != value)
moduleName = value;
OnPropertyChanged(nameof(moduleName));
}
}
private string ipAdress;
public string IPAdress {
get { return ipAdress; }
set {
if (ipAdress != value)
ipAdress = value;
OnPropertyChanged(nameof(ipAdress));
}
}
private string port;
public string Port {
get { return port; }
set {
if (port != value)
port = value;
OnPropertyChanged(nameof(port));
}
}
//The Username displayed defaults to Username //The Username displayed defaults to Username
private string userName = "Username"; private string userName;
public string UserName { public string UserName {
get { return userName; } get { return userName; }
set { set {
if(userName != value) if (userName != value)
userName = value; userName = value;
OnPropertyChanged(nameof(userName)); OnPropertyChanged(nameof(userName));
} }
@@ -70,37 +36,43 @@ namespace Server_Dashboard {
//List that contains every Module //List that contains every Module
private ObservableCollection<DashboardModule> modules; private ObservableCollection<DashboardModule> modules;
public ObservableCollection<DashboardModule> Modules { public ObservableCollection<DashboardModule> Modules {
get { return modules; } get { return modules; }
set { set {
if(value != modules) if (value != modules)
modules = value; modules = value;
OnPropertyChanged(nameof(modules)); OnPropertyChanged(nameof(modules));
} }
} }
#endregion
#endregion Properties
#region Constructor #region Constructor
public DashboardViewModel() {
//Creates a new echo server, remove b4 release public DashboardViewModel(string username) {
EchoServer echoServer = new EchoServer(); UserName = username;
echoServer.Start();
//Command inits //Command inits
OpenLinkCommand = new RelayCommand(OpenLink); OpenLinkCommand = new RelayCommand(OpenLink);
OpenNewModuleWindowCommand = new RelayCommand(OpenNewModuleWindow); OpenNewModuleWindowCommand = new RelayCommand(OpenNewModuleWindow);
CreateModuleCommand = new RelayCommand(CreateModule);
DataTable Userdata = DatabaseHandler.GetUserData(username);
dmvm = new DashboardModuleViewModel(Userdata);
//Sets the local module to the dashboardviewmodule modules //Sets the local module to the dashboardviewmodule modules
Modules = dmvm.Modules; Modules = dmvm.Modules;
} }
#endregion
#endregion Constructor
#region ICommands #region ICommands
public ICommand OpenLinkCommand { get; set; } public ICommand OpenLinkCommand { get; set; }
public ICommand OpenNewModuleWindowCommand { get; set; } public ICommand OpenNewModuleWindowCommand { get; set; }
public ICommand CreateModuleCommand { get; set; }
#endregion #endregion ICommands
#region Commands #region Commands
/// <summary> /// <summary>
/// Opens a given link in the default browser /// Opens a given link in the default browser
/// </summary> /// </summary>
@@ -116,7 +88,7 @@ namespace Server_Dashboard {
private void OpenNewModuleWindow(object param) { private void OpenNewModuleWindow(object param) {
//Creates a new CreateModulePopup and sets this view model as datacontext //Creates a new CreateModulePopup and sets this view model as datacontext
CreateModulePopup cmp = new CreateModulePopup { CreateModulePopup cmp = new CreateModulePopup {
DataContext = this DataContext = new CreateModuleViewModel(UserName)
}; };
//Opens it in the middle of the screen, setting the parent window as owner causes the //Opens it in the middle of the screen, setting the parent window as owner causes the
//application to crash when NOT in debug mode(???) //application to crash when NOT in debug mode(???)
@@ -124,17 +96,6 @@ namespace Server_Dashboard {
cmp.ShowDialog(); cmp.ShowDialog();
} }
/// <summary> #endregion Commands
/// No function yes
/// </summary>
/// <param name="param">Nothing</param>
private void CreateModule(object param) {
if (!String.IsNullOrWhiteSpace(IPAdress)) {
} else {
//error
}
}
#endregion
} }
} }

View File

@@ -0,0 +1,178 @@
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Input;
using System.Windows.Media.Imaging;
namespace Server_Dashboard {
internal class CreateModuleViewModel : BaseViewModel, IWindowHelper {
private readonly string username;
private string serverName;
public string ServerName {
get { return serverName; }
set {
if (serverName != value)
serverName = value;
OnPropertyChanged(nameof(serverName));
}
}
private string moduleName;
public string ModuleName {
get { return moduleName; }
set {
if (moduleName != value)
moduleName = value;
OnPropertyChanged(nameof(moduleName));
}
}
private string ipAdress;
public string IPAdress {
get { return ipAdress; }
set {
if (ipAdress != value)
ipAdress = value;
OnPropertyChanged(nameof(ipAdress));
}
}
private string port;
public string Port {
get { return port; }
set {
if (port != value)
port = value;
OnPropertyChanged(nameof(port));
}
}
private BitmapImage moduleIcon;
public BitmapImage ModuleIcon {
get { return moduleIcon; }
set {
if (moduleIcon != value)
moduleIcon = value;
OnPropertyChanged(nameof(moduleIcon));
}
}
private string userInformationMessage;
public string UserInformationMessage {
get { return userInformationMessage; }
set {
if (userInformationMessage != value)
userInformationMessage = value;
OnPropertyChanged(nameof(userInformationMessage));
}
}
public CreateModuleViewModel(string username) {
this.username = username;
CreateModuleCommand = new RelayCommand(CreateModuleAsync);
SelectIconCommand = new RelayCommand(SelectIcon);
RemoveIconCommand = new RelayCommand(RemoveIcon);
TestConnectionCommand = new RelayCommand(TestConnection);
}
public ICommand RemoveIconCommand { get; set; }
public ICommand SelectIconCommand { get; set; }
public ICommand CreateModuleCommand { get; set; }
public ICommand TestConnectionCommand { get; set; }
public Action Close { get; set; }
//private readonly Regex moduleNameFilter = new Regex(@"^[A-Z][a-z][0-9]{0-20}$");
//private readonly Regex serverNameFilter = new Regex(@"^[A-Z][a-z][0-9]{0-20}$");
private readonly Regex ipFilter = new Regex(@"^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$");
/// <summary>
/// First checks if the IP address and the other credentials are valid
/// than asynchronously sends the data to the database where the module will be saved
/// this also triggers a reload of all modules to make sure the newly created module
/// will be shown without an application restart
/// </summary>
/// <param name="param">Nothing</param>
private async void CreateModuleAsync(object param) {
//Checks if the IP field is not empty and valid
if (!String.IsNullOrWhiteSpace(ipAdress) && ipFilter.IsMatch(ipAdress)) {
//Gives the Module a default name if the user doesnt name it
if (String.IsNullOrWhiteSpace(moduleName))
moduleName = "Module";
//Gives the Server a default name is the user doesnt name it
if (String.IsNullOrWhiteSpace(serverName))
serverName = "Server";
//Makes sure the name isnt any longer than characters
if (moduleName.Length >= 20) {
UserInformationMessage = "The Module Name is too long";
return;
}
//Makes sure the name isnt any longer than characters
if (serverName.Length >= 20) {
UserInformationMessage = "The Server Name is too long";
return;
}
//Clears the error message if there isnt any error
UserInformationMessage = "";
byte[] moduleIconStream = null;
if (moduleIcon != null) {
try {
JpegBitmapEncoder encoder = new JpegBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(moduleIcon));
using MemoryStream ms = new MemoryStream();
encoder.Save(ms);
moduleIconStream = ms.ToArray();
} catch { }
}
if (await Task.Run(() => DatabaseHandler.CreateNewModule(ipAdress, moduleName, serverName, username, moduleIconStream, port)) == 0) {
Close?.Invoke();
} else {
UserInformationMessage = "Unknown error occured, please try again later";
}
} else {
UserInformationMessage = "The IP Address is invalid";
}
}
/// <summary>
/// Opens a file dialog and lets the user select a .jpg, .jpeg or .png file as icon
/// </summary>
/// <param name="param"></param>
private void SelectIcon(object param) {
OpenFileDialog ofd = new OpenFileDialog {
Title = "Choose an Image",
Filter = "Supported format|*.jpg;*.jpeg;*.png"
};
if ((bool)ofd.ShowDialog()) {
ModuleIcon = new BitmapImage(new Uri(ofd.FileName));
}
}
/// <summary>
/// Removes the selected ModuleIcon
/// </summary>
/// <param name="param"></param>
private void RemoveIcon(object param) => ModuleIcon = null;
/// <summary>
/// Tests the socket connection
/// </summary>
/// <param name="param"></param>
private void TestConnection(object param) {
//TODO: Test connection to the socket server
}
}
}

View File

@@ -6,13 +6,17 @@ using System.Threading.Tasks;
using Server_Dashboard_Socket; using Server_Dashboard_Socket;
namespace Server_Dashboard { namespace Server_Dashboard {
/// <summary> /// <summary>
/// View Model for the Login Window /// View Model for the Login Window
/// </summary> /// </summary>
class LoginViewModel : BaseViewModel, IWindowHelper { internal class LoginViewModel : BaseViewModel, IWindowHelper {
#region Properties #region Properties
//Username Property //Username Property
private string username; private string username;
public string Username { public string Username {
get { return username; } get { return username; }
set { set {
@@ -21,8 +25,10 @@ namespace Server_Dashboard {
OnPropertyChanged(nameof(username)); OnPropertyChanged(nameof(username));
} }
} }
//Error Text displays an error to help the user to fill the form //Error Text displays an error to help the user to fill the form
private string errorText; private string errorText;
public string ErrorText { public string ErrorText {
get { return errorText; } get { return errorText; }
set { set {
@@ -31,18 +37,22 @@ namespace Server_Dashboard {
OnPropertyChanged(nameof(errorText)); OnPropertyChanged(nameof(errorText));
} }
} }
//Remember me button //Remember me button
private bool rememberUser; private bool rememberUser;
public bool RememberUser { public bool RememberUser {
get { return rememberUser; } get { return rememberUser; }
set { set {
if(value != rememberUser) if (value != rememberUser)
rememberUser = value; rememberUser = value;
OnPropertyChanged(nameof(rememberUser)); OnPropertyChanged(nameof(rememberUser));
} }
} }
//Loading circle, gets hidden and shown when logging in //Loading circle, gets hidden and shown when logging in
private string loading; private string loading;
public string Loading { public string Loading {
get { return loading; } get { return loading; }
set { set {
@@ -51,16 +61,20 @@ namespace Server_Dashboard {
OnPropertyChanged(nameof(loading)); OnPropertyChanged(nameof(loading));
} }
} }
#endregion
#endregion Properties
#region Public Values #region Public Values
//Close action for the Window to close properly //Close action for the Window to close properly
public Action Close { get ; set; } public Action Close { get; set; }
#endregion
#endregion Public Values
#region Constructor #region Constructor
public LoginViewModel() { public LoginViewModel() {
SocketClient sc = new SocketClient(); //SocketClient sc = new SocketClient();
//Loading circle is hidden on startup //Loading circle is hidden on startup
Loading = "Hidden"; Loading = "Hidden";
//Command inits //Command inits
@@ -74,13 +88,17 @@ namespace Server_Dashboard {
//TODO: Autologin //TODO: Autologin
//AutoLoginAsync(); //AutoLoginAsync();
} }
#endregion
#endregion Constructor
#region ICommands #region ICommands
public ICommand LoginCommand { get; set; } public ICommand LoginCommand { get; set; }
#endregion
#endregion ICommands
#region Commands #region Commands
/// <summary> /// <summary>
/// Async login /// Async login
/// </summary> /// </summary>
@@ -105,6 +123,7 @@ namespace Server_Dashboard {
//Sets the error text and exits function //Sets the error text and exits function
ErrorText = "Username or password is wrong."; ErrorText = "Username or password is wrong.";
return; return;
case 1: case 1:
/*No idea why this is here, gonna let it be till the remember me and autologin is 100% done /*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)) { if (RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
@@ -133,15 +152,19 @@ namespace Server_Dashboard {
DatabaseHandler.AddCookie(Username, cookie); DatabaseHandler.AddCookie(Username, cookie);
} }
//Creates a new Dashboard window and shows it //Creates a new Dashboard window and shows it
DashboardWindow window = new DashboardWindow(); DashboardWindow window = new DashboardWindow() {
DataContext = new DashboardViewModel(Username)
};
window.Show(); window.Show();
//When closed, close it correctly //Close window when dashboard is shown
Close?.Invoke(); Close?.Invoke();
return; return;
case 2: case 2:
//Sets the error text //Sets the error text
ErrorText = "Server unreachable, connection timeout."; ErrorText = "Server unreachable, connection timeout.";
return; return;
default: default:
//Sets the error text //Sets the error text
ErrorText = "An unknown error has occured"; ErrorText = "An unknown error has occured";
@@ -169,9 +192,11 @@ namespace Server_Dashboard {
//If there is no error, clear the error text //If there is no error, clear the error text
ErrorText = ""; ErrorText = "";
} }
#endregion
#endregion Commands
#region private functions #region private functions
//TODO: Add autologin function that locks the UI untill the user hits the abort button or the login completes //TODO: Add autologin function that locks the UI untill the user hits the abort button or the login completes
/*private async void AutoLoginAsync() { /*private async void AutoLoginAsync() {
if (Settings.Default.RememberMe && !String.IsNullOrEmpty(Settings.Default.Username) && !String.IsNullOrEmpty(Settings.Default.Cookies)) { if (Settings.Default.RememberMe && !String.IsNullOrEmpty(Settings.Default.Username) && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
@@ -186,6 +211,7 @@ namespace Server_Dashboard {
} }
} }
}*/ }*/
#endregion
#endregion private functions
} }
} }

View File

@@ -4,9 +4,10 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Server_Dashboard.Views.DashboardPages.ModuleCRUD" xmlns:local="clr-namespace:Server_Dashboard.Views.DashboardPages.ModuleCRUD"
xmlns:root="clr-namespace:Server_Dashboard" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:ap="clr-namespace:Server_Dashboard"
xmlns:root="clr-namespace:Server_Dashboard" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}" 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" ap:CloseProperty.Value="True">
<WindowChrome.WindowChrome> <WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/> <WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
@@ -22,16 +23,17 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Title Bar--> <!--Title Bar-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0"> <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}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center"/> <TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand"> <Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="Click"> <i:EventTrigger EventName="Click">
@@ -40,6 +42,7 @@
</i:Interaction.Triggers> </i:Interaction.Triggers>
</Button> </Button>
</Grid> </Grid>
<!--Main Content-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20"> <Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20">
<Grid.Effect> <Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/> <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
@@ -50,6 +53,8 @@
<RowDefinition/> <RowDefinition/>
<RowDefinition/> <RowDefinition/>
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="30"/>
<RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Server Name--> <!--Server Name-->
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0"> <StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
@@ -134,8 +139,59 @@
</TextBlock> </TextBlock>
</Grid> </Grid>
</StackPanel> </StackPanel>
<!--Module Icon-->
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="102"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Cursor="Hand" Command="{Binding SelectIconCommand}" HorizontalAlignment="Left" Margin="20 0 20 0" Height="62" Width="62">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="4" x:Name="Border" Background="{StaticResource BackgroundSurface_04dp}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
</Border.Effect>
<Grid>
<Rectangle RadiusX="4" RadiusY="4">
<Rectangle.Fill>
<ImageBrush ImageSource="{Binding ModuleIcon}"/>
</Rectangle.Fill>
</Rectangle>
<Border CornerRadius="100" Background="{StaticResource BackgroundSurface_04dp}" Width="20" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="2">
<svgc:SvgViewbox IsHitTestVisible="False" Source="../../../Assets/Images/AddIcon.svg" Opacity="1"/>
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
<Button Command="{Binding RemoveIconCommand}" HorizontalAlignment="Left" Grid.Column="1" Content="Remove Icon" Height="40" Width="150"/>
</Grid>
<!--Error Text / Test Connection Result-->
<TextBlock Text="{Binding UserInformationMessage}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="5" FontSize="14">
<TextBlock.Foreground>
<SolidColorBrush Color="#64FFDA" Opacity="0.64"/>
</TextBlock.Foreground>
</TextBlock>
<!--Create Module button--> <!--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.Row="6">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Margin="20 0 10 0" Height="60" Width="Auto" Command="{Binding CreateModuleCommand}" CommandParameter="{Binding ElementName=CREATE_MODULE}" Content="CREATE MODULE" Grid.Column="0"/>
<Button Margin="10 0 20 0" Height="60" Width="Auto" Command="{Binding TestConnectionCommand}" Content="TEST CONNECTION" Grid.Column="1"/>
</Grid>
</Grid> </Grid>
</Grid> </Grid>
</Border> </Border>

View File

@@ -10,34 +10,32 @@
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/" 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.WindowChrome>
<WindowChrome CaptionHeight="0"/> <WindowChrome CaptionHeight="0" />
</WindowChrome.WindowChrome> </WindowChrome.WindowChrome>
<Window.DataContext>
<root:DashboardViewModel/>
</Window.DataContext>
<!--Dashboard Window and Container for the Dashboards--> <!--Dashboard Window and Container for the Dashboards-->
<Grid Background="{StaticResource BackgroundSurface_00dp}"> <Grid Background="{StaticResource BackgroundSurface_00dp}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="30"/> <RowDefinition Height="30" />
<RowDefinition Height="50"/> <RowDefinition Height="50" />
<RowDefinition Height="*"/> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!--Window Title--> <!--Window Title-->
<Grid Background="{StaticResource BackgroundSurface_06dp}" Grid.Row="0"> <Grid Background="{StaticResource BackgroundSurface_06dp}" Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*" />
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Grid.Column="0">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown"> <i:EventTrigger EventName="MouseLeftButtonDown">
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/> <i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
</i:EventTrigger> </i:EventTrigger>
</i:Interaction.Triggers> </i:Interaction.Triggers>
<Label Grid.Column="0"/> </Label>
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand"> <Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
<i:Interaction.Triggers> <i:Interaction.Triggers>
<i:EventTrigger EventName="Click"> <i:EventTrigger EventName="Click">
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/> <i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
</i:EventTrigger> </i:EventTrigger>
</i:Interaction.Triggers> </i:Interaction.Triggers>
</Button> </Button>
@@ -45,20 +43,20 @@
<!--Settings, Docs, User, links etc--> <!--Settings, Docs, User, links etc-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" x:Name="TopBarGrid"> <Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" x:Name="TopBarGrid">
<Grid.Effect> <Grid.Effect>
<DropShadowEffect Direction="270" BlurRadius="5"/> <DropShadowEffect Direction="270" BlurRadius="5" />
</Grid.Effect> </Grid.Effect>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button Grid.Column="0" > <Button Grid.Column="0">
<Button.Template> <Button.Template>
<ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" CornerRadius="4" Padding="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" > <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"/> <svgc:SvgViewbox Source="../Assets/Images/Settings.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87" />
</Border> </Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
@@ -74,15 +72,15 @@
<ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"> <Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
<Border.Effect> <Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/> <DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
</Border.Effect> </Border.Effect>
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}"> <Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
<Border.BorderBrush> <Border.BorderBrush>
<SolidColorBrush Color="White" Opacity="0.12"/> <SolidColorBrush Color="White" Opacity="0.12" />
</Border.BorderBrush> </Border.BorderBrush>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<svgc:SvgViewbox Source="../Assets/Images/User.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/> <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"/> <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> </StackPanel>
</Border> </Border>
</Border> </Border>
@@ -90,7 +88,7 @@
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.04"/> <SolidColorBrush Color="#B388FF" Opacity="0.04" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -99,12 +97,12 @@
<Trigger Property="IsPressed" Value="True"> <Trigger Property="IsPressed" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.12"/> <SolidColorBrush Color="#B388FF" Opacity="0.12" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter TargetName="BackgroundOverlay" Property="BorderBrush"> <Setter TargetName="BackgroundOverlay" Property="BorderBrush">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity=".87"/> <SolidColorBrush Color="#B388FF" Opacity=".87" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -117,15 +115,15 @@
<ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"> <Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
<Border.Effect> <Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/> <DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
</Border.Effect> </Border.Effect>
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}"> <Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
<Border.BorderBrush> <Border.BorderBrush>
<SolidColorBrush Color="White" Opacity="0.12"/> <SolidColorBrush Color="White" Opacity="0.12" />
</Border.BorderBrush> </Border.BorderBrush>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<svgc:SvgViewbox Source="../Assets/Images/Docs.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/> <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"/> <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> </StackPanel>
</Border> </Border>
</Border> </Border>
@@ -133,7 +131,7 @@
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.04"/> <SolidColorBrush Color="#B388FF" Opacity="0.04" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -142,12 +140,12 @@
<Trigger Property="IsPressed" Value="True"> <Trigger Property="IsPressed" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.12"/> <SolidColorBrush Color="#B388FF" Opacity="0.12" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter TargetName="BackgroundOverlay" Property="BorderBrush"> <Setter TargetName="BackgroundOverlay" Property="BorderBrush">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity=".87"/> <SolidColorBrush Color="#B388FF" Opacity=".87" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -160,15 +158,15 @@
<ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0"> <Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
<Border.Effect> <Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/> <DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
</Border.Effect> </Border.Effect>
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}"> <Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
<Border.BorderBrush> <Border.BorderBrush>
<SolidColorBrush Color="White" Opacity="0.12"/> <SolidColorBrush Color="White" Opacity="0.12" />
</Border.BorderBrush> </Border.BorderBrush>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Image Source="../Assets/Images/GitHubLight.png" Margin="5"/> <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"/> <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> </StackPanel>
</Border> </Border>
</Border> </Border>
@@ -176,7 +174,7 @@
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.04"/> <SolidColorBrush Color="#B388FF" Opacity="0.04" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -185,12 +183,12 @@
<Trigger Property="IsPressed" Value="True"> <Trigger Property="IsPressed" Value="True">
<Setter TargetName="BackgroundOverlay" Property="Background"> <Setter TargetName="BackgroundOverlay" Property="Background">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity="0.12"/> <SolidColorBrush Color="#B388FF" Opacity="0.12" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
<Setter TargetName="BackgroundOverlay" Property="BorderBrush"> <Setter TargetName="BackgroundOverlay" Property="BorderBrush">
<Setter.Value> <Setter.Value>
<SolidColorBrush Color="#B388FF" Opacity=".87"/> <SolidColorBrush Color="#B388FF" Opacity=".87" />
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Trigger> </Trigger>
@@ -201,7 +199,7 @@
</Grid> </Grid>
<!--UserControl Container for the Dashboard pages--> <!--UserControl Container for the Dashboard pages-->
<UserControl Grid.Row="3"> <UserControl Grid.Row="3">
<views:MainDashboardPage/> <views:MainDashboardPage />
</UserControl> </UserControl>
</Grid> </Grid>
</Window> </Window>

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B46BE3BAB1BA752DF3E2239D67C2C6B44ED2A3" #pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "086FBA685C865D0623D9F28DA3FE76C1340ED6A4"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "74B46BE3BAB1BA752DF3E2239D67C2C6B44ED2A3" #pragma checksum "..\..\..\..\..\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "086FBA685C865D0623D9F28DA3FE76C1340ED6A4"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F8123F9E313CFC197FD21BBF3619385A6FC8FC20" #pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B2F50F33E8CEEA6D3D19CD60460CE63C13BA1394"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F8123F9E313CFC197FD21BBF3619385A6FC8FC20" #pragma checksum "..\..\..\..\..\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "B2F50F33E8CEEA6D3D19CD60460CE63C13BA1394"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "77F7BA13CD156FFDEBCF337792520673841E87F9" #pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9D0BF0127FE86FBA349502EA25173E0D729D784A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "77F7BA13CD156FFDEBCF337792520673841E87F9" #pragma checksum "..\..\..\..\..\Controls\LoadingIndicator\LoadingIndicator.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9D0BF0127FE86FBA349502EA25173E0D729D784A"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F661893245295EF9F2D7244856AFBAC10C1B3CDD" #pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6F9DB4C5946CBF25B6E68335E790A78274B363A2"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F661893245295EF9F2D7244856AFBAC10C1B3CDD" #pragma checksum "..\..\..\..\..\Controls\ServerModules\ServerModule.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "6F9DB4C5946CBF25B6E68335E790A78274B363A2"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.

View File

@@ -1,2 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "506FBD9D5FE875E406F1D55625DC6B00926FECF9" #pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "03CDD8444CF24933F548E2C89543D6214B40416F"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 88 "..\..\..\LoginWindow.xaml" #line 89 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 108 "..\..\..\LoginWindow.xaml" #line 109 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox Password; internal System.Windows.Controls.PasswordBox Password;
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 113 "..\..\..\LoginWindow.xaml" #line 114 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock PasswordHint; internal System.Windows.Controls.TextBlock PasswordHint;

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "506FBD9D5FE875E406F1D55625DC6B00926FECF9" #pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "03CDD8444CF24933F548E2C89543D6214B40416F"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 88 "..\..\..\LoginWindow.xaml" #line 89 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 108 "..\..\..\LoginWindow.xaml" #line 109 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.PasswordBox Password; internal System.Windows.Controls.PasswordBox Password;
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
#line hidden #line hidden
#line 113 "..\..\..\LoginWindow.xaml" #line 114 "..\..\..\LoginWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBlock PasswordHint; internal System.Windows.Controls.TextBlock PasswordHint;

View File

@@ -1 +1 @@
5650ef8dc53926fe9999328f064c0571292b9a8c 8e07e5d31c9ebebb14b8f8bc5efe2ebfac9affc7

View File

@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
8-2121814096 8-2121814096
281915380331 28614409893
207-679868162 207-679868162
Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\LoadingIndicator\LoadingIndicator.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardWindow.xaml;Views\Dashboard\CRUD Popup\CreateModulePopup.xaml;Views\Pages\MainDashboardPage.xaml; Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\LoadingIndicator\LoadingIndicator.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardWindow.xaml;Views\Dashboard\CRUD Popup\CreateModulePopup.xaml;Views\Pages\MainDashboardPage.xaml;

View File

@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
8-2121814096 8-2121814096
30316053061 30-984917377
207-679868162 207-679868162
Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\LoadingIndicator\LoadingIndicator.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardWindow.xaml;Views\Dashboard\CRUD Popup\CreateModulePopup.xaml;Views\Pages\MainDashboardPage.xaml; Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;Controls\LoadingIndicator\LoadingIndicator.xaml;Controls\ServerModules\ServerModule.xaml;LoginWindow.xaml;Views\DashboardWindow.xaml;Views\Dashboard\CRUD Popup\CreateModulePopup.xaml;Views\Pages\MainDashboardPage.xaml;

View File

@@ -1,11 +1,8 @@
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\GeneratedInternalTypeHelper.g.i.cs
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\LoadingIndicator\LoadingIndicator.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\LoadingIndicator\LoadingIndicator.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\ServerModules\ServerModule.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\ServerModules\ServerModule.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\LoginWindow.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\DashboardWindow.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\DashboardWindow.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\Pages\MainDashboardPage.xaml;;

View File

@@ -1,4 +1,4 @@
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\obj\Debug\netcoreapp3.1\GeneratedInternalTypeHelper.g.cs
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;;
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;; FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;;

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DA61FA39EA7EAD147334D5DB2BC05F3B7D1BB38C" #pragma checksum "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9622FD4ED1908727106706E3ADC79DA4E6BAF4FC"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@@ -16,6 +16,7 @@ using Microsoft.Xaml.Behaviors.Layout;
using Microsoft.Xaml.Behaviors.Media; using Microsoft.Xaml.Behaviors.Media;
using Server_Dashboard; using Server_Dashboard;
using Server_Dashboard.Views.DashboardPages.ModuleCRUD; using Server_Dashboard.Views.DashboardPages.ModuleCRUD;
using SharpVectors.Converters;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Windows; using System.Windows;
@@ -48,7 +49,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 67 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 72 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ServerName; internal System.Windows.Controls.TextBox ServerName;
@@ -56,7 +57,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 88 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 93 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -64,7 +65,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 110 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 115 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox IPAdress; internal System.Windows.Controls.TextBox IPAdress;
@@ -72,7 +73,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 129 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 134 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox Port; internal System.Windows.Controls.TextBox Port;
@@ -100,6 +101,13 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
} }
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
return System.Delegate.CreateDelegate(delegateType, this, handler);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DA61FA39EA7EAD147334D5DB2BC05F3B7D1BB38C" #pragma checksum "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9622FD4ED1908727106706E3ADC79DA4E6BAF4FC"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
@@ -16,6 +16,7 @@ using Microsoft.Xaml.Behaviors.Layout;
using Microsoft.Xaml.Behaviors.Media; using Microsoft.Xaml.Behaviors.Media;
using Server_Dashboard; using Server_Dashboard;
using Server_Dashboard.Views.DashboardPages.ModuleCRUD; using Server_Dashboard.Views.DashboardPages.ModuleCRUD;
using SharpVectors.Converters;
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using System.Windows; using System.Windows;
@@ -48,7 +49,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector { public partial class CreateModulePopup : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 67 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 72 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox ServerName; internal System.Windows.Controls.TextBox ServerName;
@@ -56,7 +57,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 88 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 93 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox UserName; internal System.Windows.Controls.TextBox UserName;
@@ -64,7 +65,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 110 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 115 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox IPAdress; internal System.Windows.Controls.TextBox IPAdress;
@@ -72,7 +73,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
#line 129 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml" #line 134 "..\..\..\..\..\..\Views\Dashboard\CRUD Popup\CreateModulePopup.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox Port; internal System.Windows.Controls.TextBox Port;
@@ -100,6 +101,13 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
#line hidden #line hidden
} }
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal System.Delegate _CreateDelegate(System.Type delegateType, string handler) {
return System.Delegate.CreateDelegate(delegateType, this, handler);
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()] [System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34F9F280B2CC5ECBFCC6EA0C5845A4B16E3447E7" #pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A314D0E6AD6B6AD4D75AB6130829A86ACEBFF007"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 { public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 46 "..\..\..\..\Views\DashboardWindow.xaml" #line 44 "..\..\..\..\Views\DashboardWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid TopBarGrid; internal System.Windows.Controls.Grid TopBarGrid;

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34F9F280B2CC5ECBFCC6EA0C5845A4B16E3447E7" #pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A314D0E6AD6B6AD4D75AB6130829A86ACEBFF007"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // 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 { public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 46 "..\..\..\..\Views\DashboardWindow.xaml" #line 44 "..\..\..\..\Views\DashboardWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Grid TopBarGrid; internal System.Windows.Controls.Grid TopBarGrid;