Merge branch 'master' into ArkLightning-patch-1
This commit is contained in:
commit
a1a503a727
11 changed files with 134 additions and 755 deletions
|
@ -27,9 +27,9 @@ namespace WindowsFormsApplication1
|
|||
public static void MovePerson(string filename, string name, Person p)
|
||||
{
|
||||
File.AppendAllText(filename, " if ((myTime >= " + p.time1 + ") && (myTime <= " + p.time2 + ")) {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".angle++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x = (" + p.x1 + " + " + p.x2 + ")/2 * cos (" + name + ".angle / 10);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y = (" + p.y1 + " + " + p.y2 + ")/2 * sin (" + name + ".angle / 10);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".angle = " + name + ".angle + 360 / 20 * " + p.circles + " / (" + p.time2 + "-" + p.time1 + ");" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x = (" + p.x1 + " + " + p.x2 + ")/2 + (" + p.x1 + " - " + p.x2 + ")/2 * cos (" + name + ".angle * 3.1416 / 180);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y = (" + p.y1 + " + " + p.y2 + ")/2 + (" + p.y1 + " - " + p.y2 + ")/2 * sin (" + name + ".angle * 3.1416 / 180);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, " +
|
||||
p.width + "/" + p.sprite + ", " +
|
||||
p.height + "," +
|
||||
|
|
|
@ -57,10 +57,10 @@ namespace WindowsFormsApplication1
|
|||
File.AppendAllText(filename, " }" + Environment.NewLine);
|
||||
}
|
||||
|
||||
public static void OpenWhile(string filename)
|
||||
public static void OpenWhile(string filename, int maxTime)
|
||||
{
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " while (!GetAsyncKeyState(VK_ESCAPE))" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " while (myTime <= " + maxTime + ")" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSetColor(TX_RED);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txSetFillColor(TX_RED);" + Environment.NewLine);
|
||||
|
|
|
@ -1,421 +0,0 @@
|
|||
namespace WindowsFormsApplication1
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Требуется переменная конструктора.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Освободить все используемые ресурсы.
|
||||
/// </summary>
|
||||
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Код, автоматически созданный конструктором форм Windows
|
||||
|
||||
/// <summary>
|
||||
/// Обязательный метод для поддержки конструктора - не изменяйте
|
||||
/// содержимое данного метода при помощи редактора кода.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.nazvanieTextBox = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.dobavitFonButton = new System.Windows.Forms.Button();
|
||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.spriteLabel = new System.Windows.Forms.Label();
|
||||
this.spriteTextBox = new System.Windows.Forms.TextBox();
|
||||
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();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.textBox7 = new System.Windows.Forms.TextBox();
|
||||
this.textBox6 = new System.Windows.Forms.TextBox();
|
||||
this.textBox5 = new System.Windows.Forms.TextBox();
|
||||
this.textBox4 = new System.Windows.Forms.TextBox();
|
||||
this.comboBox2 = new System.Windows.Forms.ComboBox();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Arial Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(224, 23);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Данные о мултфильме:";
|
||||
this.label1.Click += new System.EventHandler(this.label1_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(14, 60);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(136, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Длительность: 35 секунд";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(14, 86);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(60, 13);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Название:";
|
||||
this.label3.Click += new System.EventHandler(this.label3_Click);
|
||||
//
|
||||
// nazvanieTextBox
|
||||
//
|
||||
this.nazvanieTextBox.Location = new System.Drawing.Point(80, 86);
|
||||
this.nazvanieTextBox.Name = "nazvanieTextBox";
|
||||
this.nazvanieTextBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.nazvanieTextBox.TabIndex = 3;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.pictureBox1);
|
||||
this.panel1.Controls.Add(this.label14);
|
||||
this.panel1.Controls.Add(this.dobavitFonButton);
|
||||
this.panel1.Controls.Add(this.label1);
|
||||
this.panel1.Controls.Add(this.nazvanieTextBox);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(227, 296);
|
||||
this.panel1.TabIndex = 4;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Location = new System.Drawing.Point(14, 114);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(77, 13);
|
||||
this.label14.TabIndex = 11;
|
||||
this.label14.Text = "Выбрать фон:";
|
||||
//
|
||||
// dobavitFonButton
|
||||
//
|
||||
this.dobavitFonButton.Location = new System.Drawing.Point(17, 130);
|
||||
this.dobavitFonButton.Name = "dobavitFonButton";
|
||||
this.dobavitFonButton.Size = new System.Drawing.Size(116, 24);
|
||||
this.dobavitFonButton.TabIndex = 10;
|
||||
this.dobavitFonButton.Text = "Добавить";
|
||||
this.dobavitFonButton.UseVisualStyleBackColor = true;
|
||||
this.dobavitFonButton.Click += new System.EventHandler(this.button6_Click);
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
this.splitter1.Location = new System.Drawing.Point(227, 0);
|
||||
this.splitter1.Name = "splitter1";
|
||||
this.splitter1.Size = new System.Drawing.Size(3, 296);
|
||||
this.splitter1.TabIndex = 5;
|
||||
this.splitter1.TabStop = false;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.button3);
|
||||
this.panel2.Controls.Add(this.panel3);
|
||||
this.panel2.Controls.Add(this.button2);
|
||||
this.panel2.Controls.Add(this.button1);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(230, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(408, 296);
|
||||
this.panel2.TabIndex = 6;
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.button3.Location = new System.Drawing.Point(0, 236);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(408, 30);
|
||||
this.button3.TabIndex = 3;
|
||||
this.button3.Text = "Сохранить персонажа";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.spriteLabel);
|
||||
this.panel3.Controls.Add(this.spriteTextBox);
|
||||
this.panel3.Controls.Add(this.button5);
|
||||
this.panel3.Controls.Add(this.button4);
|
||||
this.panel3.Controls.Add(this.label12);
|
||||
this.panel3.Controls.Add(this.label11);
|
||||
this.panel3.Controls.Add(this.label10);
|
||||
this.panel3.Controls.Add(this.label9);
|
||||
this.panel3.Controls.Add(this.label8);
|
||||
this.panel3.Controls.Add(this.textBox7);
|
||||
this.panel3.Controls.Add(this.textBox6);
|
||||
this.panel3.Controls.Add(this.textBox5);
|
||||
this.panel3.Controls.Add(this.textBox4);
|
||||
this.panel3.Controls.Add(this.comboBox2);
|
||||
this.panel3.Controls.Add(this.label7);
|
||||
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(408, 240);
|
||||
this.panel3.TabIndex = 2;
|
||||
this.panel3.Visible = false;
|
||||
//
|
||||
// spriteLabel
|
||||
//
|
||||
this.spriteLabel.AutoSize = true;
|
||||
this.spriteLabel.Location = new System.Drawing.Point(7, 153);
|
||||
this.spriteLabel.Name = "spriteLabel";
|
||||
this.spriteLabel.Size = new System.Drawing.Size(119, 13);
|
||||
this.spriteLabel.TabIndex = 16;
|
||||
this.spriteLabel.Text = "Количество спрайтов:";
|
||||
this.spriteLabel.Click += new System.EventHandler(this.label13_Click_1);
|
||||
//
|
||||
// spriteTextBox
|
||||
//
|
||||
this.spriteTextBox.Location = new System.Drawing.Point(10, 169);
|
||||
this.spriteTextBox.Name = "spriteTextBox";
|
||||
this.spriteTextBox.Size = new System.Drawing.Size(83, 20);
|
||||
this.spriteTextBox.TabIndex = 15;
|
||||
//
|
||||
// button5
|
||||
//
|
||||
this.button5.Location = new System.Drawing.Point(221, 160);
|
||||
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(132, 169);
|
||||
this.button4.Name = "button4";
|
||||
this.button4.Size = new System.Drawing.Size(65, 20);
|
||||
this.button4.TabIndex = 13;
|
||||
this.button4.Text = "Добавить";
|
||||
this.button4.UseVisualStyleBackColor = true;
|
||||
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Location = new System.Drawing.Point(129, 153);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(58, 13);
|
||||
this.label12.TabIndex = 12;
|
||||
this.label12.Text = "Картинка:";
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Location = new System.Drawing.Point(19, 91);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(54, 13);
|
||||
this.label11.TabIndex = 11;
|
||||
this.label11.Text = "Тайминг:";
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Location = new System.Drawing.Point(240, 91);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(13, 13);
|
||||
this.label10.TabIndex = 10;
|
||||
this.label10.Text = "--";
|
||||
this.label10.Click += new System.EventHandler(this.label10_Click);
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(240, 62);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(13, 13);
|
||||
this.label9.TabIndex = 9;
|
||||
this.label9.Text = "--";
|
||||
this.label9.Click += new System.EventHandler(this.label9_Click);
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(19, 62);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(107, 13);
|
||||
this.label8.TabIndex = 8;
|
||||
this.label8.Text = "Границы движения:";
|
||||
this.label8.Click += new System.EventHandler(this.label8_Click);
|
||||
//
|
||||
// textBox7
|
||||
//
|
||||
this.textBox7.Location = new System.Drawing.Point(132, 88);
|
||||
this.textBox7.Name = "textBox7";
|
||||
this.textBox7.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox7.TabIndex = 5;
|
||||
//
|
||||
// textBox6
|
||||
//
|
||||
this.textBox6.Location = new System.Drawing.Point(259, 88);
|
||||
this.textBox6.Name = "textBox6";
|
||||
this.textBox6.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox6.TabIndex = 4;
|
||||
this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
|
||||
//
|
||||
// textBox5
|
||||
//
|
||||
this.textBox5.Location = new System.Drawing.Point(259, 59);
|
||||
this.textBox5.Name = "textBox5";
|
||||
this.textBox5.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox5.TabIndex = 3;
|
||||
//
|
||||
// textBox4
|
||||
//
|
||||
this.textBox4.Location = new System.Drawing.Point(132, 59);
|
||||
this.textBox4.Name = "textBox4";
|
||||
this.textBox4.Size = new System.Drawing.Size(100, 20);
|
||||
this.textBox4.TabIndex = 2;
|
||||
//
|
||||
// comboBox2
|
||||
//
|
||||
this.comboBox2.FormattingEnabled = true;
|
||||
this.comboBox2.Items.AddRange(new object[] {
|
||||
"Прямо",
|
||||
"По диагонали",
|
||||
"Волнами",
|
||||
"Кругами"});
|
||||
this.comboBox2.Location = new System.Drawing.Point(107, 12);
|
||||
this.comboBox2.Name = "comboBox2";
|
||||
this.comboBox2.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBox2.TabIndex = 1;
|
||||
this.comboBox2.Text = "Прямо";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(19, 12);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(82, 13);
|
||||
this.label7.TabIndex = 0;
|
||||
this.label7.Text = "Вид движения:";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.button2.Location = new System.Drawing.Point(0, 266);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(408, 30);
|
||||
this.button2.TabIndex = 1;
|
||||
this.button2.Text = "Сохранить мульт";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// button1
|
||||
//
|
||||
this.button1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.button1.Location = new System.Drawing.Point(0, 0);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(408, 26);
|
||||
this.button1.TabIndex = 0;
|
||||
this.button1.Text = "Добавить персонажа";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// openFileDialog1
|
||||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Location = new System.Drawing.Point(17, 160);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(100, 50);
|
||||
this.pictureBox1.TabIndex = 12;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(638, 296);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.splitter1);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "MainForm";
|
||||
this.RightToLeftLayout = true;
|
||||
this.Text = "Свойства персонажа";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox nazvanieTextBox;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Splitter splitter1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox textBox7;
|
||||
private System.Windows.Forms.TextBox textBox6;
|
||||
private System.Windows.Forms.TextBox textBox5;
|
||||
private System.Windows.Forms.TextBox textBox4;
|
||||
private System.Windows.Forms.ComboBox comboBox2;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Button button4;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
|
||||
private System.Windows.Forms.Button button5;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||
private System.Windows.Forms.Label spriteLabel;
|
||||
private System.Windows.Forms.TextBox spriteTextBox;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.Button dobavitFonButton;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApplication1
|
||||
{
|
||||
public struct Personazh
|
||||
{
|
||||
public string ce_nibud;
|
||||
public string nazvanie_personazha;
|
||||
}
|
||||
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
|
||||
PictureBox[] pic1 = new PictureBox[1000];
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
button1.Click += button1_Click;
|
||||
button3.Click += button3_Click;
|
||||
openFileDialog1.Filter = "Text files(*OpenFileDialog.txt)|*.txt|All files(*.*)|*.*";
|
||||
saveFileDialog1.Filter = "Text files(*SaveFileDialog.txt)|*.txt|All files(*.*)|*.*";
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
/*int i=0;
|
||||
|
||||
for (; i < 10; i++)
|
||||
{
|
||||
PictureBox pic2 = new PictureBox();
|
||||
pic2.Location = new Point(pic2.Location.X + (i*100), pic2.Location.Y);
|
||||
pic2.BorderStyle = BorderStyle.FixedSingle;
|
||||
pic1[i] = pic2;
|
||||
Controls.Add(pic1[i]);
|
||||
}*/
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label3_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void textBox3_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
panel3.Visible = true;
|
||||
}
|
||||
|
||||
private void label9_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label10_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button4_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Список всех файлов папки
|
||||
//Создаешь из них массив (или список)
|
||||
//Выбираешь рандомный номер
|
||||
|
||||
//pictureBox1.Image = Image.FromFile("kartinka.jpg");
|
||||
}
|
||||
|
||||
private void pictureBox1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (saveFileDialog1.ShowDialog() == DialogResult.Cancel)
|
||||
return;
|
||||
string filename = saveFileDialog1.FileName;
|
||||
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);
|
||||
//txCreateWindow(800, 600);
|
||||
|
||||
|
||||
|
||||
System.IO.File.AppendAllText(filename, Environment.NewLine);
|
||||
System.IO.File.AppendAllText(filename, "txSetColor(TX_WHITE);" + Environment.NewLine);
|
||||
System.IO.File.AppendAllText(filename, "txSetFillColor(TX_WHITE);" + Environment.NewLine);
|
||||
System.IO.File.AppendAllText(filename, "txRectangle(0, 0, 800, 600);" + Environment.NewLine);
|
||||
System.IO.File.AppendAllText(filename, "HDC texture = txLoadImage(\"Pictures\\Personaj.bmp\");" + Environment.NewLine);
|
||||
|
||||
|
||||
//тут будет мультфильм
|
||||
System.IO.File.AppendAllText(filename, "return " + spriteTextBox.Text + "0;" + Environment.NewLine);
|
||||
|
||||
System.IO.File.AppendAllText(filename, "}" + Environment.NewLine);
|
||||
MessageBox.Show("Файл сохранен");
|
||||
}
|
||||
|
||||
private void button5_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
|
||||
return;
|
||||
string filename = openFileDialog1.FileName;
|
||||
string fileText = System.IO.File.ReadAllText(filename);
|
||||
nazvanieTextBox.Text = fileText;
|
||||
MessageBox.Show("Файл открыт");
|
||||
}
|
||||
|
||||
private void textBox6_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label8_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label13_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label13_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void button6_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
|
||||
return;
|
||||
string filename = openFileDialog1.FileName;
|
||||
string fileText = System.IO.File.ReadAllText(filename);
|
||||
nazvanieTextBox.Text = fileText;
|
||||
//MessageBox.Show("Файл открыт");
|
||||
pictureBox1.Image = Image.FromFile("kartinka.jpg");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>153, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>39</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -31,7 +31,7 @@ namespace WindowsFormsApplication1
|
|||
p.width + "/" + p.sprite + ", " +
|
||||
p.height + "," +
|
||||
name + ".texture, " +
|
||||
p.width + "/" + p.sprite + " * " + name + ".nomer_kadra, 255, RGB(255, 255, 255));" + Environment.NewLine);
|
||||
p.width + "/" + p.sprite + " * " + name + ".nomer_kadra, 0, RGB(255, 255, 255));" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".nomer_kadra++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
|
|
|
@ -64,6 +64,8 @@ namespace WindowsFormsApplication1
|
|||
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.leftPanel.SuspendLayout();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PictureBoxBackground)).BeginInit();
|
||||
this.rightPanel.SuspendLayout();
|
||||
this.personPanel.SuspendLayout();
|
||||
|
@ -76,9 +78,9 @@ namespace WindowsFormsApplication1
|
|||
this.LabelData.Font = new System.Drawing.Font("Arial Black", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.LabelData.Location = new System.Drawing.Point(0, 9);
|
||||
this.LabelData.Name = "LabelData";
|
||||
this.LabelData.Size = new System.Drawing.Size(224, 23);
|
||||
this.LabelData.Size = new System.Drawing.Size(234, 23);
|
||||
this.LabelData.TabIndex = 0;
|
||||
this.LabelData.Text = "Данные о мултфильме:";
|
||||
this.LabelData.Text = "Данные о мультфильме:";
|
||||
//
|
||||
// LabelLengh
|
||||
//
|
||||
|
@ -225,18 +227,20 @@ namespace WindowsFormsApplication1
|
|||
this.personPanel.Size = new System.Drawing.Size(377, 324);
|
||||
this.personPanel.TabIndex = 2;
|
||||
this.personPanel.Visible = false;
|
||||
this.panel3.Paint += new System.Windows.Forms.PaintEventHandler(this.panel3_Paint);
|
||||
//
|
||||
// charNameBox
|
||||
//
|
||||
this.charNameBox.Location = new System.Drawing.Point(85, 115);
|
||||
this.charNameBox.Location = new System.Drawing.Point(85, 88);
|
||||
this.charNameBox.Name = "charNameBox";
|
||||
this.charNameBox.Size = new System.Drawing.Size(138, 20);
|
||||
this.charNameBox.TabIndex = 19;
|
||||
this.charNameBox.TextChanged += new System.EventHandler(this.charNameBox_TextChanged);
|
||||
//
|
||||
// charNameLabel
|
||||
//
|
||||
this.charNameLabel.AutoSize = true;
|
||||
this.charNameLabel.Location = new System.Drawing.Point(19, 115);
|
||||
this.charNameLabel.Location = new System.Drawing.Point(19, 88);
|
||||
this.charNameLabel.Name = "charNameLabel";
|
||||
this.charNameLabel.Size = new System.Drawing.Size(60, 13);
|
||||
this.charNameLabel.TabIndex = 18;
|
||||
|
@ -244,7 +248,7 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
// openSpace
|
||||
//
|
||||
this.openSpace.Location = new System.Drawing.Point(188, 189);
|
||||
this.openSpace.Location = new System.Drawing.Point(185, 193);
|
||||
this.openSpace.Name = "openSpace";
|
||||
this.openSpace.Size = new System.Drawing.Size(186, 72);
|
||||
this.openSpace.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
|
@ -254,7 +258,7 @@ namespace WindowsFormsApplication1
|
|||
// SpriteNumberLabel
|
||||
//
|
||||
this.SpriteNumberLabel.AutoSize = true;
|
||||
this.SpriteNumberLabel.Location = new System.Drawing.Point(7, 153);
|
||||
this.SpriteNumberLabel.Location = new System.Drawing.Point(4, 157);
|
||||
this.SpriteNumberLabel.Name = "SpriteNumberLabel";
|
||||
this.SpriteNumberLabel.Size = new System.Drawing.Size(119, 13);
|
||||
this.SpriteNumberLabel.TabIndex = 16;
|
||||
|
@ -262,14 +266,14 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
// SpriteNumberTextBox
|
||||
//
|
||||
this.SpriteNumberTextBox.Location = new System.Drawing.Point(10, 169);
|
||||
this.SpriteNumberTextBox.Location = new System.Drawing.Point(7, 173);
|
||||
this.SpriteNumberTextBox.Name = "SpriteNumberTextBox";
|
||||
this.SpriteNumberTextBox.Size = new System.Drawing.Size(83, 20);
|
||||
this.SpriteNumberTextBox.TabIndex = 15;
|
||||
//
|
||||
// OpenButton
|
||||
//
|
||||
this.OpenButton.Location = new System.Drawing.Point(188, 153);
|
||||
this.OpenButton.Location = new System.Drawing.Point(185, 157);
|
||||
this.OpenButton.Name = "OpenButton";
|
||||
this.OpenButton.Size = new System.Drawing.Size(192, 30);
|
||||
this.OpenButton.TabIndex = 14;
|
||||
|
@ -280,7 +284,7 @@ namespace WindowsFormsApplication1
|
|||
// LabelPic
|
||||
//
|
||||
this.LabelPic.AutoSize = true;
|
||||
this.LabelPic.Location = new System.Drawing.Point(129, 153);
|
||||
this.LabelPic.Location = new System.Drawing.Point(126, 157);
|
||||
this.LabelPic.Name = "LabelPic";
|
||||
this.LabelPic.Size = new System.Drawing.Size(58, 13);
|
||||
this.LabelPic.TabIndex = 12;
|
||||
|
@ -289,7 +293,7 @@ namespace WindowsFormsApplication1
|
|||
// LabelTime
|
||||
//
|
||||
this.LabelTime.AutoSize = true;
|
||||
this.LabelTime.Location = new System.Drawing.Point(19, 91);
|
||||
this.LabelTime.Location = new System.Drawing.Point(19, 64);
|
||||
this.LabelTime.Name = "LabelTime";
|
||||
this.LabelTime.Size = new System.Drawing.Size(54, 13);
|
||||
this.LabelTime.TabIndex = 11;
|
||||
|
@ -298,7 +302,7 @@ namespace WindowsFormsApplication1
|
|||
// LabelDef2
|
||||
//
|
||||
this.LabelDef2.AutoSize = true;
|
||||
this.LabelDef2.Location = new System.Drawing.Point(240, 91);
|
||||
this.LabelDef2.Location = new System.Drawing.Point(240, 64);
|
||||
this.LabelDef2.Name = "LabelDef2";
|
||||
this.LabelDef2.Size = new System.Drawing.Size(13, 13);
|
||||
this.LabelDef2.TabIndex = 10;
|
||||
|
@ -307,7 +311,7 @@ namespace WindowsFormsApplication1
|
|||
// LabelDef1
|
||||
//
|
||||
this.LabelDef1.AutoSize = true;
|
||||
this.LabelDef1.Location = new System.Drawing.Point(240, 62);
|
||||
this.LabelDef1.Location = new System.Drawing.Point(240, 35);
|
||||
this.LabelDef1.Name = "LabelDef1";
|
||||
this.LabelDef1.Size = new System.Drawing.Size(13, 13);
|
||||
this.LabelDef1.TabIndex = 9;
|
||||
|
@ -316,7 +320,7 @@ namespace WindowsFormsApplication1
|
|||
// LabelWalls
|
||||
//
|
||||
this.LabelWalls.AutoSize = true;
|
||||
this.LabelWalls.Location = new System.Drawing.Point(19, 62);
|
||||
this.LabelWalls.Location = new System.Drawing.Point(19, 35);
|
||||
this.LabelWalls.Name = "LabelWalls";
|
||||
this.LabelWalls.Size = new System.Drawing.Size(107, 13);
|
||||
this.LabelWalls.TabIndex = 8;
|
||||
|
@ -324,21 +328,21 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
// TextBoxTime1
|
||||
//
|
||||
this.TextBoxTime1.Location = new System.Drawing.Point(132, 88);
|
||||
this.TextBoxTime1.Location = new System.Drawing.Point(132, 61);
|
||||
this.TextBoxTime1.Name = "TextBoxTime1";
|
||||
this.TextBoxTime1.Size = new System.Drawing.Size(100, 20);
|
||||
this.TextBoxTime1.TabIndex = 5;
|
||||
//
|
||||
// TextBoxTime2
|
||||
//
|
||||
this.TextBoxTime2.Location = new System.Drawing.Point(259, 88);
|
||||
this.TextBoxTime2.Location = new System.Drawing.Point(259, 61);
|
||||
this.TextBoxTime2.Name = "TextBoxTime2";
|
||||
this.TextBoxTime2.Size = new System.Drawing.Size(100, 20);
|
||||
this.TextBoxTime2.TabIndex = 4;
|
||||
//
|
||||
// TextBoxWall2
|
||||
//
|
||||
this.TextBoxWall2.Location = new System.Drawing.Point(259, 59);
|
||||
this.TextBoxWall2.Location = new System.Drawing.Point(259, 32);
|
||||
this.TextBoxWall2.Name = "TextBoxWall2";
|
||||
this.TextBoxWall2.Size = new System.Drawing.Size(100, 20);
|
||||
this.TextBoxWall2.TabIndex = 3;
|
||||
|
@ -346,7 +350,7 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
// TextBoxWall1
|
||||
//
|
||||
this.TextBoxWall1.Location = new System.Drawing.Point(132, 59);
|
||||
this.TextBoxWall1.Location = new System.Drawing.Point(132, 32);
|
||||
this.TextBoxWall1.Name = "TextBoxWall1";
|
||||
this.TextBoxWall1.Size = new System.Drawing.Size(100, 20);
|
||||
this.TextBoxWall1.TabIndex = 2;
|
||||
|
@ -361,16 +365,17 @@ namespace WindowsFormsApplication1
|
|||
"Диагонально",
|
||||
"Волнами",
|
||||
"Кругами"});
|
||||
this.ComboBoxMove.Location = new System.Drawing.Point(107, 12);
|
||||
this.ComboBoxMove.Location = new System.Drawing.Point(111, 3);
|
||||
this.ComboBoxMove.Name = "ComboBoxMove";
|
||||
this.ComboBoxMove.Size = new System.Drawing.Size(121, 21);
|
||||
this.ComboBoxMove.TabIndex = 1;
|
||||
this.ComboBoxMove.Text = "Прямо";
|
||||
this.ComboBoxMove.SelectedIndexChanged += new System.EventHandler(this.ComboBoxMove_SelectedIndexChanged);
|
||||
//
|
||||
// LabelMoveType
|
||||
//
|
||||
this.LabelMoveType.AutoSize = true;
|
||||
this.LabelMoveType.Location = new System.Drawing.Point(19, 12);
|
||||
this.LabelMoveType.Location = new System.Drawing.Point(23, 3);
|
||||
this.LabelMoveType.Name = "LabelMoveType";
|
||||
this.LabelMoveType.Size = new System.Drawing.Size(82, 13);
|
||||
this.LabelMoveType.TabIndex = 0;
|
||||
|
@ -402,6 +407,24 @@ namespace WindowsFormsApplication1
|
|||
//
|
||||
this.openFileDialog1.FileName = "openFileDialog1";
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Location = new System.Drawing.Point(85, 114);
|
||||
this.textBox1.Name = "textBox1";
|
||||
this.textBox1.Size = new System.Drawing.Size(138, 20);
|
||||
this.textBox1.TabIndex = 21;
|
||||
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(4, 114);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(81, 13);
|
||||
this.label2.TabIndex = 20;
|
||||
this.label2.Text = "Кол-во кругов:";
|
||||
this.label2.Click += new System.EventHandler(this.label2_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -462,5 +485,7 @@ namespace WindowsFormsApplication1
|
|||
private System.Windows.Forms.Label Char_Stats;
|
||||
private System.Windows.Forms.TextBox charNameBox;
|
||||
private System.Windows.Forms.Label charNameLabel;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
@ -16,6 +16,7 @@ namespace WindowsFormsApplication1
|
|||
int yPersa = 300;
|
||||
int nomerPersa = 0;
|
||||
int pNomer = 0;
|
||||
int maxTime = 0;
|
||||
PictureBox[] pic1 = new PictureBox[1000];
|
||||
String adressBackground = "";
|
||||
|
||||
|
@ -120,6 +121,7 @@ namespace WindowsFormsApplication1
|
|||
persons[nomerPersa].moveside = ComboBoxMove.Text;
|
||||
persons[nomerPersa].nomer = nomerPersa;
|
||||
persons[nomerPersa].charname = charNameBox.Text;
|
||||
persons[nomerPersa].circles = textBox1.Text;
|
||||
persons[nomerPersa].l2.Text = charNameBox.Text;
|
||||
|
||||
String[] coordinatyNachala = TextBoxWall1.Text.Split(new String[] { "," }, StringSplitOptions.None);
|
||||
|
@ -164,8 +166,19 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
|
||||
persons[pNomer].charname = charNameBox.Text;
|
||||
persons[pNomer].circles = textBox1.Text;
|
||||
persons[pNomer].l2.Text = charNameBox.Text;
|
||||
}
|
||||
|
||||
for (int nomer = 0; nomer < nomerPersa; nomer++)
|
||||
{
|
||||
if (Convert.ToInt32(persons[nomer].time2) > maxTime)
|
||||
{
|
||||
maxTime = Convert.ToInt32(persons[nomer].time2);
|
||||
}
|
||||
}
|
||||
|
||||
LabelLengh.Text = "Длительность: " + maxTime.ToString() + " секунд";
|
||||
}
|
||||
|
||||
private void OpenAddCharClick(object sender, EventArgs e)
|
||||
|
@ -253,7 +266,11 @@ namespace WindowsFormsApplication1
|
|||
{
|
||||
Directory.CreateDirectory(adres_papki);
|
||||
}
|
||||
|
||||
if (adressBackground != adres_papki + "\\" + Path.GetFileName(adressBackground))
|
||||
{
|
||||
File.Copy(adressBackground, adres_papki + "\\" + Path.GetFileName(adressBackground), true);
|
||||
}
|
||||
|
||||
Files.CreateStruct(filename);
|
||||
Files.OpenMain(filename, PictureBoxBackground, adressBackground);
|
||||
|
@ -262,6 +279,11 @@ namespace WindowsFormsApplication1
|
|||
{
|
||||
File.Copy(persons[nomer].adress, adres_papki + "\\" + Path.GetFileName(persons[nomer].adress), true);
|
||||
|
||||
if (adres_papki == adres_papki + "\\" + Path.GetFileName(persons[nomer].adress))
|
||||
{
|
||||
File.Copy(persons[nomer].adress, adres_papki + "\\" + Path.GetFileName(persons[nomer].adress), true);
|
||||
}
|
||||
|
||||
if (persons[nomer].moveside == "Прямо")
|
||||
{
|
||||
Line.CreatePerson(filename, Person.PersonName(nomer), persons[nomer]);
|
||||
|
@ -280,7 +302,7 @@ namespace WindowsFormsApplication1
|
|||
}
|
||||
}
|
||||
|
||||
Files.OpenWhile(filename);
|
||||
Files.OpenWhile(filename, maxTime);
|
||||
|
||||
for (int nomer = 0; nomer < nomerPersa; nomer++)
|
||||
{
|
||||
|
@ -324,6 +346,7 @@ namespace WindowsFormsApplication1
|
|||
ComboBoxMove.Text = persons[nomer].moveside;
|
||||
pNomer = persons[nomer].nomer;
|
||||
charNameBox.Text = persons[nomer].charname;
|
||||
textBox1.Text = persons[nomer].circles;
|
||||
|
||||
if (!String.IsNullOrEmpty(persons[nomer].adress))
|
||||
{
|
||||
|
@ -379,7 +402,43 @@ namespace WindowsFormsApplication1
|
|||
tView2.ShowAlways = true;
|
||||
tView2.AutoPopDelay = 2000;
|
||||
tView2.SetToolTip(TextBoxWall2, "x.y");
|
||||
|
||||
ComboBoxMove_SelectedIndexChanged(sender, e);
|
||||
textBox1_TextChanged(sender, e);
|
||||
}
|
||||
|
||||
private void ComboBoxMove_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ComboBoxMove.Text == "Кругами")
|
||||
{
|
||||
textBox1.Visible = true;
|
||||
label2.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
textBox1.Visible = false;
|
||||
label2.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void panel3_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void charNameBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label2_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,6 +31,7 @@ namespace WindowsFormsApplication1
|
|||
public String charname;
|
||||
public String height;
|
||||
public String width;
|
||||
public String circles;
|
||||
|
||||
public static string PersonName(int nomer)
|
||||
{
|
||||
|
|
|
@ -15,27 +15,32 @@ namespace WindowsFormsApplication1
|
|||
File.AppendAllText(filename, " " + name + ".texture = txLoadImage(\"Pictures\\\\" + Path.GetFileName(p.adress) + "\"); " + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x = " + p.x1 + ";" + 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 + ".nach_dv = (" + p.y1 + "+" + p.y2 + ")/2;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".ampl_y = abs(" + p.y1 + "-" + name + ".nach_dv)/2;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".ampl_x = 10;" + Environment.NewLine);
|
||||
}
|
||||
|
||||
public static void MovePerson(string filename, string name)
|
||||
public static void MovePerson(string filename, string name, Person p)
|
||||
{
|
||||
File.AppendAllText(filename, " " + name + ".x++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " if ((myTime >= " + p.time1 + ") && (myTime <= " + p.time2 + ")) {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".x+= (" + name + ".x2 - " + name + ".x) / (" + p.time2 + "-" + p.time1 + ");" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y+= (" + name + ".y2 - " + name + ".y) / (" + p.time2 + "-" + p.time1 + ");" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".y = " + name + ".nach_dv + " + name + ".ampl_y * sin(" + name + ".x / " + name + ".ampl_x);" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, "+
|
||||
"55, " +
|
||||
"86, " +
|
||||
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, " +
|
||||
p.width + "/" + p.sprite + ", " +
|
||||
p.height + "," +
|
||||
name + ".texture, " +
|
||||
"55 * " + name + ".nomer_kadra, 0, RGB(255, 255, 255));" + Environment.NewLine);
|
||||
p.width + "/" + p.sprite + " * " + name + ".nomer_kadra, 0, RGB(255, 255, 255));" + Environment.NewLine);
|
||||
File.AppendAllText(filename, Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".nomer_kadra++;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " if (" + name + ".nomer_kadra > 2)" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " if (" + name + ".nomer_kadra >= " + p.sprite + ")" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " {" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " }" + Environment.NewLine);
|
||||
File.AppendAllText(filename, " }" + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue