提供一个主界面显示一些项目描述。
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
</Window.Resources>
|
||||
<Window.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
|
||||
<GradientStop Color="Azure" Offset="0"/>
|
||||
<GradientStop Color="AliceBlue" Offset="0"/>
|
||||
<GradientStop Color="White" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Window.Background>
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace 软件系统客户端Wpf
|
||||
};
|
||||
|
||||
//延时
|
||||
Thread.Sleep(200);
|
||||
Thread.Sleep(400);
|
||||
|
||||
//请求指令头数据,该数据需要更具实际情况更改
|
||||
OperateResultString result = UserClient.Net_simplify_client.ReadFromServer(CommonHeadCode.SimplifyHeadCode.维护检查);
|
||||
@@ -135,7 +135,7 @@ namespace 软件系统客户端Wpf
|
||||
Dispatcher.Invoke(message_show, "正在检查账户...");
|
||||
|
||||
//延时
|
||||
Thread.Sleep(200);
|
||||
Thread.Sleep(400);
|
||||
|
||||
//===================================================================================
|
||||
// 根据实际情况校验,选择数据库校验或是将用户名密码发至服务器校验
|
||||
@@ -180,7 +180,7 @@ namespace 软件系统客户端Wpf
|
||||
Dispatcher.Invoke(message_show, "正在验证版本...");
|
||||
|
||||
//延时
|
||||
Thread.Sleep(200);
|
||||
Thread.Sleep(400);
|
||||
|
||||
result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.更新检查);
|
||||
if (result.IsSuccess)
|
||||
@@ -229,7 +229,7 @@ namespace 软件系统客户端Wpf
|
||||
Dispatcher.Invoke(message_show, "正在下载参数...");
|
||||
|
||||
//延时
|
||||
Thread.Sleep(200);
|
||||
Thread.Sleep(400);
|
||||
|
||||
|
||||
result = UserClient.Net_simplify_client.ReadFromServer(CommonLibrary.CommonHeadCode.SimplifyHeadCode.参数下载);
|
||||
@@ -291,12 +291,12 @@ namespace 软件系统客户端Wpf
|
||||
|
||||
private void ToggleButton_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
LoginButton.Focus();
|
||||
}
|
||||
|
||||
private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
LoginButton.Focus();
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -151,8 +151,14 @@
|
||||
</Grid>
|
||||
|
||||
<Grid Width="100" DockPanel.Dock="Left">
|
||||
<Border BorderThickness="0,1,1,1" BorderBrush="LightGray">
|
||||
<Border BorderThickness="0,1,1,1" BorderBrush="LightGray" Padding="5">
|
||||
<StackPanel>
|
||||
<TextBlock>随便放点什么东西</TextBlock>
|
||||
<Button Style="{StaticResource MaterialDesignRaisedLightButton}" Grid.Column="1" Width="60" VerticalAlignment="Center"
|
||||
Click="Button_BackMain_Click">
|
||||
主页
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -246,14 +252,6 @@
|
||||
<!--主界面,应该设置成可以放置其他东西-->
|
||||
<Grid>
|
||||
<ContentControl Margin="3" x:Name="UserContentControl">
|
||||
<StackPanel>
|
||||
<TextBlock>asdasdasd</TextBlock>
|
||||
<TextBlock>asdasdasddasdasd</TextBlock>
|
||||
<TextBlock>asdasdasd</TextBlock>
|
||||
<TextBlock>asdasasdasdasd</TextBlock>
|
||||
<TextBlock>asdasdasdasd</TextBlock>
|
||||
<TextBlock>asdasasdadasd</TextBlock>
|
||||
</StackPanel>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -126,6 +126,8 @@ namespace 软件系统客户端Wpf
|
||||
SoftUserPortraitInitialization();
|
||||
SoftUserPortrait.DownloadUserPortraint();
|
||||
AccountChip.Content = UserClient.UserAccount.UserName;
|
||||
|
||||
SetShowRenderControl(UIControl_Home);
|
||||
}
|
||||
|
||||
private void Window_Initialized(object sender, EventArgs e)
|
||||
@@ -616,6 +618,8 @@ namespace 软件系统客户端Wpf
|
||||
|
||||
private UserChat UIControls_Chat { get; set; }
|
||||
|
||||
private UserHome UIControl_Home { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 正在显示的子界面
|
||||
@@ -652,6 +656,8 @@ namespace 软件系统客户端Wpf
|
||||
});
|
||||
all_main_render.Add(UIControls_Chat);
|
||||
|
||||
UIControl_Home = new UserHome();
|
||||
all_main_render.Add(UIControl_Home);
|
||||
}
|
||||
|
||||
private void SetShowRenderControl(UserControl control)
|
||||
@@ -672,14 +678,18 @@ namespace 软件系统客户端Wpf
|
||||
DoubleAnimation d_y2 = new DoubleAnimation(10, 0, TimeSpan.FromMilliseconds(100));
|
||||
TranslateTransform tt2 = new TranslateTransform();
|
||||
UserContentControl.RenderTransform = tt2;
|
||||
tt2.BeginAnimation(TranslateTransform.XProperty, d_y2);
|
||||
UserContentControl.BeginAnimation(OpacityProperty, d_opacity2);
|
||||
tt.BeginAnimation(TranslateTransform.XProperty, d_y2);
|
||||
};
|
||||
|
||||
UserContentControl.BeginAnimation(OpacityProperty, d_opacity);
|
||||
tt.BeginAnimation(TranslateTransform.XProperty, d_y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void SetShowRenderControl(Type typeControl)
|
||||
{
|
||||
UserControl control = null;
|
||||
@@ -695,5 +705,10 @@ namespace 软件系统客户端Wpf
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void Button_BackMain_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SetShowRenderControl(UIControl_Home);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,111 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:软件系统客户端Wpf.Views"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
d:DesignHeight="500" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
|
||||
<!-- throw in some extra colour for our floating action button -->
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/MaterialDesignColor.Green.Named.Primary.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Top" Margin="16,50,16,16">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Source="Resources/ms-icon-310x310.png" Stretch="Uniform" Width="100" Height="100" />-->
|
||||
<StackPanel Grid.Column="1" Margin="24 16 0 0" VerticalAlignment="Center">
|
||||
<TextBlock Style="{StaticResource MaterialDesignDisplay1TextBlock}" TextWrapping="Wrap">欢迎使用C-S软件系统模版的wpf版</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom"
|
||||
Margin="0 100 0 32">
|
||||
<Grid>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:Card Width="420" Margin="4 2 8 16" Height="270">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="Windows" Width="160" Height="160" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="16 16 16 8">关于模版</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">本项目致力于打造一个.Net平台下的一个通用的C-S基础模版,使用了C#7.0语法开发,方便其他中小型
|
||||
系统在此之上进行二次开发,也方便新学习C#的人学习。</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
DockPanel.Dock="Right" Click="EmailButton_Click"
|
||||
ToolTip="hsl200909@163.com">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="Email" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Email</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}" TextWrapping="Wrap" Margin="16" VerticalAlignment="Center">
|
||||
本项目是作者的心血结晶,但是限于作者的水平及从事行业的背景,所开发的功能项目难免有疏漏之处,可以点击右侧给我发邮件。
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
<materialDesign:Card Width="420" Margin="8 2 4 16" Height="270">
|
||||
<Grid VerticalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:PackIcon Kind="GithubCircle" Width="160" Height="160" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="1">
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadlineTextBlock}" Margin="16 16 16 8">关于源代码</TextBlock>
|
||||
<TextBlock TextWrapping="Wrap" Margin="16 0 16 8" Foreground="{DynamicResource MaterialDesignBodyLight}"
|
||||
VerticalAlignment="Top">本项目将在github上开源,如果您喜欢这个项目,可以在github上进行star或是fork,并提出相关的改进push。</TextBlock>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0 1 0 0" BorderBrush="{DynamicResource MaterialDesignDivider}" Padding="8">
|
||||
<DockPanel>
|
||||
<Button Style="{DynamicResource MaterialDesignFlatButton}"
|
||||
DockPanel.Dock="Right"
|
||||
Click="GithubButton_OnClick"
|
||||
ToolTip="https://github.com/dathlin/C-S-">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon Kind="CodeTags" />
|
||||
<TextBlock Margin="8 0 0 0" VerticalAlignment="Center">Github</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}" TextWrapping="Wrap" Margin="16" VerticalAlignment="Center">
|
||||
本项目的开源地址请点击右侧按钮。
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
using System;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -24,5 +27,15 @@ namespace 软件系统客户端Wpf.Views
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void EmailButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Process.Start("mailto://hsl200909@163.com");
|
||||
}
|
||||
|
||||
private void GithubButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/dathlin/C-S-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 106 KiB |
Reference in New Issue
Block a user