/// <summary> /// Creates a form for component properties editor /// </summary> /// <param name="comp">The component</param> /// <returns>The result form</returns> public override object CreateForm(INamedComponent comp) { if (comp is IObjectLabel) { IObjectLabel ol = comp as IObjectLabel; ICategoryObject obj = ol.Object; Camera camera = obj.GetSimpleObject <Camera>(); if (camera != null) { } if (obj is Motion6D.SerializablePosition) { Motion6D.Interfaces.IPosition p = obj as Motion6D.Interfaces.IPosition; object o = p.Parameters; if (o != null) { if (o is Motion6D.Interfaces.IVisible) { Motion6D.Interfaces.IVisible v = o as Motion6D.Interfaces.IVisible; object ob = factory.CreateForm(p, v); if (ob != null) { if (ob is Form) { Form f = ob as Form; return(f); } } } } } } return(null); }
/// <summary> /// Creates object label from object /// </summary> /// <param name="obj">The object</param> /// <returns>The label</returns> public override IObjectLabelUI CreateLabel(ICategoryObject obj) { Camera camera = obj.GetSimpleObject <Camera>(); if (camera != null) { return(factory.CreateLabel(camera) as IObjectLabelUI); } if (obj is Motion6D.SerializablePosition) { Motion6D.SerializablePosition sp = obj.GetObject <Motion6D.SerializablePosition>(); object lp = sp.Parameters; Motion6D.Interfaces.IVisible vis = lp.GetSimpleObject <Motion6D.Interfaces.IVisible>(); if (vis != null) { object vl = factory.CreateLabel(sp, vis); if (vl is IObjectLabelUI) { return(vl as IObjectLabelUI); } } } return(null); }