Merge pull request #18 from Crylia/feature/modules
finish create module form
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Server Dashboard/Assets/Images/AddIcon.png
Normal file
BIN
Server Dashboard/Assets/Images/AddIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 626 B |
14
Server Dashboard/Assets/Images/AddIcon.svg
Normal file
14
Server Dashboard/Assets/Images/AddIcon.svg
Normal 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 |
BIN
Server Dashboard/Assets/Images/CodeMaid_v11.2.231.vsix
Normal file
BIN
Server Dashboard/Assets/Images/CodeMaid_v11.2.231.vsix
Normal file
Binary file not shown.
@@ -1,24 +1,24 @@
|
||||
<UserControl x:Class="Server_Dashboard.Controls.DoubleRoundProgressBar.DoubleRoundProgressBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar"
|
||||
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
|
||||
xmlns:root="clr-namespace:Server_Dashboard"
|
||||
mc:Ignorable="d"
|
||||
mc:Ignorable="d"
|
||||
x:Name="_this"
|
||||
d:DesignHeight="50" d:DesignWidth="50">
|
||||
<UserControl.Resources>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle"/>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle" />
|
||||
</UserControl.Resources>
|
||||
<!--Circular Prograss bar-->
|
||||
<Grid>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/>
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueRead}" Fill="{Binding ElementName=_this, Path=ReadIndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Seperator" Fill="Transparent" Margin="7" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1"/>
|
||||
<Ellipse x:Name="Seperator2" Fill="Transparent" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1"/>
|
||||
<ed:Arc Margin="8" ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueWrite}" Fill="{Binding ElementName=_this, Path=WriteIndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="16" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}"/>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}" />
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueRead}" Fill="{Binding ElementName=_this, Path=ReadIndicatorBrush}" Stretch="None" StartAngle="0" />
|
||||
<Ellipse x:Name="Seperator" Fill="Transparent" Margin="7" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1" />
|
||||
<Ellipse x:Name="Seperator2" Fill="Transparent" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" Panel.ZIndex="1" />
|
||||
<ed:Arc Margin="8" ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=ValueWrite}" Fill="{Binding ElementName=_this, Path=WriteIndicatorBrush}" Stretch="None" StartAngle="0" />
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="16" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,6 +13,7 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
/// <summary>
|
||||
/// DependencyProperties
|
||||
/// </summary>
|
||||
@@ -20,6 +21,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the ReadIndicatorBrush
|
||||
public static DependencyProperty ReadIndicatorBrushProperty = DependencyProperty.Register("ReadIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public Brush ReadIndicatorBrush {
|
||||
get { return (Brush)GetValue(ReadIndicatorBrushProperty); }
|
||||
set { SetValue(ReadIndicatorBrushProperty, value); }
|
||||
@@ -27,6 +29,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the WriteIndicatorBrush
|
||||
public static DependencyProperty WriteIndicatorBrushProperty = DependencyProperty.Register("WriteIndicatorBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public Brush WriteIndicatorBrush {
|
||||
get { return (Brush)GetValue(WriteIndicatorBrushProperty); }
|
||||
set { SetValue(WriteIndicatorBrushProperty, value); }
|
||||
@@ -34,6 +37,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the BackgroundBrush
|
||||
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public Brush BackgroundBrush {
|
||||
get { return (Brush)GetValue(BackgroundBrushProperty); }
|
||||
set { SetValue(BackgroundBrushProperty, value); }
|
||||
@@ -41,6 +45,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the ProgressBorderBrush
|
||||
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public Brush ProgressBorderBrush {
|
||||
get { return (Brush)GetValue(ProgressBorderBrushProperty); }
|
||||
set { SetValue(ProgressBorderBrushProperty, value); }
|
||||
@@ -48,6 +53,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the Value Write
|
||||
public static DependencyProperty ValueWriteProperty = DependencyProperty.Register("ValueWrite", typeof(int), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public int ValueWrite {
|
||||
get { return (int)GetValue(ValueWriteProperty); }
|
||||
set { SetValue(ValueWriteProperty, value); }
|
||||
@@ -55,6 +61,7 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
|
||||
//Property for the Value Read
|
||||
public static DependencyProperty ValueReadProperty = DependencyProperty.Register("ValueRead", typeof(int), typeof(DoubleRoundProgressBar));
|
||||
|
||||
public int ValueRead {
|
||||
get { return (int)GetValue(ValueReadProperty); }
|
||||
set { SetValue(ValueReadProperty, value); }
|
||||
@@ -64,4 +71,4 @@ namespace Server_Dashboard.Controls.DoubleRoundProgressBar {
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
<UserControl x:Class="Server_Dashboard.Controls.HalfRoundProgressBar.HalfRoundProgressBar"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
|
||||
xmlns:root="clr-namespace:Server_Dashboard"
|
||||
mc:Ignorable="d" x:Name="_this" d:DesignHeight="50" d:DesignWidth="50">
|
||||
<UserControl.Resources>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle"/>
|
||||
<root:ValueToAngleConverter x:Key="valueToAngle" />
|
||||
</UserControl.Resources>
|
||||
<!--Progress bar but just half round-->
|
||||
<Grid>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}"/>
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=Value}" Fill="{Binding ElementName=_this, Path=IndicatorBrush}" Stretch="None" StartAngle="0"/>
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}"/>
|
||||
<Ellipse x:Name="Background" Fill="{Binding ElementName=_this, Path=BackgroundBrush}" Margin="0" Stroke="{Binding ElementName=_this, Path=BackgroundBrush}" />
|
||||
<ed:Arc ArcThickness="8" ArcThicknessUnit="Pixel" EndAngle="{Binding Converter={StaticResource valueToAngle}, ElementName=_this, Path=Value}" Fill="{Binding ElementName=_this, Path=IndicatorBrush}" Stretch="None" StartAngle="0" />
|
||||
<Ellipse x:Name="Border" Fill="{Binding ElementName=_this, Path=ProgressBorderBrush}" Margin="8" Stroke="{Binding ElementName=_this, Path=ProgressBorderBrush}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -13,13 +13,15 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
/// <summary>
|
||||
/// Dependency Properties
|
||||
/// </summary>
|
||||
public partial class HalfRoundProgressBar : UserControl {
|
||||
|
||||
|
||||
//Indicator Brush Property
|
||||
public static DependencyProperty IndicatorBrushProperty = DependencyProperty.Register("IndicatorBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush IndicatorBrush {
|
||||
get { return (Brush)GetValue(IndicatorBrushProperty); }
|
||||
set { SetValue(IndicatorBrushProperty, value); }
|
||||
@@ -27,6 +29,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//Background Brush Property
|
||||
public static DependencyProperty BackgroundBrushProperty = DependencyProperty.Register("BackgroundBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush BackgroundBrush {
|
||||
get { return (Brush)GetValue(BackgroundBrushProperty); }
|
||||
set { SetValue(BackgroundBrushProperty, value); }
|
||||
@@ -34,6 +37,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//ProgressBorder Property
|
||||
public static DependencyProperty ProgressBorderBrushProperty = DependencyProperty.Register("ProgressBorderBrush", typeof(Brush), typeof(HalfRoundProgressBar));
|
||||
|
||||
public Brush ProgressBorderBrush {
|
||||
get { return (Brush)GetValue(ProgressBorderBrushProperty); }
|
||||
set { SetValue(ProgressBorderBrushProperty, value); }
|
||||
@@ -41,6 +45,7 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
|
||||
//Value
|
||||
public static DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(int), typeof(HalfRoundProgressBar));
|
||||
|
||||
public int Value {
|
||||
get { return (int)GetValue(ValueProperty); }
|
||||
set { SetValue(ValueProperty, value); }
|
||||
@@ -50,4 +55,4 @@ namespace Server_Dashboard.Controls.HalfRoundProgressBar {
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,45 +2,45 @@
|
||||
x:Name="control"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls"
|
||||
mc:Ignorable="d">
|
||||
<!--The Loading indicator circle-->
|
||||
<Grid DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||
<Path Stroke="Transparent" StrokeThickness=".5" RenderTransformOrigin=".5,.5" Width="60" Height="60">
|
||||
<Path.Effect>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Opacity="1" Color="#B388FF"/>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0" Opacity="1" Color="#B388FF" />
|
||||
</Path.Effect>
|
||||
<Path.Data>
|
||||
<CombinedGeometry GeometryCombineMode="Xor">
|
||||
<CombinedGeometry.Geometry1>
|
||||
<EllipseGeometry RadiusX="30" RadiusY="30" Center="30,30"/>
|
||||
<EllipseGeometry RadiusX="30" RadiusY="30" Center="30,30" />
|
||||
</CombinedGeometry.Geometry1>
|
||||
<CombinedGeometry.Geometry2>
|
||||
<EllipseGeometry RadiusX="24" RadiusY="24" Center="30,30"/>
|
||||
<EllipseGeometry RadiusX="24" RadiusY="24" Center="30,30" />
|
||||
</CombinedGeometry.Geometry2>
|
||||
</CombinedGeometry>
|
||||
</Path.Data>
|
||||
<Path.Fill>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
|
||||
<GradientStop Color="#B388FF" Offset="0"/>
|
||||
<GradientStop Color="#A7FFEB" Offset="1"/>
|
||||
<GradientStop Color="#B388FF" Offset="0" />
|
||||
<GradientStop Color="#A7FFEB" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Path.Fill>
|
||||
<Path.RenderTransform>
|
||||
<RotateTransform/>
|
||||
<RotateTransform />
|
||||
<!--This is necessary for the animation not to stop-->
|
||||
</Path.RenderTransform>
|
||||
<Path.Triggers>
|
||||
<EventTrigger RoutedEvent="Loaded">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)" To="360" Duration="0:0:.8" RepeatBehavior="Forever"/>
|
||||
<DoubleAnimation Storyboard.TargetProperty="(Rectangle.RenderTransform).(RotateTransform.Angle)" To="360" Duration="0:0:.8" RepeatBehavior="Forever" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</Path.Triggers>
|
||||
</Path>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -12,12 +12,14 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls {
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for LoadingIndicator.xaml
|
||||
/// </summary>
|
||||
public partial class LoadingIndicator : UserControl {
|
||||
|
||||
public LoadingIndicator() {
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,45 @@
|
||||
<UserControl x:Class="Server_Dashboard.Controls.ServerModules.ServerModule"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.ServerModules"
|
||||
xmlns:halfroundprogressbar="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Controls.ServerModules"
|
||||
xmlns:halfroundprogressbar="clr-namespace:Server_Dashboard.Controls.HalfRoundProgressBar"
|
||||
xmlns:doubleroundprogressbar="clr-namespace:Server_Dashboard.Controls.DoubleRoundProgressBar" mc:Ignorable="d">
|
||||
<!--Module-->
|
||||
<Border Background="{StaticResource BackgroundSurface_02dp}" MinHeight="100" MinWidth="300" Width="Auto" Height="Auto" Margin="10" CornerRadius="5">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0"/>
|
||||
<DropShadowEffect BlurRadius="5" ShadowDepth="0" />
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="40" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--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.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<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}"/>
|
||||
<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 ModuleName}" />
|
||||
<Border CornerRadius="0 5 0 0" Background="{Binding StatusIndicator}" Grid.Column="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Margin="7 0 30 0" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" FontSize="24" Text="Status">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.87" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<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>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -48,86 +48,86 @@
|
||||
<!--Main Content-->
|
||||
<Grid Grid.Row="2" Margin="20" Width="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--Information pannel, left-->
|
||||
<Grid Grid.Row="1" Margin="0 0 25 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Text="Servername" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="User" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="Public IP" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="Private IP" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="Uptime" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="Creation Date" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="Creator" FontSize="16" Margin="2 2 5 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Text="{Binding ServerInfo.ServerName}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding ServerInfo.OSUserName}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding ServerInfo.PublicIpAdress}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding ServerInfo.PrivateIpAdress}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding ServerInfo.Uptime}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding CreationDate}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock Text="{Binding Creator}" FontSize="16" Margin="5 2 2 10">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.60"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.60" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
@@ -135,37 +135,37 @@
|
||||
<!--Graphical Indicators Right-->
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.CpuUsage}" IndicatorBrush="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="0" Text="CPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"/>
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.GpuUsage}" IndicatorBrush="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="1" Text="GPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18"/>
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.CpuUsage}" IndicatorBrush="{StaticResource Teal_A100}" />
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="0" Text="CPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" />
|
||||
<halfroundprogressbar:HalfRoundProgressBar Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" Value="{Binding ServerInfo.GpuUsage}" IndicatorBrush="{StaticResource Teal_A100}" />
|
||||
<TextBlock Foreground="{StaticResource Teal_A100}" Grid.Row="1" Text="GPU" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100"/>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="0" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" />
|
||||
<StackPanel Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Read" Foreground="{StaticResource DeepPurple_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Write" Foreground="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Read" Foreground="{StaticResource DeepPurple_A100}" />
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="Write" Foreground="{StaticResource Teal_A100}" />
|
||||
</StackPanel>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100"/>
|
||||
<doubleroundprogressbar:DoubleRoundProgressBar ValueRead="70" ValueWrite="60" ReadIndicatorBrush="{StaticResource DeepPurple_A100}" WriteIndicatorBrush="{StaticResource Teal_A100}" Margin="5" Grid.Row="1" ProgressBorderBrush="{StaticResource BackgroundSurface_02dp}" BackgroundBrush="{StaticResource BackgroundSurface_08dp}" Height="100" Width="100" />
|
||||
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="UP" Foreground="{StaticResource DeepPurple_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="DOWN" Foreground="{StaticResource Teal_A100}"/>
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="UP" Foreground="{StaticResource DeepPurple_A100}" />
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" TextAlignment="Center" Text="DOWN" Foreground="{StaticResource Teal_A100}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
</UserControl>
|
||||
@@ -12,12 +12,14 @@ using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Controls.ServerModules {
|
||||
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ServerModule.xaml
|
||||
/// </summary>
|
||||
public partial class ServerModule : UserControl {
|
||||
|
||||
public ServerModule() {
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// Dashboard Module class that holds all the information that gets displayed
|
||||
/// </summary>
|
||||
class DashboardModule {
|
||||
internal class DashboardModule {
|
||||
|
||||
//The name the user gives the module
|
||||
public string ModuleName { get; set; }
|
||||
|
||||
//The user who created it
|
||||
public string Creator { get; set; }
|
||||
|
||||
//All the information that the server had
|
||||
public ServerInformation ServerInfo { get; set; }
|
||||
|
||||
//The status indicator
|
||||
public string StatusIndicator { get; set; }
|
||||
|
||||
//The background color of the status indicator
|
||||
public string StatusIndicatorBG { get; set; }
|
||||
|
||||
//If the server is avaibale or not
|
||||
public bool ServerAvailable { get; set; }
|
||||
|
||||
//The Module icon the user give the server, defaults to a generic server symbol
|
||||
public string ModuleIcon { get; set; }
|
||||
public BitmapImage ModuleIcon { get; set; }
|
||||
|
||||
//Creation date with System.DateTime.Now
|
||||
public string CreationDate { get; set; }
|
||||
|
||||
@@ -34,4 +44,4 @@ namespace Server_Dashboard {
|
||||
StatusIndicatorBG = ServerAvailable ? "#94eeb0" : "#ef9a9a";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -4,30 +4,41 @@ using System.Collections.ObjectModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// Server information class, this will probably scale pretty big later on
|
||||
/// This will hold all the information the socket will gather
|
||||
/// </summary>
|
||||
class ServerInformation {
|
||||
internal class ServerInformation {
|
||||
|
||||
//The ServerName
|
||||
public string ServerName { get; set; }
|
||||
|
||||
//The unix or windows username
|
||||
public string OSUserName { get; set; }
|
||||
|
||||
//Cpu Temp in C
|
||||
public string CpuTemp { get; set; }
|
||||
|
||||
//Gpu Temp in C
|
||||
public string GpuTemp { get; set; }
|
||||
|
||||
//Server uptime
|
||||
public string Uptime { get; set; }
|
||||
|
||||
//When the server was first deployed
|
||||
public string DeployDate { get; set; }
|
||||
|
||||
//Public IPv4 Adress
|
||||
public string PublicIpAdress { get; set; }
|
||||
|
||||
//Private IP adress from the servers network
|
||||
public string PrivateIpAdress { get; set; }
|
||||
|
||||
//GPU usage in %
|
||||
public string GpuUsage { get; set; }
|
||||
|
||||
//CPU usage in %
|
||||
public string CpuUsage { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,13 +5,17 @@ using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Reflection;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// Database class to access the database
|
||||
/// </summary>
|
||||
public static class DatabaseHandler {
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Checks the user credentials
|
||||
/// </summary>
|
||||
@@ -20,34 +24,119 @@ namespace Server_Dashboard {
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int CheckLogin(string uname, string passwd) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@uname", uname);
|
||||
com.Parameters.AddWithValue("@passwd", passwd);
|
||||
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@Valid"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC ValidateUserLogin @Username = @uname, @Password = @passwd, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using SqlCommand com = new SqlCommand(query, con);//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@uname", uname);
|
||||
com.Parameters.AddWithValue("@passwd", passwd);
|
||||
com.Parameters.Add("@valid", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute 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 (Convert.ToInt32(com.Parameters["@Valid"].Value) == 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();
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
/// Currently obscolete, would check the Username and Cookie
|
||||
/// </summary>
|
||||
@@ -56,64 +145,79 @@ namespace Server_Dashboard {
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int CheckCookie(string cookie, string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@valid", SqlDbType.Bit);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@Valid"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC CheckUserCookie @Cookie = @cookie, @UserName = @username, @Valid = @valid OUTPUT";
|
||||
//Creates a new command
|
||||
using SqlCommand com = new SqlCommand(query, con);
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@valid", SqlDbType.Bit);
|
||||
com.Parameters["@valid"].Direction = ParameterDirection.Output;
|
||||
//Execute 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 ((int)com.Parameters["@Valid"].Value == 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>
|
||||
/// Deletes a the cookie from the given user
|
||||
/// </summary>
|
||||
/// <param name="username">User who doesnt deserve any delicious cookies :3</param>
|
||||
public static void DeleteCookie(string username) {
|
||||
public static int DeleteCookie(string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC DeleteUserCookie @Username = @username, @ResponseMessage = @response OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
}
|
||||
//Catch any error, dont return them, why would you?
|
||||
} catch {
|
||||
} finally {
|
||||
//Always close the connection
|
||||
con.Close();
|
||||
using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC DeleteUserCookie @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
|
||||
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>
|
||||
/// Adds a new Cookie to a user
|
||||
/// </summary>
|
||||
@@ -122,34 +226,39 @@ namespace Server_Dashboard {
|
||||
/// <returns>[0] is false, [1] is true, [2] connection error</returns>
|
||||
public static int AddCookie(string cookie, string username) {
|
||||
//Creates the database connection
|
||||
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString)) {
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username, @ResponseMessage = @response OUTPUT";
|
||||
//Creates a new command
|
||||
using (SqlCommand com = new SqlCommand(query, con)) {
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
com.Parameters.Add("@response", SqlDbType.NVarChar, 250);
|
||||
com.Parameters["@response"].Direction = ParameterDirection.Output;
|
||||
//Execute without a return value
|
||||
com.ExecuteNonQuery();
|
||||
//The Return value from the SQL Stored Procedure will have the answer to life
|
||||
return Convert.ToInt32(com.Parameters["@ResponseMessage"].Value);
|
||||
}
|
||||
//Catch any error
|
||||
} catch (SqlException ex) {
|
||||
return ex.Number;
|
||||
} finally {
|
||||
//Always close connection
|
||||
con.Close();
|
||||
using SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ServerDashboardDB"].ConnectionString);
|
||||
try {
|
||||
//Open the connection
|
||||
con.Open();
|
||||
//SQL Query
|
||||
string query = "EXEC AddCookieToUser @Cookie = @cookie, @UserName = @username";
|
||||
//Creates a new command
|
||||
using SqlCommand com = new SqlCommand(query, con);
|
||||
//For security reasons the values are added with this function
|
||||
//this will avoid SQL Injections
|
||||
com.Parameters.AddWithValue("@cookie", cookie);
|
||||
com.Parameters.AddWithValue("@username", username);
|
||||
//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();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,11 +31,6 @@
|
||||
<RowDefinition Height="80"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</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-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.Effect>
|
||||
@@ -45,8 +40,14 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0"/>
|
||||
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕">
|
||||
<TextBlock Grid.Column="0" Text="Login" 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">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Server_Dashboard {
|
||||
/// Base View Model all the other view models inherit from
|
||||
/// Makes me write the INotifyPropertyChanged only once
|
||||
/// </summary>
|
||||
class BaseViewModel : INotifyPropertyChanged {
|
||||
public class BaseViewModel : INotifyPropertyChanged {
|
||||
public event PropertyChangedEventHandler PropertyChanged = (sender, e) => { };
|
||||
|
||||
protected void OnPropertyChanged(string prop) {
|
||||
|
||||
@@ -1,24 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// View Model for the modules
|
||||
/// </summary>
|
||||
class DashboardModuleViewModel : BaseViewModel {
|
||||
internal class DashboardModuleViewModel : BaseViewModel {
|
||||
|
||||
//List with all Modules inside
|
||||
public ObservableCollection<DashboardModule> Modules { get; set; }
|
||||
|
||||
//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>();
|
||||
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) {
|
||||
ModuleName = "TestModule",
|
||||
Creator = "Username",
|
||||
ModuleIcon = "../../Assets/Images/PlaceHolderModuleLight.png",
|
||||
ModuleName = (string)row[4],
|
||||
Creator = (string)row[1],
|
||||
ModuleIcon = moduleIcon,
|
||||
CreationDate = DateTime.Now.ToString(),
|
||||
ServerInfo = new ServerInformation() {
|
||||
GpuUsage = "20",
|
||||
@@ -27,7 +47,7 @@ namespace Server_Dashboard {
|
||||
DeployDate = DateTime.Now.ToString(),
|
||||
GpuTemp = "69.69",
|
||||
ServerName = "Ubuntu",
|
||||
OSUserName = "crylia " + i,
|
||||
OSUserName = "crylia ",
|
||||
PrivateIpAdress = "192.168.1.1",
|
||||
PublicIpAdress = "85.69.102.58",
|
||||
Uptime = DateTime.Now.ToString()
|
||||
@@ -36,4 +56,4 @@ namespace Server_Dashboard {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,64 +5,30 @@ using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Server_Dashboard_Socket;
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// View Model for the Dashboard
|
||||
/// </summary>
|
||||
class DashboardViewModel : BaseViewModel {
|
||||
internal class DashboardViewModel : BaseViewModel {
|
||||
|
||||
#region Private Values
|
||||
private readonly DashboardModuleViewModel dmvm = new DashboardModuleViewModel();
|
||||
#endregion
|
||||
|
||||
private readonly DashboardModuleViewModel dmvm;
|
||||
|
||||
#endregion Private Values
|
||||
|
||||
#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
|
||||
private string userName = "Username";
|
||||
private string userName;
|
||||
|
||||
public string UserName {
|
||||
get { return userName; }
|
||||
set {
|
||||
if(userName != value)
|
||||
set {
|
||||
if (userName != value)
|
||||
userName = value;
|
||||
OnPropertyChanged(nameof(userName));
|
||||
}
|
||||
@@ -70,37 +36,43 @@ namespace Server_Dashboard {
|
||||
|
||||
//List that contains every Module
|
||||
private ObservableCollection<DashboardModule> modules;
|
||||
|
||||
public ObservableCollection<DashboardModule> Modules {
|
||||
get { return modules; }
|
||||
set {
|
||||
if(value != modules)
|
||||
if (value != modules)
|
||||
modules = value;
|
||||
OnPropertyChanged(nameof(modules));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Constructor
|
||||
public DashboardViewModel() {
|
||||
//Creates a new echo server, remove b4 release
|
||||
EchoServer echoServer = new EchoServer();
|
||||
echoServer.Start();
|
||||
|
||||
public DashboardViewModel(string username) {
|
||||
UserName = username;
|
||||
//Command inits
|
||||
OpenLinkCommand = new RelayCommand(OpenLink);
|
||||
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
|
||||
Modules = dmvm.Modules;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
#region ICommands
|
||||
|
||||
public ICommand OpenLinkCommand { get; set; }
|
||||
public ICommand OpenNewModuleWindowCommand { get; set; }
|
||||
public ICommand CreateModuleCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
#endregion ICommands
|
||||
|
||||
#region Commands
|
||||
|
||||
/// <summary>
|
||||
/// Opens a given link in the default browser
|
||||
/// </summary>
|
||||
@@ -108,7 +80,7 @@ namespace Server_Dashboard {
|
||||
private void OpenLink(object param) {
|
||||
Process.Start(new ProcessStartInfo((string)param) { UseShellExecute = true });
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new window to create a new Module
|
||||
/// </summary>
|
||||
@@ -116,25 +88,14 @@ namespace Server_Dashboard {
|
||||
private void OpenNewModuleWindow(object param) {
|
||||
//Creates a new CreateModulePopup and sets this view model as datacontext
|
||||
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(???)
|
||||
cmp.WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
cmp.ShowDialog();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// No function yes
|
||||
/// </summary>
|
||||
/// <param name="param">Nothing</param>
|
||||
private void CreateModule(object param) {
|
||||
if (!String.IsNullOrWhiteSpace(IPAdress)) {
|
||||
|
||||
} else {
|
||||
//error
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#endregion Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,13 +6,17 @@ using System.Threading.Tasks;
|
||||
using Server_Dashboard_Socket;
|
||||
|
||||
namespace Server_Dashboard {
|
||||
|
||||
/// <summary>
|
||||
/// View Model for the Login Window
|
||||
/// </summary>
|
||||
class LoginViewModel : BaseViewModel, IWindowHelper {
|
||||
internal class LoginViewModel : BaseViewModel, IWindowHelper {
|
||||
|
||||
#region Properties
|
||||
|
||||
//Username Property
|
||||
private string username;
|
||||
|
||||
public string Username {
|
||||
get { return username; }
|
||||
set {
|
||||
@@ -21,8 +25,10 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(username));
|
||||
}
|
||||
}
|
||||
|
||||
//Error Text displays an error to help the user to fill the form
|
||||
private string errorText;
|
||||
|
||||
public string ErrorText {
|
||||
get { return errorText; }
|
||||
set {
|
||||
@@ -31,18 +37,22 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(errorText));
|
||||
}
|
||||
}
|
||||
|
||||
//Remember me button
|
||||
private bool rememberUser;
|
||||
|
||||
public bool RememberUser {
|
||||
get { return rememberUser; }
|
||||
set {
|
||||
if(value != rememberUser)
|
||||
if (value != rememberUser)
|
||||
rememberUser = value;
|
||||
OnPropertyChanged(nameof(rememberUser));
|
||||
}
|
||||
}
|
||||
|
||||
//Loading circle, gets hidden and shown when logging in
|
||||
private string loading;
|
||||
|
||||
public string Loading {
|
||||
get { return loading; }
|
||||
set {
|
||||
@@ -51,16 +61,20 @@ namespace Server_Dashboard {
|
||||
OnPropertyChanged(nameof(loading));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion Properties
|
||||
|
||||
#region Public Values
|
||||
|
||||
//Close action for the Window to close properly
|
||||
public Action Close { get ; set; }
|
||||
#endregion
|
||||
public Action Close { get; set; }
|
||||
|
||||
#endregion Public Values
|
||||
|
||||
#region Constructor
|
||||
|
||||
public LoginViewModel() {
|
||||
SocketClient sc = new SocketClient();
|
||||
//SocketClient sc = new SocketClient();
|
||||
//Loading circle is hidden on startup
|
||||
Loading = "Hidden";
|
||||
//Command inits
|
||||
@@ -74,13 +88,17 @@ namespace Server_Dashboard {
|
||||
//TODO: Autologin
|
||||
//AutoLoginAsync();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
#region ICommands
|
||||
|
||||
public ICommand LoginCommand { get; set; }
|
||||
#endregion
|
||||
|
||||
#endregion ICommands
|
||||
|
||||
#region Commands
|
||||
|
||||
/// <summary>
|
||||
/// Async login
|
||||
/// </summary>
|
||||
@@ -105,6 +123,7 @@ namespace Server_Dashboard {
|
||||
//Sets the error text and exits function
|
||||
ErrorText = "Username or password is wrong.";
|
||||
return;
|
||||
|
||||
case 1:
|
||||
/*No idea why this is here, gonna let it be till the remember me and autologin is 100% done
|
||||
if (RememberUser && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
@@ -133,22 +152,26 @@ namespace Server_Dashboard {
|
||||
DatabaseHandler.AddCookie(Username, cookie);
|
||||
}
|
||||
//Creates a new Dashboard window and shows it
|
||||
DashboardWindow window = new DashboardWindow();
|
||||
DashboardWindow window = new DashboardWindow() {
|
||||
DataContext = new DashboardViewModel(Username)
|
||||
};
|
||||
window.Show();
|
||||
//When closed, close it correctly
|
||||
//Close window when dashboard is shown
|
||||
Close?.Invoke();
|
||||
return;
|
||||
|
||||
case 2:
|
||||
//Sets the error text
|
||||
ErrorText = "Server unreachable, connection timeout.";
|
||||
return;
|
||||
|
||||
default:
|
||||
//Sets the error text
|
||||
ErrorText = "An unknown error has occured";
|
||||
return;
|
||||
}
|
||||
//If the Username and password is blank
|
||||
//All these IF's could be one but i made multiple for the different errors so the user knows whats wrong
|
||||
//If the Username and password is blank
|
||||
//All these IF's could be one but i made multiple for the different errors so the user knows whats wrong
|
||||
} else if (String.IsNullOrWhiteSpace(Username) && String.IsNullOrWhiteSpace((parameter as IHavePassword).SecurePassword.Unsecure())) {
|
||||
//Sets the error text
|
||||
ErrorText = "Please provide a username and password";
|
||||
@@ -169,9 +192,11 @@ namespace Server_Dashboard {
|
||||
//If there is no error, clear the error text
|
||||
ErrorText = "";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion Commands
|
||||
|
||||
#region private functions
|
||||
|
||||
//TODO: Add autologin function that locks the UI untill the user hits the abort button or the login completes
|
||||
/*private async void AutoLoginAsync() {
|
||||
if (Settings.Default.RememberMe && !String.IsNullOrEmpty(Settings.Default.Username) && !String.IsNullOrEmpty(Settings.Default.Cookies)) {
|
||||
@@ -186,6 +211,7 @@ namespace Server_Dashboard {
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#endregion
|
||||
|
||||
#endregion private functions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,10 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
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}"
|
||||
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 CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
@@ -22,16 +23,17 @@
|
||||
</Grid.RowDefinitions>
|
||||
<!--Title Bar-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center"/>
|
||||
<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">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
@@ -40,6 +42,7 @@
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
<!--Main Content-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
@@ -50,6 +53,8 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Server Name-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
|
||||
@@ -134,8 +139,59 @@
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</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-->
|
||||
<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>
|
||||
</Border>
|
||||
|
||||
@@ -6,38 +6,36 @@
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Views"
|
||||
xmlns:root="clr-namespace:Server_Dashboard"
|
||||
xmlns:views="clr-namespace:Server_Dashboard.Views.DashboardPages"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
|
||||
Height="1000" Width="Auto" WindowStyle="None" Background="Transparent" ResizeMode="CanResize" mc:Ignorable="d" d:Height="1000" d:Width="1900">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0"/>
|
||||
<WindowChrome CaptionHeight="0" />
|
||||
</WindowChrome.WindowChrome>
|
||||
<Window.DataContext>
|
||||
<root:DashboardViewModel/>
|
||||
</Window.DataContext>
|
||||
<!--Dashboard Window and Container for the Dashboards-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_00dp}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="50" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--Window Title-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_06dp}" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="40" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Label Grid.Column="0"/>
|
||||
<Label Grid.Column="0">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseLeftButtonDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Label>
|
||||
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
@@ -45,20 +43,20 @@
|
||||
<!--Settings, Docs, User, links etc-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" x:Name="TopBarGrid">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="270" BlurRadius="5"/>
|
||||
<DropShadowEffect Direction="270" BlurRadius="5" />
|
||||
</Grid.Effect>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" >
|
||||
<Button Grid.Column="0">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" >
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Settings.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="2" Background="Transparent" BorderBrush="Transparent" BorderThickness="0">
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Settings.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
@@ -74,15 +72,15 @@
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
|
||||
</Border.Effect>
|
||||
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.12" />
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<svgc:SvgViewbox Source="../Assets/Images/User.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
<svgc:SvgViewbox Source="../Assets/Images/User.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87" />
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -90,7 +88,7 @@
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -99,12 +97,12 @@
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter TargetName="BackgroundOverlay" Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -117,15 +115,15 @@
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
|
||||
</Border.Effect>
|
||||
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.12" />
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Docs.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
<svgc:SvgViewbox Source="../Assets/Images/Docs.svg" Margin="5" IsHitTestVisible="False" Opacity="0.87" />
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -133,7 +131,7 @@
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -142,12 +140,12 @@
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter TargetName="BackgroundOverlay" Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -160,15 +158,15 @@
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
|
||||
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
|
||||
</Border.Effect>
|
||||
<Border x:Name="BackgroundOverlay" CornerRadius="4" Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="White" Opacity="0.12" />
|
||||
</Border.BorderBrush>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="../Assets/Images/GitHubLight.png" Margin="5"/>
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0"/>
|
||||
<Image Source="../Assets/Images/GitHubLight.png" Margin="5" />
|
||||
<TextBlock FontSize="{TemplateBinding FontSize}" TextAlignment="Center" Padding="0" TextWrapping="Wrap" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5 0 10 0" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Border>
|
||||
@@ -176,7 +174,7 @@
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.04" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -185,12 +183,12 @@
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="BackgroundOverlay" Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity="0.12" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter TargetName="BackgroundOverlay" Property="BorderBrush">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87"/>
|
||||
<SolidColorBrush Color="#B388FF" Opacity=".87" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
@@ -201,7 +199,7 @@
|
||||
</Grid>
|
||||
<!--UserControl Container for the Dashboard pages-->
|
||||
<UserControl Grid.Row="3">
|
||||
<views:MainDashboardPage/>
|
||||
<views:MainDashboardPage />
|
||||
</UserControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
</Window>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
Binary file not shown.
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 88 "..\..\..\LoginWindow.xaml"
|
||||
#line 89 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 108 "..\..\..\LoginWindow.xaml"
|
||||
#line 109 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 113 "..\..\..\LoginWindow.xaml"
|
||||
#line 114 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "506FBD9D5FE875E406F1D55625DC6B00926FECF9"
|
||||
#pragma checksum "..\..\..\LoginWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "03CDD8444CF24933F548E2C89543D6214B40416F"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -56,7 +56,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 88 "..\..\..\LoginWindow.xaml"
|
||||
#line 89 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 108 "..\..\..\LoginWindow.xaml"
|
||||
#line 109 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.PasswordBox Password;
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace Server_Dashboard {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 113 "..\..\..\LoginWindow.xaml"
|
||||
#line 114 "..\..\..\LoginWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBlock PasswordHint;
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
5650ef8dc53926fe9999328f064c0571292b9a8c
|
||||
8e07e5d31c9ebebb14b8f8bc5efe2ebfac9affc7
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
|
||||
8-2121814096
|
||||
|
||||
281915380331
|
||||
28614409893
|
||||
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;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ TRACE;DEBUG;NETCOREAPP;NETCOREAPP3_1;
|
||||
C:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\App.xaml
|
||||
8-2121814096
|
||||
|
||||
30316053061
|
||||
30-984917377
|
||||
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;
|
||||
|
||||
|
||||
@@ -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\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\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\Dashboard\CRUD Popup\CreateModulePopup.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Views\Pages\MainDashboardPage.xaml;;
|
||||
|
||||
|
||||
@@ -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\Controls\DoubleRoundProgressBar\DoubleRoundProgressBar.xaml;;
|
||||
FC:\Users\Crylia\Documents\Git\Server Dashboard\Server Dashboard\Controls\HalfRoundProgressBar\HalfRoundProgressBar.xaml;;
|
||||
|
||||
Binary file not shown.
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
@@ -16,6 +16,7 @@ using Microsoft.Xaml.Behaviors.Layout;
|
||||
using Microsoft.Xaml.Behaviors.Media;
|
||||
using Server_Dashboard;
|
||||
using Server_Dashboard.Views.DashboardPages.ModuleCRUD;
|
||||
using SharpVectors.Converters;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
@@ -48,7 +49,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
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")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +57,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +65,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -72,7 +73,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
@@ -100,6 +101,13 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
|
||||
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
@@ -16,6 +16,7 @@ using Microsoft.Xaml.Behaviors.Layout;
|
||||
using Microsoft.Xaml.Behaviors.Media;
|
||||
using Server_Dashboard;
|
||||
using Server_Dashboard.Views.DashboardPages.ModuleCRUD;
|
||||
using SharpVectors.Converters;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
@@ -48,7 +49,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
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")]
|
||||
internal System.Windows.Controls.TextBox ServerName;
|
||||
|
||||
@@ -56,7 +57,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox UserName;
|
||||
|
||||
@@ -64,7 +65,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox IPAdress;
|
||||
|
||||
@@ -72,7 +73,7 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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")]
|
||||
internal System.Windows.Controls.TextBox Port;
|
||||
|
||||
@@ -100,6 +101,13 @@ namespace Server_Dashboard.Views.DashboardPages.ModuleCRUD {
|
||||
#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.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "5.0.4.0")]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
|
||||
Binary file not shown.
@@ -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>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,7 +50,7 @@ namespace Server_Dashboard.Views {
|
||||
public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 46 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
#line 44 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid TopBarGrid;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "34F9F280B2CC5ECBFCC6EA0C5845A4B16E3447E7"
|
||||
#pragma checksum "..\..\..\..\Views\DashboardWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "A314D0E6AD6B6AD4D75AB6130829A86ACEBFF007"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
@@ -50,7 +50,7 @@ namespace Server_Dashboard.Views {
|
||||
public partial class DashboardWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 46 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
#line 44 "..\..\..\..\Views\DashboardWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.Grid TopBarGrid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user