Exemplo n.º 1
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (deletion == false)
     {
         DrawableModel item      = (DrawableModel)listBox1.SelectedItem;
         MoveModel1    moveModel = new MoveModel1(item, new GameModel(), game, this);
         moveModel.Show();
     }
     else
     {
         deletion = true;
     }
 }
Exemplo n.º 2
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (treeView1.SelectedNode.Text == "Player1")
     {
         string        name      = game.GetName();
         DrawableModel newModel  = new DrawableModel(game.Content.Load <Model>(name), Matrix.Identity);
         GameModel     gameModel = new GameModel();
         game.models.Add(newModel);
         MoveModel1 moveModel = new MoveModel1(newModel, gameModel, game, this);
         moveModel.Show();
         listBox1.Items.Add(newModel);
         propertyGrid1.SelectedObject = newModel;
     }
 }
Exemplo n.º 3
0
        private void playerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            progressBar1.Show();
            progressBar1.Select();
            progressBar1.Step = 50;
            string        name      = game.GetName();
            Model         model     = game.Content.Load <Model>(name);
            GameModel     gameModel = new GameModel();
            DrawableModel newModel  = new DrawableModel(model, Matrix.Identity);

            progressBar1.PerformStep();
            game.models.Add(newModel);
            game.Add(gameModel);
            MoveModel1 moveModel = new MoveModel1(newModel, gameModel, game, this);

            moveModel.Show();
            listBox1.Items.Add(newModel);
            propertyGrid1.SelectedObject = newModel;
            progressBar1.PerformStep();
            progressBar1.Value = 0;
        }
Exemplo n.º 4
0
 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (treeView1.SelectedNode.Text == "Player1")
     {
         string name = game.GetName();
         DrawableModel newModel = new DrawableModel(game.Content.Load<Model>(name), Matrix.Identity);
         GameModel gameModel = new GameModel();
         game.models.Add(newModel);
         MoveModel1 moveModel = new MoveModel1(newModel, gameModel,game, this);
         moveModel.Show();
         listBox1.Items.Add(newModel);
         propertyGrid1.SelectedObject = newModel;
     }
 }
Exemplo n.º 5
0
 private void playerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     progressBar1.Show();
     progressBar1.Select();
     progressBar1.Step = 50;
     string name = game.GetName();
     Model model = game.Content.Load<Model>(name);
     GameModel gameModel = new GameModel();
     DrawableModel newModel = new DrawableModel(model, Matrix.Identity);
     progressBar1.PerformStep();
     game.models.Add(newModel);
     game.Add(gameModel);
     MoveModel1 moveModel = new MoveModel1(newModel,gameModel, game , this);
     moveModel.Show();
     listBox1.Items.Add(newModel);
     propertyGrid1.SelectedObject = newModel;
     progressBar1.PerformStep();
     progressBar1.Value = 0;
 }
Exemplo n.º 6
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (deletion == false)
     {
         DrawableModel item = (DrawableModel)listBox1.SelectedItem;
         MoveModel1 moveModel = new MoveModel1(item, new GameModel(), game, this);
         moveModel.Show();
     }
     else
         deletion = true;
 }