/// <summary> /// Gets Differential Equation Solver from object /// </summary> /// <param name="obj"></param> /// <returns></returns> public override IDifferentialEquationSolver GetDifferentialEquationSolver(object obj) { if (obj is IAssociatedObject) { IAssociatedObject ao = obj as IAssociatedObject; AggregableWrapper agg = ao.GetObject <AggregableWrapper>(); if (agg != null) { if (agg.Aggregate.Parent == null) { return(GetEquation(agg)); } } } if (obj is DataPerformer.Portable.MeasurementsWrapper) { DataPerformer.Portable.MeasurementsWrapper m = obj as DataPerformer.Portable.MeasurementsWrapper; for (int i = 0; i < m.Count; i++) { if (m[i] is AggregableWrapper) { AggregableWrapper agg = m[i] as AggregableWrapper; if (agg.Aggregate.Parent == null) { return(GetEquation(agg)); } } } } return(null); }
IAggregableMechanicalObject IAggregableMechanicalFactory.GetObject(object obj) { if (obj is IAssociatedObject) { IAssociatedObject ao = obj as IAssociatedObject; return(ao.GetObject <IAggregableMechanicalObject>()); } return(null); }
IPhysicalField IFieldFactory.GetField(IFieldConsumer consumer, object obj) { if (obj is IAssociatedObject) { IAssociatedObject ao = obj as IAssociatedObject; object o = ao.GetObject <PhysicalField.Interfaces.IPhysicalField>(); } return(null); }
IFieldConsumer IFieldFactory.GetConsumer(object obj) { if (obj is IAssociatedObject) { IAssociatedObject ao = obj as IAssociatedObject; return(ao.GetObject <IFieldConsumer>()); } return(null); }
/// <summary> /// Creates object editor form of property editor object /// </summary> /// <param name="obj">The property editor ofject</param> /// <returns>The property editor form</returns> static public Form CreateEditorForm(object obj) { if (obj is IAssociatedObject) { IAssociatedObject ao = obj as IAssociatedObject; IPropertiesEditor pe = ao.GetObject <IPropertiesEditor>(); if (pe != null) { object ob = pe.Editor; if (ob != null) { if (ob is Form) { Form f = ob as Form; return(f); } if (ob is Array) { Array arr = ob as Array; object h = arr.GetValue(0); if (h is Form) { Form f = h as Form; return(f); } } } } } if (obj is MultiLibraryObject) { MultiLibraryObject mo = obj as MultiLibraryObject; IObjectLabel lab = mo.Object as IObjectLabel; return(new FormMultilibrary(lab)); } return(null); }