diff --git a/Crypto Notepad.sln b/Crypto Notepad.sln index 792ddab..a5aaaab 100644 --- a/Crypto Notepad.sln +++ b/Crypto Notepad.sln @@ -1,12 +1,10 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.168 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crypto Notepad", "Crypto Notepad\Crypto Notepad.csproj", "{06D6F36C-FAFA-4B88-BE04-3F73EB28C21E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Updater", "Updater\Updater.csproj", "{7B347593-6F3C-4308-BB94-51D35677C0C4}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,12 +15,11 @@ Global {06D6F36C-FAFA-4B88-BE04-3F73EB28C21E}.Debug|Any CPU.Build.0 = Debug|Any CPU {06D6F36C-FAFA-4B88-BE04-3F73EB28C21E}.Release|Any CPU.ActiveCfg = Release|Any CPU {06D6F36C-FAFA-4B88-BE04-3F73EB28C21E}.Release|Any CPU.Build.0 = Release|Any CPU - {7B347593-6F3C-4308-BB94-51D35677C0C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B347593-6F3C-4308-BB94-51D35677C0C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B347593-6F3C-4308-BB94-51D35677C0C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B347593-6F3C-4308-BB94-51D35677C0C4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {91E42AC9-FA32-4204-98F0-0C3A73C6436A} + EndGlobalSection EndGlobal diff --git a/Crypto Notepad/Resources/Updater.exe b/Crypto Notepad/Resources/Updater.exe index e99f6cf..ab8d3eb 100644 Binary files a/Crypto Notepad/Resources/Updater.exe and b/Crypto Notepad/Resources/Updater.exe differ diff --git a/Updater/App.config b/Updater/App.config deleted file mode 100644 index 8e15646..0000000 --- a/Updater/App.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Updater/Form1.Designer.cs b/Updater/Form1.Designer.cs deleted file mode 100644 index a7f12c4..0000000 --- a/Updater/Form1.Designer.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace Updater -{ - partial class UpdateForm - { - /// - /// Обязательная переменная конструктора. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Освободить все используемые ресурсы. - /// - /// истинно, если управляемый ресурс должен быть удален; иначе ложно. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Код, автоматически созданный конструктором форм Windows - - /// - /// Требуемый метод для поддержки конструктора — не изменяйте - /// содержимое этого метода с помощью редактора кода. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.button1 = new System.Windows.Forms.Button(); - this.linkLabel1 = new System.Windows.Forms.LinkLabel(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.label1.Location = new System.Drawing.Point(69, 6); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(222, 60); - this.label1.TabIndex = 2; - this.label1.Text = "Application will be updated and reopened."; - // - // panel1 - // - this.panel1.BackColor = System.Drawing.SystemColors.Window; - this.panel1.Controls.Add(this.pictureBox1); - this.panel1.Controls.Add(this.label1); - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(294, 73); - this.panel1.TabIndex = 4; - // - // pictureBox1 - // - this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pictureBox1.Image = global::Updater.Properties.Resources.arrow_down; - this.pictureBox1.Location = new System.Drawing.Point(6, 6); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(60, 60); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pictureBox1.TabIndex = 0; - this.pictureBox1.TabStop = false; - // - // button1 - // - this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.button1.Location = new System.Drawing.Point(214, 79); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 5; - this.button1.Text = "OK"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // linkLabel1 - // - this.linkLabel1.AutoSize = true; - this.linkLabel1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.AlwaysUnderline; - this.linkLabel1.Location = new System.Drawing.Point(3, 83); - this.linkLabel1.Name = "linkLabel1"; - this.linkLabel1.Size = new System.Drawing.Size(110, 15); - this.linkLabel1.TabIndex = 6; - this.linkLabel1.TabStop = true; - this.linkLabel1.Text = "View release notes"; - this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); - // - // UpdateForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(296, 107); - this.Controls.Add(this.linkLabel1); - this.Controls.Add(this.button1); - this.Controls.Add(this.panel1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "UpdateForm"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Crypto Notepad Updater"; - this.Load += new System.EventHandler(this.Form1_Load); - this.panel1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.LinkLabel linkLabel1; - } -} - diff --git a/Updater/Form1.cs b/Updater/Form1.cs deleted file mode 100644 index da7e6d3..0000000 --- a/Updater/Form1.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using Ionic.Zip; -using System.Windows.Forms; -using System.IO; -using System.Diagnostics; -using System.ComponentModel; -using System.Net; -using System.Reflection; - -namespace Updater -{ - public partial class UpdateForm : Form - { - string[] arg; - string exePath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\"; - bool okButton = false; - - public UpdateForm(string[] args) - { - arg = args; - InitializeComponent(); - } - - #region ExtractZip - public void ExtractFileToDirectory(string zipFileName, string outputDirectory) - { - ZipFile zip = ZipFile.Read(zipFileName); - Directory.CreateDirectory(outputDirectory); - zip.ExtractAll(outputDirectory, ExtractExistingFileAction.OverwriteSilently); - } - #endregion - - void downloader_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e) - { - if (e.Error != null) - { - System.Media.SystemSounds.Beep.Play(); - //linkLabel1.Visible = false; - okButton = true; - button1.Enabled = true; - label1.Text = "There was some errors during the update, please try again later."; - } - - if (e.Error == null) - { - var pr = new Process(); - ExtractFileToDirectory(exePath + "Crypto-Notepad-Update.zip", exePath); - pr.StartInfo.FileName = exePath + "Crypto Notepad.exe"; - pr.Start(); - Application.Exit(); - } - } - - private void Form1_Load(object sender, EventArgs e) - { - if (arg.Length == 0) - { - this.Close(); - } - - else if (arg[0] == "/u") - { - return; - } - } - - private void button1_Click(object sender, EventArgs e) - { - if (okButton == false) - { - var pr = new Process(); - button1.Enabled = false; - WebClient webClient = new WebClient(); - webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(downloader_DownloadFileCompleted); - webClient.DownloadFileAsync(new Uri("https://raw.githubusercontent.com/Sigmanor/Crypto-Notepad/master/Crypto-Notepad-Update.zip"), exePath + "Crypto-Notepad-Update.zip"); - } - - if (okButton == true) - { - var pr = new Process(); - pr.StartInfo.FileName = exePath + "Crypto Notepad.exe"; - pr.Start(); - Application.Exit(); - } - } - - private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - Process.Start("https://github.com/Sigmanor/Crypto-Notepad/wiki/Release-Notes"); - } - } -} diff --git a/Updater/Form1.resx b/Updater/Form1.resx deleted file mode 100644 index 1af7de1..0000000 --- a/Updater/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Updater/Ionic.Zip.dll b/Updater/Ionic.Zip.dll deleted file mode 100644 index 95fa928..0000000 Binary files a/Updater/Ionic.Zip.dll and /dev/null differ diff --git a/Updater/Program.cs b/Updater/Program.cs deleted file mode 100644 index 372be53..0000000 --- a/Updater/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace Updater -{ - static class Program - { - /// - /// Главная точка входа для приложения. - /// - [STAThread] - static void Main(string[] args) - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new UpdateForm(args)); - } - } -} diff --git a/Updater/Properties/AssemblyInfo.cs b/Updater/Properties/AssemblyInfo.cs deleted file mode 100644 index 2752a04..0000000 --- a/Updater/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Управление общими сведениями о сборке осуществляется с помощью -// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, -// связанные со сборкой. -[assembly: AssemblyTitle("Updater")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Updater")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми -// для COM-компонентов. Если требуется обратиться к типу в этой сборке через -// COM, задайте атрибуту ComVisible значение TRUE для этого типа. -[assembly: ComVisible(false)] - -// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM -[assembly: Guid("7b347593-6f3c-4308-bb94-51d35677c0c4")] - -// Сведения о версии сборки состоят из следующих четырех значений: -// -// Основной номер версии -// Дополнительный номер версии -// Номер сборки -// Редакция -// -// Можно задать все значения или принять номера сборки и редакции по умолчанию -// используя "*", как показано ниже: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Updater/Properties/Resources.Designer.cs b/Updater/Properties/Resources.Designer.cs deleted file mode 100644 index a921c47..0000000 --- a/Updater/Properties/Resources.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Этот код создан программой. -// Исполняемая версия:4.0.30319.42000 -// -// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае -// повторной генерации кода. -// -//------------------------------------------------------------------------------ - -namespace Updater.Properties { - using System; - - - /// - /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. - /// - // Этот класс создан автоматически классом StronglyTypedResourceBuilder - // с помощью такого средства, как ResGen или Visual Studio. - // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen - // с параметром /str или перестройте свой проект VS. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Updater.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Перезаписывает свойство CurrentUICulture текущего потока для всех - /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Поиск локализованного ресурса типа System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap arrow_down { - get { - object obj = ResourceManager.GetObject("arrow_down", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/Updater/Properties/Resources.resx b/Updater/Properties/Resources.resx deleted file mode 100644 index 66bce8b..0000000 --- a/Updater/Properties/Resources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\resources\arrow_down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/Updater/Properties/Settings.Designer.cs b/Updater/Properties/Settings.Designer.cs deleted file mode 100644 index a73b3cf..0000000 --- a/Updater/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Updater.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/Updater/Properties/Settings.settings b/Updater/Properties/Settings.settings deleted file mode 100644 index 3964565..0000000 --- a/Updater/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Updater/Resources/arrow_down.png b/Updater/Resources/arrow_down.png deleted file mode 100644 index 8587f60..0000000 Binary files a/Updater/Resources/arrow_down.png and /dev/null differ diff --git a/Updater/Updater.csproj b/Updater/Updater.csproj deleted file mode 100644 index ff31d8d..0000000 --- a/Updater/Updater.csproj +++ /dev/null @@ -1,101 +0,0 @@ - - - - - Debug - AnyCPU - {7B347593-6F3C-4308-BB94-51D35677C0C4} - WinExe - Properties - Updater - Updater - v4.5 - 512 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - application.ico - - - - .\Ionic.Zip.dll - - - - - - - - - - - - - - - - Form - - - Form1.cs - - - - - Form1.cs - - - ResXFileCodeGenerator - Designer - Resources.Designer.cs - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - True - Resources.resx - - - True - Settings.settings - True - - - - - - - - - - - - - \ No newline at end of file diff --git a/Updater/application.ico b/Updater/application.ico deleted file mode 100644 index 3f95acc..0000000 Binary files a/Updater/application.ico and /dev/null differ