Merge branch 'master' into Arsenee-patch-1

This commit is contained in:
Mikhail Abramov 2018-04-07 06:25:41 +03:00 committed by GitHub
commit f75d304dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 15 deletions

View file

@ -59,10 +59,12 @@ namespace WindowsFormsApplication1
this.ButtonAddChar = new System.Windows.Forms.Button();
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.openSpace = new System.Windows.Forms.PictureBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PictureBoxBackground)).BeginInit();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.openSpace)).BeginInit();
this.SuspendLayout();
//
// LabelData
@ -186,6 +188,7 @@ namespace WindowsFormsApplication1
//
// panel3
//
this.panel3.Controls.Add(this.openSpace);
this.panel3.Controls.Add(this.SpriteNumberLabel);
this.panel3.Controls.Add(this.SpriteNumberTextBox);
this.panel3.Controls.Add(this.OpenButton);
@ -355,6 +358,14 @@ namespace WindowsFormsApplication1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// openSpace
//
this.openSpace.Location = new System.Drawing.Point(65, 206);
this.openSpace.Name = "openSpace";
this.openSpace.Size = new System.Drawing.Size(245, 55);
this.openSpace.TabIndex = 17;
this.openSpace.TabStop = false;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -372,6 +383,7 @@ namespace WindowsFormsApplication1
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.openSpace)).EndInit();
this.ResumeLayout(false);
}
@ -409,5 +421,6 @@ namespace WindowsFormsApplication1
private System.Windows.Forms.Button dobavitFonButton;
private System.Windows.Forms.PictureBox PictureBoxBackground;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.PictureBox openSpace;
}
}

View file

@ -21,6 +21,7 @@ namespace WindowsFormsApplication1
public int nomer;
public String coord;
public String adress;
};
Person[] persons = new Person[200];
@ -139,6 +140,7 @@ namespace WindowsFormsApplication1
nomerPersa++;
yPersa = yPersa + 30;
openSpace.Image = null;
}
private void circle_create_person(string filename, string name)
@ -154,8 +156,8 @@ namespace WindowsFormsApplication1
private void old_place(string filename, string name)
{
File.AppendAllText(filename, " " + name + ".x = 10; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = 10; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x = " + TextBoxWall1.Text + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".y = " + TextBoxWall1.Text + "; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0; " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".gr_dvigx = 1000; " + Environment.NewLine);
}
@ -165,7 +167,7 @@ namespace WindowsFormsApplication1
File.AppendAllText(filename, " txTransparentBlt(txDC(), " + name + ".x, " + name + ".y, 55, 86, " + name + ".texture, 55 * " + name + ".nomer_kadra, 0, RGB(0, 255, 255)); " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".x++; " + 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 > " + TextBoxWall1.Text + ") " + Environment.NewLine);
File.AppendAllText(filename, " { " + Environment.NewLine);
File.AppendAllText(filename, " " + name + ".nomer_kadra = 0;" + Environment.NewLine);
File.AppendAllText(filename, " }" + Environment.NewLine);
@ -183,9 +185,9 @@ namespace WindowsFormsApplication1
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, " {"+ Environment.NewLine);
File.AppendAllText(filename, " nomer_kadra = 0;"+ Environment.NewLine);
File.AppendAllText(filename, " }"+ Environment.NewLine);
File.AppendAllText(filename, " }"+ Environment.NewLine);
File.AppendAllText(filename, Environment.NewLine);
File.AppendAllText(filename, " txSleep(10);"+ Environment.NewLine);
File.AppendAllText(filename, " }"+ Environment.NewLine);
@ -200,9 +202,8 @@ namespace WindowsFormsApplication1
{
if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
return;
string filename = openFileDialog1.FileName;
string fileText =File.ReadAllText(filename);
nazvanieTextBox.Text = fileText;
openSpace.Image = Image.FromFile(openFileDialog1.FileName);
persons[nomerPersa].adress = openFileDialog1.FileName;
}
private void AddBackArtClick(object sender, EventArgs e)
@ -279,13 +280,16 @@ namespace WindowsFormsApplication1
if (sender.Equals(persons[nomer].b1))
{
TextBoxWall1.Text = persons[nomer].coord;
if (!String.IsNullOrEmpty(persons[nomer].adress))
{
openSpace.Image = Image.FromFile(persons[nomer].adress);
}
else
{
openSpace.Image = null;
}
}
}
}
private void nazvanieTextBox_TextChanged(object sender, EventArgs e)
{
}
}
}
}

View file

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WindowsFormsApplication1</RootNamespace>
<AssemblyName>WindowsFormsApplication1</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -30,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -66,7 +69,9 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>