font thing
This commit is contained in:
1 parent
c9ee51457d
commit
d4d8bedc3f
5 files changed
+34
-9
No files matched your search
@@ -6,9 +6,6 @@ MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XPSLauncher", "XPSLauncher\XPSLauncher.csproj", "{1DFB73E7-C99E-43E8-A0AB-F271D8F36C80}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{17082187-CDB9-4EDA-9617-B06AACFC731E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\..\..\Downloads\pusab.ttf = ..\..\..\Downloads\pusab.ttf
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
Generated
-5
@@ -53,7 +53,6 @@ namespace XPSLauncher
|
||||
//
|
||||
this.button1.Cursor = System.Windows.Forms.Cursors.WaitCursor;
|
||||
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button1.Font = new System.Drawing.Font("Pusab", 17.5F);
|
||||
this.button1.ForeColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.button1.Location = new System.Drawing.Point(240, 176);
|
||||
this.button1.Name = "button1";
|
||||
@@ -67,7 +66,6 @@ namespace XPSLauncher
|
||||
//
|
||||
this.button2.Cursor = System.Windows.Forms.Cursors.No;
|
||||
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button2.Font = new System.Drawing.Font("Pusab", 17.5F);
|
||||
this.button2.ForeColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.button2.Location = new System.Drawing.Point(240, 275);
|
||||
this.button2.Name = "button2";
|
||||
@@ -80,7 +78,6 @@ namespace XPSLauncher
|
||||
//
|
||||
this.button3.Cursor = System.Windows.Forms.Cursors.WaitCursor;
|
||||
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button3.Font = new System.Drawing.Font("Pusab", 17.5F);
|
||||
this.button3.ForeColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.button3.Location = new System.Drawing.Point(240, 375);
|
||||
this.button3.Name = "button3";
|
||||
@@ -94,7 +91,6 @@ namespace XPSLauncher
|
||||
//
|
||||
this.button4.Cursor = System.Windows.Forms.Cursors.WaitCursor;
|
||||
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.button4.Font = new System.Drawing.Font("Pusab", 17.5F);
|
||||
this.button4.ForeColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.button4.Location = new System.Drawing.Point(240, 475);
|
||||
this.button4.Name = "button4";
|
||||
@@ -107,7 +103,6 @@ namespace XPSLauncher
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Pusab", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.ForeColor = System.Drawing.SystemColors.ButtonFace;
|
||||
this.label1.Location = new System.Drawing.Point(96, 111);
|
||||
this.label1.Name = "label1";
|
||||
|
||||
+31
-1
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Text;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Security.Principal;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -10,16 +13,34 @@ namespace XPSLauncher
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private static readonly HttpClient client = new HttpClient();
|
||||
private static readonly string currentVersion = "2.0.0";
|
||||
private static readonly string currentVersion = "2.0.1";
|
||||
private PrivateFontCollection privateFonts = new PrivateFontCollection();
|
||||
|
||||
public Form1()
|
||||
{
|
||||
if (!IsRunningAsAdministrator())
|
||||
{
|
||||
MessageBox.Show($"XPS requires administrator due to how the installer works. Please re-run XPS with administrator to continue", $"Administrator Required", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
this.FormBorderStyle = FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.pictureBox1.SendToBack();
|
||||
checkVersion();
|
||||
LoadFontFromFile();
|
||||
}
|
||||
|
||||
private void LoadFontFromFile()
|
||||
{
|
||||
string fontPath = "Pusab.ttf";
|
||||
privateFonts.AddFontFile(fontPath);
|
||||
button1.Font = new Font(privateFonts.Families[0], 17.5F);
|
||||
button2.Font = new Font(privateFonts.Families[0], 17.5F);
|
||||
button3.Font = new Font(privateFonts.Families[0], 17.5F);
|
||||
button4.Font = new Font(privateFonts.Families[0], 17.5F);
|
||||
label1.Font = new Font(privateFonts.Families[0], 15.75F);
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
@@ -198,6 +219,15 @@ namespace XPSLauncher
|
||||
MessageBox.Show($"Error launching that GDPS version. Create a support ticket in the Discord and we will try to help you.\n\nError message: {ex.Message}", $"Error laucnhing GDPS", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsRunningAsAdministrator()
|
||||
{
|
||||
using (WindowsIdentity identity = WindowsIdentity.GetCurrent())
|
||||
{
|
||||
WindowsPrincipal principal = new WindowsPrincipal(identity);
|
||||
return principal.IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -47,6 +47,9 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Content Include="Pusab.ttf">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
|
||||
Reference in new issue
Block a user