Пример #1
0
        public static ICanvasDrawableObject CanvasFromDrawableObject(IBlackboardObject srcInstance)
        {
            TypeAndAssembly ta     = CanvasFromDrawableObjectMap [srcInstance.GetType().ToString()];
            ObjectHandle    handle = null;

            handle = Activator.CreateInstance(ta.AssemblyName, ta.Type.ToString());
            return((ICanvasDrawableObject)handle.Unwrap());
        }
Пример #2
0
 public static ICanvasSelectableObject CanvasFromDrawableObject(IBlackboardObject drawable)
 {
     string objecttype = String.Format ("LongoMatch.Drawing.CanvasObjects.Blackboard.{0}Object",
                             drawable.GetType ().ToString ().Split ('.').Last ());
     ObjectHandle handle = Activator.CreateInstance (null, objecttype);
     ICanvasDrawableObject d = (ICanvasDrawableObject)handle.Unwrap ();
     d.IDrawableObject = drawable;
     return d;
 }
Пример #3
0
        public static ICanvasSelectableObject CanvasFromDrawableObject(IBlackboardObject drawable)
        {
            string objecttype = String.Format("LongoMatch.Drawing.CanvasObjects.Blackboard.{0}Object",
                                              drawable.GetType().ToString().Split('.').Last());
            ObjectHandle          handle = Activator.CreateInstance(null, objecttype);
            ICanvasDrawableObject d      = (ICanvasDrawableObject)handle.Unwrap();

            d.IDrawableObject = drawable;
            return(d);
        }