-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
65 lines (53 loc) · 2.05 KB
/
Program.cs
File metadata and controls
65 lines (53 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using Microsoft.Win32;
using System.Drawing.Text;
using System.IO;
using System.Runtime.InteropServices;
namespace LeahsPlatinumTracker
{
internal static class Program
{
/// <summary>
/// The current version number of Leah's Platinum Tracker.
/// </summary>
internal static Version Version = new("1.1.2");
// Updating via Squirrel
// https://github.com/Squirrel/Squirrel.Windows/blob/develop/docs/getting-started/2-packaging.md
// https://www.youtube.com/watch?v=W8Qu4qMJyh4
// Language (not yet supported)
internal static string Language = "en";
// Main
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
AddFileFontToCollection("Pokemon DPPt.ttf", CustomFonts);
//AddFileFontToCollection("PowerClear.ttf", CustomFonts);
AddFileFontToCollection("PowerClearB.ttf", CustomFonts);
ApplicationConfiguration.Initialize();
Application.SetCompatibleTextRenderingDefault(true);
Application.Run(new Index());
}
// Fonts
/// <summary>
/// Custom fonts used by Leah's Platinum Tracker. </ br>
/// 0: Pokemon DPPt </ br>
/// 1: Power Clear (/bold) </ br>
/// </summary>
public static PrivateFontCollection CustomFonts = new();
/// Before build, replace every instance of X with Y, and vice versa for design.
///
/// X: Font("Pokemon DPPt"
/// Y: Font(Program.CustomFonts.Families[0]
///
/// X: Font("Power Clear"
/// Y: Font(Program.CustomFonts.Families[1]
///
private static void AddFileFontToCollection(string fontName, PrivateFontCollection collection)
{
string fontPath = Path.Combine(Directory.GetCurrentDirectory(), fontName);
collection.AddFontFile(fontPath);
}
}
}