mirror of
https://e.coding.net/circlecloud/CTZLauncher.git
synced 2024-11-22 02:08:49 +00:00
修改界面为双窗口模式 添加基础服务器选择部分 ...
This commit is contained in:
parent
79a53284b0
commit
6f280c3f45
@ -1,20 +1,29 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CTZLauncher", "CTZLauncher\CTZLauncher.csproj", "{EC25362D-5BA7-4CB3-BDA2-C575B9318086}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
CD_ROM|Any CPU = CD_ROM|Any CPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
DVD-5|Any CPU = DVD-5|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
SingleImage|Any CPU = SingleImage|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EC25362D-5BA7-4CB3-BDA2-C575B9318086}.SingleImage|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -14,6 +14,24 @@
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<TargetFrameworkProfile />
|
||||
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||
<PublishUrl>http://localhost:8000/CTZL/</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Web</InstallFrom>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@ -40,6 +58,24 @@
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>A065480634083D151778AF72BD70335EA2E3E9C0</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>CTZLauncher_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="System" />
|
||||
@ -120,6 +156,7 @@
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
@ -135,6 +172,28 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="image\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 %28x86 和 x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 4.5</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</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.
|
||||
|
@ -1,16 +1,15 @@
|
||||
<Window x:Class="CTZLauncher.MainWindow"
|
||||
<Window
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:s="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="CTZLauncher.MainWindow"
|
||||
ResizeMode = "NoResize"
|
||||
MouseMove="Window_MouseMove"
|
||||
Title="MainWindow" Height="600" Width="800" Background="#FF3A3A3A" AllowsTransparency="True" WindowStyle="None" Visibility="Visible" HorizontalContentAlignment="Center" HorizontalAlignment="Center" Icon="ico.ico" VerticalAlignment="Center" VerticalContentAlignment="Center" WindowStartupLocation="CenterScreen" Initialized="Window_Initialized" Loaded="Window_Loaded" FontFamily="Microsoft YaHei">
|
||||
|
||||
<Window.Resources>
|
||||
<!-- s:Double表示了变量类型 x:key表示了变量名 -->
|
||||
<s:Double x:Key="m_nFontSize">
|
||||
32
|
||||
</s:Double>
|
||||
<s:Double x:Key="m_nFontSize">32</s:Double>
|
||||
|
||||
<!--
|
||||
<ControlTemplate x:Key="CornerButton" TargetType="{x:Type Button}">
|
||||
@ -26,7 +25,7 @@
|
||||
-->
|
||||
<ControlTemplate x:Key="CornerButton" TargetType="{x:Type Button}">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="0" Background="{TemplateBinding Background}">
|
||||
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
<ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="CornerTextBox" TargetType="{x:Type TextBox}">
|
||||
@ -35,8 +34,20 @@
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Window.Resources>
|
||||
<Grid Name="outline" Background="#FF3299CC" Height="600" Width="800" VerticalAlignment="Top" MouseLeftButtonDown="outline_MouseLeftButtonDown">
|
||||
<Grid Margin="20,60,20,20" Background="White">
|
||||
<Grid x:Name="outline" Background="#FF3299CC" Height="600" Width="800" VerticalAlignment="Top" MouseLeftButtonDown="outline_MouseLeftButtonDown">
|
||||
<Grid Margin="20,0" Background="#FF3299CC" Height="60" VerticalAlignment="Top" d:IsLocked="True" >
|
||||
<Label x:Name="barl1" Content="论坛" HorizontalAlignment="Left" Margin="245,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl2" Content="资源下载" HorizontalAlignment="Left" Margin="350,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl3" Content="新手指南" HorizontalAlignment="Left" Margin="455,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl4" Content="赞助我们" HorizontalAlignment="Left" Margin="560,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Image HorizontalAlignment="Left" Height="50" Margin="15,5,0,0" VerticalAlignment="Top" Width="50" Source="ico.ico" RenderTransformOrigin="0.56,0.24"/>
|
||||
<Label Content="魔方" HorizontalAlignment="Left" Height="50" Margin="90,5,0,0" VerticalAlignment="Top" Width="74" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="STXingkai" Foreground="White" FontSize="35" />
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
<Grid Name="LoginWindow" Margin="20,60,20,20" Background="White">
|
||||
<Grid Height="269" VerticalAlignment="Top">
|
||||
<Grid Margin="20,20,0,0" HorizontalAlignment="Left" Width="400" >
|
||||
<Image />
|
||||
@ -95,33 +106,34 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Margin="20,0" Background="#FF3299CC" Height="60" VerticalAlignment="Top" >
|
||||
<Label x:Name="barl1" Content="论坛" HorizontalAlignment="Left" Margin="245,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl2" Content="资源下载" HorizontalAlignment="Left" Margin="350,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl3" Content="新手指南" HorizontalAlignment="Left" Margin="455,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Label x:Name="barl4" Content="赞助我们" HorizontalAlignment="Left" Margin="560,15,0,0" VerticalAlignment="Top" Width="100" Height="30" FontSize="15" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="White" MouseDown="barclick_MouseDown"/>
|
||||
<Image HorizontalAlignment="Left" Height="50" Margin="15,5,0,0" VerticalAlignment="Top" Width="50" Source="ico.ico" RenderTransformOrigin="0.56,0.24"/>
|
||||
<Label Content="魔方" HorizontalAlignment="Left" Height="50" Margin="90,5,0,0" VerticalAlignment="Top" Width="74" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="STXingkai" Foreground="White" FontSize="35" />
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
|
||||
<Grid Margin="20,60,20,20" Background="White" Name="SelServer" 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 Height="80" VerticalAlignment="Top" Margin="0,0,0,0">
|
||||
<Label Content="选择大区" Margin="155,20" FontSize="20" VerticalAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Height="100" VerticalAlignment="Top" Margin="0,85,0,0">
|
||||
|
||||
<Grid Height="100" VerticalAlignment="Top" Margin="0,80,0,0">
|
||||
<RadioButton Content="纯净大区" Margin="30,40,305,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="模组大区" Margin="120,40,215,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="X X大区" Margin="215,40,120,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="X X大区" Margin="305,40,30,0" VerticalAlignment="Top"/>
|
||||
</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 Height="235" VerticalAlignment="Top" Margin="10,50,10,0">
|
||||
<Grid Margin="10,55,10,10">
|
||||
<RadioButton Content="服务器1" Margin="50,40,252,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="服务器2" Margin="150,40,150,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="服务器3" Margin="252,40,50,0" VerticalAlignment="Top"/>
|
||||
|
||||
<RadioButton Content="服务器4" HorizontalAlignment="Left" Margin="50,80,0,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="服务器5" HorizontalAlignment="Left" Margin="252,80,0,0" VerticalAlignment="Top"/>
|
||||
<RadioButton Content="服务器6" Margin="150,80,150,0" VerticalAlignment="Top"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
@ -131,20 +143,16 @@
|
||||
<Label Content="服务器介绍" Margin="85,2" FontSize="20" VerticalContentAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
<Grid Height="200" VerticalAlignment="Bottom" Margin="10,0,10,10">
|
||||
|
||||
<Label Content="友爱" HorizontalAlignment="Left" Margin="190,30,0,0" VerticalAlignment="Top"/>
|
||||
<Label Content="友爱" HorizontalAlignment="Left" Margin="50,30,0,0" VerticalAlignment="Top"/>
|
||||
<Label Content="友爱个篮子" HorizontalAlignment="Left" Margin="103,30,0,0" VerticalAlignment="Top"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Right" Width="300" ShowGridLines="True" Height="206" VerticalAlignment="Bottom">
|
||||
<Label Margin="10,15,0,0" Content="最大内存" VerticalAlignment="Top" Height="30" FontSize="17" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="Black" HorizontalAlignment="Left" Width="100"/>
|
||||
<TextBox x:Name="maxmem" Template="{StaticResource CornerTextBox}" Text="" Height="30" Width="174" TextWrapping="Wrap" Margin="0,15,10,161" FontSize="20" TextChanged="maxmem_TextChanged" HorizontalAlignment="Right" />
|
||||
<ComboBox x:Name="javacombo" Height="30" Width="174" FontSize="15" Margin="0,50,10,0" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
<Label Margin="10,50,0,126" Content="JAVA版本" FontSize="17" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="Black" HorizontalAlignment="Left" Width="100"/>
|
||||
<ComboBox x:Name="gamecombo" Height="30" Width="174" FontSize="15" Margin="0,85,10,0" VerticalAlignment="Top" HorizontalAlignment="Right"/>
|
||||
<Label Margin="10,85,0,91" Content="游戏版本" FontSize="17" Background="{x:Null}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Foreground="Black" HorizontalAlignment="Left" Width="100"/>
|
||||
<Button x:Name="StartGame" BorderBrush="#FF3299CC" Content="启动游戏" Template="{StaticResource CornerButton}" Margin="10,0,10,10" Height="64" VerticalAlignment="Bottom" FontSize="16" Click="StartGame_Click" IsEnabled="False"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Button Template="{StaticResource CornerButton}" Width="30" HorizontalAlignment="Right" Content="r" Background="#FFE05A5A" Height="30" VerticalAlignment="Top" FontFamily="Webdings" Click="close_Click" Margin="0,0,0,0" />
|
||||
<Button Template="{StaticResource CornerButton}" Width="30" HorizontalAlignment="Right" Content="r" Background="#FFE05A5A" Height="30" VerticalAlignment="Top" FontFamily="Webdings" Click="close_Click" Margin="0,0,0,0" d:IsLocked="True" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
@ -27,7 +27,7 @@ namespace CTZLauncher
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
LauncherCore launcher = null;
|
||||
LauncherCore launcher;
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -35,33 +35,16 @@ namespace CTZLauncher
|
||||
|
||||
private void Window_Initialized(object sender, EventArgs e)
|
||||
{
|
||||
if (Directory.Exists(".minecraft"))
|
||||
{
|
||||
launcher = LauncherCore.Create(".minecraft");
|
||||
launcher.GameLog += launcher_GameLog;
|
||||
}
|
||||
else
|
||||
if (!Directory.Exists(".minecraft"))
|
||||
{
|
||||
Directory.CreateDirectory(".minecraft");
|
||||
}
|
||||
|
||||
LauncherCore launcher = LauncherCore.Create(".minecraft");
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (var item in SystemTools.FindJava())
|
||||
{
|
||||
javacombo.Items.Add(item);
|
||||
}
|
||||
if (!javacombo.Items.IsEmpty)
|
||||
javacombo.SelectedIndex = 0;
|
||||
foreach (var item in launcher.GetVersions())
|
||||
{
|
||||
gamecombo.Items.Add(item.Id);
|
||||
}
|
||||
if (!gamecombo.Items.IsEmpty)
|
||||
gamecombo.SelectedIndex = 0;
|
||||
maxmem.Text = "2048";
|
||||
|
||||
}
|
||||
|
||||
private void Window_MouseMove(object sender, MouseEventArgs e)
|
||||
@ -94,13 +77,6 @@ namespace CTZLauncher
|
||||
}
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
IAuthenticator auth = new YggdrasilLogin("jtb1@163.com", "jtb325325", false);
|
||||
AuthenticationInfo result = auth.Do();
|
||||
MessageBox.Show(result.UUID.ToString());
|
||||
}
|
||||
|
||||
private void Login_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Login.IsEnabled = false;
|
||||
@ -119,7 +95,7 @@ namespace CTZLauncher
|
||||
}
|
||||
else
|
||||
{
|
||||
SelServer.Visibility = System.Windows.Visibility.Visible;
|
||||
ServerWindow.Visibility = System.Windows.Visibility.Visible;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -150,10 +126,11 @@ namespace CTZLauncher
|
||||
Console.WriteLine("StartGame");
|
||||
LaunchOptions option = new LaunchOptions();
|
||||
option.Mode = LaunchMode.MCLauncher;
|
||||
option.MaxMemory = int.Parse(maxmem.Text);
|
||||
option.MaxMemory = 2048;
|
||||
option.Authenticator = new OfflineAuthenticator(username.Text); // offline
|
||||
option.Version = launcher.GetVersion(gamecombo.Text);
|
||||
launcher.JavaPath = javacombo.Text;
|
||||
option.Version = launcher.GetVersion("1.8");
|
||||
launcher.JavaPath = SystemTools.FindJava().First();
|
||||
launcher.GameLog += launcher_GameLog;
|
||||
launcher.Launch(option);
|
||||
}
|
||||
|
||||
|
54
CTZLauncher/Properties/app.manifest
Normal file
54
CTZLauncher/Properties/app.manifest
Normal file
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC 清单选项
|
||||
如果要更改 Windows 用户帐户控制级别,请用以下节点之一替换
|
||||
requestedExecutionLevel 节点。
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
指定 requestedExecutionLevel 节点将会禁用文件和注册表虚拟化。
|
||||
如果要利用文件和注册表虚拟化实现向后
|
||||
兼容性,则删除 requestedExecutionLevel 节点。
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
<applicationRequestMinimum>
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- 此应用程序设计使用的所有 Windows 版本的列表。
|
||||
Windows 将会自动选择最兼容的环境。-->
|
||||
<!-- 如果应用程序设计为使用 Windows Vista,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>-->
|
||||
<!-- 如果应用程序设计使用 Windows 7,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||
<!-- 如果应用程序设计为使用 Windows 8,请取消注释以下 supportedOS 节点-->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>-->
|
||||
<!-- 如果应用程序设计为使用 Windows 8.1,请取消对以下 supportedOS 节点的注释-->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>-->
|
||||
</application>
|
||||
</compatibility>
|
||||
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||
<!-- <dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>-->
|
||||
</asmv1:assembly>
|
Loading…
Reference in New Issue
Block a user