├── .gitignore
├── LICENSE
├── README.md
├── latest.txt
├── tsge.sln
└── tsge
├── Classes
├── Buff.cs
├── DpiHelper.cs
├── Item.cs
├── ItemPrefix.cs
├── ModelBase.cs
├── NativeAPI.cs
├── Player.cs
├── ServerEntry.cs
└── Terraria.cs
├── Comparers
└── EqualComparer.cs
├── Controls
├── BuffListBox.Designer.cs
├── BuffListBox.cs
├── BuffListBox.resx
├── BuffSelectionList.Designer.cs
├── BuffSelectionList.cs
├── HairListBox.Designer.cs
├── HairListBox.cs
├── ItemLabel.Designer.cs
├── ItemLabel.cs
├── ModelViewer.Designer.cs
├── ModelViewer.cs
└── ModelViewer.resx
├── Extensions
└── ColorExtensions.cs
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── DataSources
│ └── tsge.Classes.Player.datasource
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── Resources
├── Twitter.png
├── donate.png
├── folder_user.png
├── information.png
├── new.png
├── page_save.png
├── script_save.png
├── status_online.png
├── stop.png
└── terr.ico
├── frmAbout.Designer.cs
├── frmAbout.cs
├── frmAbout.resx
├── frmHairSelection.Designer.cs
├── frmHairSelection.cs
├── frmHairSelection.resx
├── frmMain.Designer.cs
├── frmMain.cs
├── frmMain.resx
├── terr.ico
├── tsge.csproj
└── tsge.csproj.DotSettings
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | ## Ignore Visual Studio temporary files, build results, and
9 | ## files generated by popular Visual Studio add-ons.
10 |
11 | # User-specific files
12 | *.suo
13 | *.user
14 | *.sln.docstates
15 |
16 | # Build results
17 | [Dd]ebug/
18 | [Rr]elease/
19 | x64/
20 | *_i.c
21 | *_p.c
22 | *.ilk
23 | *.meta
24 | *.obj
25 | *.pch
26 | *.pdb
27 | *.pgc
28 | *.pgd
29 | *.rsp
30 | *.sbr
31 | *.tlb
32 | *.tli
33 | *.tlh
34 | *.tmp
35 | *.log
36 | *.vspscc
37 | *.vssscc
38 | .builds
39 |
40 | # Visual C++ cache files
41 | ipch/
42 | *.aps
43 | *.ncb
44 | *.opensdf
45 | *.sdf
46 |
47 | # Visual Studio profiler
48 | *.psess
49 | *.vsp
50 | *.vspx
51 |
52 | # Guidance Automation Toolkit
53 | *.gpState
54 |
55 | # ReSharper is a .NET coding add-in
56 | _ReSharper*
57 |
58 | # NCrunch
59 | *.ncrunch*
60 | .*crunch*.local.xml
61 |
62 | # Installshield output folder
63 | [Ee]xpress
64 |
65 | # DocProject is a documentation generator add-in
66 | DocProject/buildhelp/
67 | DocProject/Help/*.HxT
68 | DocProject/Help/*.HxC
69 | DocProject/Help/*.hhc
70 | DocProject/Help/*.hhk
71 | DocProject/Help/*.hhp
72 | DocProject/Help/Html2
73 | DocProject/Help/html
74 |
75 | # Click-Once directory
76 | publish
77 |
78 | # Publish Web Output
79 | *.Publish.xml
80 |
81 | # NuGet Packages Directory
82 | packages
83 |
84 | # Windows Azure Build Output
85 | csx
86 | *.build.csdef
87 |
88 | # Windows Store app package directory
89 | AppPackages/
90 |
91 | # Others
92 | [Bb]in
93 | [Oo]bj
94 | sql
95 | TestResults
96 | [Tt]est[Rr]esult*
97 | *.Cache
98 | ClientBin
99 | [Ss]tyle[Cc]op.*
100 | ~$*
101 | *.dbmdl
102 | Generated_Code #added for RIA/Silverlight projects
103 |
104 | # Backup & report files from converting an old project file to a newer
105 | # Visual Studio version. Backup files are not needed, because we have git ;-)
106 | _UpgradeReport_Files/
107 | Backup*/
108 | UpgradeLog*.XML
109 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | TSGE *(Terraria Save Game Editor)*
2 | ====
3 |
4 | Donate To TSGE!
5 | -------------
6 | Enjoy using TSGE or any of my other applications? Show your support by donating!
7 | https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7U7Q2GRT6KUJN
8 |
9 |
10 | What is TSGE?
11 | -------------
12 | TSGE (which stands for 'Terraria Save Game Editor') is a save game editor that allows players to modify their save game files (profiles) and adjust their characters. TSGE supports and targets the latest version of Terraria, currently: 1.2.1.2
13 |
14 | What can TSGE do?
15 | -------------
16 | TSGE is a FULL save game editor. It can edit all parts of a save game file.
17 |
18 | TSGE can edit the following:
19 | * Player Tab
20 | * Edit the player name.
21 | * Edit the player difficulty.
22 | * Edit the player male / female flag.
23 | * Edit the player hotbar locked flag.
24 | * Edit the player hp and mana values.
25 | * Edit the player colors.
26 | * Edit the player hair style.
27 | * Buff Tab
28 | * Edit the player buffs. (Add / remove.)
29 | * Max all buff duration's to their known max values.
30 | * Hack all buff duration's to int.Max value.
31 | * Inventory Tab
32 | * Edit the player inventory entirely.
33 | * Adjust item prefixes.
34 | * Max all inventory slots to their max stack counts.
35 | * Hack all stack counts to int.Max value.
36 | * Equipment Tab
37 | * Edit the player equipment, vanity set, dye set, and accessories entirely.
38 | * Adjust item prefixes.
39 | * No restrictions to equip multiple accessories of the same type.
40 | * Bank Tab
41 | * Edit the player bank and safe entirely.
42 | * Adjust item prefixes.
43 | * Max all stacks to their max stack counts.
44 | * Hack all stack counts to int.Max value.
45 | * About Tab
46 | * Display info, credits, links, etc. for TSGE.
47 |
48 | And much much more as TSGE continues to update and grow!
49 |
50 | What is TSGE coded with?
51 | -------------
52 | TSGE is coded in C#.
53 | TSGE is also open source, you can find the source here:
54 | https://github.com/atom0s/TSGE
55 | TSGE uses .NET 4.0 to ensure it will run on Windows XP machines.
56 | It is designed, tested, and built using Visual Studio 2012 on Windows 7 Ultimate (x64).
57 |
58 | Thanks and Credits
59 | -------------
60 | * atom0s - Core development.
61 | * Austin Andrews - Titlebar icons.
62 | * Terraria - Item textures and application icon.
63 | * Sinzfeldt - For buying me Terraria.
64 | * attilathedud - Original beta testing.
65 |
--------------------------------------------------------------------------------
/latest.txt:
--------------------------------------------------------------------------------
1 | 2.1.0.12
2 | https://github.com/atom0s/TSGE/releases/download/v2.1.0.12/tsge_2.1.0.12_beta.7z
--------------------------------------------------------------------------------
/tsge.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2012
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tsge", "tsge\tsge.csproj", "{2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}.Debug|x86.ActiveCfg = Debug|x86
13 | {2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}.Debug|x86.Build.0 = Debug|x86
14 | {2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}.Release|x86.ActiveCfg = Release|x86
15 | {2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/tsge/Classes/Buff.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System;
21 | using System.IO;
22 | using System.Linq;
23 | using System.Runtime.Serialization.Formatters.Binary;
24 | using System.Xml.Serialization;
25 |
26 | [Serializable]
27 | public class Buff : ModelBase, ICloneable
28 | {
29 | ///
30 | /// Updates this buff entry to the given buff.
31 | ///
32 | ///
33 | public void SetBuff(int buffId)
34 | {
35 | // Obtain the buff info..
36 | var buff = Terraria.Instance.Buffs.SingleOrDefault(b => b.Id == buffId);
37 | if (buff == null) return;
38 |
39 | // Set this buff info..
40 | this.Duration = buff.Duration;
41 | this.Icon = new Uri(string.Format(@"{0}\Data\Buffs\buff_{1}.png", AppDomain.CurrentDomain.BaseDirectory, buff.Id), UriKind.Absolute);
42 | this.Id = buff.Id;
43 | this.Name = buff.Name;
44 | this.Tooltip = buff.Tooltip;
45 | }
46 |
47 | ///
48 | /// Gets or sets the id property.
49 | ///
50 | [XmlAttribute("index")]
51 | public int Id
52 | {
53 | get { return this.Get("Id"); }
54 | set
55 | {
56 | this.Set("Id", value);
57 | this.Icon = new Uri(string.Format(@"{0}\Data\Buffs\buff_{1}.png", AppDomain.CurrentDomain.BaseDirectory, value), UriKind.Absolute);
58 | }
59 | }
60 |
61 | ///
62 | /// Gets or sets the name property.
63 | ///
64 | [XmlAttribute("name")]
65 | public string Name
66 | {
67 | get { return this.Get("Name"); }
68 | set { this.Set("Name", value); }
69 | }
70 |
71 | ///
72 | /// Gets or sets the tooltip property.
73 | ///
74 | [XmlAttribute("tooltip")]
75 | public string Tooltip
76 | {
77 | get { return this.Get("Tooltip"); }
78 | set { this.Set("Tooltip", value); }
79 | }
80 |
81 | ///
82 | /// Gets or sets the duration property.
83 | ///
84 | [XmlAttribute("duration")]
85 | public int Duration
86 | {
87 | get { return this.Get("Duration"); }
88 | set
89 | {
90 | this.Set("Duration", value);
91 | this.DurationString = "Refreshing..";
92 | }
93 | }
94 |
95 | ///
96 | /// Gets or sets the icon property.
97 | ///
98 | [XmlIgnore]
99 | public Uri Icon
100 | {
101 | get { return this.Get("Icon"); }
102 | set { this.Set("Icon", value); }
103 | }
104 |
105 | ///
106 | /// Gets or sets the duration string property.
107 | ///
108 | [XmlIgnore]
109 | public string DurationString
110 | {
111 | get
112 | {
113 | this.Set("DurationString", string.Format("{0} second(s)", this.Duration / 60));
114 | return this.Get("DurationString");
115 | }
116 | set
117 | {
118 | if (value == null)
119 | throw new ArgumentNullException("value");
120 | this.Set("DurationString", string.Format("{0} second(s)", this.Duration / 60));
121 | }
122 | }
123 |
124 | ///
125 | /// Tostring override to return this buffs name.
126 | ///
127 | ///
128 | public override string ToString()
129 | {
130 | return this.Name;
131 | }
132 |
133 | ///
134 | /// ICloneable implementation.
135 | ///
136 | ///
137 | public object Clone()
138 | {
139 | try
140 | {
141 | using (var mStream = new MemoryStream())
142 | {
143 | var formatter = new BinaryFormatter();
144 | formatter.Serialize(mStream, this);
145 | mStream.Position = 0;
146 | return formatter.Deserialize(mStream);
147 | }
148 | }
149 | catch
150 | {
151 | return this.MemberwiseClone();
152 | }
153 | }
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/tsge/Classes/DpiHelper.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System;
21 | using System.Drawing;
22 |
23 | internal static class DpiHelper
24 | {
25 | ///
26 | /// Obtains the current device DPI.
27 | ///
28 | ///
29 | internal static int GetCurrentDpi()
30 | {
31 | using (var g = Graphics.FromHwnd(IntPtr.Zero))
32 | {
33 | return NativeAPI.GetDeviceCaps(g.GetHdc(), 88);
34 | }
35 | }
36 |
37 | ///
38 | /// Obtains the current device DPI scale percent.
39 | ///
40 | ///
41 | internal static int GetScalePercent()
42 | {
43 | return GetCurrentDpi() * 100 / 96;
44 | }
45 |
46 | ///
47 | /// Determines the scaled DPI size of an object.
48 | ///
49 | ///
50 | ///
51 | internal static int ScaleAsDpi(int baseSize)
52 | {
53 | return baseSize * GetScalePercent() / 100;
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/tsge/Classes/ItemPrefix.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System;
21 | using System.IO;
22 | using System.Runtime.Serialization.Formatters.Binary;
23 | using System.Xml.Serialization;
24 |
25 | public class ItemPrefix : ModelBase, ICloneable
26 | {
27 | ///
28 | /// Gets or sets the id property.
29 | ///
30 | [XmlAttribute("id")]
31 | public int Id
32 | {
33 | get { return this.Get("Id"); }
34 | set { this.Set("Id", value); }
35 | }
36 |
37 | ///
38 | /// Gets or sets the prefix property.
39 | ///
40 | [XmlAttribute("prefix")]
41 | public string Prefix
42 | {
43 | get { return this.Get("Prefix"); }
44 | set { this.Set("Prefix", value); }
45 | }
46 |
47 | ///
48 | /// Gets or sets the category prefix.
49 | ///
50 | [XmlAttribute("category")]
51 | public int Category
52 | {
53 | get { return this.Get("Category"); }
54 | set { this.Set("Category", value); }
55 | }
56 |
57 | ///
58 | /// Tostring override to return this item prefixes prefix.
59 | ///
60 | ///
61 | public override string ToString()
62 | {
63 | return this.Prefix;
64 | }
65 |
66 | ///
67 | /// ICloneable implementation.
68 | ///
69 | ///
70 | public object Clone()
71 | {
72 | try
73 | {
74 | using (var mStream = new MemoryStream())
75 | {
76 | var formatter = new BinaryFormatter();
77 | formatter.Serialize(mStream, this);
78 | mStream.Position = 0;
79 | return formatter.Deserialize(mStream);
80 | }
81 | }
82 | catch
83 | {
84 | return this.MemberwiseClone();
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/tsge/Classes/ModelBase.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System;
21 | using System.Collections.Generic;
22 | using System.ComponentModel;
23 |
24 | [Serializable]
25 | public class ModelBase : INotifyPropertyChanged
26 | {
27 | ///
28 | /// Internal properties container.
29 | ///
30 | private readonly Dictionary _properties;
31 |
32 | ///
33 | /// Event triggered when a property is changed.
34 | ///
35 | public event PropertyChangedEventHandler PropertyChanged;
36 |
37 | ///
38 | /// Default Constructor
39 | ///
40 | public ModelBase()
41 | {
42 | this._properties = new Dictionary();
43 | }
44 |
45 | ///
46 | /// Method used to raise the PropertyChanged event.
47 | ///
48 | ///
49 | public void OnPropertyChanged(String prop)
50 | {
51 | if (this.PropertyChanged != null)
52 | this.PropertyChanged(this, new PropertyChangedEventArgs(prop));
53 | }
54 |
55 | ///
56 | /// Method to raise the PropertyChanged event.
57 | ///
58 | ///
59 | protected void RaisePropertyChanged(string property)
60 | {
61 | if (string.IsNullOrEmpty(property))
62 | throw new ArgumentNullException(property);
63 | this.OnPropertyChanged(property);
64 | }
65 |
66 | ///
67 | /// Gets a property from the internal container.
68 | ///
69 | ///
70 | ///
71 | ///
72 | protected T Get(String prop)
73 | {
74 | if (this._properties.ContainsKey(prop))
75 | return (T)this._properties[prop];
76 | return default(T);
77 | }
78 |
79 | ///
80 | /// Sets a property in the internal container.
81 | ///
82 | ///
83 | ///
84 | ///
85 | protected void Set(String prop, T val)
86 | {
87 | var curr = this.Get(prop);
88 | if (Equals(curr, val))
89 | return;
90 |
91 | this._properties[prop] = val;
92 | this.OnPropertyChanged(prop);
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/tsge/Classes/NativeAPI.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System;
21 | using System.Drawing;
22 | using System.Runtime.InteropServices;
23 |
24 | internal static class NativeAPI
25 | {
26 | ///
27 | /// gdi32.GetDeviceCaps import.
28 | ///
29 | ///
30 | ///
31 | ///
32 | [DllImport("gdi32.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
33 | internal static extern int GetDeviceCaps(IntPtr hDC, int nIndex);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tsge/Classes/Player.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using System.Drawing;
21 | using System.Linq;
22 |
23 | public class Player : ModelBase
24 | {
25 | ///
26 | /// Default Constructor
27 | ///
28 | public Player()
29 | {
30 | // Set player defaults..
31 | this.GameVersion = Terraria.LatestVersion;
32 | this.Name = "Player";
33 | this.Difficulty = 0;
34 | this.Hair = 0;
35 | this.IsMale = true;
36 | this.Health = 500;
37 | this.HealthMax = 500;
38 | this.Mana = 200;
39 | this.ManaMax = 200;
40 | this.IsHotbarLocked = false;
41 | this.File = string.Empty;
42 |
43 | // Set default colors..
44 | this.HairColor = Color.FromArgb(0xFF, 0xD7, 0x5A, 0x37);
45 | this.SkinColor = Color.FromArgb(0xFF, 0xFF, 0x7D, 0x4B);
46 | this.EyeColor = Color.FromArgb(0xFF, 0x69, 0x5A, 0x4B);
47 | this.ShirtColor = Color.FromArgb(0xFF, 0xAF, 0xA5, 0x8C);
48 | this.UndershirtColor = Color.FromArgb(0xFF, 0xA0, 0xB4, 0xD7);
49 | this.PantsColor = Color.FromArgb(0xFF, 0xFF, 0xE6, 0xAF);
50 | this.ShoesColor = Color.FromArgb(0xFF, 0xA0, 0x6A, 0x3C);
51 |
52 | // Prepare default data..
53 | this.Armor = new Item[3];
54 | this.Vanity = new Item[3];
55 | this.Accessories = new Item[5];
56 | this.SocialAccessories = new Item[5];
57 | this.Dye = new Item[8];
58 | this.Inventory = new Item[58];
59 | this.Bank1 = new Item[40];
60 | this.Bank2 = new Item[40];
61 | this.Buffs = new Buff[22];
62 | this.ServerEntries = new ServerEntry[200];
63 |
64 | var item = Terraria.Instance.Items.Single(i => i.NetID == 0);
65 | var buff = Terraria.Instance.Buffs.Single(b => b.Id == 0);
66 |
67 | for (var x = 0; x < this.Armor.Length; x++)
68 | this.Armor[x] = item.Clone() as Item;
69 |
70 | for (var x = 0; x < this.Vanity.Length; x++)
71 | this.Vanity[x] = item.Clone() as Item;
72 |
73 | for (var x = 0; x < this.Accessories.Length; x++)
74 | this.Accessories[x] = item.Clone() as Item;
75 |
76 | for (var x = 0; x < this.SocialAccessories.Length; x++)
77 | this.SocialAccessories[x] = item.Clone() as Item;
78 |
79 | for (var x = 0; x < this.Dye.Length; x++)
80 | this.Dye[x] = item.Clone() as Item;
81 |
82 | for (var x = 0; x < this.Inventory.Length; x++)
83 | this.Inventory[x] = item.Clone() as Item;
84 |
85 | for (var x = 0; x < this.Bank1.Length; x++)
86 | this.Bank1[x] = item.Clone() as Item;
87 |
88 | for (var x = 0; x < this.Bank2.Length; x++)
89 | this.Bank2[x] = item.Clone() as Item;
90 |
91 | for (var x = 0; x < this.Buffs.Length; x++)
92 | this.Buffs[x] = buff.Clone() as Buff;
93 |
94 | for (var x = 0; x < this.ServerEntries.Length; x++)
95 | this.ServerEntries[x] = new ServerEntry();
96 | }
97 |
98 | ///
99 | /// Gets or sets the profile file of this player.
100 | ///
101 | public string File
102 | {
103 | get { return this.Get("File"); }
104 | set { this.Set("File", value); }
105 | }
106 |
107 | ///
108 | /// Gets or sets the game version of this player.
109 | ///
110 | public int GameVersion
111 | {
112 | get { return this.Get("GameVersion"); }
113 | set { this.Set("GameVersion", value); }
114 | }
115 |
116 | ///
117 | /// Gets or sets the name of this player.
118 | ///
119 | public string Name
120 | {
121 | get { return this.Get("Name"); }
122 | set { this.Set("Name", value); }
123 | }
124 |
125 | ///
126 | /// Gets or sets the difficulty of this player.
127 | ///
128 | public byte Difficulty
129 | {
130 | get { return this.Get("Difficulty"); }
131 | set { this.Set("Difficulty", value); }
132 | }
133 |
134 | ///
135 | /// Gets or sets the hair of this player.
136 | ///
137 | public int Hair
138 | {
139 | get { return this.Get("Hair"); }
140 | set { this.Set("Hair", value); }
141 | }
142 |
143 | ///
144 | /// Gets or sets the hair dye of this player.
145 | ///
146 | public byte HairDye
147 | {
148 | get { return this.Get("HairDye"); }
149 | set { this.Set("HairDye", value); }
150 | }
151 |
152 | ///
153 | /// Gets or sets the hide visual flag of this player.
154 | ///
155 | public byte HideVisual
156 | {
157 | get { return this.Get("HideVisual"); }
158 | set { this.Set("HideVisual", value); }
159 | }
160 |
161 | ///
162 | /// Gets or sets the male flag of this player.
163 | ///
164 | public bool IsMale
165 | {
166 | get { return this.Get("IsMale"); }
167 | set { this.Set("IsMale", value); }
168 | }
169 |
170 | ///
171 | /// Gets or sets the health of this player.
172 | ///
173 | public int Health
174 | {
175 | get { return this.Get("Health"); }
176 | set { this.Set("Health", value); }
177 | }
178 |
179 | ///
180 | /// Gets or sets the max health of this player.
181 | ///
182 | public int HealthMax
183 | {
184 | get { return this.Get("HealthMax"); }
185 | set { this.Set("HealthMax", value); }
186 | }
187 |
188 | ///
189 | /// Gets or sets the mana of this player.
190 | ///
191 | public int Mana
192 | {
193 | get { return this.Get("Mana"); }
194 | set { this.Set("Mana", value); }
195 | }
196 |
197 | ///
198 | /// Gets or sets the max mana of this player.
199 | ///
200 | public int ManaMax
201 | {
202 | get { return this.Get("ManaMax"); }
203 | set { this.Set("ManaMax", value); }
204 | }
205 |
206 | ///
207 | /// Gets or sets the hair color of this player.
208 | ///
209 | public Color HairColor
210 | {
211 | get { return this.Get("HairColor"); }
212 | set { this.Set("HairColor", value); }
213 | }
214 |
215 | ///
216 | /// Gets or sets the skin color of this player.
217 | ///
218 | public Color SkinColor
219 | {
220 | get { return this.Get("SkinColor"); }
221 | set { this.Set("SkinColor", value); }
222 | }
223 |
224 | ///
225 | /// Gets or sets the eye color of this player.
226 | ///
227 | public Color EyeColor
228 | {
229 | get { return this.Get("EyeColor"); }
230 | set { this.Set("EyeColor", value); }
231 | }
232 |
233 | ///
234 | /// Gets or sets the shirt color of this player.
235 | ///
236 | public Color ShirtColor
237 | {
238 | get { return this.Get("ShirtColor"); }
239 | set { this.Set("ShirtColor", value); }
240 | }
241 |
242 | ///
243 | /// Gets or sets the undershirt color of this player.
244 | ///
245 | public Color UndershirtColor
246 | {
247 | get { return this.Get("UndershirtColor"); }
248 | set { this.Set("UndershirtColor", value); }
249 | }
250 |
251 | ///
252 | /// Gets or sets the pants color of this player.
253 | ///
254 | public Color PantsColor
255 | {
256 | get { return this.Get("PantsColor"); }
257 | set { this.Set("PantsColor", value); }
258 | }
259 |
260 | ///
261 | /// Gets or sets the shoes color of this player.
262 | ///
263 | public Color ShoesColor
264 | {
265 | get { return this.Get("ShoesColor"); }
266 | set { this.Set("ShoesColor", value); }
267 | }
268 |
269 | ///
270 | /// Gets or sets the armor items of this player.
271 | ///
272 | public Item[] Armor
273 | {
274 | get { return this.Get- ("Armor"); }
275 | set { this.Set("Armor", value); }
276 | }
277 |
278 | ///
279 | /// Gets or sets the vanity items of this player.
280 | ///
281 | public Item[] Vanity
282 | {
283 | get { return this.Get
- ("Vanity"); }
284 | set { this.Set("Vanity", value); }
285 | }
286 |
287 | ///
288 | /// Gets or sets the accessory items of this player.
289 | ///
290 | public Item[] Accessories
291 | {
292 | get { return this.Get
- ("Accessories"); }
293 | set { this.Set("Accessories", value); }
294 | }
295 |
296 | ///
297 | /// Gets or sets the social accessory items of this player.
298 | ///
299 | public Item[] SocialAccessories
300 | {
301 | get { return this.Get
- ("SocialAccessories"); }
302 | set { this.Set("SocialAccessories", value); }
303 | }
304 |
305 | ///
306 | /// Gets or sets the dye items of this player.
307 | ///
308 | public Item[] Dye
309 | {
310 | get { return this.Get
- ("Dye"); }
311 | set { this.Set("Dye", value); }
312 | }
313 |
314 | ///
315 | /// Gets or sets the inventory items of this player.
316 | ///
317 | public Item[] Inventory
318 | {
319 | get { return this.Get
- ("Inventory"); }
320 | set { this.Set("Inventory", value); }
321 | }
322 |
323 | ///
324 | /// Gets or sets the bank1 items of this player.
325 | ///
326 | public Item[] Bank1
327 | {
328 | get { return this.Get
- ("Bank1"); }
329 | set { this.Set("Bank1", value); }
330 | }
331 |
332 | ///
333 | /// Gets or sets the bank2 items of this player.
334 | ///
335 | public Item[] Bank2
336 | {
337 | get { return this.Get
- ("Bank2"); }
338 | set { this.Set("Bank2", value); }
339 | }
340 |
341 | ///
342 | /// Gets or sets the buffs of this player.
343 | ///
344 | public Buff[] Buffs
345 | {
346 | get { return this.Get("Buffs"); }
347 | set { this.Set("Buffs", value); }
348 | }
349 |
350 | ///
351 | /// Gets or sets the server entries of this player.
352 | ///
353 | public ServerEntry[] ServerEntries
354 | {
355 | get { return this.Get("ServerEntries"); }
356 | set { this.Set("ServerEntries", value); }
357 | }
358 |
359 | ///
360 | /// Gets or sets the is hotbar locked flag of this player.
361 | ///
362 | public bool IsHotbarLocked
363 | {
364 | get { return this.Get("IsHotbarLocked"); }
365 | set { this.Set("IsHotbarLocked", value); }
366 | }
367 | }
368 | }
369 |
--------------------------------------------------------------------------------
/tsge/Classes/ServerEntry.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | public class ServerEntry : ModelBase
21 | {
22 | ///
23 | /// Default Constructor
24 | ///
25 | public ServerEntry()
26 | {
27 | this.ServerAddress = -1;
28 | this.ServerName = string.Empty;
29 | this.SpawnX = -1;
30 | this.SpawnY = -1;
31 | }
32 |
33 | ///
34 | /// Gets or sets the server address of this server entry.
35 | ///
36 | public int ServerAddress
37 | {
38 | get { return this.Get("ServerAddress"); }
39 | set { this.Set("ServerAddress", value); }
40 | }
41 |
42 | ///
43 | /// Gets or sets the server name of this server entry.
44 | ///
45 | public string ServerName
46 | {
47 | get { return this.Get("ServerName"); }
48 | set { this.Set("ServerName", value); }
49 | }
50 |
51 | ///
52 | /// Gets or sets the x spawn location of this server entry.
53 | ///
54 | public int SpawnX
55 | {
56 | get { return this.Get("SpawnX"); }
57 | set { this.Set("SpawnX", value); }
58 | }
59 |
60 | ///
61 | /// Gets or sets the y spawn location of this server entry.
62 | ///
63 | public int SpawnY
64 | {
65 | get { return this.Get("SpawnY"); }
66 | set { this.Set("SpawnY", value); }
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/tsge/Classes/Terraria.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Classes
19 | {
20 | using Comparers;
21 | using Extensions;
22 | using System;
23 | using System.Collections.Generic;
24 | using System.Drawing;
25 | using System.IO;
26 | using System.Linq;
27 | using System.Security.Cryptography;
28 | using System.Text;
29 | using System.Windows.Forms;
30 | using System.Xml.Serialization;
31 |
32 | public class Terraria
33 | {
34 | ///
35 | /// Singleton instance of this class.
36 | ///
37 | private static Terraria m_Instance;
38 |
39 | ///
40 | /// Internal buff list.
41 | ///
42 | private List m_BuffList;
43 |
44 | ///
45 | /// Internal item list.
46 | ///
47 | private List
- m_ItemList;
48 |
49 | ///
50 | /// Internal item prefix list.
51 | ///
52 | private List m_PrefixList;
53 |
54 | ///
55 | /// Current supported game version.
56 | ///
57 | public static List GameVersions = new List(new[] { 38, 47, 58, 68, 69, 70, 71, 72, 73, 77, 81, 83, 93, 94 });
58 |
59 | ///
60 | /// The latest supported version of Terraria.
61 | ///
62 | public static int LatestVersion = 94;
63 |
64 | ///
65 | /// Profile path to the Terraria save game files.
66 | ///
67 | public static string ProfilePath = string.Join(
68 | Path.DirectorySeparatorChar.ToString(),
69 | new[]
70 | {
71 | Environment.GetFolderPath(Environment.SpecialFolder.Personal),
72 | "My Games", "Terraria", "Players"
73 | });
74 |
75 | ///
76 | /// Encryption key used to encrypt and decrypt player files.
77 | ///
78 | private const string ENCRYPTION_KEY = "h3y_gUyZ";
79 |
80 | ///
81 | /// Encryption key converted to byte data for crypto provider.
82 | ///
83 | private static readonly byte[] ENCRYPTION_DATA = Encoding.Unicode.GetBytes(ENCRYPTION_KEY);
84 |
85 | ///
86 | /// Default Constructor
87 | ///
88 | public Terraria()
89 | {
90 | // Initialize internl lists..
91 | this.m_BuffList = new List();
92 | this.m_ItemList = new List
- ();
93 | this.m_PrefixList = new List();
94 | this.HairFiles = new List();
95 | }
96 |
97 | ///
98 | /// Gets the singleton instance of this class.
99 | ///
100 | public static Terraria Instance
101 | {
102 | get { return m_Instance ?? (m_Instance = new Terraria()); }
103 | }
104 |
105 | ///
106 | /// Initializes the Terraria class.
107 | ///
108 | ///
109 | public bool Initialize()
110 | {
111 | // Load buff list..
112 | using (var fStream = new FileStream("Data\\_bufflist.xml", FileMode.Open, FileAccess.Read))
113 | {
114 | var xls = new XmlSerializer(typeof(Buff[]));
115 | this.Buffs = ((Buff[])xls.Deserialize(fStream)).ToList();
116 | }
117 |
118 | // Load item list..
119 | using (var fStream = new FileStream("Data\\_itemlist.xml", FileMode.Open, FileAccess.Read))
120 | {
121 | var xls = new XmlSerializer(typeof(Item[]));
122 | this.m_ItemList = ((Item[])xls.Deserialize(fStream)).ToList();
123 | }
124 |
125 | // Load item prefix list..
126 | using (var fStream = new FileStream("Data\\_prefixlist.xml", FileMode.Open, FileAccess.Read))
127 | {
128 | var xls = new XmlSerializer(typeof(ItemPrefix[]));
129 | this.Prefixes = ((ItemPrefix[])xls.Deserialize(fStream)).ToList();
130 | }
131 |
132 | // Load the hair style list..
133 | var dir = new DirectoryInfo("Data\\Hair");
134 | var files = (from FileInfo f in dir.GetFiles("*.png")
135 | where f.FullName.Contains("_alt_") == false
136 | select f).ToList().OrderBy(file => file, new NaturalFileInfoNameComparer());
137 |
138 | foreach (var f in files)
139 | this.HairFiles.Add(f.Name);
140 |
141 |
142 | return (this.Buffs != null && this.m_ItemList != null && this.m_PrefixList != null);
143 | }
144 |
145 | ///
146 | /// Decrypts the given player profile and returns the data as an array.
147 | ///
148 | ///
149 | ///
150 | private static byte[] DecryptProfile(string fileName)
151 | {
152 | try
153 | {
154 | using (var fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read))
155 | {
156 | var rjm = new RijndaelManaged();
157 | using (var cStream = new CryptoStream(fStream, rjm.CreateDecryptor(ENCRYPTION_DATA, ENCRYPTION_DATA), CryptoStreamMode.Read))
158 | {
159 | using (var mStream = new MemoryStream())
160 | {
161 | int dataRead;
162 | while ((dataRead = cStream.ReadByte()) != -1)
163 | mStream.WriteByte((byte)dataRead);
164 | return mStream.GetBuffer().Clone() as byte[];
165 | }
166 | }
167 | }
168 | }
169 | catch (Exception ex)
170 | {
171 | MessageBox.Show(string.Format("Failed to decrypt profile; error was:\r\n\r\n{0}", ex), "Error!");
172 | return default(byte[]);
173 | }
174 | }
175 |
176 | ///
177 | /// Encrypts the given player profile.
178 | ///
179 | ///
180 | ///
181 | private static bool EncryptProfile(string fileName)
182 | {
183 | try
184 | {
185 | using (var fStreamOut = new FileStream(fileName, FileMode.Create, FileAccess.Write))
186 | {
187 | var rjm = new RijndaelManaged();
188 | using (var cStream = new CryptoStream(fStreamOut, rjm.CreateEncryptor(ENCRYPTION_DATA, ENCRYPTION_DATA), CryptoStreamMode.Write))
189 | {
190 | using (var fStreamTmp = new FileStream(fileName + ".tmp", FileMode.Open, FileAccess.Read))
191 | {
192 | int dataRead;
193 | while ((dataRead = fStreamTmp.ReadByte()) != -1)
194 | cStream.WriteByte((byte)dataRead);
195 | return true;
196 | }
197 | }
198 | }
199 | }
200 | catch (Exception ex)
201 | {
202 | MessageBox.Show(string.Format("Failed to encrypt profile; error was:\r\n\r\n{0}", ex), "Error!");
203 | return false;
204 | }
205 | }
206 |
207 | ///
208 | /// Attempts to decrypt and load a player file.
209 | ///
210 | ///
211 | ///
212 | public Player LoadProfile(string fileName)
213 | {
214 | try
215 | {
216 | // Attempt to decrypt the player file..
217 | var playerData = DecryptProfile(fileName);
218 | if (playerData == null)
219 | return default(Player);
220 |
221 | // Attempt to read the player file..
222 | using (var mStream = new MemoryStream(playerData))
223 | {
224 | using (var bReader = new BinaryReader(mStream))
225 | {
226 | // Create the new player object..
227 | var p = new Player { GameVersion = bReader.ReadInt32() };
228 |
229 | // Ensure game version is valid..
230 | if (p.GameVersion < Terraria.GameVersions.Min() || p.GameVersion > Terraria.GameVersions.Max())
231 | throw new InvalidDataException("GameVersion does not match the supported value!");
232 |
233 | // Read basic player info..
234 | p.Name = bReader.ReadString();
235 | p.Difficulty = bReader.ReadByte();
236 | p.Hair = bReader.ReadInt32();
237 |
238 | // Hair Dye
239 | if (p.GameVersion >= 82)
240 | p.HairDye = bReader.ReadByte();
241 |
242 | // Hide Visual
243 | if (p.GameVersion >= 83)
244 | p.HideVisual = bReader.ReadByte();
245 |
246 | p.IsMale = bReader.ReadBoolean();
247 | p.Health = bReader.ReadInt32();
248 | p.HealthMax = bReader.ReadInt32();
249 | p.Mana = bReader.ReadInt32();
250 | p.ManaMax = bReader.ReadInt32();
251 |
252 | // Read character colors..
253 | p.HairColor = new Color().FromBytes(bReader.ReadBytes(3));
254 | p.SkinColor = new Color().FromBytes(bReader.ReadBytes(3));
255 | p.EyeColor = new Color().FromBytes(bReader.ReadBytes(3));
256 | p.ShirtColor = new Color().FromBytes(bReader.ReadBytes(3));
257 | p.UndershirtColor = new Color().FromBytes(bReader.ReadBytes(3));
258 | p.PantsColor = new Color().FromBytes(bReader.ReadBytes(3));
259 | p.ShoesColor = new Color().FromBytes(bReader.ReadBytes(3));
260 |
261 | // Read Armor..
262 | for (var x = 0; x < 3; x++)
263 | {
264 | p.Armor[x].SetItem(bReader.ReadInt32());
265 | p.Armor[x].Prefix = bReader.ReadByte();
266 | }
267 |
268 | // Read accessories..
269 | for (var x = 0; x < 5; x++)
270 | {
271 | p.Accessories[x].SetItem(bReader.ReadInt32());
272 | p.Accessories[x].Prefix = bReader.ReadByte();
273 | }
274 |
275 | // Read vanity items..
276 | for (var x = 0; x < 3; x++)
277 | {
278 | p.Vanity[x].SetItem(bReader.ReadInt32());
279 | p.Vanity[x].Prefix = bReader.ReadByte();
280 | }
281 |
282 | // Read social accessories..
283 | for (var x = 0; x < 5; x++)
284 | {
285 | p.SocialAccessories[x].SetItem(bReader.ReadInt32());
286 | p.SocialAccessories[x].Prefix = bReader.ReadByte();
287 | }
288 |
289 | // Read dye items..
290 | if (p.GameVersion >= 47)
291 | {
292 | var dyeCount = (p.GameVersion >= 81) ? 8 : 3;
293 | for (var x = 0; x < dyeCount; x++)
294 | {
295 | p.Dye[x].SetItem(bReader.ReadInt32());
296 | p.Dye[x].Prefix = bReader.ReadByte();
297 | }
298 | }
299 |
300 | // Read inventory..
301 | for (var x = 0; x < ((p.GameVersion >= 58) ? 58 : 48); x++)
302 | {
303 | var temp = bReader.ReadInt32();
304 | if (temp >= 2289)
305 | p.Inventory[x].SetItem(0);
306 | else
307 | {
308 | p.Inventory[x].SetItem(temp);
309 | p.Inventory[x].Count = bReader.ReadInt32();
310 | p.Inventory[x].Prefix = bReader.ReadByte();
311 | }
312 | }
313 |
314 | // Read Bank1..
315 | for (var x = 0; x < ((p.GameVersion >= 58) ? 40 : 20); x++)
316 | {
317 | p.Bank1[x].SetItem(bReader.ReadInt32());
318 | p.Bank1[x].Count = bReader.ReadInt32();
319 | p.Bank1[x].Prefix = bReader.ReadByte();
320 | }
321 |
322 | // Read Bank2..
323 | for (var x = 0; x < ((p.GameVersion >= 58) ? 40 : 20); x++)
324 | {
325 | p.Bank2[x].SetItem(bReader.ReadInt32());
326 | p.Bank2[x].Count = bReader.ReadInt32();
327 | p.Bank2[x].Prefix = bReader.ReadByte();
328 | }
329 |
330 | // Read Buffs..
331 | var buffCount = (p.GameVersion < 74) ? 10 : 22;
332 | for (var x = 0; x < buffCount; x++)
333 | {
334 | p.Buffs[x].SetBuff(bReader.ReadInt32());
335 | p.Buffs[x].Duration = bReader.ReadInt32();
336 | }
337 |
338 | // Read Server Entries..
339 | for (var x = 0; x < 200; x++)
340 | {
341 | var temp = bReader.ReadInt32();
342 | if (temp == -1) break;
343 |
344 | p.ServerEntries[x].SpawnX = temp;
345 | p.ServerEntries[x].SpawnY = bReader.ReadInt32();
346 | p.ServerEntries[x].ServerAddress = bReader.ReadInt32();
347 | p.ServerEntries[x].ServerName = bReader.ReadString();
348 | }
349 |
350 | // Read Hotbar Locked Flag..
351 | p.IsHotbarLocked = bReader.ReadBoolean();
352 |
353 | // Force the new profile to latest version..
354 | p.GameVersion = Terraria.LatestVersion;
355 | return p;
356 | }
357 | }
358 | }
359 | catch (Exception ex)
360 | {
361 | MessageBox.Show(string.Format("Failed to load profile; error was:\r\n\r\n{0}", ex), "Error!");
362 | return default(Player);
363 | }
364 | }
365 |
366 | ///
367 | /// Attempts to obtain the profiles name.
368 | ///
369 | ///
370 | ///
371 | public string GetProfileName(string fileName)
372 | {
373 | // Attempt to decrypt the player file..
374 | var playerData = DecryptProfile(fileName);
375 | if (playerData == null)
376 | return string.Empty;
377 |
378 | // Attempt to read the name..
379 | try
380 | {
381 | using (var mStream = new MemoryStream(playerData))
382 | {
383 | using (var bReader = new BinaryReader(mStream))
384 | {
385 | bReader.ReadInt32(); // GameVersion
386 | return bReader.ReadString();
387 | }
388 | }
389 | }
390 | catch
391 | {
392 | return string.Empty;
393 | }
394 | }
395 |
396 | ///
397 | /// Attempts to encrypt and save a player object.
398 | ///
399 | ///
400 | ///
401 | ///
402 | public bool SaveProfile(Player player, string fileName)
403 | {
404 | FileStream fStream = null;
405 | BinaryWriter bWriter = null;
406 |
407 | try
408 | {
409 | // Open or create temp file to write to..
410 | fStream = new FileStream(fileName + ".tmp", FileMode.OpenOrCreate, FileAccess.Write);
411 | bWriter = new BinaryWriter(fStream);
412 |
413 | // Write the game version..
414 | bWriter.Write(player.GameVersion);
415 |
416 | // Write basic player info..
417 | bWriter.Write(player.Name);
418 | bWriter.Write(player.Difficulty);
419 | bWriter.Write(player.Hair);
420 |
421 | // Write hair dye and hide visual flag..
422 | bWriter.Write((byte)player.HairDye);
423 | bWriter.Write((byte)player.HideVisual);
424 |
425 | bWriter.Write(player.IsMale);
426 | bWriter.Write(player.Health);
427 | bWriter.Write(player.HealthMax);
428 | bWriter.Write(player.Mana);
429 | bWriter.Write(player.ManaMax);
430 |
431 | // Write player colors..
432 | bWriter.Write(player.HairColor.ToBytes());
433 | bWriter.Write(player.SkinColor.ToBytes());
434 | bWriter.Write(player.EyeColor.ToBytes());
435 | bWriter.Write(player.ShirtColor.ToBytes());
436 | bWriter.Write(player.UndershirtColor.ToBytes());
437 | bWriter.Write(player.PantsColor.ToBytes());
438 | bWriter.Write(player.ShoesColor.ToBytes());
439 |
440 | // Write player armor..
441 | for (var x = 0; x < 3; x++)
442 | {
443 | bWriter.Write(player.Armor[x].NetID);
444 | bWriter.Write(player.Armor[x].Prefix);
445 | }
446 |
447 | // Write player accessories..
448 | for (var x = 0; x < 5; x++)
449 | {
450 | bWriter.Write(player.Accessories[x].NetID);
451 | bWriter.Write(player.Accessories[x].Prefix);
452 | }
453 |
454 | // Write player vanity items..
455 | for (var x = 0; x < 3; x++)
456 | {
457 | bWriter.Write(player.Vanity[x].NetID);
458 | bWriter.Write(player.Vanity[x].Prefix);
459 | }
460 |
461 | // Write social accessories items..
462 | for (var x = 0; x < 5; x++)
463 | {
464 | bWriter.Write(player.SocialAccessories[x].NetID);
465 | bWriter.Write(player.SocialAccessories[x].Prefix);
466 | }
467 |
468 | // Write player dye..
469 | for (var x = 0; x < 8; x++)
470 | {
471 | bWriter.Write(player.Dye[x].NetID);
472 | bWriter.Write(player.Dye[x].Prefix);
473 | }
474 |
475 | // Write player inventory..
476 | for (var x = 0; x < 58; x++)
477 | {
478 | bWriter.Write(player.Inventory[x].NetID);
479 | bWriter.Write(player.Inventory[x].Count);
480 | bWriter.Write(player.Inventory[x].Prefix);
481 | }
482 |
483 | // Write player bank1..
484 | for (var x = 0; x < 40; x++)
485 | {
486 | bWriter.Write(player.Bank1[x].NetID);
487 | bWriter.Write(player.Bank1[x].Count);
488 | bWriter.Write(player.Bank1[x].Prefix);
489 | }
490 |
491 | // Write player bank2..
492 | for (var x = 0; x < 40; x++)
493 | {
494 | bWriter.Write(player.Bank2[x].NetID);
495 | bWriter.Write(player.Bank2[x].Count);
496 | bWriter.Write(player.Bank2[x].Prefix);
497 | }
498 |
499 | // Write player buffs..
500 | var buffCount = (player.GameVersion < 74) ? 10 : 22;
501 | for (var x = 0; x < buffCount; x++)
502 | {
503 | bWriter.Write(player.Buffs[x].Id);
504 | bWriter.Write(player.Buffs[x].Duration);
505 | }
506 |
507 | // Write server entries..
508 | for (var x = 0; x < 200; x++)
509 | {
510 | if (player.ServerEntries[x].SpawnX == -1)
511 | {
512 | bWriter.Write(player.ServerEntries[x].SpawnX);
513 | break;
514 | }
515 |
516 | bWriter.Write(player.ServerEntries[x].SpawnX);
517 | bWriter.Write(player.ServerEntries[x].SpawnY);
518 | bWriter.Write(player.ServerEntries[x].ServerAddress);
519 | bWriter.Write(player.ServerEntries[x].ServerName);
520 | }
521 |
522 | // Write hotbar locked flag..
523 | bWriter.Write(player.IsHotbarLocked);
524 |
525 | // Cleanup..
526 | bWriter.Close();
527 | fStream.Close();
528 |
529 | // Encrypt the file and save it to real path..
530 | var ret = EncryptProfile(fileName);
531 |
532 | // Delete the temp file..
533 | File.Delete(fileName + ".tmp");
534 | return ret;
535 | }
536 | catch (Exception ex)
537 | {
538 | MessageBox.Show(string.Format("Failed to save profile; error was:\r\n\r\n{0}", ex), "Error!");
539 | return false;
540 | }
541 | finally
542 | {
543 | // Ensure streams are cleaned up..
544 | if (bWriter != null)
545 | bWriter.Close();
546 | if (fStream != null)
547 | fStream.Close();
548 | }
549 | }
550 |
551 | ///
552 | /// Gets or sets the list of buffs.
553 | ///
554 | public List Buffs
555 | {
556 | get
557 | {
558 | if (this.m_BuffList != null && this.m_BuffList.Count > 0)
559 | this.m_BuffList.Sort(new NaturalBuffNameComparer());
560 | return this.m_BuffList;
561 | }
562 | set { this.m_BuffList = value; }
563 | }
564 |
565 | ///
566 | /// Gets or sets the list of Items.
567 | ///
568 | public List
- Items
569 | {
570 | get
571 | {
572 | if (this.m_ItemList != null && this.m_ItemList.Count > 0)
573 | this.m_ItemList.Sort(new NaturalItemNameComparer());
574 |
575 | if (this.m_ItemList == null)
576 | return null;
577 |
578 | var items = this.m_ItemList;
579 | return new List
- ((Item[])items.ToArray().Clone());
580 | }
581 | }
582 |
583 | ///
584 | /// Gets or sets the list of Prefixes.
585 | ///
586 | public List Prefixes
587 | {
588 | get
589 | {
590 | if (this.m_PrefixList != null && this.m_PrefixList.Count > 0)
591 | this.m_PrefixList.Sort(new NaturalItemPrefixNameComparer());
592 |
593 | if (this.m_PrefixList == null)
594 | return null;
595 |
596 | var prefixes = this.m_PrefixList;
597 | return new List((ItemPrefix[])prefixes.ToArray().Clone());
598 | }
599 | set { this.m_PrefixList = value; }
600 | }
601 |
602 | ///
603 | /// Gets or sets the hair file list.
604 | ///
605 | public List HairFiles { get; set; }
606 | }
607 | }
608 |
--------------------------------------------------------------------------------
/tsge/Comparers/EqualComparer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | // -----------------------------------------------------------------------
19 | // Natural Sorting Implementation
20 | //
21 | // (c) 2008 Greg Beech
22 | // http://stackoverflow.com/questions/248603/natural-sort-order-in-c-sharp/248613#248613
23 | // -----------------------------------------------------------------------
24 |
25 | namespace tsge.Comparers
26 | {
27 | using System.Collections.Generic;
28 | using System.IO;
29 | using System.Runtime.InteropServices;
30 | using System.Security;
31 |
32 | [SuppressUnmanagedCodeSecurity]
33 | internal static class SafeNativeMethods
34 | {
35 | ///
36 | /// shlwapi.StrCmpLogicalW Function Import Definition
37 | ///
38 | ///
39 | ///
40 | ///
41 | [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)]
42 | public static extern int StrCmpLogicalW(string psz1, string psz2);
43 | }
44 |
45 | public sealed class NaturalStringComparer : IComparer
46 | {
47 | ///
48 | /// Compares two strings logically to each other.
49 | ///
50 | ///
51 | ///
52 | ///
53 | public int Compare(string a, string b)
54 | {
55 | return SafeNativeMethods.StrCmpLogicalW(a, b);
56 | }
57 | }
58 |
59 | public sealed class NaturalFileInfoNameComparer : IComparer
60 | {
61 | ///
62 | /// Compares two file names logically to each other.
63 | ///
64 | ///
65 | ///
66 | ///
67 | public int Compare(FileInfo a, FileInfo b)
68 | {
69 | return SafeNativeMethods.StrCmpLogicalW(a.Name, b.Name);
70 | }
71 | }
72 |
73 | public sealed class NaturalBuffNameComparer : IComparer
74 | {
75 | ///
76 | /// Compares two Buff classes logically to each other by name.
77 | ///
78 | ///
79 | ///
80 | ///
81 | public int Compare(tsge.Classes.Buff a, tsge.Classes.Buff b)
82 | {
83 | return SafeNativeMethods.StrCmpLogicalW(a.Name, b.Name);
84 | }
85 | }
86 |
87 | public sealed class NaturalItemNameComparer : IComparer
88 | {
89 | ///
90 | /// Compares two Item classes logically to each other by name.
91 | ///
92 | ///
93 | ///
94 | ///
95 | public int Compare(tsge.Classes.Item a, tsge.Classes.Item b)
96 | {
97 | return SafeNativeMethods.StrCmpLogicalW(a.Name, b.Name);
98 | }
99 | }
100 |
101 | public sealed class NaturalItemPrefixNameComparer : IComparer
102 | {
103 | ///
104 | /// Compares two ItemPrefix classes logically to each other by name.
105 | ///
106 | ///
107 | ///
108 | ///
109 | public int Compare(tsge.Classes.ItemPrefix a, tsge.Classes.ItemPrefix b)
110 | {
111 | return SafeNativeMethods.StrCmpLogicalW(a.Prefix, b.Prefix);
112 | }
113 | }
114 | }
115 |
--------------------------------------------------------------------------------
/tsge/Controls/BuffListBox.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | sealed partial class BuffListBox
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 |
38 | if (this.m_ItalicFont != null)
39 | this.m_ItalicFont.Dispose();
40 |
41 | base.Dispose(disposing);
42 | }
43 |
44 | #region Component Designer generated code
45 |
46 | ///
47 | /// Required method for Designer support - do not modify
48 | /// the contents of this method with the code editor.
49 | ///
50 | private void InitializeComponent()
51 | {
52 | components = new System.ComponentModel.Container();
53 | }
54 |
55 | #endregion
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/tsge/Controls/BuffListBox.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | using Classes;
21 | using System.Drawing;
22 | using System.Windows.Forms;
23 |
24 | public sealed partial class BuffListBox : ListBox
25 | {
26 | ///
27 | /// Internal italic font.
28 | ///
29 | private readonly Font m_ItalicFont;
30 |
31 | ///
32 | /// Default Constructor
33 | ///
34 | public BuffListBox()
35 | {
36 | InitializeComponent();
37 |
38 | // Prepare the italic font..
39 | this.m_ItalicFont = new Font(this.Font.FontFamily, this.Font.Size, FontStyle.Italic);
40 |
41 | }
42 |
43 | ///
44 | /// OnDrawItem override to draw our custom item.
45 | ///
46 | ///
47 | protected override void OnDrawItem(DrawItemEventArgs e)
48 | {
49 | // Validation check to prevent designer errors..
50 | if (this.Items.Count <= 0)
51 | return;
52 |
53 | // Cast the incoming argument as a buff entry..
54 | var buff = (Buff)this.Items[e.Index];
55 |
56 | // Adjust the background based on selection..
57 | e.Graphics.FillRectangle((e.State & DrawItemState.Selected) == DrawItemState.Selected ?
58 | Brushes.SkyBlue : Brushes.White, e.Bounds);
59 |
60 | // Draw seperator line..
61 | e.Graphics.DrawLine(Pens.Black, e.Bounds.X, e.Bounds.Y, e.Bounds.X + e.Bounds.Width, e.Bounds.Y);
62 |
63 | // Draw the buff icon..
64 | var bmp = new Bitmap(buff.Icon.LocalPath);
65 | e.Graphics.DrawImage(bmp, e.Bounds.X + this.Margin.Left, e.Bounds.Y + this.Margin.Top, 32, 32);
66 |
67 | // Calculate name string bounds..
68 | var nameBounds = new Rectangle(e.Bounds.X + this.Margin.Horizontal + 32,
69 | e.Bounds.Y + this.Margin.Top,
70 | e.Bounds.Width - this.Margin.Right - 32 - this.Margin.Horizontal,
71 | (int)this.Font.GetHeight() + 2);
72 |
73 | // Calculate duration string bounds..
74 | var durationBounds = new Rectangle(e.Bounds.X + this.Margin.Horizontal + 32,
75 | e.Bounds.Y + (int)this.Font.GetHeight() + 2 + this.Margin.Vertical + this.Margin.Top,
76 | e.Bounds.Width - this.Margin.Right - 32 - this.Margin.Horizontal,
77 | e.Bounds.Height - this.Margin.Bottom - (int)this.Font.GetHeight() - 2 - this.Margin.Vertical - this.Margin.Top);
78 |
79 | // Calculate tooltip string bounds..
80 | var toolTipBounds = new Rectangle(e.Bounds.X,
81 | e.Bounds.Y + this.Margin.Top + 32 + 5,
82 | e.Bounds.Width - this.Margin.Right - 32 - this.Margin.Horizontal,
83 | (int)this.Font.GetHeight() + 2);
84 |
85 | // Draw buff information strings..
86 | e.Graphics.DrawString(buff.Name, this.Font, Brushes.Black, nameBounds);
87 | e.Graphics.DrawString(buff.DurationString, this.Font, Brushes.Black, durationBounds);
88 | e.Graphics.DrawString(buff.Tooltip, this.m_ItalicFont, Brushes.Black, toolTipBounds);
89 |
90 | // Draw the focused item rect..
91 | e.DrawFocusRectangle();
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/tsge/Controls/BuffListBox.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/tsge/Controls/BuffSelectionList.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | partial class BuffSelectionListBox
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Component Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | components = new System.ComponentModel.Container();
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/tsge/Controls/BuffSelectionList.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | using Classes;
21 | using System.Drawing;
22 | using System.Windows.Forms;
23 |
24 | public sealed partial class BuffSelectionListBox : ListBox
25 | {
26 | ///
27 | /// Default Constructor
28 | ///
29 | public BuffSelectionListBox()
30 | {
31 | InitializeComponent();
32 | }
33 |
34 | ///
35 | /// OnDrawItem override to draw our custom item.
36 | ///
37 | ///
38 | protected override void OnDrawItem(DrawItemEventArgs e)
39 | {
40 | // Validation check to prevent designer errors..
41 | if (this.Items.Count <= 0)
42 | return;
43 |
44 | // Cast the incoming argument as a buff entry..
45 | var buff = (Buff)this.Items[e.Index];
46 |
47 | // Adjust the background based on selection..
48 | e.Graphics.FillRectangle((e.State & DrawItemState.Selected) == DrawItemState.Selected ?
49 | Brushes.SkyBlue : Brushes.White, e.Bounds);
50 |
51 | // Draw seperator line..
52 | e.Graphics.DrawLine(Pens.Black, e.Bounds.X, e.Bounds.Y, e.Bounds.X + e.Bounds.Width, e.Bounds.Y);
53 |
54 | // Draw the buff icon..
55 | var bmp = new Bitmap(buff.Icon.LocalPath);
56 | e.Graphics.DrawImage(bmp, e.Bounds.X + this.Margin.Left, e.Bounds.Y + this.Margin.Top, 32, 32);
57 |
58 | // Calculate name string bounds..
59 | var nameBounds = new Rectangle(e.Bounds.X + this.Margin.Horizontal + 32,
60 | e.Bounds.Y + this.Margin.Top,
61 | e.Bounds.Width - this.Margin.Right - 32 - this.Margin.Horizontal,
62 | (int)this.Font.GetHeight() + 2);
63 |
64 | // Draw buff information strings..
65 | e.Graphics.DrawString(buff.Name, this.Font, Brushes.Black, nameBounds);
66 |
67 | // Draw the focused item rect..
68 | e.DrawFocusRectangle();
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/tsge/Controls/HairListBox.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | partial class HairListBox
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Component Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | components = new System.ComponentModel.Container();
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/tsge/Controls/HairListBox.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | using Classes;
21 | using System.Drawing;
22 | using System.Windows.Forms;
23 |
24 | public partial class HairListBox : ListBox
25 | {
26 | ///
27 | /// Default Constructor
28 | ///
29 | public HairListBox()
30 | {
31 | InitializeComponent();
32 |
33 | // Add each hair file to our item list..
34 | foreach (var file in Terraria.Instance.HairFiles)
35 | this.Items.Add(file);
36 | }
37 |
38 | ///
39 | /// OnDrawItem override to draw our custom item.
40 | ///
41 | ///
42 | protected override void OnDrawItem(DrawItemEventArgs e)
43 | {
44 | // Validation check to prevent designer errors..
45 | if (this.Items.Count <= 0)
46 | return;
47 |
48 | // Cast the incoming argument as a string..
49 | var filePath = (string)this.Items[e.Index];
50 |
51 | // Adjust the background based on selection..
52 | e.Graphics.FillRectangle((e.State & DrawItemState.Selected) == DrawItemState.Selected ?
53 | Brushes.SkyBlue : Brushes.White, e.Bounds);
54 |
55 | // Draw seperator line..
56 | e.Graphics.DrawLine(Pens.Black, e.Bounds.X, e.Bounds.Y, e.Bounds.X + e.Bounds.Width, e.Bounds.Y);
57 |
58 | // Draw the hair icon..
59 | var bmp = new Bitmap(string.Format("{0}\\Data\\Hair\\{1}", Application.StartupPath, filePath));
60 | e.Graphics.DrawImage(bmp, e.Bounds.X + this.Margin.Left, e.Bounds.Y + this.Margin.Top, 48, 48);
61 |
62 | // Calculate name string bounds..
63 | var nameBounds = new Rectangle(e.Bounds.X + this.Margin.Horizontal + 48,
64 | e.Bounds.Y + this.Margin.Top + (e.Bounds.Height / 2) - (int)this.Font.GetHeight(),
65 | e.Bounds.Width - this.Margin.Right - 48 - this.Margin.Horizontal,
66 | (int)this.Font.GetHeight() + 2);
67 |
68 | var styleId = filePath.Replace("hair_", "").Replace(".png", "");
69 |
70 | // Draw style information string..
71 | e.Graphics.DrawString(string.Format("Hair Style: {0}", styleId), this.Font, Brushes.Black, nameBounds);
72 |
73 | // Draw the focused item rect..
74 | e.DrawFocusRectangle();
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/tsge/Controls/ItemLabel.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | partial class ItemLabel
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Component Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | components = new System.ComponentModel.Container();
49 | }
50 |
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/tsge/Controls/ItemLabel.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | using System.Drawing;
21 | using System.Drawing.Drawing2D;
22 | using System.Windows.Forms;
23 |
24 | public partial class ItemLabel : Label
25 | {
26 | ///
27 | /// Default Constructor
28 | ///
29 | public ItemLabel()
30 | {
31 | InitializeComponent();
32 |
33 | // Set item count to show default..
34 | this.ShowItemCount = true;
35 | }
36 |
37 | ///
38 | /// OnPaint override to draw our custom item label.
39 | ///
40 | ///
41 | protected override void OnPaint(PaintEventArgs e)
42 | {
43 | // Adjust the graphics quality..
44 | e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
45 | e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
46 | e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
47 |
48 | // Draw the item image..
49 | if (this.Image != null)
50 | e.Graphics.DrawImage(this.Image, (e.ClipRectangle.Width / 2) - (this.Image.Width / 2), (e.ClipRectangle.Height / 2) - (this.Image.Height / 2));
51 |
52 | // Don't draw the item count if not needed..
53 | if (!this.ShowItemCount)
54 | return;
55 |
56 | // Draw the text background..
57 | e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(75, 0, 0, 0)),
58 | 0, e.ClipRectangle.Height - 15, e.ClipRectangle.Width, 15);
59 |
60 | // Draw the text..
61 | var f = new Font(this.Font.FontFamily, this.Font.Size, FontStyle.Bold);
62 | var sf = new StringFormat { Alignment = StringAlignment.Far, LineAlignment = StringAlignment.Far };
63 | var p = new Pen(Color.FromArgb(255, 0, 0, 0), 2) { LineJoin = LineJoin.Round };
64 |
65 | try
66 | {
67 | using (var gp = new GraphicsPath())
68 | {
69 | gp.AddString(this.Text, f.FontFamily, (int)f.Style, 14, new Rectangle(0, 0, this.Width - 1, this.Height - 1), sf);
70 | e.Graphics.DrawPath(p, gp);
71 | e.Graphics.FillPath(Brushes.White, gp);
72 | }
73 | } catch { /* Swallow designer exception.. */ }
74 |
75 | // Cleanup..
76 | p.Dispose();
77 | sf.Dispose();
78 | f.Dispose();
79 | }
80 |
81 | ///
82 | /// Gets or sets if the item count should be drawn.
83 | ///
84 | public bool ShowItemCount { get; set; }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/tsge/Controls/ModelViewer.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | partial class ModelViewer
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Component Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | this.pbModelViewer = new System.Windows.Forms.PictureBox();
49 | ((System.ComponentModel.ISupportInitialize)(this.pbModelViewer)).BeginInit();
50 | this.SuspendLayout();
51 | //
52 | // pbModelViewer
53 | //
54 | this.pbModelViewer.Dock = System.Windows.Forms.DockStyle.Fill;
55 | this.pbModelViewer.Location = new System.Drawing.Point(0, 0);
56 | this.pbModelViewer.Name = "pbModelViewer";
57 | this.pbModelViewer.Size = new System.Drawing.Size(225, 246);
58 | this.pbModelViewer.TabIndex = 0;
59 | this.pbModelViewer.TabStop = false;
60 | //
61 | // ModelViewer
62 | //
63 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
64 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
65 | this.Controls.Add(this.pbModelViewer);
66 | this.Name = "ModelViewer";
67 | this.Size = new System.Drawing.Size(225, 246);
68 | ((System.ComponentModel.ISupportInitialize)(this.pbModelViewer)).EndInit();
69 | this.ResumeLayout(false);
70 |
71 | }
72 |
73 | #endregion
74 |
75 | private System.Windows.Forms.PictureBox pbModelViewer;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/tsge/Controls/ModelViewer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Controls
19 | {
20 | using System;
21 | using System.Drawing;
22 | using System.IO;
23 | using System.Windows.Forms;
24 |
25 | public partial class ModelViewer : UserControl
26 | {
27 | ///
28 | /// Internal copy of the hair id.
29 | ///
30 | private int m_HairId;
31 |
32 | ///
33 | /// Internal copy of the hair color.
34 | ///
35 | private Color m_HairColor;
36 |
37 | ///
38 | /// Internal copy of the head color.
39 | ///
40 | private Color m_HeadColor;
41 |
42 | ///
43 | /// Internal copy of the eye color.
44 | ///
45 | private Color m_EyeColor;
46 |
47 | ///
48 | /// Internal copy of the eye whites color.
49 | ///
50 | private Color m_EyeWhitesColor;
51 |
52 | ///
53 | /// Internal copy of the hands color.
54 | ///
55 | private Color m_HandsColor;
56 |
57 | ///
58 | /// Internal copy of the shirt color.
59 | ///
60 | private Color m_ShirtColor;
61 |
62 | ///
63 | /// Internal copy of the undershirt color.
64 | ///
65 | private Color m_UndershirtColor;
66 |
67 | ///
68 | /// Internal copy of the pants color.
69 | ///
70 | private Color m_PantsColor;
71 |
72 | ///
73 | /// Internal copy of the shoes color.
74 | ///
75 | private Color m_ShoesColor;
76 |
77 | ///
78 | /// Internal copy of the eye texture.
79 | ///
80 | private Bitmap m_EyeTexture;
81 |
82 | ///
83 | /// Internal copy of the eye whites texture.
84 | ///
85 | private Bitmap m_EyeWhitesTexture;
86 |
87 | ///
88 | /// Internal copy of the hair texture.
89 | ///
90 | private Bitmap m_HairTexture;
91 |
92 | ///
93 | /// Internal copy of the hands texture.
94 | ///
95 | private Bitmap m_HandsTexture;
96 |
97 | ///
98 | /// Internal copy of the head texture.
99 | ///
100 | private Bitmap m_HeadTexture;
101 |
102 | ///
103 | /// Internal copy of the pants texture.
104 | ///
105 | private Bitmap m_PantsTexture;
106 |
107 | ///
108 | /// Internal copy of the shirt texture.
109 | ///
110 | private Bitmap m_ShirtTexture;
111 |
112 | ///
113 | /// Internal copy of the shoes texture.
114 | ///
115 | private Bitmap m_ShoesTexture;
116 |
117 | ///
118 | /// Internal copy of the undershirt texture.
119 | ///
120 | private Bitmap m_UnderShirtTexture;
121 |
122 | ///
123 | /// Default Constructor
124 | ///
125 | public ModelViewer()
126 | {
127 | InitializeComponent();
128 |
129 | // Set class property defaults..
130 | this.Suspended = false;
131 | this.LargestImageWidth = 0;
132 | this.LargestImageHeight = 0;
133 |
134 | // Suspend model updates..
135 | this.SuspendModelUpdates();
136 |
137 | // Set default colors..
138 | this.EyeWhitesColor = Color.FromArgb(255, 255, 255, 255);
139 | this.EyeColor = Color.FromArgb(255, 105, 90, 75);
140 | this.HairColor = Color.FromArgb(255, 215, 90, 55);
141 | this.HandsColor = Color.FromArgb(255, 255, 125, 75);
142 | this.HeadColor = Color.FromArgb(255, 255, 125, 75);
143 | this.PantsColor = Color.FromArgb(255, 255, 230, 175);
144 | this.ShirtColor = Color.FromArgb(255, 175, 165, 140);
145 | this.ShoesColor = Color.FromArgb(255, 160, 106, 60);
146 | this.UndershirtColor = Color.FromArgb(255, 160, 180, 215);
147 |
148 | // Set default file paths..
149 | this.HairFile = "Data\\Hair\\hair_0.png";
150 | this.EyeFile = "Data\\Eyes\\eyes.png";
151 | this.EyeWhitesFile = "Data\\Eyes\\eye_whites.png";
152 | this.HeadFile = "Data\\Heads\\head.png";
153 | this.HandsFile = "Data\\Hands\\hands.png";
154 | this.ShirtFile = "Data\\Shirts\\shirt.png";
155 | this.UnderShirtFile = "Data\\UnderShirts\\undershirt.png";
156 | this.PantsFile = "Data\\Pants\\pants.png";
157 | this.ShoesFile = "Data\\Shoes\\shoes.png";
158 |
159 | // Update the model viewer..
160 | this.ResumeModelUpdates();
161 | }
162 |
163 | ///
164 | /// Colorizes a bitmap with the given color.
165 | ///
166 | ///
167 | ///
168 | ///
169 | private Bitmap ColorizeBitmap(Bitmap bmpInput, Color c)
170 | {
171 | if (this.Suspended)
172 | return bmpInput;
173 |
174 | // Adjust the pixel colors..
175 | for (var h = 0; h < bmpInput.Height; h++)
176 | for (var w = 0; w < bmpInput.Width; w++)
177 | {
178 | var pixel = bmpInput.GetPixel(w, h);
179 | if (pixel == Color.FromArgb(0, 0, 0, 0))
180 | continue;
181 |
182 | if (pixel != Color.FromArgb(255, 249, 249, 249))
183 | {
184 | bmpInput.SetPixel(w, h, System.Drawing.Color.FromArgb(
185 | (pixel.R + c.R) / 2,
186 | (pixel.G + c.G) / 2,
187 | (pixel.B + c.B) / 2));
188 | }
189 | else
190 | {
191 | bmpInput.SetPixel(w, h, System.Drawing.Color.White);
192 | }
193 | }
194 |
195 | // Draw the new image..
196 | var bmpColored = new Bitmap(bmpInput.Width * 4, bmpInput.Height * 4);
197 | using (var g = Graphics.FromImage(bmpColored))
198 | {
199 | g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
200 | g.DrawImage(bmpInput, 0, 0, bmpColored.Width, bmpColored.Height);
201 | }
202 |
203 | // Store the largest found texture size..
204 | if (bmpColored.Width > this.LargestImageWidth)
205 | this.LargestImageWidth = bmpColored.Width;
206 | if (bmpColored.Height > this.LargestImageHeight)
207 | this.LargestImageHeight = bmpColored.Height;
208 |
209 | return bmpColored;
210 | }
211 |
212 | ///
213 | /// Updates the model viewer textures and creates the new player preview.
214 | ///
215 | public void UpdateTextures()
216 | {
217 | if (this.Suspended)
218 | return;
219 |
220 | // Validation check..
221 | if (this.ShoesFile == null)
222 | return;
223 |
224 | try
225 | {
226 | // Update the texture files..
227 | this.m_EyeTexture = this.ColorizeBitmap(new Bitmap(this.EyeFile), this.EyeColor);
228 | this.m_EyeWhitesTexture = this.ColorizeBitmap(new Bitmap(this.EyeWhitesFile), this.EyeWhitesColor);
229 | this.m_HairTexture = this.ColorizeBitmap(new Bitmap(this.HairFile), this.HairColor);
230 | this.m_HandsTexture = this.ColorizeBitmap(new Bitmap(this.HandsFile), this.HandsColor);
231 | this.m_HeadTexture = this.ColorizeBitmap(new Bitmap(this.HeadFile), this.HeadColor);
232 | this.m_PantsTexture = this.ColorizeBitmap(new Bitmap(this.PantsFile), this.PantsColor);
233 | this.m_ShirtTexture = this.ColorizeBitmap(new Bitmap(this.ShirtFile), this.ShirtColor);
234 | this.m_ShoesTexture = this.ColorizeBitmap(new Bitmap(this.ShoesFile), this.ShoesColor);
235 | this.m_UnderShirtTexture = this.ColorizeBitmap(new Bitmap(this.UnderShirtFile), this.UndershirtColor);
236 |
237 | // Draw the new full model based on the largest images dimensions.
238 | var bmpModel = new Bitmap(this.LargestImageWidth, this.LargestImageHeight);
239 | using (var g = Graphics.FromImage(bmpModel))
240 | {
241 | g.DrawImage(this.m_PantsTexture, 0, 0);
242 | g.DrawImage(this.m_ShoesTexture, 0, 0);
243 | g.DrawImage(this.m_ShirtTexture, 0, 0);
244 | g.DrawImage(this.m_UnderShirtTexture, 0, 0);
245 | g.DrawImage(this.m_HandsTexture, 0, 0);
246 | g.DrawImage(this.m_HeadTexture, 0, 0);
247 | g.DrawImage(this.m_HairTexture, 0, 0);
248 | g.DrawImage(this.m_EyeWhitesTexture, 0, 0);
249 | g.DrawImage(this.m_EyeTexture, 0, 0);
250 | }
251 |
252 | // Save the new bitmap to a memory stream..
253 | var ms = new MemoryStream();
254 | bmpModel.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
255 | this.pbModelViewer.Image = new Bitmap(ms);
256 |
257 | // Collect garbage..
258 | GC.Collect();
259 | }
260 | catch { }
261 | }
262 |
263 | ///
264 | /// Suspends model updates from happening until resumed.
265 | ///
266 | public void SuspendModelUpdates()
267 | {
268 | this.Suspended = true;
269 | }
270 |
271 | ///
272 | /// Resumes model updates.
273 | ///
274 | public void ResumeModelUpdates()
275 | {
276 | this.Suspended = false;
277 | this.UpdateTextures();
278 | }
279 |
280 | ///
281 | /// Gets or sets if the model viewer is paused from updating.
282 | ///
283 | public bool Suspended { get; set; }
284 |
285 | ///
286 | /// Gets or sets the largest image width.
287 | ///
288 | public int LargestImageWidth { get; set; }
289 |
290 | ///
291 | /// Gets or sets the largest image height.
292 | ///
293 | public int LargestImageHeight { get; set; }
294 |
295 | ///
296 | /// Gets or sets the hair id property.
297 | ///
298 | public int HairId
299 | {
300 | get { return this.m_HairId; }
301 | set
302 | {
303 | this.m_HairId = value;
304 | this.HairFile = string.Format("Data\\Hair\\hair_{0}.png", value);
305 | }
306 | }
307 |
308 | ///
309 | /// Gets or sets the hair color property.
310 | ///
311 | public Color HairColor
312 | {
313 | get { return m_HairColor; }
314 | set { this.m_HairColor = value; this.UpdateTextures(); }
315 | }
316 |
317 | ///
318 | /// Gets or sets the head color property.
319 | ///
320 | public Color HeadColor
321 | {
322 | get { return m_HeadColor; }
323 | set { this.m_HeadColor = value; this.UpdateTextures(); }
324 | }
325 |
326 | ///
327 | /// Gets or sets the eye color property.
328 | ///
329 | public Color EyeColor
330 | {
331 | get { return m_EyeColor; }
332 | set { this.m_EyeColor = value; this.UpdateTextures(); }
333 | }
334 |
335 | ///
336 | /// Gets or sets the eye whites color property.
337 | ///
338 | public Color EyeWhitesColor
339 | {
340 | get { return m_EyeWhitesColor; }
341 | set { this.m_EyeWhitesColor = value; this.UpdateTextures(); }
342 | }
343 |
344 | ///
345 | /// Gets or sets the hands color property.
346 | ///
347 | public Color HandsColor
348 | {
349 | get { return m_HandsColor; }
350 | set { this.m_HandsColor = value; this.UpdateTextures(); }
351 | }
352 |
353 | ///
354 | /// Gets or sets the shirt color property.
355 | ///
356 | public Color ShirtColor
357 | {
358 | get { return m_ShirtColor; }
359 | set { this.m_ShirtColor = value; this.UpdateTextures(); }
360 | }
361 |
362 | ///
363 | /// Gets or sets the under shirt color property.
364 | ///
365 | public Color UndershirtColor
366 | {
367 | get { return m_UndershirtColor; }
368 | set { this.m_UndershirtColor = value; this.UpdateTextures(); }
369 | }
370 |
371 | ///
372 | /// Gets or sets the pants color property.
373 | ///
374 | public Color PantsColor
375 | {
376 | get { return m_PantsColor; }
377 | set { this.m_PantsColor = value; this.UpdateTextures(); }
378 | }
379 |
380 | ///
381 | /// Gets or sets the shoes color property.
382 | ///
383 | public Color ShoesColor
384 | {
385 | get { return m_ShoesColor; }
386 | set { this.m_ShoesColor = value; this.UpdateTextures(); }
387 | }
388 |
389 | ///
390 | /// Gets or sets the hair file property.
391 | ///
392 | public string HairFile { get; set; }
393 |
394 | ///
395 | /// Gets or sets the head file property.
396 | ///
397 | public string HeadFile { get; set; }
398 |
399 | ///
400 | /// Gets or sets the eye file property.
401 | ///
402 | public string EyeFile { get; set; }
403 |
404 | ///
405 | /// Gets or sets the eye whites file property.
406 | ///
407 | public string EyeWhitesFile { get; set; }
408 |
409 | ///
410 | /// Gets or sets the hands file property.
411 | ///
412 | public string HandsFile { get; set; }
413 |
414 | ///
415 | /// Gets or sets the shirt file property.
416 | ///
417 | public string ShirtFile { get; set; }
418 |
419 | ///
420 | /// Gets or sets the under shirt file property.
421 | ///
422 | public string UnderShirtFile { get; set; }
423 |
424 | ///
425 | /// Gets or sets the pants file property.
426 | ///
427 | public string PantsFile { get; set; }
428 |
429 | ///
430 | /// Gets or sets the shoes file property.
431 | ///
432 | public string ShoesFile { get; set; }
433 | }
434 | }
435 |
--------------------------------------------------------------------------------
/tsge/Controls/ModelViewer.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
--------------------------------------------------------------------------------
/tsge/Extensions/ColorExtensions.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge.Extensions
19 | {
20 | using System;
21 | using System.Drawing;
22 |
23 | public static class ColorExtensions
24 | {
25 | ///
26 | /// Converts a byte array of three bytes to a System.Drawing.Color.
27 | ///
28 | ///
29 | ///
30 | ///
31 | public static Color FromBytes(this Color c, byte[] btColor)
32 | {
33 | if (btColor == null || btColor.Length != 3)
34 | throw new ArgumentException("Invalid array size for incoming color.", "btColor");
35 | return Color.FromArgb(255, btColor[0], btColor[1], btColor[2]);
36 | }
37 |
38 | ///
39 | /// Converts a System.Drawing.Color to a three byte array.
40 | ///
41 | ///
42 | ///
43 | public static byte[] ToBytes(this Color c)
44 | {
45 | return new[] { c.R, c.G, c.B };
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/tsge/Program.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge
19 | {
20 | using System;
21 | using System.IO;
22 | using System.Windows.Forms;
23 |
24 | internal static class Program
25 | {
26 | ///
27 | /// The main entry point for the application.
28 | ///
29 | [STAThread]
30 | private static void Main()
31 | {
32 | // Attach unhandled exception handler..
33 | AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
34 |
35 | // Execute the application..
36 | Application.EnableVisualStyles();
37 | Application.SetCompatibleTextRenderingDefault(false);
38 | Application.Run(new frmMain());
39 | }
40 |
41 | ///
42 | /// Catches and saves unhandled exceptions.
43 | ///
44 | ///
45 | ///
46 | private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs)
47 | {
48 | try
49 | {
50 | if (unhandledExceptionEventArgs.ExceptionObject == null)
51 | return;
52 |
53 | var ex = (Exception)unhandledExceptionEventArgs.ExceptionObject;
54 | using (var writer = new StreamWriter("crashlog.txt"))
55 | {
56 | writer.Write(ex);
57 | writer.Flush();
58 | }
59 |
60 | MessageBox.Show(ex.ToString(), "Error!");
61 | }
62 | catch
63 | {
64 | }
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/tsge/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | using System.Reflection;
19 | using System.Runtime.InteropServices;
20 |
21 | // General Information about an assembly is controlled through the following
22 | // set of attributes. Change these attribute values to modify the information
23 | // associated with an assembly.
24 | [assembly: AssemblyTitle("tsge")]
25 | [assembly: AssemblyDescription("Terraria Save Game Editor - by atom0s")]
26 | [assembly: AssemblyConfiguration("Release")]
27 | [assembly: AssemblyCompany("atom0s")]
28 | [assembly: AssemblyProduct("tsge")]
29 | [assembly: AssemblyCopyright("Copyright © atom0s 2012-2013")]
30 | [assembly: AssemblyTrademark("")]
31 | [assembly: AssemblyCulture("")]
32 |
33 | // Setting ComVisible to false makes the types in this assembly not visible
34 | // to COM components. If you need to access a type in this assembly from
35 | // COM, set the ComVisible attribute to true on that type.
36 | [assembly: ComVisible(false)]
37 |
38 | // The following GUID is for the ID of the typelib if this project is exposed to COM
39 | [assembly: Guid("a2765b35-57f8-4ac7-9c68-7e75795cd713")]
40 |
41 | // Version information for an assembly consists of the following four values:
42 | //
43 | // Major Version
44 | // Minor Version
45 | // Build Number
46 | // Revision
47 | //
48 | // You can specify all the values or you can default the Build and Revision Numbers
49 | // by using the '*' as shown below:
50 | // [assembly: AssemblyVersion("1.0.*")]
51 | [assembly: AssemblyVersion("2.2.0.2")]
52 | [assembly: AssemblyFileVersion("2.2.0.2")]
53 |
--------------------------------------------------------------------------------
/tsge/Properties/DataSources/tsge.Classes.Player.datasource:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 | tsge.Classes.Player, tsge, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null
10 | tsge.Classes.Item, tsge, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null
11 | tsge.Classes.ItemPrefix, tsge, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null
12 | tsge.Classes.Buff, tsge, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null
13 |
--------------------------------------------------------------------------------
/tsge/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18052
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace tsge.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("tsge.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap _new {
67 | get {
68 | object obj = ResourceManager.GetObject("new", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap donate {
77 | get {
78 | object obj = ResourceManager.GetObject("donate", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Bitmap.
85 | ///
86 | internal static System.Drawing.Bitmap folder_user {
87 | get {
88 | object obj = ResourceManager.GetObject("folder_user", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 |
93 | ///
94 | /// Looks up a localized resource of type System.Drawing.Bitmap.
95 | ///
96 | internal static System.Drawing.Bitmap information {
97 | get {
98 | object obj = ResourceManager.GetObject("information", resourceCulture);
99 | return ((System.Drawing.Bitmap)(obj));
100 | }
101 | }
102 |
103 | ///
104 | /// Looks up a localized resource of type System.Drawing.Bitmap.
105 | ///
106 | internal static System.Drawing.Bitmap page_save {
107 | get {
108 | object obj = ResourceManager.GetObject("page_save", resourceCulture);
109 | return ((System.Drawing.Bitmap)(obj));
110 | }
111 | }
112 |
113 | ///
114 | /// Looks up a localized resource of type System.Drawing.Bitmap.
115 | ///
116 | internal static System.Drawing.Bitmap script_save {
117 | get {
118 | object obj = ResourceManager.GetObject("script_save", resourceCulture);
119 | return ((System.Drawing.Bitmap)(obj));
120 | }
121 | }
122 |
123 | ///
124 | /// Looks up a localized resource of type System.Drawing.Bitmap.
125 | ///
126 | internal static System.Drawing.Bitmap status_online {
127 | get {
128 | object obj = ResourceManager.GetObject("status_online", resourceCulture);
129 | return ((System.Drawing.Bitmap)(obj));
130 | }
131 | }
132 |
133 | ///
134 | /// Looks up a localized resource of type System.Drawing.Bitmap.
135 | ///
136 | internal static System.Drawing.Bitmap stop {
137 | get {
138 | object obj = ResourceManager.GetObject("stop", resourceCulture);
139 | return ((System.Drawing.Bitmap)(obj));
140 | }
141 | }
142 |
143 | ///
144 | /// Looks up a localized resource of type System.Drawing.Bitmap.
145 | ///
146 | internal static System.Drawing.Bitmap Twitter {
147 | get {
148 | object obj = ResourceManager.GetObject("Twitter", resourceCulture);
149 | return ((System.Drawing.Bitmap)(obj));
150 | }
151 | }
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/tsge/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\status_online.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\page_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
131 | ..\Resources\script_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
132 |
133 |
134 | ..\Resources\Twitter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
135 |
136 |
137 | ..\Resources\folder_user.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
138 |
139 |
140 | ..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
141 |
142 |
143 | ..\Resources\donate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
144 |
145 |
146 | ..\Resources\new.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
147 |
148 |
--------------------------------------------------------------------------------
/tsge/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.18052
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace tsge.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/tsge/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tsge/Resources/Twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/Twitter.png
--------------------------------------------------------------------------------
/tsge/Resources/donate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/donate.png
--------------------------------------------------------------------------------
/tsge/Resources/folder_user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/folder_user.png
--------------------------------------------------------------------------------
/tsge/Resources/information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/information.png
--------------------------------------------------------------------------------
/tsge/Resources/new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/new.png
--------------------------------------------------------------------------------
/tsge/Resources/page_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/page_save.png
--------------------------------------------------------------------------------
/tsge/Resources/script_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/script_save.png
--------------------------------------------------------------------------------
/tsge/Resources/status_online.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/status_online.png
--------------------------------------------------------------------------------
/tsge/Resources/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/stop.png
--------------------------------------------------------------------------------
/tsge/Resources/terr.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/Resources/terr.ico
--------------------------------------------------------------------------------
/tsge/frmAbout.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge
19 | {
20 | partial class frmAbout
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Windows Form Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
49 | this.label1 = new System.Windows.Forms.Label();
50 | this.label2 = new System.Windows.Forms.Label();
51 | this.lblVersion = new System.Windows.Forms.Label();
52 | this.label4 = new System.Windows.Forms.Label();
53 | this.lblSourceCode = new System.Windows.Forms.LinkLabel();
54 | this.label3 = new System.Windows.Forms.Label();
55 | this.label5 = new System.Windows.Forms.Label();
56 | this.label6 = new System.Windows.Forms.Label();
57 | this.label7 = new System.Windows.Forms.Label();
58 | this.label8 = new System.Windows.Forms.Label();
59 | this.btnDonate = new System.Windows.Forms.Button();
60 | this.btnTwitter = new System.Windows.Forms.Button();
61 | this.label9 = new System.Windows.Forms.Label();
62 | this.SuspendLayout();
63 | //
64 | // label1
65 | //
66 | this.label1.AutoSize = true;
67 | this.label1.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
68 | this.label1.Location = new System.Drawing.Point(12, 9);
69 | this.label1.Name = "label1";
70 | this.label1.Size = new System.Drawing.Size(312, 32);
71 | this.label1.TabIndex = 0;
72 | this.label1.Text = "Terraria Save Game Editor";
73 | //
74 | // label2
75 | //
76 | this.label2.AutoSize = true;
77 | this.label2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
78 | this.label2.Location = new System.Drawing.Point(30, 41);
79 | this.label2.Name = "label2";
80 | this.label2.Size = new System.Drawing.Size(44, 13);
81 | this.label2.TabIndex = 1;
82 | this.label2.Text = "Version:";
83 | //
84 | // lblVersion
85 | //
86 | this.lblVersion.AutoSize = true;
87 | this.lblVersion.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
88 | this.lblVersion.Location = new System.Drawing.Point(85, 41);
89 | this.lblVersion.Name = "lblVersion";
90 | this.lblVersion.Size = new System.Drawing.Size(37, 13);
91 | this.lblVersion.TabIndex = 2;
92 | this.lblVersion.Text = "0.0.0.0";
93 | //
94 | // label4
95 | //
96 | this.label4.AutoSize = true;
97 | this.label4.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
98 | this.label4.Location = new System.Drawing.Point(30, 54);
99 | this.label4.Name = "label4";
100 | this.label4.Size = new System.Drawing.Size(210, 13);
101 | this.label4.TabIndex = 3;
102 | this.label4.Text = "(c) 2012 - 2013 atom0s [atom0s@live.com]";
103 | //
104 | // lblSourceCode
105 | //
106 | this.lblSourceCode.AutoSize = true;
107 | this.lblSourceCode.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
108 | this.lblSourceCode.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
109 | this.lblSourceCode.Location = new System.Drawing.Point(30, 127);
110 | this.lblSourceCode.Name = "lblSourceCode";
111 | this.lblSourceCode.Size = new System.Drawing.Size(238, 13);
112 | this.lblSourceCode.TabIndex = 4;
113 | this.lblSourceCode.TabStop = true;
114 | this.lblSourceCode.Text = "TSGE is open source; click here for more info!";
115 | this.lblSourceCode.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblSourceCode_LinkClicked);
116 | //
117 | // label3
118 | //
119 | this.label3.AutoSize = true;
120 | this.label3.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
121 | this.label3.Location = new System.Drawing.Point(12, 95);
122 | this.label3.Name = "label3";
123 | this.label3.Size = new System.Drawing.Size(158, 32);
124 | this.label3.TabIndex = 5;
125 | this.label3.Text = "Source Code";
126 | //
127 | // label5
128 | //
129 | this.label5.AutoSize = true;
130 | this.label5.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
131 | this.label5.Location = new System.Drawing.Point(12, 163);
132 | this.label5.Name = "label5";
133 | this.label5.Size = new System.Drawing.Size(232, 32);
134 | this.label5.TabIndex = 6;
135 | this.label5.Text = "Credits and Thanks";
136 | //
137 | // label6
138 | //
139 | this.label6.AutoSize = true;
140 | this.label6.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
141 | this.label6.Location = new System.Drawing.Point(30, 195);
142 | this.label6.Name = "label6";
143 | this.label6.Size = new System.Drawing.Size(219, 65);
144 | this.label6.TabIndex = 7;
145 | this.label6.Text = "atom0s - Core development.\r\nAustin Andrews - Titlebar icons.\r\nTerraria - Item tex" +
146 | "tures and application icon.\r\nSinzfeldt - For buying me Terraria.\r\nattilathedud -" +
147 | " Original beta testing.";
148 | //
149 | // label7
150 | //
151 | this.label7.AutoSize = true;
152 | this.label7.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
153 | this.label7.Location = new System.Drawing.Point(12, 278);
154 | this.label7.Name = "label7";
155 | this.label7.Size = new System.Drawing.Size(312, 32);
156 | this.label7.TabIndex = 8;
157 | this.label7.Text = "Supported Game Versions";
158 | //
159 | // label8
160 | //
161 | this.label8.AutoSize = true;
162 | this.label8.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
163 | this.label8.Location = new System.Drawing.Point(30, 310);
164 | this.label8.Name = "label8";
165 | this.label8.Size = new System.Drawing.Size(126, 78);
166 | this.label8.TabIndex = 9;
167 | this.label8.Text = "Terraria 1.1.2+\r\nTerraria 1.2.0.0\r\nTerraria 1.2.0.1\r\nTerraria 1.2.0.2\r\nTerraria 1" +
168 | ".2.0.3 / 1.2.0.3.1\r\nTerraria 1.2.1 / 1.2.1.2";
169 | //
170 | // btnDonate
171 | //
172 | this.btnDonate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
173 | this.btnDonate.Image = global::tsge.Properties.Resources.donate;
174 | this.btnDonate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
175 | this.btnDonate.Location = new System.Drawing.Point(362, 82);
176 | this.btnDonate.Name = "btnDonate";
177 | this.btnDonate.Size = new System.Drawing.Size(166, 64);
178 | this.btnDonate.TabIndex = 11;
179 | this.btnDonate.Text = "Donate!";
180 | this.btnDonate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
181 | this.btnDonate.UseVisualStyleBackColor = true;
182 | this.btnDonate.Click += new System.EventHandler(this.btnDonate_Click);
183 | //
184 | // btnTwitter
185 | //
186 | this.btnTwitter.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
187 | this.btnTwitter.Image = global::tsge.Properties.Resources.Twitter;
188 | this.btnTwitter.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
189 | this.btnTwitter.Location = new System.Drawing.Point(362, 12);
190 | this.btnTwitter.Name = "btnTwitter";
191 | this.btnTwitter.Size = new System.Drawing.Size(166, 64);
192 | this.btnTwitter.TabIndex = 10;
193 | this.btnTwitter.Text = "Follow me on Twitter!";
194 | this.btnTwitter.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
195 | this.btnTwitter.UseVisualStyleBackColor = true;
196 | this.btnTwitter.Click += new System.EventHandler(this.btnTwitter_Click);
197 | //
198 | // label9
199 | //
200 | this.label9.AutoSize = true;
201 | this.label9.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
202 | this.label9.Location = new System.Drawing.Point(162, 310);
203 | this.label9.Name = "label9";
204 | this.label9.Size = new System.Drawing.Size(110, 13);
205 | this.label9.TabIndex = 12;
206 | this.label9.Text = "Terraria 1.2.3 / 1.2.3.1";
207 | //
208 | // frmAbout
209 | //
210 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
211 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
212 | this.ClientSize = new System.Drawing.Size(540, 408);
213 | this.Controls.Add(this.label9);
214 | this.Controls.Add(this.btnDonate);
215 | this.Controls.Add(this.btnTwitter);
216 | this.Controls.Add(this.label8);
217 | this.Controls.Add(this.label7);
218 | this.Controls.Add(this.label6);
219 | this.Controls.Add(this.label5);
220 | this.Controls.Add(this.label3);
221 | this.Controls.Add(this.lblSourceCode);
222 | this.Controls.Add(this.label4);
223 | this.Controls.Add(this.lblVersion);
224 | this.Controls.Add(this.label2);
225 | this.Controls.Add(this.label1);
226 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
227 | this.MaximizeBox = false;
228 | this.Name = "frmAbout";
229 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
230 | this.Text = "About TSGE";
231 | this.ResumeLayout(false);
232 | this.PerformLayout();
233 |
234 | }
235 |
236 | #endregion
237 |
238 | private System.Windows.Forms.Label label1;
239 | private System.Windows.Forms.Label label2;
240 | private System.Windows.Forms.Label lblVersion;
241 | private System.Windows.Forms.Label label4;
242 | private System.Windows.Forms.LinkLabel lblSourceCode;
243 | private System.Windows.Forms.Label label3;
244 | private System.Windows.Forms.Label label5;
245 | private System.Windows.Forms.Label label6;
246 | private System.Windows.Forms.Label label7;
247 | private System.Windows.Forms.Label label8;
248 | private System.Windows.Forms.Button btnTwitter;
249 | private System.Windows.Forms.Button btnDonate;
250 | private System.Windows.Forms.Label label9;
251 | }
252 | }
--------------------------------------------------------------------------------
/tsge/frmAbout.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge
19 | {
20 | using System.Diagnostics;
21 | using System.Reflection;
22 | using System.Windows.Forms;
23 |
24 | public partial class frmAbout : Form
25 | {
26 | ///
27 | /// Default Constructor
28 | ///
29 | public frmAbout()
30 | {
31 | InitializeComponent();
32 |
33 | // Set the application version label..
34 | var appVersion = Assembly.GetExecutingAssembly().GetName().Version;
35 | this.lblVersion.Text = string.Format("Version: {0}.{1}.{2}.{3}", appVersion.Major, appVersion.Minor, appVersion.Build, appVersion.Revision);
36 | }
37 |
38 | ///
39 | /// Launches the users browser and navigates to Twitter.
40 | ///
41 | ///
42 | ///
43 | private void btnTwitter_Click(object sender, System.EventArgs e)
44 | {
45 | Process.Start(new ProcessStartInfo("http://www.twitter.com/atom0s"));
46 | }
47 |
48 | ///
49 | /// Launches the users browser and navigates to Paypal.
50 | ///
51 | ///
52 | ///
53 | private void btnDonate_Click(object sender, System.EventArgs e)
54 | {
55 | Process.Start(new ProcessStartInfo("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7U7Q2GRT6KUJN"));
56 | }
57 |
58 | ///
59 | /// Launches the users browser and navigates to Google.
60 | ///
61 | ///
62 | ///
63 | private void lblSourceCode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
64 | {
65 | Process.Start(new ProcessStartInfo("https://github.com/atom0s/TSGE"));
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/tsge/frmAbout.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
124 | AAD///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyLzA2Pr85RljROUVWyzY+
125 | SaM3RFbzSlhty0VRYbU5RFOvPkxg0UpacvMyMjI5////Af///wH///8B////Af///wH///8B////Af//
126 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDY+kTM+
127 | TtU9VXf/NUtq/z9Zfv9dfav/W3qm/1Rym/9QZoXrS1ltyTIyMiX///8B////Af///wH///8B////Af//
128 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
129 | /wH///8BMjIyHTI/Uek2TGv/QVyC/1Z2o/9jg7H/SVhuxzIyMif///8B////Af///wH///8B////Af//
130 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
131 | /wH///8B////Af///wH///8BMDU8hzZLaP8+WH3/Xn6r/0pjh/81OD5T////Af///wH///8B////Af//
132 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
133 | /wH///8B////Af///wH///8B////Af///wExMTEFMjxJz0Fcg/9ff63/QU9kzzExMQX///8B////Af//
134 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
135 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyO0fNNk1s/1Z2o/9KWW/rNjtCN///
136 | /wH///8B////ATIyMhH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
137 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATQ+TM01TGr/XX2r/159
138 | qf9JXXvnNT1IgzExMQcrOCaBKEAf0zIyMif///8B////Af///wH///8B////Af///wH///8B////Af//
139 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDlEzT9a
140 | gP9igrH/TGOC70dVasNJX37/NT1Ezy9eGv81dBf/JksZrS87KjH///8B////Af///wH///8B////Af//
141 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
142 | /wEvN0HNQVyC/119qv9EUmbNMjIyCTg9REsuPC35SZ8c/02qG/8zcBf/LzorX////wH///8B////Af//
143 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyMjIL////Af//
144 | /wH///8BNTk+LTM9Suc3Tm7/XX2q/0lXa83///8BMjIyCTVXIvFJmh7/TKId/z1nJ9kyMjIR////Af//
145 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyIyg+
146 | IcstOShzMjIyBTU7RHVGWnbjQ16D/z1Wev9YeKT/TFpvzf///wEyMjJTIUoT/S1oFP84ZiDrOlwnszIy
147 | Mgv///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIy
148 | MikqQyCjMXQU/y1oFP80PULBSV9+/0lZcM09UWzxQ2CI/1Z0nv9JV2vN////Af///wExMzBFLj0oczIy
149 | MicyMjIP////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
150 | /wH///8BLzUsZSteFv9OrBz/T7Ac/0ReUfk6QEhZMTExDTA4RM1BXYP/TmyW/0xab83///8B////Af//
151 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
152 | /wH///8B////Af///wEyMjIRLE0f2UOQG/9Qrx3/OmAl8TIyMgP///8BLzdCzTRKaP9cfKr/RVNmzf//
153 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
154 | /wH///8B////Af///wH///8B////ATIyMg0nQB6/KVQY8TZ1GP8tYxb9MjIyWTIyMicxPlHpOVJz/1l5
155 | pv9JV2vN////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
156 | /wH///8B////Af///wH///8B////Af///wH///8B////ATIyMhMyMjIvLj4ogzEzMFP///8BMjIyQTNF
157 | Xf8wRF//Vnaj/0xab83///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
158 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
159 | /wExMTEtMkFW7zdObv9XdqL/SVdrzf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
160 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
161 | /wH///8B////Af///wEwNDrNOE5t/0hih/9FU2fN////Af///wH///8B////Af///wH///8B////Af//
162 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
163 | /wH///8B////ASo7JLMvNC5RKDwg1SZFHP0wP0//LUA6/zxJW9ExMTEFMjIyCTExMQv///8B////Af//
164 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
165 | /wH///8B////ATIyMg8xMTEZJ0ka9yRKFP8rXRT/I18M/yhOGv8nRCD/LUA1/y1II7cvTiPFK0ofyzIy
166 | MiX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
167 | /wH///8B////Af///wH///8BKj0koSRBGt8cTQr/IloM/zJzFP82fBX/P4wa/zmCF/81dRj/OIIW/ziC
168 | Fv80exX/LVoc9TIyMjn///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
169 | /wH///8B////Af///wH///8B////AS48KVchTBLzJlwP/ytnEf8ydRT/N30W/zh9Fv81ehX/O4UY/0WR
170 | HP9Aixr/N30W/0GKG/8ydRT/K0Ajrf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
171 | /wH///8B////Af///wH///8B////Af///wH///8BKjolqR1SCv8saBH/LW4R/zR3FP86gRf/Q4oc/0aQ
172 | Hf87gRj/R5Ue/0SOHP87hRf/N34V/zqAF/8tYBn5MjIyM////wH///8B////Af///wH///8B////Af//
173 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEuNSuXIUwR+SZfDv82eBb/OH0W/0WQ
174 | Hf9FkB3/UKsf/0ynG/9DjRv/Tqgd/0OLHP88hhj/N34W/zZqHf8yMjI3////Af///wH///8B////Af//
175 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIyMg0mPR7PLmwS/zR2
176 | Ff88hhj/R5Qd/0qeHf9Npx3/T6wd/06pHf9Nph3/SJcd/0aWG/83fhX/NGYb/zIyMjf///8B////Af//
177 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BLDwmjR9R
178 | Df8qaQ//L3AS/0GMGv9Knhz/TaYc/0ygHv9Qrxz/Tqod/02lHv9QsRz/S6Qb/zh8Fv81bRr/NUMuW///
179 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
180 | /wEuNSsxKTwity5oE/8xcRP/OH8W/0iWHf9LpBv/TaUd/0yjHv9OqB3/TKUd/0qfHP9HlR3/Spof/zxv
181 | If81Rit7////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
182 | /wH///8B////Af///wEyMjInKFIY7TJ2E/9BjBr/Q4wc/0eWG/9MpB3/T6oe/1CxHP9MpB3/RI8b/0eT
183 | Hf8+dx/9MjUxUzExMQP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
184 | /wH///8B////Af///wH///8B////ATIyMjEsWBnxM3UU/zl/Fv9Gkh3/RZAd/0WPHP9Nph3/Tawa/0eV
185 | HP9IlR7/P30d/TIyMoX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
186 | /wH///8B////Af///wH///8B////Af///wH///8BMjIyOyhRGPUubRL/PoIa/zN3FP8+hhn/PokZ/0eT
187 | Hf9HlB7/Qo0b/0WQHf85WifX////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
188 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyWypKHtMtUx3xLUAmpSlY
189 | F+0zdxT/MnYT/zx9Gv82VSe9N1clzTI4LyH///8B////Af///wH///8B////Af///wH///8B////Af//
190 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMTExDTIy
191 | Mhf///8BMDYuZSxDI8s1USbLNk8onzExMQcyMjIN////Af///wH///8B////Af///wH///8B////Af//
192 | /wH///8B////Af///wH///8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
193 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
194 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
195 |
196 |
197 |
--------------------------------------------------------------------------------
/tsge/frmHairSelection.Designer.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge
19 | {
20 | partial class frmHairSelection
21 | {
22 | ///
23 | /// Required designer variable.
24 | ///
25 | private System.ComponentModel.IContainer components = null;
26 |
27 | ///
28 | /// Clean up any resources being used.
29 | ///
30 | /// true if managed resources should be disposed; otherwise, false.
31 | protected override void Dispose(bool disposing)
32 | {
33 | if (disposing && (components != null))
34 | {
35 | components.Dispose();
36 | }
37 | base.Dispose(disposing);
38 | }
39 |
40 | #region Windows Form Designer generated code
41 |
42 | ///
43 | /// Required method for Designer support - do not modify
44 | /// the contents of this method with the code editor.
45 | ///
46 | private void InitializeComponent()
47 | {
48 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmHairSelection));
49 | this.lstHairSelection = new tsge.Controls.HairListBox();
50 | this.btnSelectHair = new System.Windows.Forms.Button();
51 | this.btnCancel = new System.Windows.Forms.Button();
52 | this.SuspendLayout();
53 | //
54 | // lstHairSelection
55 | //
56 | this.lstHairSelection.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
57 | this.lstHairSelection.FormattingEnabled = true;
58 | this.lstHairSelection.ItemHeight = 48;
59 | this.lstHairSelection.Location = new System.Drawing.Point(12, 12);
60 | this.lstHairSelection.Name = "lstHairSelection";
61 | this.lstHairSelection.Size = new System.Drawing.Size(293, 333);
62 | this.lstHairSelection.TabIndex = 0;
63 | this.lstHairSelection.SelectedIndexChanged += new System.EventHandler(this.lstHairSelection_SelectedIndexChanged);
64 | //
65 | // btnSelectHair
66 | //
67 | this.btnSelectHair.Location = new System.Drawing.Point(149, 351);
68 | this.btnSelectHair.Name = "btnSelectHair";
69 | this.btnSelectHair.Size = new System.Drawing.Size(75, 23);
70 | this.btnSelectHair.TabIndex = 1;
71 | this.btnSelectHair.Text = "Select Hair";
72 | this.btnSelectHair.UseVisualStyleBackColor = true;
73 | this.btnSelectHair.Click += new System.EventHandler(this.btnSelectHair_Click);
74 | //
75 | // btnCancel
76 | //
77 | this.btnCancel.Location = new System.Drawing.Point(230, 351);
78 | this.btnCancel.Name = "btnCancel";
79 | this.btnCancel.Size = new System.Drawing.Size(75, 23);
80 | this.btnCancel.TabIndex = 2;
81 | this.btnCancel.Text = "Cancel";
82 | this.btnCancel.UseVisualStyleBackColor = true;
83 | this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
84 | //
85 | // frmHairSelection
86 | //
87 | this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
88 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
89 | this.ClientSize = new System.Drawing.Size(317, 386);
90 | this.Controls.Add(this.btnCancel);
91 | this.Controls.Add(this.btnSelectHair);
92 | this.Controls.Add(this.lstHairSelection);
93 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
94 | this.MaximizeBox = false;
95 | this.MinimizeBox = false;
96 | this.Name = "frmHairSelection";
97 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
98 | this.Text = "Select a hair style..";
99 | this.ResumeLayout(false);
100 |
101 | }
102 |
103 | #endregion
104 |
105 | private Controls.HairListBox lstHairSelection;
106 | private System.Windows.Forms.Button btnSelectHair;
107 | private System.Windows.Forms.Button btnCancel;
108 | }
109 | }
--------------------------------------------------------------------------------
/tsge/frmHairSelection.cs:
--------------------------------------------------------------------------------
1 | // -----------------------------------------------------------------------
2 | // This file is part of TSGE.
3 | //
4 | // TSGE is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // TSGE is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with TSGE. If not, see .
16 | // -----------------------------------------------------------------------
17 |
18 | namespace tsge
19 | {
20 | using System;
21 | using System.Windows.Forms;
22 |
23 | public partial class frmHairSelection : Form
24 | {
25 | ///
26 | /// Internal hair id value.
27 | ///
28 | private int m_HairId;
29 |
30 | ///
31 | /// Default Constructor
32 | ///
33 | public frmHairSelection()
34 | {
35 | InitializeComponent();
36 |
37 | this.m_HairId = 0;
38 | this.lstHairSelection.SelectedIndex = this.HairId;
39 | }
40 |
41 | ///
42 | /// Selects the hair style.
43 | ///
44 | ///
45 | ///
46 | private void lstHairSelection_SelectedIndexChanged(object sender, EventArgs e)
47 | {
48 | this.HairId = this.lstHairSelection.SelectedIndex;
49 | }
50 |
51 | ///
52 | /// Closes this form with a valid result.
53 | ///
54 | ///
55 | ///
56 | private void btnSelectHair_Click(object sender, EventArgs e)
57 | {
58 | this.DialogResult = DialogResult.OK;
59 | this.Close();
60 | }
61 |
62 | ///
63 | /// Closes this form with a cancelled result.
64 | ///
65 | ///
66 | ///
67 | private void btnCancel_Click(object sender, EventArgs e)
68 | {
69 | this.DialogResult = DialogResult.Cancel;
70 | this.Close();
71 | }
72 |
73 | ///
74 | /// Gets or sets the selected hair index.
75 | ///
76 | public int HairId
77 | {
78 |
79 | get { return this.m_HairId; }
80 | set
81 | {
82 | this.m_HairId = value;
83 | this.lstHairSelection.SelectedIndex = value;
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/tsge/frmHairSelection.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 |
123 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
124 | AAD///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyLzA2Pr85RljROUVWyzY+
125 | SaM3RFbzSlhty0VRYbU5RFOvPkxg0UpacvMyMjI5////Af///wH///8B////Af///wH///8B////Af//
126 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDY+kTM+
127 | TtU9VXf/NUtq/z9Zfv9dfav/W3qm/1Rym/9QZoXrS1ltyTIyMiX///8B////Af///wH///8B////Af//
128 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
129 | /wH///8BMjIyHTI/Uek2TGv/QVyC/1Z2o/9jg7H/SVhuxzIyMif///8B////Af///wH///8B////Af//
130 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
131 | /wH///8B////Af///wH///8BMDU8hzZLaP8+WH3/Xn6r/0pjh/81OD5T////Af///wH///8B////Af//
132 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
133 | /wH///8B////Af///wH///8B////Af///wExMTEFMjxJz0Fcg/9ff63/QU9kzzExMQX///8B////Af//
134 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
135 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyO0fNNk1s/1Z2o/9KWW/rNjtCN///
136 | /wH///8B////ATIyMhH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
137 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATQ+TM01TGr/XX2r/159
138 | qf9JXXvnNT1IgzExMQcrOCaBKEAf0zIyMif///8B////Af///wH///8B////Af///wH///8B////Af//
139 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDlEzT9a
140 | gP9igrH/TGOC70dVasNJX37/NT1Ezy9eGv81dBf/JksZrS87KjH///8B////Af///wH///8B////Af//
141 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
142 | /wEvN0HNQVyC/119qv9EUmbNMjIyCTg9REsuPC35SZ8c/02qG/8zcBf/LzorX////wH///8B////Af//
143 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyMjIL////Af//
144 | /wH///8BNTk+LTM9Suc3Tm7/XX2q/0lXa83///8BMjIyCTVXIvFJmh7/TKId/z1nJ9kyMjIR////Af//
145 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyIyg+
146 | IcstOShzMjIyBTU7RHVGWnbjQ16D/z1Wev9YeKT/TFpvzf///wEyMjJTIUoT/S1oFP84ZiDrOlwnszIy
147 | Mgv///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIy
148 | MikqQyCjMXQU/y1oFP80PULBSV9+/0lZcM09UWzxQ2CI/1Z0nv9JV2vN////Af///wExMzBFLj0oczIy
149 | MicyMjIP////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
150 | /wH///8BLzUsZSteFv9OrBz/T7Ac/0ReUfk6QEhZMTExDTA4RM1BXYP/TmyW/0xab83///8B////Af//
151 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
152 | /wH///8B////Af///wEyMjIRLE0f2UOQG/9Qrx3/OmAl8TIyMgP///8BLzdCzTRKaP9cfKr/RVNmzf//
153 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
154 | /wH///8B////Af///wH///8B////ATIyMg0nQB6/KVQY8TZ1GP8tYxb9MjIyWTIyMicxPlHpOVJz/1l5
155 | pv9JV2vN////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
156 | /wH///8B////Af///wH///8B////Af///wH///8B////ATIyMhMyMjIvLj4ogzEzMFP///8BMjIyQTNF
157 | Xf8wRF//Vnaj/0xab83///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
158 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
159 | /wExMTEtMkFW7zdObv9XdqL/SVdrzf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
160 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
161 | /wH///8B////Af///wEwNDrNOE5t/0hih/9FU2fN////Af///wH///8B////Af///wH///8B////Af//
162 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
163 | /wH///8B////ASo7JLMvNC5RKDwg1SZFHP0wP0//LUA6/zxJW9ExMTEFMjIyCTExMQv///8B////Af//
164 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
165 | /wH///8B////ATIyMg8xMTEZJ0ka9yRKFP8rXRT/I18M/yhOGv8nRCD/LUA1/y1II7cvTiPFK0ofyzIy
166 | MiX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
167 | /wH///8B////Af///wH///8BKj0koSRBGt8cTQr/IloM/zJzFP82fBX/P4wa/zmCF/81dRj/OIIW/ziC
168 | Fv80exX/LVoc9TIyMjn///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
169 | /wH///8B////Af///wH///8B////AS48KVchTBLzJlwP/ytnEf8ydRT/N30W/zh9Fv81ehX/O4UY/0WR
170 | HP9Aixr/N30W/0GKG/8ydRT/K0Ajrf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
171 | /wH///8B////Af///wH///8B////Af///wH///8BKjolqR1SCv8saBH/LW4R/zR3FP86gRf/Q4oc/0aQ
172 | Hf87gRj/R5Ue/0SOHP87hRf/N34V/zqAF/8tYBn5MjIyM////wH///8B////Af///wH///8B////Af//
173 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEuNSuXIUwR+SZfDv82eBb/OH0W/0WQ
174 | Hf9FkB3/UKsf/0ynG/9DjRv/Tqgd/0OLHP88hhj/N34W/zZqHf8yMjI3////Af///wH///8B////Af//
175 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIyMg0mPR7PLmwS/zR2
176 | Ff88hhj/R5Qd/0qeHf9Npx3/T6wd/06pHf9Nph3/SJcd/0aWG/83fhX/NGYb/zIyMjf///8B////Af//
177 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BLDwmjR9R
178 | Df8qaQ//L3AS/0GMGv9Knhz/TaYc/0ygHv9Qrxz/Tqod/02lHv9QsRz/S6Qb/zh8Fv81bRr/NUMuW///
179 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
180 | /wEuNSsxKTwity5oE/8xcRP/OH8W/0iWHf9LpBv/TaUd/0yjHv9OqB3/TKUd/0qfHP9HlR3/Spof/zxv
181 | If81Rit7////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
182 | /wH///8B////Af///wEyMjInKFIY7TJ2E/9BjBr/Q4wc/0eWG/9MpB3/T6oe/1CxHP9MpB3/RI8b/0eT
183 | Hf8+dx/9MjUxUzExMQP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
184 | /wH///8B////Af///wH///8B////ATIyMjEsWBnxM3UU/zl/Fv9Gkh3/RZAd/0WPHP9Nph3/Tawa/0eV
185 | HP9IlR7/P30d/TIyMoX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
186 | /wH///8B////Af///wH///8B////Af///wH///8BMjIyOyhRGPUubRL/PoIa/zN3FP8+hhn/PokZ/0eT
187 | Hf9HlB7/Qo0b/0WQHf85WifX////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
188 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyWypKHtMtUx3xLUAmpSlY
189 | F+0zdxT/MnYT/zx9Gv82VSe9N1clzTI4LyH///8B////Af///wH///8B////Af///wH///8B////Af//
190 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMTExDTIy
191 | Mhf///8BMDYuZSxDI8s1USbLNk8onzExMQcyMjIN////Af///wH///8B////Af///wH///8B////Af//
192 | /wH///8B////Af///wH///8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
193 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
194 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
195 |
196 |
197 |
--------------------------------------------------------------------------------
/tsge/frmMain.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 132, 17
122 |
123 |
124 | 296, 17
125 |
126 |
127 | 17, 17
128 |
129 |
130 | 454, 17
131 |
132 |
133 | 31
134 |
135 |
136 |
137 |
138 | AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
139 | AAD///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyLzA2Pr85RljROUVWyzY+
140 | SaM3RFbzSlhty0VRYbU5RFOvPkxg0UpacvMyMjI5////Af///wH///8B////Af///wH///8B////Af//
141 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDY+kTM+
142 | TtU9VXf/NUtq/z9Zfv9dfav/W3qm/1Rym/9QZoXrS1ltyTIyMiX///8B////Af///wH///8B////Af//
143 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
144 | /wH///8BMjIyHTI/Uek2TGv/QVyC/1Z2o/9jg7H/SVhuxzIyMif///8B////Af///wH///8B////Af//
145 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
146 | /wH///8B////Af///wH///8BMDU8hzZLaP8+WH3/Xn6r/0pjh/81OD5T////Af///wH///8B////Af//
147 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
148 | /wH///8B////Af///wH///8B////Af///wExMTEFMjxJz0Fcg/9ff63/QU9kzzExMQX///8B////Af//
149 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
150 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyO0fNNk1s/1Z2o/9KWW/rNjtCN///
151 | /wH///8B////ATIyMhH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
152 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATQ+TM01TGr/XX2r/159
153 | qf9JXXvnNT1IgzExMQcrOCaBKEAf0zIyMif///8B////Af///wH///8B////Af///wH///8B////Af//
154 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMDlEzT9a
155 | gP9igrH/TGOC70dVasNJX37/NT1Ezy9eGv81dBf/JksZrS87KjH///8B////Af///wH///8B////Af//
156 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
157 | /wEvN0HNQVyC/119qv9EUmbNMjIyCTg9REsuPC35SZ8c/02qG/8zcBf/LzorX////wH///8B////Af//
158 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEyMjIL////Af//
159 | /wH///8BNTk+LTM9Suc3Tm7/XX2q/0lXa83///8BMjIyCTVXIvFJmh7/TKId/z1nJ9kyMjIR////Af//
160 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyIyg+
161 | IcstOShzMjIyBTU7RHVGWnbjQ16D/z1Wev9YeKT/TFpvzf///wEyMjJTIUoT/S1oFP84ZiDrOlwnszIy
162 | Mgv///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIy
163 | MikqQyCjMXQU/y1oFP80PULBSV9+/0lZcM09UWzxQ2CI/1Z0nv9JV2vN////Af///wExMzBFLj0oczIy
164 | MicyMjIP////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
165 | /wH///8BLzUsZSteFv9OrBz/T7Ac/0ReUfk6QEhZMTExDTA4RM1BXYP/TmyW/0xab83///8B////Af//
166 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
167 | /wH///8B////Af///wEyMjIRLE0f2UOQG/9Qrx3/OmAl8TIyMgP///8BLzdCzTRKaP9cfKr/RVNmzf//
168 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
169 | /wH///8B////Af///wH///8B////ATIyMg0nQB6/KVQY8TZ1GP8tYxb9MjIyWTIyMicxPlHpOVJz/1l5
170 | pv9JV2vN////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
171 | /wH///8B////Af///wH///8B////Af///wH///8B////ATIyMhMyMjIvLj4ogzEzMFP///8BMjIyQTNF
172 | Xf8wRF//Vnaj/0xab83///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
173 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
174 | /wExMTEtMkFW7zdObv9XdqL/SVdrzf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
175 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
176 | /wH///8B////Af///wEwNDrNOE5t/0hih/9FU2fN////Af///wH///8B////Af///wH///8B////Af//
177 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
178 | /wH///8B////ASo7JLMvNC5RKDwg1SZFHP0wP0//LUA6/zxJW9ExMTEFMjIyCTExMQv///8B////Af//
179 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
180 | /wH///8B////ATIyMg8xMTEZJ0ka9yRKFP8rXRT/I18M/yhOGv8nRCD/LUA1/y1II7cvTiPFK0ofyzIy
181 | MiX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
182 | /wH///8B////Af///wH///8BKj0koSRBGt8cTQr/IloM/zJzFP82fBX/P4wa/zmCF/81dRj/OIIW/ziC
183 | Fv80exX/LVoc9TIyMjn///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
184 | /wH///8B////Af///wH///8B////AS48KVchTBLzJlwP/ytnEf8ydRT/N30W/zh9Fv81ehX/O4UY/0WR
185 | HP9Aixr/N30W/0GKG/8ydRT/K0Ajrf///wH///8B////Af///wH///8B////Af///wH///8B////Af//
186 | /wH///8B////Af///wH///8B////Af///wH///8BKjolqR1SCv8saBH/LW4R/zR3FP86gRf/Q4oc/0aQ
187 | Hf87gRj/R5Ue/0SOHP87hRf/N34V/zqAF/8tYBn5MjIyM////wH///8B////Af///wH///8B////Af//
188 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEuNSuXIUwR+SZfDv82eBb/OH0W/0WQ
189 | Hf9FkB3/UKsf/0ynG/9DjRv/Tqgd/0OLHP88hhj/N34W/zZqHf8yMjI3////Af///wH///8B////Af//
190 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////ATIyMg0mPR7PLmwS/zR2
191 | Ff88hhj/R5Qd/0qeHf9Npx3/T6wd/06pHf9Nph3/SJcd/0aWG/83fhX/NGYb/zIyMjf///8B////Af//
192 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BLDwmjR9R
193 | Df8qaQ//L3AS/0GMGv9Knhz/TaYc/0ygHv9Qrxz/Tqod/02lHv9QsRz/S6Qb/zh8Fv81bRr/NUMuW///
194 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
195 | /wEuNSsxKTwity5oE/8xcRP/OH8W/0iWHf9LpBv/TaUd/0yjHv9OqB3/TKUd/0qfHP9HlR3/Spof/zxv
196 | If81Rit7////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
197 | /wH///8B////Af///wEyMjInKFIY7TJ2E/9BjBr/Q4wc/0eWG/9MpB3/T6oe/1CxHP9MpB3/RI8b/0eT
198 | Hf8+dx/9MjUxUzExMQP///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
199 | /wH///8B////Af///wH///8B////ATIyMjEsWBnxM3UU/zl/Fv9Gkh3/RZAd/0WPHP9Nph3/Tawa/0eV
200 | HP9IlR7/P30d/TIyMoX///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
201 | /wH///8B////Af///wH///8B////Af///wH///8BMjIyOyhRGPUubRL/PoIa/zN3FP8+hhn/PokZ/0eT
202 | Hf9HlB7/Qo0b/0WQHf85WifX////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af//
203 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMjIyWypKHtMtUx3xLUAmpSlY
204 | F+0zdxT/MnYT/zx9Gv82VSe9N1clzTI4LyH///8B////Af///wH///8B////Af///wH///8B////Af//
205 | /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BMTExDTIy
206 | Mhf///8BMDYuZSxDI8s1USbLNk8onzExMQcyMjIN////Af///wH///8B////Af///wH///8B////Af//
207 | /wH///8B////Af///wH///8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
208 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
209 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
210 |
211 |
212 |
--------------------------------------------------------------------------------
/tsge/terr.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gabsoftware/TSGE/412e77f880e0cd50930a7215b4561a83a08fc59f/tsge/terr.ico
--------------------------------------------------------------------------------
/tsge/tsge.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2C4D0926-C0B1-4427-B5DC-4BEC5BB2304E}
8 | WinExe
9 | Properties
10 | tsge
11 | tsge
12 | v4.0
13 | 512
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 | x86
36 | bin\x86\Debug\
37 |
38 |
39 | x86
40 | bin\x86\Release\
41 |
42 |
43 | terr.ico
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | Component
71 |
72 |
73 | BuffListBox.cs
74 |
75 |
76 | Component
77 |
78 |
79 | BuffSelectionList.cs
80 |
81 |
82 | Component
83 |
84 |
85 | HairListBox.cs
86 |
87 |
88 | Component
89 |
90 |
91 | ItemLabel.cs
92 |
93 |
94 | UserControl
95 |
96 |
97 | ModelViewer.cs
98 |
99 |
100 |
101 | Form
102 |
103 |
104 | frmAbout.cs
105 |
106 |
107 | Form
108 |
109 |
110 | frmHairSelection.cs
111 |
112 |
113 | Form
114 |
115 |
116 | frmMain.cs
117 |
118 |
119 |
120 |
121 | BuffListBox.cs
122 |
123 |
124 | ModelViewer.cs
125 |
126 |
127 | frmAbout.cs
128 |
129 |
130 | frmHairSelection.cs
131 |
132 |
133 | frmMain.cs
134 |
135 |
136 | ResXFileCodeGenerator
137 | Resources.Designer.cs
138 | Designer
139 |
140 |
141 | True
142 | Resources.resx
143 | True
144 |
145 |
146 |
147 | SettingsSingleFileGenerator
148 | Settings.Designer.cs
149 |
150 |
151 | True
152 | Settings.settings
153 | True
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
192 |
--------------------------------------------------------------------------------
/tsge/tsge.csproj.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | No
--------------------------------------------------------------------------------