public override void Connect(ViewerBase viewer)
        {
            if (!(viewer is BitmapViewer))
            {
                throw new System.ArgumentException(StringResources.GetString("ExStrVObjRubberbandAcceptsBitmapViewer"), "viewer");
            }

            base.Connect(viewer);
            _vObjectHost.HostViewerInternal = viewer;
            _bitmapViewer = (BitmapViewer)viewer;
        }
Example #2
0
        private void ChangeViewerVisibility(bool?display, ViewerBase viewer)
        {
            switch (display.HasValue && display.Value)
            {
            case true:
            {
                _viewerManager.DisplayedViewers.Add(viewer);
                break;
            }

            case false:
            {
                _viewerManager.DisplayedViewers.Remove(viewer);
                break;
            }
            }
        }
Example #3
0
        public GripsProvider(IVObject obj, ViewerBase hostControl)
        {
            if (hostControl == null)
            {
                throw new System.ArgumentNullException("hostControl");
            }

            if (obj == null)
            {
                throw new System.ArgumentNullException("obj");
            }

            _hostControl = hostControl;

            _obj = obj;
            _controlPointsProvider = obj as IControlPointsProvider;

            _objectBorderPen           = new System.Drawing.Pen(System.Drawing.Color.DarkGray, 1.0f);
            _objectBorderPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
        }
Example #4
0
 public void RegisterViewer(ViewerBase viewer)
 {
     _viewers.Add(viewer);
     DisplayedViewers.Add(viewer);
 }
Example #5
0
 /// <summary>
 /// Build a minimal row from a class (key fields only)
 /// </summary>
 public static void BuildMinimalRow(ref DataRow row, Viewer entity)
 {
     ViewerBase.BuildMinimalRow(ref row, entity);
 }