Merge branch 'master' into Arsenee-patch-1
This commit is contained in:
commit
7256f8f4ae
5 changed files with 80 additions and 35 deletions
BIN
How to use.docx
Normal file
BIN
How to use.docx
Normal file
Binary file not shown.
49
WindowsFormsApplication1/WindowsFormsApplication1/Circle.cs
Normal file
49
WindowsFormsApplication1/WindowsFormsApplication1/Circle.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WindowsFormsApplication1
|
||||
{
|
||||
public class Circle
|
||||
{
|
||||
|
||||
public static void CreatePerson(string filename, string name)
|
||||
{
|
||||
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, Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x = 50;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y = 50;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".angle = 0;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
}
|
||||
|
||||
public static void circle(string filename, string name)
|
||||
{
|
||||
File.AppendAllText(filename, " angle++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " textureX = 500 + 200 * cos (angle / 10);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " textureY = 300 + 200 * sin (angle / 10);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txTransparentBlt(txDC(), textureX, textureY, 55, 86, texture, 55 * nomer_kadra, 0, RGB(0, 255, 255));" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " nomer_kadra++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " if (nomer_kadra > 2)" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " nomer_kadra = 0;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " }" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSleep(10);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " }" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, "txDeleteDC(texture);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, "return 0;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, "}" + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,6 +42,8 @@ namespace WindowsFormsApplication1
|
|||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.SaveCharButton = new System.Windows.Forms.Button();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.charNameBox = new System.Windows.Forms.TextBox();
|
||||
this.charNameLabel = new System.Windows.Forms.Label();
|
||||
this.openSpace = new System.Windows.Forms.PictureBox();
|
||||
this.SpriteNumberLabel = new System.Windows.Forms.Label();
|
||||
this.SpriteNumberTextBox = new System.Windows.Forms.TextBox();
|
||||
|
@ -201,6 +203,8 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.charNameBox);
|
||||
this.panel3.Controls.Add(this.charNameLabel);
|
||||
this.panel3.Controls.Add(this.openSpace);
|
||||
this.panel3.Controls.Add(this.SpriteNumberLabel);
|
||||
this.panel3.Controls.Add(this.SpriteNumberTextBox);
|
||||
|
@ -223,6 +227,22 @@ namespace WindowsFormsApplication1
|
|||
this.panel3.TabIndex = 2;
|
||||
this.panel3.Visible = false;
|
||||
//
|
||||
// charNameBox
|
||||
//
|
||||
this.charNameBox.Location = new System.Drawing.Point(85, 115);
|
||||
this.charNameBox.Name = "charNameBox";
|
||||
this.charNameBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.charNameBox.TabIndex = 19;
|
||||
//
|
||||
// charNameLabel
|
||||
//
|
||||
this.charNameLabel.AutoSize = true;
|
||||
this.charNameLabel.Location = new System.Drawing.Point(19, 115);
|
||||
this.charNameLabel.Name = "charNameLabel";
|
||||
this.charNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.charNameLabel.TabIndex = 18;
|
||||
this.charNameLabel.Text = "Название:";
|
||||
//
|
||||
// openSpace
|
||||
//
|
||||
this.openSpace.Location = new System.Drawing.Point(65, 206);
|
||||
|
@ -440,5 +460,7 @@ namespace WindowsFormsApplication1
|
|||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.PictureBox openSpace;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox charNameBox;
|
||||
private System.Windows.Forms.Label charNameLabel;
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ namespace WindowsFormsApplication1
|
|||
public String time2;
|
||||
public String sprite;
|
||||
public String moveside;
|
||||
public String charname;
|
||||
};
|
||||
|
||||
Person[] persons = new Person[200];
|
||||
|
@ -174,6 +175,8 @@ namespace WindowsFormsApplication1
|
|||
persons[nomerPersa].sprite = SpriteNumberTextBox.Text;
|
||||
persons[nomerPersa].moveside = ComboBoxMove.Text;
|
||||
persons[nomerPersa].nomer = nomerPersa;
|
||||
persons[nomerPersa].charname = charNameBox.Text;
|
||||
persons[nomerPersa].l2.Text = charNameBox.Text;
|
||||
|
||||
String[] coordinatyNachala = TextBoxWall1.Text.Split(new String[] { "," }, StringSplitOptions.None);
|
||||
if (coordinatyNachala.Length > 1)
|
||||
|
@ -216,23 +219,14 @@ namespace WindowsFormsApplication1
|
|||
persons[pNomer].y2 = coordinatyKonza[1];
|
||||
}
|
||||
|
||||
persons[pNomer].charname = charNameBox.Text;
|
||||
persons[pNomer].l2.Text = charNameBox.Text;
|
||||
}
|
||||
|
||||
//sohranit v massiv
|
||||
//proverit, chto est arr[1]
|
||||
}
|
||||
|
||||
private void circle_create_person(string filename, string name)
|
||||
{
|
||||
File.AppendAllText(filename, " HDC texture = txLoadImage(\"Pictures\\Personaj.bmp);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " double per.textureX = 50;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " double textureY = 50;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " double angle = 0;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " double nomer_kadra = 0;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
}
|
||||
|
||||
private void old_place(string filename, string name, Person p)
|
||||
{
|
||||
//ctrl-c ctrl-v texture n_sprites x2 y2
|
||||
|
@ -257,28 +251,6 @@ namespace WindowsFormsApplication1
|
|||
File.AppendAllText(filename, Environment.NewLine);
|
||||
}
|
||||
|
||||
private void circle(string filename, string name)
|
||||
{
|
||||
File.AppendAllText(filename, " angle++;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " textureX = 500 + 200 * cos (angle / 10);"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " textureY = 300 + 200 * sin (angle / 10);"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " txTransparentBlt(txDC(), textureX, textureY, 55, 86, texture, 55 * nomer_kadra, 0, RGB(0, 255, 255));"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " nomer_kadra++;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " if (nomer_kadra > 2)"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " {"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " nomer_kadra = 0;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " }"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSleep(10);"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, " }"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, "txDeleteDC(texture);"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, "return 0;"+ Environment.NewLine);
|
||||
File.AppendAllText(filename, "}"+ Environment.NewLine);
|
||||
}
|
||||
|
||||
private void OpenAddCharClick(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -330,9 +302,9 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
else if (ComboBoxMove.Text == "Кругами")
|
||||
{
|
||||
circle_create_person(filename, "per");
|
||||
Circle.CreatePerson(filename, "per");
|
||||
Files.OpenWhile(filename);
|
||||
circle(filename, "per");
|
||||
Circle.circle(filename, "per");
|
||||
close_while(filename);
|
||||
delete_pics(filename);
|
||||
}
|
||||
|
@ -374,6 +346,7 @@ namespace WindowsFormsApplication1
|
|||
SpriteNumberTextBox.Text = persons[nomer].sprite;
|
||||
ComboBoxMove.Text = persons[nomer].moveside;
|
||||
pNomer = persons[nomer].nomer;
|
||||
charNameBox.Text = persons[nomer].charname;
|
||||
|
||||
if (!String.IsNullOrEmpty(persons[nomer].adress))
|
||||
{
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Circle.cs" />
|
||||
<Compile Include="Files.cs" />
|
||||
<Compile Include="MainForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
|
Loading…
Add table
Reference in a new issue