mirror of
https://e.coding.net/circlecloud/CTZLauncher.git
synced 2024-11-14 00:48:48 +00:00
添加界面设计图...
This commit is contained in:
parent
d7738a282e
commit
4b5d48ae64
@ -102,9 +102,6 @@
|
||||
<Compile Include="Tools\SystemTools.cs" />
|
||||
<Compile Include="Tools\UsefulTools.cs" />
|
||||
<Compile Include="Tools\ZipTools.cs" />
|
||||
<Compile Include="RegisterWindow.xaml.cs">
|
||||
<DependentUpon>RegisterWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@ -141,10 +138,6 @@
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Page Include="RegisterWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Modules\JVersion\JVersion.cs" />
|
||||
@ -181,7 +174,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="IZ.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Resource Include="image\chooseArea.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
|
||||
<Visible>False</Visible>
|
||||
@ -226,6 +221,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="image\logo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="image\area.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -28,6 +28,12 @@
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="AreaButton" TargetType="{x:Type Button}">
|
||||
<Grid>
|
||||
<Image Source="image/area.png"/>
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="CornerTextBox" TargetType="{x:Type TextBox}">
|
||||
<Border BorderBrush="#FF3299CC" BorderThickness="1" CornerRadius="0" Background="#FF3299CC">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Background="White"/>
|
||||
@ -43,7 +49,7 @@
|
||||
<Image HorizontalAlignment="Left" Height="50" Margin="15,5,0,0" VerticalAlignment="Top" Width="50" Source="image/logo.png" RenderTransformOrigin="0.56,0.24"/>
|
||||
<Label Content="MC 魔方" HorizontalAlignment="Left" Height="50" Margin="80,5,0,0" VerticalAlignment="Top" Width="150" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Impact" Foreground="White" FontSize="35" />
|
||||
</Grid>
|
||||
<Grid Name="LoginWindow" Margin="20,60,20,20" Background="White">
|
||||
<Grid Name="LoginWindow" Margin="20,60,20,20" Background="White" d:IsHidden="True">
|
||||
<Grid Height="280" VerticalAlignment="Top">
|
||||
<Grid Margin="20,20,20,10" HorizontalAlignment="Left" Width="600" >
|
||||
<Border BorderThickness="1" BorderBrush="#FF3299CC">
|
||||
@ -61,8 +67,8 @@
|
||||
<Button x:Name="forget" Margin="218,116,32,0" Template="{StaticResource CornerButton}" Height="30" Content="?" VerticalAlignment="Top" />
|
||||
</Grid>
|
||||
<Grid Margin="10,0,10,10" Height="50" VerticalAlignment="Bottom">
|
||||
<Button x:Name="Login" Margin="30,10,160,10" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Content="+ 注册账号" Click="Login_Click" Foreground="White" Background="#FF45AB34"/>
|
||||
<Button x:Name="register" Margin="160,10,30,10" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Content="√ 进入游戏" Click="register_Click" Background="#FFAB3434" Foreground="White" FontSize="13" />
|
||||
<Button x:Name="register" Margin="30,10,160,10" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Content="+ 注册账号" Click="register_Click" Foreground="White" Background="#FF45AB34"/>
|
||||
<Button x:Name="Login" Margin="160,10,30,10" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Content="√ 进入游戏" Click="Login_Click" Background="#FFAB3434" Foreground="White" FontSize="13" />
|
||||
</Grid>
|
||||
<CheckBox x:Name="remzh" Content="记住帐号" HorizontalAlignment="Left" Margin="40,185,0,0" VerticalAlignment="Top"/>
|
||||
<CheckBox x:Name="remmm" Content="记住密码" HorizontalAlignment="Right" Margin="0,185,41,0" VerticalAlignment="Top"/>
|
||||
@ -115,29 +121,29 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Margin="20,60,20,20" Background="White" x:Name="ServerWindow" Visibility="Hidden">
|
||||
<Grid Margin="20,60,20,20" Background="White" x:Name="ServerWindow">
|
||||
<!--Visibility="Hidden"-->
|
||||
<Grid HorizontalAlignment="Left" Width="400" Margin="20,20,0,20">
|
||||
<Grid HorizontalAlignment="Left" Width="600" Margin="20,20,0,20">
|
||||
<Grid Height="80" VerticalAlignment="Top" Margin="0,0,0,0">
|
||||
<Label Content="选择大区" Margin="155,20" FontSize="20" VerticalAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<Image Margin="0,0,0,0" Source="image/chooseArea.png" Cursor="None" Stretch="None" />
|
||||
</Grid>
|
||||
<Grid Height="100" VerticalAlignment="Top" Margin="0,80,0,0" Name="GameArea">
|
||||
<Button Name="a0" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="30,30,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a1" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="120,30,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a2" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="215,30,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a3" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="305,30,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a0" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="20,15,0,0"/>
|
||||
<Button Name="a1" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="155,15,0,0"/>
|
||||
<Button Name="a2" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="295,15,0,0"/>
|
||||
<Button Name="a3" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="435,15,0,0"/>
|
||||
|
||||
<Button Name="a4" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="30,60,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a5" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="120,60,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a6" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="215,60,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a7" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource CornerButton}" HorizontalAlignment="Left" Margin="305,60,0,0" VerticalAlignment="Top" Width="75" Visibility="Hidden" Click="area_Click"/>
|
||||
<Button Name="a4" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="20,55,0,0"/>
|
||||
<Button Name="a5" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="155,55,0,0"/>
|
||||
<Button Name="a6" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="295,55,0,0"/>
|
||||
<Button Name="a7" BorderBrush="#FF3299CC" Content="X X大区" Template="{StaticResource AreaButton}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="135" Height="30" Click="area_Click" Margin="435,55,0,0"/>
|
||||
</Grid>
|
||||
<Grid Height="285" VerticalAlignment="Top" Margin="10,185,10,0">
|
||||
<Grid Height="50" VerticalAlignment="Top" Margin="10,0,10,0">
|
||||
<Label Content="选择服务器" Margin="125,8" FontSize="20" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Margin="10,55,10,10" Name="GameServer">
|
||||
<Button Name="s0" Content="服务器1" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Margin="50,40,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="80" Visibility="Hidden" Click="server_Click"/>
|
||||
<Button Name="s0" Content="服务器1" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Margin="50,40,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="80" Click="server_Click"/>
|
||||
<Button Name="s1" Content="服务器2" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Margin="150,40,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="80" Visibility="Hidden" Click="server_Click"/>
|
||||
<Button Name="s2" Content="服务器3" Template="{StaticResource CornerButton}" BorderBrush="#FF3299CC" Margin="252,40,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="80" Visibility="Hidden" Click="server_Click"/>
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
<Window x:Class="CTZLauncher.RegisterWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CTZLauncher"
|
||||
mc:Ignorable="d"
|
||||
Title="账号注册" Height="300" Width="300">
|
||||
<Grid>
|
||||
<TextBox x:Name="username" HorizontalAlignment="Left" Height="25" Margin="128,47,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
|
||||
<TextBox x:Name="password" HorizontalAlignment="Left" Height="25" Margin="128,75,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
|
||||
<TextBox x:Name="pwdcfm" HorizontalAlignment="Left" Height="25" Margin="128,103,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
|
||||
<Label x:Name="label" Content="帐 号" HorizontalAlignment="Left" Margin="39,47,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="label1" Content="密 码" HorizontalAlignment="Left" Margin="39,75,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="label2" Content="确认密码" HorizontalAlignment="Left" Margin="39,103,0,0" VerticalAlignment="Top"/>
|
||||
<TextBox x:Name="email" HorizontalAlignment="Left" Height="25" Margin="128,133,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
|
||||
<Label x:Name="label2_Copy" Content="邮 箱" HorizontalAlignment="Left" Margin="39,133,0,0" VerticalAlignment="Top"/>
|
||||
<Button Content="取消" HorizontalAlignment="Left" Margin="39,189,0,0" VerticalAlignment="Top" Width="75"/>
|
||||
<Button x:Name="reg" Content="注册" HorizontalAlignment="Left" Margin="173,189,0,0" VerticalAlignment="Top" Width="75" Click="reg_Click"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
@ -1,65 +0,0 @@
|
||||
using KMCCC.Authentication;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace CTZLauncher
|
||||
{
|
||||
/// <summary>
|
||||
/// Window1.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class RegisterWindow : Window
|
||||
{
|
||||
string serveraddress;
|
||||
int serverport;
|
||||
public RegisterWindow(string serveraddress, int serverport)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.serveraddress = serveraddress;
|
||||
this.serverport = serverport;
|
||||
}
|
||||
|
||||
private void reg_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
reg.IsEnabled = false;
|
||||
if (username.Text.Length == 0 || password.Text.Length == 0)
|
||||
{
|
||||
MessageBox.Show("请输入账号密码!");
|
||||
return;
|
||||
}
|
||||
CTZAuthenticator auth = new CTZAuthenticator(username.Text, password.Text, serveraddress, serverport);
|
||||
try
|
||||
{
|
||||
if (auth.isRegistered())
|
||||
{
|
||||
MessageBox.Show("该用户名已注册 请更换用户名!");
|
||||
return;
|
||||
}
|
||||
if (auth.Register())
|
||||
{
|
||||
MessageBox.Show("注册成功!");
|
||||
Close();
|
||||
}
|
||||
else
|
||||
MessageBox.Show("注册失败!");
|
||||
}
|
||||
catch (ArgumentNullException ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
reg.IsEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
BIN
CTZLauncher/image/area.png
Normal file
BIN
CTZLauncher/image/area.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
CTZLauncher/image/chooseArea.png
Normal file
BIN
CTZLauncher/image/chooseArea.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
CTZLauncher/image/join.png
Normal file
BIN
CTZLauncher/image/join.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user