Esempio n. 1
0
File: Form1.cs Progetto: Philpo/test
    private void addSphere(object sender, EventArgs args) {
      TreeView view = ((SpheresTabPage) tabControl1.SelectedTab.Controls[0]).treeView1;
      TreeNode node = new TreeNode();
      node.Text = "sphere " + sphereCount++;
      Sphere sphere = new Sphere();
      node.Tag = sphere;
      view.Nodes.Add(node);

      for (int i = 1; i < tabControl1.TabPages.Count; i++) {
        TreeView passView = ((PassTabPage) tabControl1.TabPages[i].Controls[0]).treeView1;

        Move move = new Move();
        TreeNode moveNode = new TreeNode();
        moveNode.Text = node.Text;
        moveNode.Tag = move;
        passView.Nodes.Add(moveNode);
      }
    }
Esempio n. 2
0
 public MovePropertiesDialog(Move move, int numSpheres) {
   InitializeComponent();
   
   comboBox1.Text = move.getFunction();
   numericUpDown2.Text = move.getAmount().ToString();
 }