public Page12(GlobalDataModels global) { DataModelShapesCollection = global.GDMPage12.DataModelShapesCollection; InitializeComponent(); this.DataContext = this; }
public DataModel_ARExteriorCircularTop(GlobalDataModels global) { global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameter = 0; }); }
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(); } }; }); }
public DataModel_CircularBarsTop(GlobalDataModels global) { global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameter = 0; this.Groups = ""; this.SelectedIndexOption = 0; }); }
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_BR_D2(GlobalDataModels global) { global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameter = 0; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexOption = 0; }); }
public DataModel_ARExtUBars(GlobalDataModels global) { global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameterL = 0; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameterS = 0; }); }
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 Page03(GlobalDataModels global) { DataModel_ScrewPiles = global.GDMPage03.DataModel_ScrewPile; InitializeComponent(); this.DataContext = this; CultureRenamer.Rename(UI_Grid_Master); }
public Page01(GlobalDataModels global) { DataModel_Global_Formwork = global.GDMPage01.DataModel_Global_Formwork; DataModel_Global_Coordinations_GroundPoint = global.GDMPage01.DataModel_Global_Coordinations_GroundPoint; DataModel_Global_Materials = global.GDMPage01.DataModel_Global_Materials; InitializeComponent(); this.DataContext = this; }
public Page02(GlobalDataModels global) { DataModel_Anchor = global.GDMPage02.DataModel_Anchor; InitializeComponent(); this.DataContext = this; CultureRenamer.Rename(UI_Grid_Master); }
public Page10(GlobalDataModels global) { DataModel_CHR_General = global.GDMPage10.DataModel_CHR_General; DataModel_CHR_Zones = global.GDMPage10.DataModel_CHR_Zones; this.DataContext = this; InitializeComponent(); CultureRenamer.Rename(UI_Grid_Master); }
public DataModel_CircularBarsExteriorSide(GlobalDataModels global) { global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexDiameter = 0; }); global.EvtHandler.AddPostEventsRegisterAction(() => { this.SelectedIndexOption = 0; }); }
public Page04(GlobalDataModels global) { this.globalDataModels = global; DataModelCircularGeneral = global.GDMPage04.DataModelCircularGeneral; DataModelRadial1 = global.GDMPage04.DataModelRadial1; DataModelRadial2 = global.GDMPage04.DataModelRadial2; DataModelRadialGeneral = global.GDMPage04.DataModelRadialGeneral; DataModelCircular_ZoneCollection = global.GDMPage04.DataModelCircular_ZoneCollection; InitializeComponent(); this.DataContext = this; TemplateGrid = CloneAndRemoveTemplateGrid(); //if not set in AddPopulateDataAction it will not register global.EvtHandler.AddPopulateDataAction(() => { DataModelCircular_ZoneCollection.Zones.CollectionChanged += (o, e) => { RecalculateGridSetup(); EvaluateUIEnabled(); }; }); CultureRenamer.Rename(UI_Grid_MasterGrid); global.EvtHandler.AddPopulateDataAction(() => { Button_Click(null, null); Button_Click(null, null); DataModelCircular_ZoneCollection.Zones[0].SpacingValue = 200; DataModelCircular_ZoneCollection.Zones[0].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D25.ToString()); DataModelCircular_ZoneCollection.Zones[1].SpacingValue = 150; DataModelCircular_ZoneCollection.Zones[1].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D25.ToString()); DataModelCircular_ZoneCollection.Zones[1].RadiusGiven = 8250; DataModelCircular_ZoneCollection.Zones[2].SpacingValue = 125; DataModelCircular_ZoneCollection.Zones[2].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D25.ToString()); DataModelCircular_ZoneCollection.Zones[2].RadiusGiven = 6540; DataModelCircular_ZoneCollection.Zones[3].SpacingValue = 0; }); }
public Page06(GlobalDataModels global) { DataModel_BR_D1 = global.GDMPage06.DataModel_BR_D1; DataModel_BR_D2 = global.GDMPage06.DataModel_BR_D2; DataModel_BR_L = global.GDMPage06.DataModel_BR_L; DataModel_TB_D1 = global.GDMPage06.DataModel_TB_D1; DataModel_TB_D2 = global.GDMPage06.DataModel_TB_D2; DataModel_Circular_EdgeOfL = global.GDMPage06.DataModel_Circular_EdgeOfL; DataModel_Generalities = global.GDMPage06.DataModel_Generalities; InitializeComponent(); this.DataContext = this; }
public Page07(GlobalDataModels global) { DataModel_StraightBars_Dir1 = global.GDMPage07.DataModel_StraightBars_Dir1; DataModel_StraightBars_Dir2 = global.GDMPage07.DataModel_StraightBars_Dir2; DataModel_RadialEdgeConcrete = global.GDMPage07.DataModel_RadialEdgeConcrete; DataModel_CircularBarsTop = global.GDMPage07.DataModel_CircularBarsTop; DataModel_CircularBarsExteriorSide = global.GDMPage07.DataModel_CircularBarsExteriorSide; DataModel_StraightBars_Extra = global.GDMPage07.DataModel_StraightBars_Extra; InitializeComponent(); this.DataContext = this; CultureRenamer.Rename(UI_MasterGrid); }
public Page11(GlobalDataModels global) { DataModelMaterialsFoundation = global.GDMPage11.DataModelMaterialsFoundation; DataModelMaterialsFoundationTowerBase = global.GDMPage11.DataModelMaterialsFoundationTowerBase; DataModelMaterialsLeanConcrete = global.GDMPage11.DataModelMaterialsLeanConcrete; DataModelMaterialsEnvelopeAroundConduits = global.GDMPage11.DataModelMaterialsEnvelopeAroundConduits; DataModelMaterialsGrouting = global.GDMPage11.DataModelMaterialsGrouting; DataModelMaterialsFoundationPile = global.GDMPage11.DataModelMaterialsFoundationPile; InitializeComponent(); this.DataContext = this; CultureRenamer.Rename(UI_Grid_Master); }
public Page08(GlobalDataModels global) { DataModel_ARExtUBars = global.GDMPage08.DataModel_ARExtUBars; DataModel_ARExteriorCircularTop = global.GDMPage08.DataModel_ARExteriorCircularTop; DataModel_ARExteriorCircularLateral = global.GDMPage08.DataModel_ARExteriorCircularLateral; DataModel_ARExteriorCircularBottom = global.GDMPage08.DataModel_ARExteriorCircularBottom; DataModel_ARIntUBars = global.GDMPage08.DataModel_ARIntUBars; DataModel_ARIntCircularTop = global.GDMPage08.DataModel_ARIntCircularTop; DataModel_ARIntCircularLateral = global.GDMPage08.DataModel_ARIntCircularLateral; DataModel_ARIntCircularBottom = global.GDMPage08.DataModel_ARIntCircularBottom; InitializeComponent(); this.DataContext = this; }
public Page09(GlobalDataModels global) { DataModelUBABCollection = global.GDMPage09.DataModelUBABCollection; InitializeComponent(); this.DataContext = this; CultureRenamer.Rename(UI_Grid_Master); global.EvtHandler.AddPostBuildEvents(() => { AddNewNDataModel(); SetGridDataContext(0); }); global.EvtHandler.AddPostBuildEvents(() => { DataModelUBABCollection.Collection.CollectionChanged += (o, e) => { foreach (var item in DataModelUBABCollection.Collection) { item.AddEvents(); item.Set_InteriorHalfLength(); } }; }); global.EvtHandler.AddPopulateDataAction(() => { AddNewNDataModel(); AddNewNDataModel(); DataModelUBABCollection.Collection[0].ExteriorHalfLength = 1000; DataModelUBABCollection.Collection[0].SmallEdge = 170; DataModelUBABCollection.Collection[0].DistanceFromTop = 400; DataModelUBABCollection.Collection[0].FreeEdgeLength = 50; DataModelUBABCollection.Collection[0].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D16.ToString()); DataModelUBABCollection.Collection[1].ExteriorHalfLength = 1000; DataModelUBABCollection.Collection[1].SmallEdge = 170; DataModelUBABCollection.Collection[1].DistanceFromTop = 600; DataModelUBABCollection.Collection[1].FreeEdgeLength = 50; DataModelUBABCollection.Collection[1].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D18.ToString()); DataModelUBABCollection.Collection[2].ExteriorHalfLength = 1000; DataModelUBABCollection.Collection[2].SmallEdge = 170; DataModelUBABCollection.Collection[2].DistanceFromTop = 800; DataModelUBABCollection.Collection[2].FreeEdgeLength = 50; DataModelUBABCollection.Collection[2].SelectedIndexDiameter = Enum.GetNames(typeof(EDiameters)).ToList().IndexOf(EDiameters.D20.ToString()); }); }
public MenuPageProvider(GlobalDataModels global) { Page01 = new Page01(global); Page02 = new Page02(global); Page03 = new Page03(global); Page04 = new Page04(global); Page05 = new Page05(global); Page06 = new Page06(global); Page07 = new Page07(global); Page08 = new Page08(global); Page09 = new Page09(global); Page10 = new Page10(global); Page11 = new Page11(global); Page12 = new Page12(global); }
public MainWindow() { Global = new GlobalDataModels(); MenuPageProvider = new MenuPageProvider(Global); Global.EvtHandler.RegisterPostBuildEvents(); Global.EvtHandler.CallPostEventsRegisterAction(); Global.EvtHandler.CallPopulateDataAction(); InitializeComponent(); InitializeMenuClicks(); InitializeMenuItemHeaders(); //Writer.Writer.WriteTexts(); }
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 DataModelCircular_ZoneCollection(GlobalDataModels global) { _globalDataModels = global; Zones = new ObservableCollection <DataModelCircular_Zone>(); global.EvtHandler.AddPostBuildEvents(() => { Zones.CollectionChanged += (o, e) => { for (var i = 0; i < Count; i++) { Zones[i].ListIndex = i; var cc = Zones[i].ListIndex; if (i == 0) { Zones[i].Position = EZonePosition.Start; } else if (i == Count - 1) { Zones[i].Position = EZonePosition.End; } else { Zones[i].Position = EZonePosition.Middle; } } //first update indices and then set data UpdateIndices(); foreach (var item in Zones) { item.addEvents(); item.Set_DistanceFromTop(); item.Set_NoOfBars(); item.Set_OffsetFromEdge(); item.Set_RadiusGiven(); item.Set_ZoneLength(); item.Set_ZoneInterDistance(); } }; }); global.EvtHandler.AddPostEventsRegisterAction(() => { Zones.Add(new DataModelCircular_Zone(global)); Zones.Add(new DataModelCircular_Zone(global)); }); }
public static void Open(GlobalDataModels global, string filePath) { //Registry Registry = new Registry(); Registry.Register <GlobalDataModels, GlobalDataModels>(global); //Registry //FileStream fs = new FileStream(currentDirectory + "\\temp.xml", FileMode.Open); string xml = System.IO.File.ReadAllText(filePath); //XmlTextReader xmlTextReader = new XmlTextReader(fs); //xmlTextReader.read(); XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); EvaluateOpenedXML(doc); }
public static void EvaluateOpenedXML(XmlDocument xmlDocument) { //first child node is var root = xmlDocument.GetElementsByTagName(RootNodeName)[0]; KeyCodeDictionary dictionary = new KeyCodeDictionary(); GlobalDataModels globalDataModels = Registry.Demand <GlobalDataModels>(); globalDataModels.GDMPage05.DataModelCircular_ZoneCollection.Add(); PropertyInfo[] propertiesInfo = typeof(GlobalDataModels).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo pinfo in propertiesInfo) { Match(pinfo, root, globalDataModels); } }
public static void Save(GlobalDataModels globalDataModels, string filePath) { //GlobalDataModels = globalDataModels; XmlDocument Document = new XmlDocument(); Document.PreserveWhitespace = true; XmlNode root = AppendRoot(Document); KeyCodeDictionary saveData = CollectGlobalDataModel(globalDataModels); EvaluateDictionary(saveData, Document, root); Document.AppendChild(root); SaveToFile(Document, filePath); }
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 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_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(); } }; }); }