Exemplo n.º 1
0
Arquivo: Form1.cs Projeto: 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);
      }
    }
Exemplo n.º 2
0
 public MovePropertiesDialog(Move move, int numSpheres) {
   InitializeComponent();
   
   comboBox1.Text = move.getFunction();
   numericUpDown2.Text = move.getAmount().ToString();
 }