Skip to content

Commit

Permalink
1.0.2.0
Browse files Browse the repository at this point in the history
* улучшил автообновление
* улучшение темного режима
* добавил ссылку на гитхаб в "О программе"
* добавил возможность сохранять введеные значение
  • Loading branch information
Stive99 committed Jul 31, 2020
1 parent a86cc34 commit f6490ed
Show file tree
Hide file tree
Showing 13 changed files with 344 additions and 70 deletions.
14 changes: 14 additions & 0 deletions About.Designer.cs

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

38 changes: 37 additions & 1 deletion About.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System;
using Microsoft.Win32;
using ResourceCalculator.Properties;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
Expand All @@ -20,6 +23,39 @@ public About()
label1.Text += Form1.versionProg.ToString();

label2.Text += Application.ProductName;


/*using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\ResourceCalculator"))*/
/*labelReg.Text += key?.GetValue("DarkMode")?.ToString() == "true" ? true : false;*/

var key = Registry.CurrentUser.CreateSubKey(@"Software\ResourceCalculator");

if (key?.GetValue("DarkMode")?.ToString() == "true")
{
BackColor = Color.FromArgb(255, 29, 29, 29);
label1.ForeColor = Color.FromArgb(255, 255, 255, 255);
label2.ForeColor = Color.FromArgb(255, 255, 255, 255);

pictureBox1.Image = Resources.github_white;

}
else if (key?.GetValue("DarkMode")?.ToString() == "false")
{
BackColor = Color.FromArgb(255, 255, 255, 255);
label1.ForeColor = SystemColors.ControlText;
label2.ForeColor = SystemColors.ControlText;

pictureBox1.Image = Resources.github_dark;
}
}

private void pictureBox1_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Вы хотите перейти на сайт?", "Перейти на гитхаб", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
{
Process.Start("https://github.com/BZHStudio/ResourceCalculator");
}
}

}
}
29 changes: 24 additions & 5 deletions Form1.Designer.cs

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

Loading

0 comments on commit f6490ed

Please sign in to comment.