Beispiel #1
0
        public ArborViewer()
        {
            base.BorderStyle = BorderStyle.Fixed3D;
            base.TabStop     = true;
            base.BackColor   = Color.White;

            base.DoubleBuffered = true;
            base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            base.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            // repulsion - отталкивание, stiffness - тугоподвижность, friction - сила трения
            fSys = new ArborSystemEx(10000, 500 /*1000*/, 0.1, this);
            fSys.setScreenSize(Width, Height);
            fSys.AutoStop = false;

            fEnergyDebug = false;
            fDrawFont    = new Font("Calibri", 9);

            fStrFormat               = new StringFormat();
            fStrFormat.Alignment     = StringAlignment.Center;
            fStrFormat.LineAlignment = StringAlignment.Center;

            fBlackBrush    = new SolidBrush(Color.Black);
            fWhiteBrush    = new SolidBrush(Color.White);
            fDragged       = null;
            fNodesDragging = false;
        }