commit e2f3d2f292e0a4faf9f7d59ae5536f16ee19fff4 Author: Your Name Date: Wed Dec 10 12:57:59 2025 +0400 first commit diff --git a/App.config b/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..f2ad8e1 --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,503 @@ +namespace palopa.rur +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + 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.button25 = new System.Windows.Forms.Button(); + this.button26 = new System.Windows.Forms.Button(); + this.button27 = new System.Windows.Forms.Button(); + this.button28 = new System.Windows.Forms.Button(); + this.button29 = new System.Windows.Forms.Button(); + this.button30 = new System.Windows.Forms.Button(); + this.button31 = new System.Windows.Forms.Button(); + this.button32 = new System.Windows.Forms.Button(); + this.button33 = new System.Windows.Forms.Button(); + this.button34 = new System.Windows.Forms.Button(); + this.button35 = new System.Windows.Forms.Button(); + this.button36 = new System.Windows.Forms.Button(); + this.button37 = new System.Windows.Forms.Button(); + this.button38 = new System.Windows.Forms.Button(); + this.button39 = new System.Windows.Forms.Button(); + this.button40 = new System.Windows.Forms.Button(); + this.button41 = new System.Windows.Forms.Button(); + this.button42 = new System.Windows.Forms.Button(); + this.button43 = new System.Windows.Forms.Button(); + this.button44 = new System.Windows.Forms.Button(); + this.button45 = new System.Windows.Forms.Button(); + this.button46 = new System.Windows.Forms.Button(); + this.button47 = new System.Windows.Forms.Button(); + this.button48 = new System.Windows.Forms.Button(); + this.Выражение = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.button49 = new System.Windows.Forms.Button(); + this.button50 = new System.Windows.Forms.Button(); + this.button51 = new System.Windows.Forms.Button(); + this.button52 = new System.Windows.Forms.Button(); + this.button53 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button25 + // + this.button25.Location = new System.Drawing.Point(143, 191); + this.button25.Name = "button25"; + this.button25.Size = new System.Drawing.Size(42, 40); + this.button25.TabIndex = 0; + this.button25.Text = "1"; + this.button25.UseVisualStyleBackColor = true; + this.button25.Click += new System.EventHandler(this.button25_Click); + // + // button26 + // + this.button26.Location = new System.Drawing.Point(191, 191); + this.button26.Name = "button26"; + this.button26.Size = new System.Drawing.Size(42, 40); + this.button26.TabIndex = 1; + this.button26.Text = "2"; + this.button26.UseVisualStyleBackColor = true; + this.button26.Click += new System.EventHandler(this.button26_Click); + // + // button27 + // + this.button27.Location = new System.Drawing.Point(239, 191); + this.button27.Name = "button27"; + this.button27.Size = new System.Drawing.Size(42, 40); + this.button27.TabIndex = 2; + this.button27.Text = "3"; + this.button27.UseVisualStyleBackColor = true; + this.button27.Click += new System.EventHandler(this.button27_Click); + // + // button28 + // + this.button28.ForeColor = System.Drawing.Color.Crimson; + this.button28.Location = new System.Drawing.Point(287, 191); + this.button28.Name = "button28"; + this.button28.Size = new System.Drawing.Size(42, 40); + this.button28.TabIndex = 3; + this.button28.Text = "/"; + this.button28.UseVisualStyleBackColor = true; + this.button28.Click += new System.EventHandler(this.button28_Click); + // + // button29 + // + this.button29.Location = new System.Drawing.Point(143, 237); + this.button29.Name = "button29"; + this.button29.Size = new System.Drawing.Size(42, 40); + this.button29.TabIndex = 4; + this.button29.Text = "4"; + this.button29.UseVisualStyleBackColor = true; + this.button29.Click += new System.EventHandler(this.button29_Click); + // + // button30 + // + this.button30.Location = new System.Drawing.Point(191, 237); + this.button30.Name = "button30"; + this.button30.Size = new System.Drawing.Size(42, 40); + this.button30.TabIndex = 5; + this.button30.Text = "5"; + this.button30.UseVisualStyleBackColor = true; + this.button30.Click += new System.EventHandler(this.button30_Click); + // + // button31 + // + this.button31.Location = new System.Drawing.Point(239, 237); + this.button31.Name = "button31"; + this.button31.Size = new System.Drawing.Size(42, 40); + this.button31.TabIndex = 6; + this.button31.Text = "6"; + this.button31.UseVisualStyleBackColor = true; + this.button31.Click += new System.EventHandler(this.button31_Click); + // + // button32 + // + this.button32.ForeColor = System.Drawing.Color.Firebrick; + this.button32.Location = new System.Drawing.Point(287, 237); + this.button32.Name = "button32"; + this.button32.Size = new System.Drawing.Size(42, 40); + this.button32.TabIndex = 7; + this.button32.Text = "*"; + this.button32.UseVisualStyleBackColor = true; + this.button32.Click += new System.EventHandler(this.button32_Click); + // + // button33 + // + this.button33.Location = new System.Drawing.Point(143, 283); + this.button33.Name = "button33"; + this.button33.Size = new System.Drawing.Size(42, 40); + this.button33.TabIndex = 8; + this.button33.Text = "7"; + this.button33.UseVisualStyleBackColor = true; + this.button33.Click += new System.EventHandler(this.button33_Click); + // + // button34 + // + this.button34.Location = new System.Drawing.Point(191, 283); + this.button34.Name = "button34"; + this.button34.Size = new System.Drawing.Size(42, 40); + this.button34.TabIndex = 9; + this.button34.Text = "8"; + this.button34.UseVisualStyleBackColor = true; + this.button34.Click += new System.EventHandler(this.button34_Click); + // + // button35 + // + this.button35.Location = new System.Drawing.Point(239, 283); + this.button35.Name = "button35"; + this.button35.Size = new System.Drawing.Size(42, 40); + this.button35.TabIndex = 10; + this.button35.Text = "9"; + this.button35.UseVisualStyleBackColor = true; + this.button35.Click += new System.EventHandler(this.button35_Click); + // + // button36 + // + this.button36.ForeColor = System.Drawing.Color.Crimson; + this.button36.Location = new System.Drawing.Point(287, 283); + this.button36.Name = "button36"; + this.button36.Size = new System.Drawing.Size(42, 40); + this.button36.TabIndex = 11; + this.button36.Text = "-"; + this.button36.UseVisualStyleBackColor = true; + this.button36.Click += new System.EventHandler(this.button36_Click); + // + // button37 + // + this.button37.Location = new System.Drawing.Point(143, 329); + this.button37.Name = "button37"; + this.button37.Size = new System.Drawing.Size(42, 40); + this.button37.TabIndex = 12; + this.button37.Text = "+/-"; + this.button37.UseVisualStyleBackColor = true; + // + // button38 + // + this.button38.Location = new System.Drawing.Point(191, 329); + this.button38.Name = "button38"; + this.button38.Size = new System.Drawing.Size(42, 40); + this.button38.TabIndex = 13; + this.button38.Text = "0"; + this.button38.UseVisualStyleBackColor = true; + this.button38.Click += new System.EventHandler(this.button38_Click); + // + // button39 + // + this.button39.ForeColor = System.Drawing.Color.Crimson; + this.button39.Location = new System.Drawing.Point(239, 329); + this.button39.Name = "button39"; + this.button39.Size = new System.Drawing.Size(42, 40); + this.button39.TabIndex = 14; + this.button39.Text = "mod"; + this.button39.UseVisualStyleBackColor = true; + this.button39.Click += new System.EventHandler(this.button39_Click); + // + // button40 + // + this.button40.ForeColor = System.Drawing.Color.Crimson; + this.button40.Location = new System.Drawing.Point(287, 329); + this.button40.Name = "button40"; + this.button40.Size = new System.Drawing.Size(42, 40); + this.button40.TabIndex = 15; + this.button40.Text = "+"; + this.button40.UseVisualStyleBackColor = true; + this.button40.Click += new System.EventHandler(this.button40_Click); + // + // button41 + // + this.button41.ForeColor = System.Drawing.Color.CornflowerBlue; + this.button41.Location = new System.Drawing.Point(371, 191); + this.button41.Name = "button41"; + this.button41.Size = new System.Drawing.Size(53, 40); + this.button41.TabIndex = 16; + this.button41.Text = "MR"; + this.button41.UseVisualStyleBackColor = true; + this.button41.Click += new System.EventHandler(this.button41_Click); + // + // button42 + // + this.button42.ForeColor = System.Drawing.Color.CornflowerBlue; + this.button42.Location = new System.Drawing.Point(371, 237); + this.button42.Name = "button42"; + this.button42.Size = new System.Drawing.Size(53, 40); + this.button42.TabIndex = 17; + this.button42.Text = "M+"; + this.button42.UseVisualStyleBackColor = true; + this.button42.Click += new System.EventHandler(this.button42_Click); + // + // button43 + // + this.button43.ForeColor = System.Drawing.Color.CornflowerBlue; + this.button43.Location = new System.Drawing.Point(371, 283); + this.button43.Name = "button43"; + this.button43.Size = new System.Drawing.Size(53, 40); + this.button43.TabIndex = 18; + this.button43.Text = "MC"; + this.button43.UseVisualStyleBackColor = true; + // + // button44 + // + this.button44.ForeColor = System.Drawing.Color.Crimson; + this.button44.Location = new System.Drawing.Point(371, 329); + this.button44.Name = "button44"; + this.button44.Size = new System.Drawing.Size(53, 40); + this.button44.TabIndex = 19; + this.button44.Text = "="; + this.button44.UseVisualStyleBackColor = true; + this.button44.Click += new System.EventHandler(this.button44_Click); + // + // button45 + // + this.button45.ForeColor = System.Drawing.Color.Crimson; + this.button45.ImageKey = "(отсутствует)"; + this.button45.Location = new System.Drawing.Point(270, 133); + this.button45.Name = "button45"; + this.button45.Size = new System.Drawing.Size(80, 37); + this.button45.TabIndex = 20; + this.button45.Text = "Стереть"; + this.button45.UseVisualStyleBackColor = true; + this.button45.Click += new System.EventHandler(this.button45_Click); + // + // button46 + // + this.button46.ForeColor = System.Drawing.Color.Crimson; + this.button46.Location = new System.Drawing.Point(371, 133); + this.button46.Name = "button46"; + this.button46.Size = new System.Drawing.Size(53, 40); + this.button46.TabIndex = 21; + this.button46.Text = "Сброс"; + this.button46.UseVisualStyleBackColor = true; + this.button46.Click += new System.EventHandler(this.button46_Click); + // + // button47 + // + this.button47.Location = new System.Drawing.Point(143, 133); + this.button47.Name = "button47"; + this.button47.Size = new System.Drawing.Size(42, 40); + this.button47.TabIndex = 22; + this.button47.Text = "("; + this.button47.UseVisualStyleBackColor = true; + this.button47.Click += new System.EventHandler(this.button47_Click); + // + // button48 + // + this.button48.Location = new System.Drawing.Point(191, 133); + this.button48.Name = "button48"; + this.button48.Size = new System.Drawing.Size(42, 40); + this.button48.TabIndex = 23; + this.button48.Text = ")"; + this.button48.UseVisualStyleBackColor = true; + this.button48.Click += new System.EventHandler(this.button48_Click); + // + // Выражение + // + this.Выражение.AutoSize = true; + this.Выражение.Location = new System.Drawing.Point(140, 69); + this.Выражение.Name = "Выражение"; + this.Выражение.Size = new System.Drawing.Size(66, 13); + this.Выражение.TabIndex = 24; + this.Выражение.Text = "Выражение"; + this.Выражение.Click += new System.EventHandler(this.Выражение_Click); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(140, 95); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(59, 13); + this.label2.TabIndex = 25; + this.label2.Text = "Результат"; + this.label2.Click += new System.EventHandler(this.label2_Click); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(270, 62); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(154, 20); + this.textBox1.TabIndex = 28; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(270, 95); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(154, 20); + this.textBox2.TabIndex = 29; + // + // button49 + // + this.button49.Location = new System.Drawing.Point(440, 191); + this.button49.Name = "button49"; + this.button49.Size = new System.Drawing.Size(65, 40); + this.button49.TabIndex = 30; + this.button49.Text = "sin"; + this.button49.UseVisualStyleBackColor = true; + this.button49.Click += new System.EventHandler(this.button49_Click); + // + // button50 + // + this.button50.Location = new System.Drawing.Point(440, 237); + this.button50.Name = "button50"; + this.button50.Size = new System.Drawing.Size(65, 40); + this.button50.TabIndex = 31; + this.button50.Text = "cos"; + this.button50.UseVisualStyleBackColor = true; + this.button50.Click += new System.EventHandler(this.button50_Click); + // + // button51 + // + this.button51.Location = new System.Drawing.Point(440, 283); + this.button51.Name = "button51"; + this.button51.Size = new System.Drawing.Size(65, 40); + this.button51.TabIndex = 32; + this.button51.Text = "e"; + this.button51.UseVisualStyleBackColor = true; + this.button51.Click += new System.EventHandler(this.button51_Click); + // + // button52 + // + this.button52.Location = new System.Drawing.Point(440, 329); + this.button52.Name = "button52"; + this.button52.Size = new System.Drawing.Size(65, 40); + this.button52.TabIndex = 33; + this.button52.Text = "²"; + this.button52.UseVisualStyleBackColor = true; + this.button52.Click += new System.EventHandler(this.button52_Click); + // + // button53 + // + this.button53.Location = new System.Drawing.Point(540, 237); + this.button53.Name = "button53"; + this.button53.Size = new System.Drawing.Size(65, 40); + this.button53.TabIndex = 34; + this.button53.Text = "³"; + this.button53.UseVisualStyleBackColor = true; + this.button53.Click += new System.EventHandler(this.button53_Click); + // + // Form1 + // + this.ClientSize = new System.Drawing.Size(899, 531); + this.Controls.Add(this.button53); + this.Controls.Add(this.button52); + this.Controls.Add(this.button51); + this.Controls.Add(this.button50); + this.Controls.Add(this.button49); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label2); + this.Controls.Add(this.Выражение); + this.Controls.Add(this.button48); + this.Controls.Add(this.button47); + this.Controls.Add(this.button46); + this.Controls.Add(this.button45); + this.Controls.Add(this.button44); + this.Controls.Add(this.button43); + this.Controls.Add(this.button42); + this.Controls.Add(this.button41); + this.Controls.Add(this.button40); + this.Controls.Add(this.button39); + this.Controls.Add(this.button38); + this.Controls.Add(this.button37); + this.Controls.Add(this.button36); + this.Controls.Add(this.button35); + this.Controls.Add(this.button34); + this.Controls.Add(this.button33); + this.Controls.Add(this.button32); + this.Controls.Add(this.button31); + this.Controls.Add(this.button30); + this.Controls.Add(this.button29); + this.Controls.Add(this.button28); + this.Controls.Add(this.button27); + this.Controls.Add(this.button26); + this.Controls.Add(this.button25); + this.Name = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button10; + private System.Windows.Forms.Button button11; + private System.Windows.Forms.Button button12; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button15; + private System.Windows.Forms.Button button16; + private System.Windows.Forms.Button button17; + private System.Windows.Forms.Button button18; + private System.Windows.Forms.Button button19; + private System.Windows.Forms.Button button20; + private System.Windows.Forms.Button button21; + private System.Windows.Forms.Button button22; + private System.Windows.Forms.Button button23; + private System.Windows.Forms.Button button24; + private System.Windows.Forms.Button button25; + private System.Windows.Forms.Button button26; + private System.Windows.Forms.Button button27; + private System.Windows.Forms.Button button28; + private System.Windows.Forms.Button button29; + private System.Windows.Forms.Button button30; + private System.Windows.Forms.Button button31; + private System.Windows.Forms.Button button32; + private System.Windows.Forms.Button button33; + private System.Windows.Forms.Button button34; + private System.Windows.Forms.Button button35; + private System.Windows.Forms.Button button36; + private System.Windows.Forms.Button button37; + private System.Windows.Forms.Button button38; + private System.Windows.Forms.Button button39; + private System.Windows.Forms.Button button40; + private System.Windows.Forms.Button button41; + private System.Windows.Forms.Button button42; + private System.Windows.Forms.Button button43; + private System.Windows.Forms.Button button44; + private System.Windows.Forms.Button button45; + private System.Windows.Forms.Button button46; + private System.Windows.Forms.Button button47; + private System.Windows.Forms.Button button48; + private System.Windows.Forms.Label Выражение; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button button49; + private System.Windows.Forms.Button button50; + private System.Windows.Forms.Button button51; + private System.Windows.Forms.Button button52; + private System.Windows.Forms.Button button53; + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..330811b --- /dev/null +++ b/Form1.cs @@ -0,0 +1,337 @@ +using BaseCalculator; +using System; +using System.Diagnostics.Eventing.Reader; +using System.Linq.Expressions; +using System.Windows.Forms; + +namespace palopa.rur +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void button6_Click(object sender, EventArgs e) + { + + } + + private void button46_Click(object sender, EventArgs e) + { + textBox1.Clear(); + textBox2.Clear(); + textBox1.Focus(); + } + + private void button25_Click(object sender, EventArgs e) + { + textBox1.Text += "1"; + + } + + private void button29_Click(object sender, EventArgs e) + { + textBox1.Text += "4"; + } + + private void button38_Click(object sender, EventArgs e) + { + textBox1.Text += "0"; + } + + private void button41_Click(object sender, EventArgs e) + { + textBox1.Text += "MR"; + } + + private void Выражение_Click(object sender, EventArgs e) + { + + } + + private void label2_Click(object sender, EventArgs e) + { + + } + + private void button44_Click(object sender, EventArgs e) + { + try + { + string expression = textBox1.Text; + AnalaizerClass.expression = expression; + if (!AnalaizerClass.CheckCurrency()) + { + textBox2.Text = $"Ошибка: некоректные скобки"; + return; + } + + expression = expression.Replace(" ", "").Replace("(", "").Replace(")", ""); + + if (expression.Contains("+")) + { + string[] parts = expression.Split('+'); + if (parts.Length == 2) + { + long a = long.Parse(parts[0]); + long b = long.Parse(parts[1]); + + int result = CalcClass.Add(a, b); + + textBox2.Text = result.ToString(); + } + } + + else if (expression.Contains("-")) + { + string[] parts = expression.Split('-'); + if (parts.Length == 2) + { + long a = long.Parse(parts[0]); + long b = long.Parse(parts[1]); + + int result = CalcClass.Sub(a, b); + + textBox2.Text = result.ToString(); + } + } + else if (expression.Contains("*")) + { + string[] parts = expression.Split('*'); + if (parts.Length == 2) + { + long a = long.Parse(parts[0]); + long b = long.Parse(parts[1]); + + int result = CalcClass.Mult(a, b); + + textBox2.Text = result.ToString(); + } + + } + else if (expression.Contains("sin")) + { + string[] parts = expression.Split(new string[] { "sin" }, StringSplitOptions.None); + if (parts.Length == 2) + { + double a = double.Parse(parts[0].Trim()); + + double result = CalcClass.Sinus(a); + textBox2.Text = result.ToString(); + } + } + else if (expression.Contains("cos")) + { + string[] parts = expression.Split(new string[] { "cos" }, StringSplitOptions.None); + if (parts.Length == 2) + { + double a = double.Parse(parts[0].Trim()); + + double result = CalcClass.Cosinus(a); + textBox2.Text = result.ToString(); + } + } + else if (expression.Contains("/")) + { + string[] parts = expression.Split('/'); + if (parts.Length == 2) + { + long a = long.Parse(parts[0]); + long b = long.Parse(parts[1]); + + int result = CalcClass.Div(a, b); + + textBox2.Text = result.ToString(); + } + } + else if (expression.Contains("Mod")) + { + string[] parts = expression.Split(new string[] { "Mod" }, StringSplitOptions.None); + if (parts.Length == 2) + { + long a = long.Parse(parts[0].Trim()); + long b = long.Parse(parts[1].Trim()); + if (b == 0) + { + textBox2.Text = "Ошибка: деление на ноль в операции Mod"; + return; + } + int result = CalcClass.Mod(a, b); + textBox2.Text = result.ToString(); + } + else + { + textBox2.Text = "Ошибка: неверный формат выражения для Mod"; + } + } + else if (expression.Contains("e")) + { + string[] parts = expression.Split('e'); + if (parts.Length == 2) + { + double a = double.Parse(parts[0]); + + + double result = CalcClass.Exp(a); + + textBox2.Text = result.ToString(); + } + } + + + else if (expression.Contains("²")) + + { + string[] parts = expression.Split('²'); + if (parts.Length == 2) + { + double a = double.Parse(parts[0]); + + + double result = CalcClass.Square(a); + + textBox2.Text = result.ToString(); + } + + } + + else if (expression.Contains("³")) + + { + string[] parts = expression.Split('³'); + if (parts.Length == 2) + { + double a = double.Parse(parts[0]); + + + double result = CalcClass.Cube(a); + + textBox2.Text = result.ToString(); + } + + } + else + { + textBox2.Text = $"Ошибка: неверный формат выражения"; + } + + } + catch (Exception ex) + { + textBox2.Text = $"Ошибка: {ex.Message}"; + } + } + + + private void button26_Click(object sender, EventArgs e) + { + textBox1.Text += "2"; + } + + private void button27_Click(object sender, EventArgs e) + { + textBox1.Text += "3"; + } + + private void button30_Click(object sender, EventArgs e) + { + textBox1.Text += "5"; + } + + private void button31_Click(object sender, EventArgs e) + { + textBox1.Text += "6"; + } + + private void button33_Click(object sender, EventArgs e) + { + textBox1.Text += "7"; + } + + private void button34_Click(object sender, EventArgs e) + { + textBox1.Text += "8"; + } + + private void button35_Click(object sender, EventArgs e) + { + textBox1.Text += "9"; + } + + private void button40_Click(object sender, EventArgs e) + { + textBox1.Text += "+"; + } + + private void button36_Click(object sender, EventArgs e) + { + textBox1.Text += "-"; + } + + private void button32_Click(object sender, EventArgs e) + { + textBox1.Text += "*"; + } + + private void button39_Click(object sender, EventArgs e) + { + textBox1.Text += "Mod"; + } + + private void button28_Click(object sender, EventArgs e) + { + textBox1.Text += "/"; + } + + private void button47_Click(object sender, EventArgs e) + { + textBox1.Text += "("; + } + + private void button48_Click(object sender, EventArgs e) + { + textBox1.Text += ")"; + } + + private void button45_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(textBox1.Text)) + { + textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1); + } + } + + private void button42_Click(object sender, EventArgs e) + { + + } + + private void button49_Click(object sender, EventArgs e) + { + textBox1.Text += "sin"; + } + + private void button50_Click(object sender, EventArgs e) + { + textBox1.Text += "cos"; + } + + private void button51_Click(object sender, EventArgs e) + { + textBox1.Text += "e"; + } + + private void button52_Click(object sender, EventArgs e) + { + textBox1.Text += "²"; + } + + private void button53_Click(object sender, EventArgs e) + { + textBox1.Text += "³"; + } + } +} + diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Form1.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/Program.cs b/Program.cs new file mode 100644 index 0000000..7a8d8bf --- /dev/null +++ b/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace palopa.rur +{ + internal static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..96e8038 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов для изменения сведений, +// связанных со сборкой. +[assembly: AssemblyTitle("palopa.rur")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("palopa.rur")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, следует установить атрибут ComVisible в TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("4bc5f105-8dff-47ed-8576-c056e54413ce")] + +// Сведения о версии сборки состоят из указанных ниже четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..819e161 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace palopa.rur.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("palopa.rur.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/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..ed3f883 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 palopa.rur.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/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/bin/Debug/AnalaizerClass.dll b/bin/Debug/AnalaizerClass.dll new file mode 100644 index 0000000..9644b50 Binary files /dev/null and b/bin/Debug/AnalaizerClass.dll differ diff --git a/bin/Debug/CalcClass.dll b/bin/Debug/CalcClass.dll new file mode 100644 index 0000000..272e88f Binary files /dev/null and b/bin/Debug/CalcClass.dll differ diff --git a/bin/Debug/palopa.rur.exe b/bin/Debug/palopa.rur.exe new file mode 100644 index 0000000..e9a511d Binary files /dev/null and b/bin/Debug/palopa.rur.exe differ diff --git a/bin/Debug/palopa.rur.exe.config b/bin/Debug/palopa.rur.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/bin/Debug/palopa.rur.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/Debug/palopa.rur.pdb b/bin/Debug/palopa.rur.pdb new file mode 100644 index 0000000..59e25c0 Binary files /dev/null and b/bin/Debug/palopa.rur.pdb differ diff --git a/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..8b9b776 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6392516 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/palopa.rur.Form1.resources b/obj/Debug/palopa.rur.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/palopa.rur.Form1.resources differ diff --git a/obj/Debug/palopa.rur.Properties.Resources.resources b/obj/Debug/palopa.rur.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/palopa.rur.Properties.Resources.resources differ diff --git a/obj/Debug/palopa.rur.csproj.AssemblyReference.cache b/obj/Debug/palopa.rur.csproj.AssemblyReference.cache new file mode 100644 index 0000000..872a282 Binary files /dev/null and b/obj/Debug/palopa.rur.csproj.AssemblyReference.cache differ diff --git a/obj/Debug/palopa.rur.csproj.CopyComplete b/obj/Debug/palopa.rur.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/palopa.rur.csproj.CoreCompileInputs.cache b/obj/Debug/palopa.rur.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..62a9ffc --- /dev/null +++ b/obj/Debug/palopa.rur.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +5aeff44966291da6765fb68fb91f799e1f870bc5f187261fe9e0cf2630466ad9 diff --git a/obj/Debug/palopa.rur.csproj.FileListAbsolute.txt b/obj/Debug/palopa.rur.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..10cc436 --- /dev/null +++ b/obj/Debug/palopa.rur.csproj.FileListAbsolute.txt @@ -0,0 +1,24 @@ +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.AssemblyReference.cache +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.Form1.resources +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.Properties.Resources.resources +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.GenerateResource.cache +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.CoreCompileInputs.cache +C:\Users\Student\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.exe.config +C:\Users\Student\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.exe +C:\Users\Student\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.pdb +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.CopyComplete +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.exe +C:\Users\Student\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.pdb +C:\Users\Student\source\repos\palopa.rur\palopa.rur\bin\Debug\CalcClass.dll +C:\Users\Student\source\repos\palopa.rur\palopa.rur\bin\Debug\AnalaizerClass.dll +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.exe.config +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.exe +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\bin\Debug\palopa.rur.pdb +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.AssemblyReference.cache +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.Form1.resources +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.Properties.Resources.resources +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.GenerateResource.cache +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.CoreCompileInputs.cache +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.csproj.CopyComplete +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.exe +C:\Users\Student\Desktop\calc3\source\repos\palopa.rur\palopa.rur\obj\Debug\palopa.rur.pdb diff --git a/obj/Debug/palopa.rur.csproj.GenerateResource.cache b/obj/Debug/palopa.rur.csproj.GenerateResource.cache new file mode 100644 index 0000000..5d8fdd1 Binary files /dev/null and b/obj/Debug/palopa.rur.csproj.GenerateResource.cache differ diff --git a/obj/Debug/palopa.rur.exe b/obj/Debug/palopa.rur.exe new file mode 100644 index 0000000..e9a511d Binary files /dev/null and b/obj/Debug/palopa.rur.exe differ diff --git a/obj/Debug/palopa.rur.pdb b/obj/Debug/palopa.rur.pdb new file mode 100644 index 0000000..59e25c0 Binary files /dev/null and b/obj/Debug/palopa.rur.pdb differ diff --git a/palopa.rur.csproj b/palopa.rur.csproj new file mode 100644 index 0000000..5febf75 --- /dev/null +++ b/palopa.rur.csproj @@ -0,0 +1,92 @@ + + + + + Debug + AnyCPU + {4BC5F105-8DFF-47ED-8576-C056E54413CE} + WinExe + palopa.rur + palopa.rur + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\Downloads\AnalaizerClass.dll + + + ..\..\..\..\Downloads\CalcClass.dll + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + \ No newline at end of file diff --git a/palopa.rur.sln b/palopa.rur.sln new file mode 100644 index 0000000..5e0545d --- /dev/null +++ b/palopa.rur.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "palopa.rur", "palopa.rur\palopa.rur.csproj", "{4BC5F105-8DFF-47ED-8576-C056E54413CE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4BC5F105-8DFF-47ED-8576-C056E54413CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BC5F105-8DFF-47ED-8576-C056E54413CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BC5F105-8DFF-47ED-8576-C056E54413CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BC5F105-8DFF-47ED-8576-C056E54413CE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8189CFA2-DDA9-4703-A176-8CFABC86BF3E} + EndGlobalSection +EndGlobal