public DataModelCircularGeneral(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircularGeneral>(x => x.SpacingEdgeCirculars)) { Set_NumberEdgeCircular(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { this.global.GDMPage02.DataModel_Anchor.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Anchor>(x => x.RadiusCenterLineTower) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Anchor>(x => x.WidthBottFlange)) { Set_RadiusCore(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { this.global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HFoundationEdge) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.BottomCover) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.TopCover)) { Set_NumberEdgeCircular(); } }; }); }
private void SetGameObjectInspectorHidden(bool hide) { foreach (var inspector in Reflected.getAllInspectorWindows()) { var tracker = Reflected.getInspectorTracker.GetValue(inspector, null) as ActiveEditorTracker; for (var i = 1; i < tracker.activeEditors.Length; i++) { var editor = tracker.activeEditors[i]; if (editor == null) { continue; } if (!(editor.target is Folder folder)) { continue; } foreach (var gameObjectInspector in Resources.FindObjectsOfTypeAll(Reflected.gameObjectInspectorType)) { var goEditor = gameObjectInspector as UnityEditor.Editor; var gameObject = goEditor.target as GameObject; // Hide GameObject inspector only for folders if (folder.gameObject == gameObject) { Reflected.hideInspector.SetValue(gameObjectInspector, hide); } } } } }
public DataModelRadial1(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.LargeDiamNoOfBars)) { Set_SpacingAngle(); } // LargeDiameterOffsetFromCenter => Math.Max(UnreinforcedCore, GlobalPage04.DataModelRadialGeneral.MinCore); if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.UnreinforcedCore)) { Set_LargeDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.Spacing3rdDiameterAngle)) { Set_ThirdDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.ThirdDiamNoOfBars)) { Set_Spacing3rdDiameterAngle(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.SpacingAngle)) { Set_StartOffsetAngle(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelRadialGeneral.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadialGeneral>(x => x.MinCore)) { Set_LargeDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadialGeneral>(x => x.MinSpaceField)) { Set_ThirdDiameterOffsetFromCenter(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage02.DataModel_Anchor.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModels.NSPage02.DataModel_Anchor>(x => x.DiameterAnchor) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModels.NSPage02.DataModel_Anchor>(x => x.BoltDiameter)) { Set_SmallDiameterOffsetFromCenter(); } }; }); }
public DataModel_CHR_Zones(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_CHR_Zones>(x => x.EdgeOffset2) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_CHR_Zones>(x => x.ZoneLength1)) { Set_ZoneLength2(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.DFoundation) || e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.DTowerBase) || e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.EdgeCover)) { Set_ZoneLength2(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelRadial1.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage04.DataModelRadial1>(x => x.SelectedIndexLargeDiameter)) { Set_ZoneLength2(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelCircularGeneral.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage04.DataModelCircularGeneral>(x => x.SelectedDiameterEdgeCirculars)) { Set_ZoneLength2(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage12.DataModelShapesCollection.CollectionChanged += (o, e) => { Set_ZoneLength2(); }; }); }
//public override string PreferencesTooltip { get { return "Some tag for the tooltip here"; } } public override void Init() { if (lastContent == null) { lastContent = new GUIContent(); } lastContent.text = string.Empty; lastContent.image = Preferences.HideDefaultIcon ? // Fix #46 Reflected.GetObjectIcon(EnhancedHierarchy.CurrentGameObject) : AssetPreview.GetMiniThumbnail(EnhancedHierarchy.CurrentGameObject); lastContent.tooltip = Preferences.Tooltips && !Preferences.RelevantTooltipsOnly ? "Change Icon" : string.Empty; }
public DataModel_ARIntUBars(GlobalDataModels global) { global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage08.DataModel_ARExtUBars.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.TopOffset)) { this.TopOffset = global.GDMPage08.DataModel_ARExtUBars.TopOffset; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.BottomOffset)) { this.BottomOffset = global.GDMPage08.DataModel_ARExtUBars.BottomOffset; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.AxisOffset)) { this.AxisOffset = global.GDMPage08.DataModel_ARExtUBars.AxisOffset; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.HookULarger)) { this.HookULarger = global.GDMPage08.DataModel_ARExtUBars.HookULarger; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.HookUSmaller)) { this.HookUSmaller = global.GDMPage08.DataModel_ARExtUBars.HookUSmaller; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.TopExtraOffset)) { this.TopExtraOffset = global.GDMPage08.DataModel_ARExtUBars.TopExtraOffset; } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ARExtUBars>(x => x.BottomExtraOffset)) { this.BottomExtraOffset = global.GDMPage08.DataModel_ARExtUBars.BottomExtraOffset; } }; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameterL = 0; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameterS = 0; }); }
public static void LoadFromAppConfig(this object configObject) { if (ReferenceEquals(configObject, null)) { return; } var configType = configObject.GetType(); var reflectedObject = new Reflected(configObject); foreach (var property in configType.GetPropertiesThatImplementGeneric(typeof(IConfigurationProperty <>))) { var propertyName = property.Name; var path = $"{configType.Name}.{propertyName}"; if (FileAppConfig.TryGetString(path, out var stringValue)) reflectedObject.TrySetValue(propertyName, stringValue); } }
public ReflectedProperty(PropertyInfo propToReflect) { Reflected = propToReflect ?? throw new ArgumentNullException(nameof(propToReflect)); _attributes = new Lazy <IReadOnlyCollection <Attribute> >(getAttributes); #if USE_CODE_GEN _getter = new Lazy <Func <object, object> >(() => Reflected.GetValueGetter()); _setter = new Lazy <Action <object, object> >(() => Reflected.GetValueSetter()); #else _getter = new Lazy <Func <object, object> >(() => instance => Reflected.GetValue(instance, null)); _setter = new Lazy <Action <object, object> >(() => (instance, value) => Reflected.SetValue(instance, value, null)); // This is slow, but there is an alternative: we can avoid codegen (voor iOS) when not dealing with netstandard 1.1 // using (Func<object,object>)Delegate.CreateDelegate(typeof(Func<object,object>), Reflected.GetGetMethod()) #endif List <Attribute> getAttributes() => ReflectionHelper.GetAttributes(Reflected).ToList(); }
public DataModelRadialGeneral(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { //Min Core if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadialGeneral>(x => x.MinSpaceCenter)) { Set_MinCore(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelRadial2.PropertyChanged += (o, e) => { //Min Core if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial2>(x => x.SpacingAngle)) { Set_MinCore(); } return; }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage02.DataModel_Anchor.PropertyChanged += (o, e) => { //Min Core if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage02.DataModel_Anchor>(x => x.BoltDiameter) || e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage02.DataModel_Anchor>(x => x.RadiusCenterLineTower) || e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage02.DataModel_Anchor>(x => x.DispanceBoltPairs)) { Set_alternativeHalfMinStartAngle(); } }; }); }
public DataModel_TB_D1(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += (o, e) => { //Depth Pile if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HBottom)) { Set_OffsetFromBottom(); } }; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameter = 0; this.SelectedIndexOption = 0; }); }
public override void DoGUI(Rect rect) { using (ProfilerSample.Get()) { rect.yMin++; rect.xMin++; GUI.changed = false; GUI.Button(rect, lastContent, EditorStyles.label); if (!GUI.changed) { return; } var affectedObjsList = GetSelectedObjectsAndCurrent(); var affectedObjsEnum = affectedObjsList.AsEnumerable(); var changeMode = AskChangeModeIfNecessary(affectedObjsList, Preferences.IconAskMode.Value, "Change Icons", "Do you want to change children icons as well?"); switch (changeMode) { case ChildrenChangeMode.ObjectAndChildren: affectedObjsEnum = affectedObjsEnum.SelectMany(go => go.GetComponentsInChildren <Transform>(true).Select(t => t.gameObject)); break; } affectedObjsEnum = affectedObjsEnum.Distinct(); var affectedObjsArray = affectedObjsEnum.ToArray(); foreach (var obj in affectedObjsArray) { Undo.RegisterCompleteObjectUndo(obj, "Icon Changed"); } Reflected.ShowIconSelector(affectedObjsArray, rect, true); } }
public DataModel_Global_Materials(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage11.DataModelMaterialsFoundation.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelMaterials>(x => x.SelectedIndexConcreteQuality)) { Set_MaterialFoundation(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage11.DataModelMaterialsLeanConcrete.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelMaterials>(x => x.SelectedIndexConcreteQuality)) { Set_MaterialFoundationBed(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage11.DataModelMaterialsFoundationTowerBase.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelMaterials>(x => x.SelectedIndexConcreteQuality)) { Set_MaterialTowerBase(); } }; }); }
public DataModel_Global_Coordinations_GroundPoint(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Coordinations_GroundPoint>(x => x.CoordinationZ)) { Set_FoundationPointZ(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.DeptFoundation) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HBottom)) { Set_FoundationPointZ(); } }; }); }
public DataModel_Global_Formwork(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { //Depth Foundation if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HFoundation) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HTowerBase) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HightAboveGround)) { Set_DeptFoundation(); } //Radius Btc if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.DTowerBase) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Formwork>(x => x.HBottom)) { Set_RadiusBtc(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage02.DataModel_Anchor.PropertyChanged += (o, e) => { //Radius Centerline Tower if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Anchor>(x => x.RadiusCenterLineTower)) { Set_RadiusCenterLineTower(); } }; }); }
/// <summary> Apply to the mesh with given policy </summary> public void Apply(Mesh m, VertexProfiles profile, MeshTopology topology = MeshTopology.Triangles) { m.Clear(); if (m_Verts.Count == 0) { return; } #if !(UNITY_5 || UNITY_2017_1 || UNITY_2017_2) if (m_Verts.Count >= 0xFFFF) { m.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32; } #endif m.SetVertices(m_Verts); m.subMeshCount = m_Tris.Count; for (int i = 0; i < m_Tris.Count; i++) { if (topology == MeshTopology.Triangles) { m.SetTriangles(m_Tris[i], i, false); } else { Reflected.SetIndices(m, m_Tris[i], topology, i, false); } } m.RecalculateBounds(); if (topology <= MeshTopology.Quads) { m.RecalculateNormals(); m.RecalculateTangents(); if (profile > 0) { var uv = (int)profile; if ((uv & 1) > 0) { m.SetUVs(0, m_Uv0); } if ((uv & 2) > 0) { m.SetUVs(1, m_Uv2); } if ((uv & 4) > 0) { m.SetUVs(2, m_Uv3); } } } if ((profile & VertexProfiles.Color) > 0) { m.SetColors(m_Colors); } }
public void SetPrimaryKey(Reflected.Field primary) { this._primaryKey = primary; }
public SingleLineLabel() { reflected = new Reflected(this); }
public DataModel_ScrewPiles(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { //Depth Pile if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ScrewPiles>(x => x.PileDepth)) { Set_DepthPile(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ScrewPiles>(x => x.PR_StirrupRadius_Layer1)) { Set_PR_StirrupRadius_Layer2(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ScrewPiles>(x => x.Slope)) { Set_Angle(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_ScrewPiles>(x => x.NoPiles)) { Set_divCurve(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage01.DataModel_Global_Coordinations_GroundPoint.PropertyChanged += (o, e) => { //Depth Pile if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModel_Global_Coordinations_GroundPoint>(x => x.FoundationPointZ)) { Set_DepthPile(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage11.DataModelMaterialsFoundationPile.PropertyChanged += (o, e) => { //Material Piles if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelMaterials>(x => x.SelectedIndexConcreteQuality)) { Set_MaterialPiles(); } }; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.PR_StirrupRebarDiam_Layer1 = 0; this.Forces = ""; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.PR_LongRebarDiam = 0; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.PR_Ureinforcement_RebarDiam = 0; }); }
// ReSharper disable once MemberCanBePrivate.Local protected bool Equals(Reflected other) { return base.Equals(other) && _propertyDescriptor.Equals(other._propertyDescriptor); }
public DataModelCircular_Zone(GlobalDataModels global) { this.globalData = global; action_this_propertyChanged = (o, e) => { switch (Position) { case EZonePosition.Start: //NoOfBars -- OK if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.ZoneLength) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SpacingValue)) { Set_NoOfBars(); } //ZoneLength if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.RadiusGiven)) { Set_ZoneLength(); } //ZoneInterDistance if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SpacingValue)) { Set_ZoneInterDistance(); } //RadiusGiven if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.OffsetFromEdge)) { Set_RadiusGiven(); } //DistanceFromBottom if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SelectedIndexDiameter)) { Set_DistanceFromTop(); } //OffsetFromEdge if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SelectedIndexDiameter)) { Set_OffsetFromEdge(); } break; case EZonePosition.Middle: //NoOfBars -- OK if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.ZoneLength) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SpacingValue)) { Set_NoOfBars(); } //ZoneLength if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.RadiusGiven)) { Set_ZoneLength(); } //ZoneInterDistance if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SpacingValue)) { Set_ZoneInterDistance(); } //DistanceFromBottom if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelCircular_Zone>(x => x.SelectedIndexDiameter)) { Set_DistanceFromTop(); } break; case EZonePosition.End: //OffsetFromEdge if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.ZoneLength) || e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.ZoneInterDistance)) { Set_OffsetFromEdge(); } //DistanceFromBottom if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.SelectedIndexDiameter)) { Set_DistanceFromTop(); } break; } }; action_this2_propertyChanged = (o, e) => { //middle zone OffsetFromEdge depends on previous zone ZoneLength ZoneInterDistance and OffsetFromEdge if (Position != EZonePosition.End) { //next index should not be last . 1->2, 2->3, 3 -x 4 if ((ListIndex + 1) < globalData.GDMPage05.DataModelCircular_ZoneCollection.Count - 1) { //If current properties change - notify next position but not the last one if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.ZoneLength) || e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.ZoneInterDistance) || e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.OffsetFromEdge)) { global.GDMPage05.DataModelCircular_ZoneCollection.Get(ListIndex + 1).Set_OffsetFromEdge(); } } if ((ListIndex + 1) == globalData.GDMPage05.DataModelCircular_ZoneCollection.Count - 1) { if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.OffsetFromEdge)) { global.GDMPage05.DataModelCircular_ZoneCollection.Get(ListIndex + 1).Set_OffsetFromEdge(); } } } //middle ZoneLength and ZoneInterDistance depends of next (+1) zone if (Position == EZonePosition.Middle || Position == EZonePosition.End) { //ZoneLength if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.RadiusGiven)) { global.GDMPage05.DataModelCircular_ZoneCollection.Get(ListIndex - 1).Set_ZoneLength(); } //ZoneInterDistance if (e.PropertyName == Reflected.ObjGetLastPropertyName <IDataModelCircularZone>(x => x.SpacingValue)) { global.GDMPage05.DataModelCircular_ZoneCollection.Get(ListIndex - 1).Set_ZoneInterDistance(); } } }; action_page01_formwork_propertyChanged = (o, e) => { //DistanceFromBottom if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.TopCover)) { Set_DistanceFromTop(); } switch (Position) { case EZonePosition.Start: //RadiusGiven if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.DFoundation)) { Set_RadiusGiven(); } //OffsetFromEdge if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage01.DataModel_Global_Formwork>(x => x.EdgeCover)) { Set_OffsetFromEdge(); } break; } }; action_page05_radial1 = (o, e) => { //DistanceFromBottom if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage05.DataModelRadial1>(x => x.SelectedIndexLargeDiameter)) { Set_DistanceFromTop(); } }; action_page05_circulargeneral = (o, e) => { switch (Position) { case EZonePosition.Start: //OffsetFromEdge if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage05.DataModelCircularGeneral>(x => x.SelectedDiameterEdgeCirculars)) { Set_OffsetFromEdge(); } break; case EZonePosition.End: if (e.PropertyName == Reflected.ObjGetLastPropertyName <NSPage05.DataModelCircularGeneral>(x => x.RadiusCore)) { Set_RadiusGiven(); } break; } }; addEvents = () => { if (!_eventsAdded) { this.PropertyChanged += action_this_propertyChanged; this.PropertyChanged += action_this2_propertyChanged; global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += action_page01_formwork_propertyChanged; global.GDMPage05.DataModelRadial1.PropertyChanged += action_page05_radial1; global.GDMPage05.DataModelCircularGeneral.PropertyChanged += action_page05_circulargeneral; _eventsAdded = true; } }; removeEvents = () => { this.PropertyChanged -= action_this_propertyChanged; this.PropertyChanged -= action_this2_propertyChanged; global.GDMPage01.DataModel_Global_Formwork.PropertyChanged -= action_page01_formwork_propertyChanged; global.GDMPage05.DataModelRadial1.PropertyChanged -= action_page05_radial1; global.GDMPage05.DataModelCircularGeneral.PropertyChanged -= action_page05_circulargeneral; }; }
public DataModelRadial2(GlobalDataModels global) { this.global = global; global.EvtHandler.AddPostBuildEvents(() => { this.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial2>(x => x.LargeDiamNoOfBars)) { Set_SpacingAngle(); } // LargeDiameterOffsetFromCenter => Math.Max(UnreinforcedCore, GlobalPage04.DataModelRadialGeneral.MinCore); if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.LargeDiamNoOfBars) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.SmallDiamNoOfBars) || e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.SpacingAngle)) { Set_SmallDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.Spacing3rdDiameterAngle)) { Set_ThirdDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.ThirdDiamNoOfBars)) { Set_Spacing3rdDiameterAngle(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.SpacingAngle)) { Set_StartOffsetAngle(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelRadialGeneral.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadialGeneral>(x => x.MinCore)) { Set_LargeDiameterOffsetFromCenter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadialGeneral>(x => x.MinSpaceField)) { Set_ThirdDiameterOffsetFromCenter(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage05.DataModelRadial1.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.OverlappLargeDiameter)) { Set_OverlappLargeDiameter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.OverlappSmallDiameter)) { Set_OverlappSmallDiameter(); } if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial1>(x => x.Overlapp3rdDiameter)) { Set_Overlapp3rdDiameter(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage04.DataModelRadial2.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModelRadial2>(x => x.LargeDiameterOffsetFromCenter)) // { Set_LargeDiameterOffsetFromCenter(); } }; }); global.EvtHandler.AddPostBuildEvents(() => { global.GDMPage01.DataModel_Global_Formwork.PropertyChanged += (o, e) => { if (e.PropertyName == Reflected.ObjGetLastPropertyName <DataModels.NSPage01.DataModel_Global_Formwork>(x => x.DTowerBase)) { Set_SmallDiameterOffsetFromCenter(); } }; }); }
public Constraint(Reflected.Field thisField, Reflected.Field otherField, Table table) { this._thisField = thisField; this._otherField = otherField; this._table = table; }
// ReSharper disable once MemberCanBePrivate.Local protected bool Equals(Reflected other) { return(base.Equals(other) && _propertyDescriptor.Equals(other._propertyDescriptor)); }
private static string GetNameForEnum(Reflected rc) { if (rc == Reflected.AsyncPattern) { return("AsyncPattern"); } else if (rc == Reflected.SyncPattern) { return("SyncPattern"); } else if (rc == Reflected.PAsyncPattern) { return("PremadePattern"); } else if (rc == Reflected.TP) { return("TP"); } else if (rc == Reflected.TP3) { return("TP3"); } else if (rc == Reflected.Path) { return("Path"); } else if (rc == Reflected.LaserPath) { return("Laser Path"); } else if (rc == Reflected.FXY) { return("FXY"); } else if (rc == Reflected.BPY) { return("BPY"); } else if (rc == Reflected.Pred) { return("Predicate"); } else if (rc == Reflected.SBCF) { return("BulletControl"); } else if (rc == Reflected.BehCF) { return("BEH Control"); } else if (rc == Reflected.LCF) { return("LaserControl"); } else if (rc == Reflected.SPCF) { return("PoolControl"); } else if (rc == Reflected.FPCF) { return("FancyPoolControl"); } else if (rc == Reflected.LPCF) { return("LaserPoolControl"); } else if (rc == Reflected.FV2) { return("FV2"); } else if (rc == Reflected.FF) { return("FF"); } else if (rc == Reflected.SBF) { return("SB>Float Func"); } else if (rc == Reflected.SBV2) { return("SB>V2 Func"); } else if (rc == Reflected.BPRV2) { return("BP>V2RV2 Func"); } else if (rc == Reflected.GCProp) { return("GenCtx Property"); } return("NULL CLASS"); }
private static TreeViewItem FindItem(int id) { return(Reflected.FindHierarchyItem(Reflected.GetHierarchyTreeView(), id)); }