Заготовка мульта

This commit is contained in:
Arsenee 2018-02-13 17:22:06 +04:00 committed by GitHub
parent 1230d49f9c
commit 1daba70943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 12 deletions

View file

@ -43,6 +43,7 @@
this.panel2 = new System.Windows.Forms.Panel();
this.button3 = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.button5 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
@ -60,7 +61,7 @@
this.button1 = new System.Windows.Forms.Button();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@ -106,6 +107,7 @@
//
// panel1
//
this.panel1.Controls.Add(this.button6);
this.panel1.Controls.Add(this.comboBox1);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.label5);
@ -235,6 +237,16 @@
this.panel3.TabIndex = 2;
this.panel3.Visible = false;
//
// button5
//
this.button5.Location = new System.Drawing.Point(234, 158);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(171, 30);
this.button5.TabIndex = 14;
this.button5.Text = "Открыть персонажа";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(19, 134);
@ -378,15 +390,15 @@
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// button5
// button6
//
this.button5.Location = new System.Drawing.Point(234, 158);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(171, 30);
this.button5.TabIndex = 14;
this.button5.Text = "Открыть персонажа";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
this.button6.Location = new System.Drawing.Point(105, 213);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(75, 23);
this.button6.TabIndex = 10;
this.button6.Text = "button6";
this.button6.UseVisualStyleBackColor = true;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// Form1
//
@ -444,6 +456,7 @@
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button button6;
}
}

View file

@ -93,7 +93,16 @@ namespace WindowsFormsApplication1
if (saveFileDialog1.ShowDialog() == DialogResult.Cancel)
return;
string filename = saveFileDialog1.FileName;
System.IO.File.WriteAllText(filename, nazvanieTextBox.Text);
System.IO.File.WriteAllText(filename, "");
System.IO.File.AppendAllText(filename, "#include \"TXLib.h\"" + Environment.NewLine);
System.IO.File.AppendAllText(filename, Environment.NewLine);
System.IO.File.AppendAllText(filename, "int main()" + Environment.NewLine);
System.IO.File.AppendAllText(filename, "{" + Environment.NewLine);
System.IO.File.AppendAllText(filename, Environment.NewLine);
//тут будет мультфильм
System.IO.File.AppendAllText(filename, "return 0;" + Environment.NewLine);
System.IO.File.AppendAllText(filename, "}" + Environment.NewLine);
MessageBox.Show("Файл сохранен");
}
@ -107,6 +116,9 @@ namespace WindowsFormsApplication1
MessageBox.Show("Файл открыт");
}
private void button6_Click(object sender, EventArgs e)
{
Close();
}
}
}
}

View file

@ -0,0 +1,6 @@
#include "TXLib.h"
int main()
{
}

View file

@ -0,0 +1,6 @@
#include TXLib.h
int main()
{
}