Ejemplo n.º 1
0
 protected void Reset()
 {
     _areaOriginDefined = false;
     _areaDefined       = false;
     _objectHost        = null;
     _cornerPoints      = new System.Drawing.PointF[2];
 }
        public override void NotifyConnect(IVObjectHost objectHost)
        {
            if (objectHost == null)
            {
                throw new System.ArgumentNullException("objectHost");
            }

            base.NotifyConnect(objectHost);
        }
Ejemplo n.º 3
0
        internal static object GetObjectDesignerProperty(IVObjectHost objectHost, string key)
        {
            if (!objectHost.DesignerOptions.ContainsKey(key))
            {
                return(null);
            }

            return(objectHost.DesignerOptions[key]);
        }
Ejemplo n.º 4
0
 internal static void SetObjectDesignerProperty(IVObjectHost objectHost, object value, string key)
 {
     if (value == null && objectHost.DesignerOptions.ContainsKey(key))
     {
         objectHost.DesignerOptions.Remove(key);
     }
     else
     {
         objectHost.DesignerOptions[key] = value;
     }
 }
Ejemplo n.º 5
0
        public virtual void NotifyConnect(IVObjectHost objectHost)
        {
            if (objectHost == null)
            {
                throw new System.ArgumentNullException("objectHost");
            }

            _objectHost    = objectHost;
            _gripsProvider = new GripsProvider(_obj, _objectHost.HostViewer);
            _gripsProvider.VObjectBorderPen = _objectBorderPen;

            InvalidateObjectArea();
        }
Ejemplo n.º 6
0
        public UndoRedoTracker(IVObjectHost objectHost)
        {
            if (objectHost == null)
            {
                throw new System.ArgumentNullException("objectHost");
            }

            _vObjectHost      = objectHost;
            _maxUndoStepCount = 10;
            _trackingEnabled  = true;

            RegisterInternalEvents();
        }
Ejemplo n.º 7
0
        internal static System.Windows.Forms.Cursor GetCursorDesignerProperty(IVObjectHost objectHost, string key)
        {
            object result = VObjectsUtils.GetObjectDesignerProperty(objectHost, key);

            if (result != null && result.GetType() == typeof(System.Windows.Forms.Cursor))
            {
                return((System.Windows.Forms.Cursor)result);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 8
0
        internal static bool GetBoolDesignerProperty(IVObjectHost objectHost, string key, bool defaultValue)
        {
            if (!objectHost.DesignerOptions.ContainsKey(key))
            {
                return(defaultValue);
            }

            object value = objectHost.DesignerOptions[key];

            if (value.GetType() == typeof(bool))
            {
                return((bool)value);
            }

            return(defaultValue);
        }
Ejemplo n.º 9
0
 public virtual void NotifyConnect(IVObjectHost objectHost)
 {
     _objectHost = objectHost;
 }
 public override void NotifyConnect(IVObjectHost objectHost)
 {
     base.NotifyConnect(objectHost);
     _dragging = false;
 }