Add files via upload
This commit is contained in:
parent
0215aa3760
commit
c77db12841
4 changed files with 21 additions and 39 deletions
|
@ -38,7 +38,7 @@ namespace WindowsFormsApplication1
|
|||
public static void OpenWhile(string filename)
|
||||
{
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " while (!GetAsyncKeyState(VK_ESCAPE));" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " while (!GetAsyncKeyState(VK_ESCAPE))" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSetColor(TX_RED);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSetFillColor(TX_RED);" + Environment.NewLine);
|
||||
|
|
|
@ -99,6 +99,7 @@ namespace WindowsFormsApplication1
|
|||
this.nazvanieTextBox.Name = "nazvanieTextBox";
|
||||
this.nazvanieTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.nazvanieTextBox.TabIndex = 3;
|
||||
this.nazvanieTextBox.TextChanged += new System.EventHandler(this.nazvanieTextBox_TextChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
|
@ -125,32 +126,6 @@ namespace WindowsFormsApplication1
|
|||
this.label13.TabIndex = 23;
|
||||
this.label13.Text = "ИНФОРМАЦИЯ О ПЕРСОНАЖАХ";
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(143, 308);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(39, 13);
|
||||
this.label12.TabIndex = 22;
|
||||
this.label12.Text = "номер";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(79, 308);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(39, 13);
|
||||
this.label11.TabIndex = 22;
|
||||
this.label11.Text = "время";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(9, 308);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(27, 13);
|
||||
this.label10.TabIndex = 22;
|
||||
this.label10.Text = "имя";
|
||||
// PictureBoxBackground
|
||||
//
|
||||
this.PictureBoxBackground.Location = new System.Drawing.Point(17, 160);
|
||||
|
@ -201,7 +176,7 @@ namespace WindowsFormsApplication1
|
|||
// SaveCharButton
|
||||
//
|
||||
this.SaveCharButton.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.SaveCharButton.Location = new System.Drawing.Point(0, 315);
|
||||
this.SaveCharButton.Location = new System.Drawing.Point(0, 320);
|
||||
this.SaveCharButton.Name = "SaveCharButton";
|
||||
this.SaveCharButton.Size = new System.Drawing.Size(377, 30);
|
||||
this.SaveCharButton.TabIndex = 3;
|
||||
|
@ -228,7 +203,7 @@ namespace WindowsFormsApplication1
|
|||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 26);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(392, 319);
|
||||
this.panel3.Size = new System.Drawing.Size(377, 324);
|
||||
this.panel3.TabIndex = 2;
|
||||
this.panel3.Visible = false;
|
||||
//
|
||||
|
@ -357,7 +332,7 @@ namespace WindowsFormsApplication1
|
|||
// SaveMultButton
|
||||
//
|
||||
this.SaveMultButton.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.SaveMultButton.Location = new System.Drawing.Point(0, 345);
|
||||
this.SaveMultButton.Location = new System.Drawing.Point(0, 350);
|
||||
this.SaveMultButton.Name = "SaveMultButton";
|
||||
this.SaveMultButton.Size = new System.Drawing.Size(377, 30);
|
||||
this.SaveMultButton.TabIndex = 1;
|
||||
|
|
|
@ -209,15 +209,13 @@ namespace WindowsFormsApplication1
|
|||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
|
||||
return;
|
||||
string filename = openFileDialog1.FileName;
|
||||
string fileText =File.ReadAllText(filename);
|
||||
nazvanieTextBox.Text = fileText;
|
||||
PictureBoxBackground.Image = Image.FromFile(Path.Combine(Application.StartupPath, "kartinka.jpg"));
|
||||
PictureBoxBackground.Image = Image.FromFile(openFileDialog1.FileName);
|
||||
}
|
||||
|
||||
private void SaveMultButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
|
||||
if (saveFileDialog1.ShowDialog() == DialogResult.OK &&
|
||||
PictureBoxBackground.Image != null)
|
||||
{
|
||||
string filename = saveFileDialog1.FileName;
|
||||
|
||||
|
@ -239,7 +237,7 @@ namespace WindowsFormsApplication1
|
|||
Files.OpenWhile(filename);
|
||||
Sinus.MovePerson(filename, "per");
|
||||
close_while(filename);
|
||||
delete_pics2(filename, 5);
|
||||
delete_pics(filename);
|
||||
}
|
||||
else if (ComboBoxMove.Text == "Кругами")
|
||||
{
|
||||
|
@ -249,6 +247,15 @@ namespace WindowsFormsApplication1
|
|||
close_while(filename);
|
||||
delete_pics(filename);
|
||||
}
|
||||
else if (ComboBoxMove.Text == "Диагонально")
|
||||
{
|
||||
Sinus.CreatePerson(filename, "per", TextBoxWall1.Text);
|
||||
old_place(filename, "per");
|
||||
Files.OpenWhile(filename);
|
||||
go_pryamo(filename, "per");
|
||||
close_while(filename);
|
||||
delete_pics(filename);
|
||||
}
|
||||
|
||||
Files.Ending(filename);
|
||||
|
||||
|
@ -276,9 +283,9 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
}
|
||||
|
||||
private void SaveMultButton_Click(object sender, EventArgs e)
|
||||
private void nazvanieTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//надо
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace WindowsFormsApplication1
|
|||
{
|
||||
File.AppendAllText(filename, " Person " + name + ";" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\Personaj.bmp\");" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\Personaj.bmp\");" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x = " + xBeg + ";" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y = " + xBeg + ";" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
|
||||
|
|
Loading…
Add table
Reference in a new issue