示例#1
0
 public void init(MainForm form)
 {
     this.BackColor = Color.Red;
     this.Location = new Point(250 - 24/2, 300);
     this.Name = "player";
     this.Size = new Size(24, 24);
     this.TabIndex = 3;
     this.Visible = true;
     this.parent = form;
     this.parent.Controls.Add(this);
 }
 public void init(int level, MainForm form)
 {
     this.mainForm = form;
     this.label_levelcompleted.Text = this.label_levelcompleted.Text.Replace("%s", level + "");
     if(level == 0) {
         this.label_levelcompleted.Text = "You did not complete any levels";
         this.button_savescore.Enabled = false;
         this.textbox_name.Enabled = false;
     }
     //this.deleteFile();
     this.createFile();
     this.displayScoreBoard();
     this.level = level;
 }
示例#3
0
 public void init(MainForm form, int x, int y, int xs, int ys)
 {
     this.parent = form;
     this.BackColor = Color.Purple;
     this.Location = new Point(x, y);
     this.Name = "block" + x + y;
     this.Size = new Size(48, 48);
     this.TabIndex = Convert.ToInt32(x + "" + y);
     this.Visible = true;
     this.BackgroundImage = Properties.Resources.johan;
     this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
     this.parent = form;
     this.parent.Controls.Add(this);
     this.xspeed = xs;
     this.yspeed = ys;
 }