Merge pull request #36 from IngenerkaTeamCenter/RKQl-patch-1

Тороплюсь. Розовая куртка
This commit is contained in:
Mikhail Abramov 2018-04-11 12:27:12 +04:00 committed by GitHub
commit 4ac5b367f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 9 deletions

View file

@ -41,6 +41,7 @@ namespace WindowsFormsApplication1
this.panel2 = new System.Windows.Forms.Panel();
this.SaveCharButton = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.openSpace = new System.Windows.Forms.PictureBox();
this.SpriteNumberLabel = new System.Windows.Forms.Label();
this.SpriteNumberTextBox = new System.Windows.Forms.TextBox();
this.OpenButton = new System.Windows.Forms.Button();
@ -59,7 +60,6 @@ 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();
@ -209,6 +209,14 @@ namespace WindowsFormsApplication1
this.panel3.TabIndex = 2;
this.panel3.Visible = false;
//
// 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;
//
// SpriteNumberLabel
//
this.SpriteNumberLabel.AutoSize = true;
@ -300,6 +308,7 @@ namespace WindowsFormsApplication1
this.TextBoxWall2.Name = "TextBoxWall2";
this.TextBoxWall2.Size = new System.Drawing.Size(100, 20);
this.TextBoxWall2.TabIndex = 3;
this.TextBoxWall2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBoxWall1_KeyPress);
//
// TextBoxWall1
//
@ -307,6 +316,7 @@ namespace WindowsFormsApplication1
this.TextBoxWall1.Name = "TextBoxWall1";
this.TextBoxWall1.Size = new System.Drawing.Size(100, 20);
this.TextBoxWall1.TabIndex = 2;
this.TextBoxWall1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBoxWall1_KeyPress);
//
// ComboBoxMove
//
@ -357,14 +367,6 @@ 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);

View file

@ -94,6 +94,9 @@ namespace WindowsFormsApplication1
private void SaveCharButtonClick(object sender, EventArgs e)
{
String[] arr = TextBoxWall1.Text.Split(new String[] { " " }, StringSplitOptions.None);
MessageBox.Show(arr[0]);
persons[nomerPersa].l1 = new Label();
persons[nomerPersa].l1.Top = yPersa;
persons[nomerPersa].l1.Left = 30;
@ -295,5 +298,15 @@ namespace WindowsFormsApplication1
}
}
}
private void TextBoxWall1_KeyPress(object sender, KeyPressEventArgs e)
{
char c = e.KeyChar;
if (!(char.IsDigit(c) || c == '\b' || c == ' '))
{
e.Handled = true;
}
}
}
}