Skip to content

Commit 720846c

Browse files
committed
Update to version 2.1
1 parent e94f0c6 commit 720846c

9 files changed

Lines changed: 26 additions & 31 deletions

File tree

app/Project Tracker Installer/Project Tracker Installer/MainWindow.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void startup() {
8080
subTitle.Content = "Version: " + PROGRAM_VERSION;
8181

8282
// Copies the current file to the Program Data folder. Code execution doesn't pass this if it's not already there
83-
/*if ((Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Project Tracker Installer.exe") != INSTALLER_PATH) {
83+
if ((Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Project Tracker Installer.exe") != INSTALLER_PATH) {
8484
string currentLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\Project Tracker Installer.exe";
8585

8686
if (!File.Exists(INSTALLER_PATH)) { // An installer file exists
@@ -136,7 +136,7 @@ void startup() {
136136
catch (WebException) {
137137
subTitle.Visibility = Visibility.Hidden; // Couldn't get version
138138
}
139-
}*/
139+
}
140140

141141
try {
142142
installButton.IsEnabled = false;
Binary file not shown.

app/Project Tracker/Project Tracker/MainWindow.xaml.cs

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public partial class MainWindow : UWPHost.Window {
2323
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
2424
+ "/Project Tracker";
2525

26-
private readonly string CURRENT_VERSION = "2.0";
26+
private readonly string CURRENT_VERSION = "2.1";
2727

2828
private readonly string DATA_DIRECTORY =
2929
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
@@ -1649,8 +1649,6 @@ private void Startup() {
16491649
thread.Start();
16501650

16511651
if (!File.Exists(SETTINGS_FILE)) { // Settings file doesn't exist. Create it
1652-
File.Create(SETTINGS_FILE);
1653-
16541652
StringBuilder sb = new StringBuilder();
16551653
StringWriter sw = new StringWriter(sb);
16561654

@@ -1674,24 +1672,23 @@ private void Startup() {
16741672
sb.Clear();
16751673
sw.Close();
16761674
}
1677-
else { // Settings file exists, read from it
1678-
string json = File.ReadAllText(SETTINGS_FILE);
1679-
SettingsManifest.Rootobject settings =
1680-
JsonConvert.DeserializeObject<SettingsManifest.Rootobject>(json);
16811675

1682-
if (settings.LastSelectedIndex != null) {
1683-
try {
1684-
selectedIndex = Int32.Parse(settings.LastSelectedIndex);
1685-
}
1686-
catch (FormatException) { // The index isn't a number for some reason, someone probably tampered with the file
1687-
selectedIndex = 1;
1688-
}
1676+
string json = File.ReadAllText(SETTINGS_FILE);
1677+
SettingsManifest.Rootobject settings =
1678+
JsonConvert.DeserializeObject<SettingsManifest.Rootobject>(json);
1679+
1680+
if (settings.LastSelectedIndex != null) {
1681+
try {
1682+
selectedIndex = Int32.Parse(settings.LastSelectedIndex);
16891683
}
1690-
if (settings.DisplayingCompleted != null) {
1691-
if (settings.DisplayingCompleted == "true") {
1692-
isCompletedTasksShown = true;
1693-
completedTaskSwitchLabel.Content = "Completed tasks";
1694-
}
1684+
catch (FormatException) { // The index isn't a number for some reason, someone probably tampered with the file
1685+
selectedIndex = 1;
1686+
}
1687+
}
1688+
if (settings.DisplayingCompleted != null) {
1689+
if (settings.DisplayingCompleted == "true") {
1690+
isCompletedTasksShown = true;
1691+
completedTaskSwitchLabel.Content = "Completed tasks";
16951692
}
16961693
}
16971694

app/Project Tracker/Project Tracker/UpdateWindow.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public partial class UpdateWindow : Window {
1818

1919
private readonly string INSTALLER_PATH = @"C:\Program Files\Project Tracker\Project Tracker Installer.exe";
2020
private readonly string VERSION_FILE = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/Project Tracker/update.txt";
21-
private readonly string CURRENT_VERSION = "2.0";
21+
private readonly string CURRENT_VERSION = "2.1";
2222
private readonly Color sortColor = Color.FromRgb(228, 233, 235);
2323
private readonly FontFamily textFont = new FontFamily("Microsoft Sans Serif");
2424

5.01 KB
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.

install-resources/version.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
2-
"Version": "2.0",
3-
"Updates": [
4-
"Added a settings menu.",
5-
"Added future release information.",
6-
"Added a 'Check for update' button located in the settings.",
7-
"Now you can rename projects!"
8-
],
9-
"Fixes": []
2+
"Version": "2.1",
3+
"Updates": [],
4+
"Fixes": [
5+
"Fixed installation issues.",
6+
"Fixed other small bugs in the program."
7+
]
108
}

install-resources/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0
1+
2.1

0 commit comments

Comments
 (0)