diff --git a/Test3/Test3.sln b/Test3/Test3.sln new file mode 100644 index 0000000..2c50c42 --- /dev/null +++ b/Test3/Test3.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31205.134 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test3", "Test3\Test3.csproj", "{494AF596-F008-431D-860B-D09CD9D0DDEA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {494AF596-F008-431D-860B-D09CD9D0DDEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {494AF596-F008-431D-860B-D09CD9D0DDEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {494AF596-F008-431D-860B-D09CD9D0DDEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {494AF596-F008-431D-860B-D09CD9D0DDEA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E908E865-0FDF-45C0-9E04-449E6494F49F} + EndGlobalSection +EndGlobal diff --git a/Test3/Test3/Form1.Designer.cs b/Test3/Test3/Form1.Designer.cs new file mode 100644 index 0000000..d50d4be --- /dev/null +++ b/Test3/Test3/Form1.Designer.cs @@ -0,0 +1,123 @@ + +namespace Test3 +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.button1 = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.button2 = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.button1.BackColor = System.Drawing.SystemColors.ButtonFace; + this.button1.ForeColor = System.Drawing.SystemColors.ControlText; + this.button1.Location = new System.Drawing.Point(240, 20); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(140, 50); + this.button1.TabIndex = 0; + this.button1.Text = "Start"; + this.button1.UseVisualStyleBackColor = false; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // progressBar1 + // + this.progressBar1.BackColor = System.Drawing.SystemColors.Highlight; + this.progressBar1.Location = new System.Drawing.Point(38, 94); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(544, 81); + this.progressBar1.TabIndex = 1; + // + // button2 + // + this.button2.Anchor = System.Windows.Forms.AnchorStyles.None; + this.button2.BackColor = System.Drawing.SystemColors.ButtonFace; + this.button2.ForeColor = System.Drawing.Color.Red; + this.button2.Location = new System.Drawing.Point(234, 192); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(152, 71); + this.button2.TabIndex = 2; + this.button2.Text = "Exit"; + this.button2.UseVisualStyleBackColor = false; + this.button2.Visible = false; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.ActiveCaption; + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 35F)); + this.tableLayoutPanel1.Controls.Add(this.button1, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.progressBar1, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.button2, 1, 2); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 3; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(620, 273); + this.tableLayoutPanel1.TabIndex = 3; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(620, 273); + this.Controls.Add(this.tableLayoutPanel1); + this.MinimumSize = new System.Drawing.Size(300, 300); + this.Name = "Form1"; + this.Text = "Form1"; + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + } +} + diff --git a/Test3/Test3/Form1.cs b/Test3/Test3/Form1.cs new file mode 100644 index 0000000..b13b328 --- /dev/null +++ b/Test3/Test3/Form1.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test3 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + timer1.Enabled = true; + progressBar1.Value = 0; + } + + private void timer1_Tick(object sender, EventArgs e) + { + progressBar1.Value++; + if (progressBar1.Value == 100) + { + button2.Visible = true; + timer1.Enabled = false; + } + } + + private void button2_Click(object sender, EventArgs e) + { + Close(); + } + } +} \ No newline at end of file diff --git a/Test3/Test3/Form1.resx b/Test3/Test3/Form1.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Test3/Test3/Form1.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Test3/Test3/Program.cs b/Test3/Test3/Program.cs new file mode 100644 index 0000000..7941a14 --- /dev/null +++ b/Test3/Test3/Program.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test3 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Test3/Test3/Properties/Resources.Designer.cs b/Test3/Test3/Properties/Resources.Designer.cs new file mode 100644 index 0000000..729822e --- /dev/null +++ b/Test3/Test3/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace Test3.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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("Test3.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; + } + } + } +} diff --git a/Test3/Test3/Properties/Resources.resx b/Test3/Test3/Properties/Resources.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Test3/Test3/Properties/Resources.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Test3/Test3/Test3.csproj b/Test3/Test3/Test3.csproj new file mode 100644 index 0000000..2faea65 --- /dev/null +++ b/Test3/Test3/Test3.csproj @@ -0,0 +1,24 @@ + + + + WinExe + net5.0-windows + true + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + \ No newline at end of file