Merge pull request #45 from IngenerkaTeamCenter/mabramovsd-patch-2

RQKL
This commit is contained in:
Mikhail Abramov 2018-04-17 20:03:10 +03:00 committed by GitHub
commit e3467711a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -167,9 +167,10 @@ namespace WindowsFormsApplication1
File.AppendAllText(filename, Environment.NewLine); File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + p.x1 + "; " + Environment.NewLine); File.AppendAllText(filename, " " + name + ".x = " + p.x1 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + p.y1 + "; " + Environment.NewLine); File.AppendAllText(filename, " " + name + ".y = " + p.y1 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x2 = " + p.x2 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y2 = " + p.y2 + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0; " + Environment.NewLine); File.AppendAllText(filename, " " + name + ".nomer_kadra = 0; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine); File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".gr_dvigx = 1000; " + Environment.NewLine);
} }
private void go_pryamo(string filename, string name) private void go_pryamo(string filename, string name)
@ -238,7 +239,7 @@ namespace WindowsFormsApplication1
} }
else if (persons[nomer].moveside == "Волнами") else if (persons[nomer].moveside == "Волнами")
{ {
Sinus.CreatePerson(filename, Person.PersonName(nomer), persons[nomer].coord); Sinus.CreatePerson(filename, Person.PersonName(nomer), persons[nomer]);
} }
else if (persons[nomer].moveside == "Кругами") else if (persons[nomer].moveside == "Кругами")
{ {

View file

@ -8,15 +8,15 @@ namespace WindowsFormsApplication1
{ {
public class Sinus public class Sinus
{ {
public static void CreatePerson(string filename, string name, string xBeg) public static void CreatePerson(string filename, string name, Person p)
{ {
File.AppendAllText(filename, " Person " + name + ";" + Environment.NewLine); File.AppendAllText(filename, " Person " + name + ";" + Environment.NewLine);
File.AppendAllText(filename, 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\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + xBeg + ";" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".x = " + p.x1 + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + xBeg + ";" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".y = " + p.y1 + ";" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nach_dv = " + name + ".y;" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".nach_dv = (" + p.y1 + "+" + p.y2 + ")/2;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".ampl_y = 150;" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".ampl_y = 150;" + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".ampl_x = 10;" + Environment.NewLine); File.AppendAllText(filename, " " + name + ".ampl_x = 10;" + Environment.NewLine);
} }