예제 #1
0
        public Circle(Point centre, int r, Circle c, ref DestDelegate destDelegate, double chance, string info, double price)
        {
            parent        = c;
            destDelegate += Destination;
            this.centre   = centre;
            this.r        = r;

            if (parent != null)
            {
                Number = $"{parent.Number}.{parent.children.Count + 1}";
            }
            else
            {
                Number = "1";
            }

            information = info;

            if (c is Square)
            {
                probablyToParent = 1;
            }
            else
            {
                probablyToParent = chance;
            }

            this.price = price;
            GetTotalChance();

            treeNode = new TreeNode(Number + " " + info);
        }
예제 #2
0
 public void CirclesGetDelegate(Circle c) // Метод присвоения делегата окружностям после открытия нового файла
 {
     destDelegate += c.Destination;
     for (int i = 0; i < c.children.Count; i++)
     {
         destDelegate += c.children[i].Destination;
         CirclesGetDelegate(c.children[i]);
     }
 }
예제 #3
0
        public Form1()
        {
            InitializeComponent();
            destDelegate = null;

            Size                    = MaximumSize;
            MinimumSize             = new Size(500, 600);
            pictureBox1.MouseWheel += pictureBox1MouseWheel;

            First();
            structureComboBox1.SelectedIndex = 1;
            label1WithInfo.Visible           = false;
            panel1.Cursor = Cursors.Default;
        }
예제 #4
0
 public Triangle(Point centre, int r, Circle c, ref DestDelegate destDelegate, double chance, string info, double price) : base(centre, r, c, ref destDelegate, chance, info, price)
 {
 }