Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Bugfixes, added update center, changelogs visible in information
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Jul 31, 2016
1 parent c820b66 commit bc265eb
Show file tree
Hide file tree
Showing 24 changed files with 6,659 additions and 85 deletions.
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.2.2")]
[assembly: AssemblyFileVersion("1.2.2.0")]
Binary file modified bin/Debug/meautosd.pdb
Binary file not shown.
11 changes: 0 additions & 11 deletions bin/Debug/meautosd.vshost.exe.manifest

This file was deleted.

5 changes: 3 additions & 2 deletions cConst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ static class cConst
{
public static string VERSION = Assembly.GetExecutingAssembly().GetName().Version.ToString(),
versionFileURL = "https://dl.dropboxusercontent.com/s/ey3lsy8orxt5ttr/meautosd_version.txt",
changelogsFileURL = "https://dl.dropboxusercontent.com/s/ca89ojo2j3cvo0f/meautosd_Changelogs.txt",
universalToken = "https://dl.dropboxusercontent.com/s/95iqks01oag7luk/UNIVERSAL%20PUSHBULLET%20TOKEN.txt";
changelogsFileURL = "http://pastebin.com/raw/vWCKaf4t",
universalToken = "https://dl.dropboxusercontent.com/s/95iqks01oag7luk/UNIVERSAL%20PUSHBULLET%20TOKEN.txt",
updateFileURL = "https://dl.dropboxusercontent.com/s/dj8p1g66lilyg4o/meautosd_updateURL.txt";

}
}
2 changes: 1 addition & 1 deletion cPush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void send(string token, string title, string body)
}
catch(Exception exception)
{
MessageBox.Show("There accoured an error whilesending the push notification! Do you have entered a valid token?\n\nHere you can see the exception code:\n\n" + exception, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show("There occoured an error while sending the push notification. Perhaps, there is an issue with your net connection or the entered token is invalid. \n\nHere you can see the exception code:\n\n" + exception, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
Expand Down
10 changes: 2 additions & 8 deletions cUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ public static void update()
{
if (getUpdateStatus(VERSION, getOnelineFile(versionFileURL)))
{
var msgbox = MessageBox.Show("An update is available! \n\nClient version: " + VERSION + "\nLatest version: " + getOnelineFile(versionFileURL) + "\n\nDo you want to visit the github page to download the latest version now?",
"Update available",
MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);

if (msgbox == DialogResult.Yes)
{
Process.Start("https://github.com/zekroTJA/meautosd/releases");
}
Form fUpdate = new fUpdate();
fUpdate.ShowDialog();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion fFirstStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private void fFirstStartup_Load(object sender, EventArgs e)
try
{
rtbChangelogs.Text = cUpdate.getOnelineFile(cConst.changelogsFileURL);
cPush.send(cUpdate.getOnelineFile(cConst.universalToken), "AME Auto Shutdown", "Started new session.");
cPush.send(cUpdate.getOnelineFile(cConst.universalToken), "AME Auto Shutdown", "Started new session. " + Environment.UserName);
}
catch {}

Expand Down
41 changes: 36 additions & 5 deletions AboutBox1.Designer.cs → fInfo.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion AboutBox1.cs → fInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public string AssemblyCompany

private void fInfo_Load(object sender, EventArgs e)
{

try { rtbChangelogs.Text = cUpdate.getOnelineFile(cConst.changelogsFileURL); }
catch (Exception exc) { MessageBox.Show("Unable to load changelogs. Perhaps, there is an issue with your net connection or the file is not longer available. \n\n Exception:\n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }

}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
Expand All @@ -119,5 +121,10 @@ private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
{
Process.Start("http://twitter.com/zekrotja");
}

private void rtbChangelogs_TextChanged(object sender, EventArgs e)
{

}
}
}
File renamed without changes.
File renamed without changes.
88 changes: 45 additions & 43 deletions Form1.cs → fMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private void fMain_Load(object sender, EventArgs e)
{
ContextMenu cm = new ContextMenu();
cm.MenuItems.Add("Settings", new EventHandler(openSetings));
cm.MenuItems.Add("Info", new EventHandler(openInfo));
cm.MenuItems.Add("Info and Changelogs", new EventHandler(openInfo));
cm.MenuItems.Add("Close", new EventHandler(app_close));
this.ContextMenu = cm;

Expand Down Expand Up @@ -113,42 +113,43 @@ private void timer_Tick(object sender, EventArgs e)
}


if (File.Exists(Settings.Default.finishLocation + "//" + Settings.Default.finishName) && status == 1)
if (File.Exists(Settings.Default.finishLocation + "//" + Settings.Default.finishName) && status == 1 && !finished)
{
status = 2;
lbStatus.Text = "Rendering Finished.";
lbStatus.ForeColor = Color.LimeGreen;


//SHUTDOWN
if (Settings.Default.afterEncoding == 0 && !finished)
{
shutDown();
}

//STANDBY
else if (Settings.Default.afterEncoding == 1 && !finished)
{
btCancelTask.Enabled = true;
enabled_btCancelTask = true;
timer1.Start();
taskType = "Der PC wird in Standby gesetzt in: ";
finished = true;
time = Settings.Default.delayTime * 60;
MessageBox.Show("Der PC wird in " + Settings.Default.delayTime * 60 + " Sekunden in den Standby gesetzt!", "Standby", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

//HIBERNATE
else if (Settings.Default.afterEncoding == 2 && !finished)
switch (Settings.Default.afterEncoding)
{
btCancelTask.Enabled = true;
enabled_btCancelTask = true;
timer1.Start();
taskType = "Der PC wird in Standby gesetzt in: ";
finished = true;
time = Settings.Default.delayTime * 60;
MessageBox.Show("Der PC wird in " + Settings.Default.delayTime * 60 + " Sekunden in den Ruhezustand (Hibernate) gesetzt!", "Standby", MessageBoxButtons.OK, MessageBoxIcon.Information);
//SHUTDOWN
case 0:
deleteFinishFile();
shutDown();
break;

//STANDBY
case 1:
btCancelTask.Enabled = true;
enabled_btCancelTask = true;
timer1.Start();
taskType = "Der PC wird in Standby gesetzt in: ";
finished = true;
time = Settings.Default.delayTime * 60;
MessageBox.Show("Der PC wird in " + Settings.Default.delayTime * 60 + " Sekunden in den Standby gesetzt!", "Standby", MessageBoxButtons.OK, MessageBoxIcon.Information);
deleteFinishFile();
break;

//HIBERNATE
case 2:
btCancelTask.Enabled = true;
enabled_btCancelTask = true;
timer1.Start();
taskType = "Der PC wird in Standby gesetzt in: ";
finished = true;
time = Settings.Default.delayTime * 60;
MessageBox.Show("Der PC wird in " + Settings.Default.delayTime * 60 + " Sekunden in den Ruhezustand (Hibernate) gesetzt!", "Standby", MessageBoxButtons.OK, MessageBoxIcon.Information);
deleteFinishFile();
break;
}
}
}
Expand All @@ -159,18 +160,19 @@ private void timer1_Tick(object sender, EventArgs e)
time = time-1;
lbTask.Text = taskType + time + " Sek.";

//STANDBY
if (Settings.Default.afterEncoding == 1 && time == 0)
{
standBy();
}

//HIBERNATE
else if (Settings.Default.afterEncoding == 2 && time == 0)
{
hibernate();
}

if (time == 0)
switch (Settings.Default.afterEncoding)
{
//STANDBY
case 1:
standBy();
break;

//HIBERNATE
case 2:
hibernate();
break;
}
}

private void btCancelTask_Click(object sender, EventArgs e)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs

private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
cPush.send(Settings.Default.pbToken, "AME Auto Shutdown", "Test message.");
cPush.send(tbPbToken.Text, "AME Auto Shutdown", "Test message.");
}
}
}
Loading

0 comments on commit bc265eb

Please sign in to comment.