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);
        }
Пример #3
0
        internal static object GetObjectDesignerProperty(IVObjectHost objectHost, string key)
        {
            if (!objectHost.DesignerOptions.ContainsKey(key))
            {
                return(null);
            }

            return(objectHost.DesignerOptions[key]);
        }
Пример #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;
     }
 }
Пример #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();
        }
Пример #6
0
        public UndoRedoTracker(IVObjectHost objectHost)
        {
            if (objectHost == null)
            {
                throw new System.ArgumentNullException("objectHost");
            }

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

            RegisterInternalEvents();
        }
Пример #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);
            }
        }
Пример #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);
        }
Пример #9
0
 public virtual void NotifyConnect(IVObjectHost objectHost)
 {
     _objectHost = objectHost;
 }
 public override void NotifyConnect(IVObjectHost objectHost)
 {
     base.NotifyConnect(objectHost);
     _dragging = false;
 }