Issue #5
This commit is contained in:
@@ -6,19 +6,12 @@
|
||||
xmlns:local="clr-namespace:Server_Dashboard.Views.DashboardPages.ModuleCRUD"
|
||||
xmlns:root="clr-namespace:Server_Dashboard" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}"
|
||||
mc:Ignorable="d"
|
||||
ResizeMode="NoResize"
|
||||
Height="700"
|
||||
Width="500"
|
||||
d:WindowStyle="None"
|
||||
>
|
||||
mc:Ignorable="d" ResizeMode="NoResize" Height="700" Width="500" d:WindowStyle="None">
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
<Border
|
||||
Width="500"
|
||||
Height="700"
|
||||
>
|
||||
<!--Create new Server Form-->
|
||||
<Border Width="500" Height="700">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="#2D2D2D" Opacity="1"/>
|
||||
</Border.Background>
|
||||
@@ -27,10 +20,8 @@
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid
|
||||
Background="{StaticResource BackgroundSurface_04dp}"
|
||||
Grid.Row="0"
|
||||
>
|
||||
<!--Title Bar-->
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
@@ -40,19 +31,8 @@
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Text="Create a new Server"
|
||||
Margin="5 0 0 0"
|
||||
Foreground="{StaticResource DeepPurple_A100}"
|
||||
VerticalAlignment="Center"
|
||||
/>
|
||||
<Button
|
||||
Style="{StaticResource CloseButton}"
|
||||
Grid.Column="2"
|
||||
Content="✕"
|
||||
Cursor="Hand"
|
||||
>
|
||||
<TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center"/>
|
||||
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
@@ -60,11 +40,7 @@
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid
|
||||
Background="{StaticResource BackgroundSurface_04dp}"
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
>
|
||||
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20">
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
@@ -76,192 +52,98 @@
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Server Name-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Server Name"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Server Name" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="20"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding ServerName}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="ServerName"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="My Awesome Server"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding ServerName}" Grid.Column="1" Height="40" FontSize="20" x:Name="ServerName"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="My Awesome Server" FontSize="20" Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Password-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="1" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Password"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Password" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="20"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<PasswordBox
|
||||
Width="420"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
root:MonitorPasswordProperty.Value="True"
|
||||
Grid.Column="1"
|
||||
FontSize="20"
|
||||
x:Name="Password"
|
||||
Height="40"
|
||||
>
|
||||
<PasswordBox Width="420" VerticalAlignment="Center" HorizontalAlignment="Left" root:MonitorPasswordProperty.Value="True" Grid.Column="1" FontSize="20" x:Name="Password" Height="40">
|
||||
</PasswordBox>
|
||||
<TextBlock
|
||||
Visibility="{Binding ElementName=Password, Path=(root:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint"
|
||||
Text="********"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="5 0 0 0"
|
||||
FontSize="20"
|
||||
>
|
||||
<TextBlock Visibility="{Binding ElementName=Password, Path=(root:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}" x:Name="PasswordHint" Text="********" Grid.Column="1" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5 0 0 0" FontSize="20">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Username-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="2" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="Username"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Username" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="16"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding Username}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="UserName"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="Name"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding Username}" Grid.Column="1" Height="40" FontSize="20" x:Name="UserName"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Name" FontSize="20" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--IP Adress-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="3" Margin="20 0 20 0">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Text="IP Adress"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="IP Adress" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
<TextBlock
|
||||
Text="*"
|
||||
Foreground="{StaticResource ErrorRed}"
|
||||
FontSize="16"
|
||||
/>
|
||||
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding IPAdress}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="IPAdress"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="sample.ssh.com"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding IPAdress}" Grid.Column="1" Height="40" FontSize="20" x:Name="IPAdress"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="sample.ssh.com" FontSize="20" Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!--Port-->
|
||||
<StackPanel VerticalAlignment="Center" Grid.Row="4" Margin="20 0 20 0">
|
||||
<TextBlock
|
||||
Text="Port"
|
||||
FontSize="24"
|
||||
Margin="0 0 0 5"
|
||||
>
|
||||
<TextBlock Text="Port" FontSize="24" Margin="0 0 0 5">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.87"/>
|
||||
</TextBlock.Foreground>
|
||||
@@ -270,38 +152,16 @@
|
||||
<Grid.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
|
||||
</Grid.Effect>
|
||||
<TextBox
|
||||
Text="{Binding Port}"
|
||||
Grid.Column="1"
|
||||
Height="40"
|
||||
FontSize="20"
|
||||
x:Name="Port"
|
||||
/>
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Text="22"
|
||||
FontSize="20"
|
||||
Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
|
||||
Grid.Column="1"
|
||||
IsHitTestVisible="False"
|
||||
Margin="5 0 0 0"
|
||||
>
|
||||
<TextBox Text="{Binding Port}" Grid.Column="1" Height="40" FontSize="20" x:Name="Port"/>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="22" FontSize="20" Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="White" Opacity="0.12"/>
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<Button
|
||||
Height="60"
|
||||
Width="350"
|
||||
Command="{Binding CreateModuleCommand}"
|
||||
CommandParameter="{Binding ElementName=CREATE_MODULE}"
|
||||
Grid.Row="5"
|
||||
Content="CREATE MODULE"
|
||||
Grid.ColumnSpan="2"
|
||||
/>
|
||||
<!--Create Module button-->
|
||||
<Button Height="60" Width="350" Command="{Binding CreateModuleCommand}" CommandParameter="{Binding ElementName=CREATE_MODULE}" Grid.Row="5" Content="CREATE MODULE" Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
Reference in New Issue
Block a user