Exemplo n.º 1
0
        private void Redraw()
        {
            Drawing.ClearBitmap();
            GuidMapLogic.ClearGuidMap();

            foreach (var graphicObjectDictPair in GraphicObjects)
            {
                graphicObjectDictPair.Value.DrawItself();

                if (graphicObjectDictPair.Value.ParentGraphicObject == null)
                {
                    graphicObjectDictPair.Value.DrawOnGuidMap();
                }
            }
        }
Exemplo n.º 2
0
        private void ClearMap()
        {
            GraphicObjects = new Dictionary <Guid, GraphicObject>();
            //Lines = new Dictionary<Guid, Line>();
            _formAction = FormAction.NoAction;

            _clicksDrawLine            = new List <Point>(128);
            _clicksStartDrawPolygon    = new List <Point>(128);
            _clicksDrawCircleOptimized = new List <Point>(128);
            _clicksOther         = new List <Point>(128);
            _clicksSetConcerntic = new List <Point>(128);

            GuidMapLogic = new GuidMapLogic(Drawing.Height, Drawing.Width);
            Drawing.ClearBitmap();
        }
Exemplo n.º 3
0
        //private readonly Action _graphicObjectSelected;
        //private readonly Action _verticleSelected;
        //private readonly Func<int, bool> _lineSelected;
        //private readonly Action _nullSelected;
        //private readonly Action _circleSelected;

        public FormLogic(Drawing.Drawing drawing, TextBox timeTextBox, MainForm.ButtonControl buttonControl)
        {
            GraphicObjects = new Dictionary <Guid, GraphicObject>();
            //Lines = new Dictionary<Guid, Line>();
            _timeTextBox   = timeTextBox;
            _buttonControl = buttonControl;
            //this._graphicObjectSelected = graphicObjectSelected;
            //this._verticleSelected = verticleSelected;
            //this._lineSelected = lineSelected;
            //_nullSelected = nullSelected;
            //_circleSelected = circleSelected;

            Drawing     = drawing;
            _formAction = FormAction.NoAction;

            _clicksDrawLine            = new List <Point>(128);
            _clicksStartDrawPolygon    = new List <Point>(128);
            _clicksDrawCircleOptimized = new List <Point>(128);
            _clicksOther         = new List <Point>(128);
            _clicksSetConcerntic = new List <Point>(128);
            GuidMapLogic         = new GuidMapLogic(drawing.Height, drawing.Width);
        }