/// <summary>Return the child grid blocks.</summary> /// <param name="macroAddress">The macro address.</param> /// <param name="subAddress">The sub address.</param> /// <param name="macroItem">The macro item.</param> /// <param name="subItem">The sub item.</param> /// <returns></returns> /// <exception cref="System.ArgumentException"></exception> public IGridBlock_Base GetChild_SubGridBlock(string macroAddress, string subAddress, enGrid_BlockDisplayType macroItem = enGrid_BlockDisplayType.Address, enGrid_BlockDisplayType subItem = enGrid_BlockDisplayType.Address) { var gridMacro = GetChild_MacroGridBlock(macroAddress, macroItem); var gridSubI = gridMacro.GetChild_GridBlock(subAddress, subItem); return(gridSubI); }
/// <summary>Return the child grid blocks.</summary> /// <param name="macroAddress">The macro address.</param> /// <param name="subAddress">The sub address.</param> /// <param name="microAddress">The micro address.</param> /// <param name="macroItem">The macro item.</param> /// <param name="subItem">The sub item.</param> /// <param name="microItem">The micro item.</param> /// <returns></returns> /// <exception cref="System.ArgumentException"></exception> public IGridBlock_Base GetChild_MicroGridBlock(string macroAddress, string subAddress, string microAddress, enGrid_BlockDisplayType macroItem = enGrid_BlockDisplayType.Address, enGrid_BlockDisplayType subItem = enGrid_BlockDisplayType.Address, enGrid_BlockDisplayType microItem = enGrid_BlockDisplayType.Address) { var gridSub = GetChild_SubGridBlock(macroAddress, subAddress, macroItem, subItem) as IGridBlock_Base; var gridMicroI = gridSub.GetChild_GridBlock(microAddress, microItem); return(gridMicroI); }
private static bool GridSync_DisplayMode(IGridBlock_Base grid, IGridControl gridControl, enGrid_BlockDisplayType displayMode) { var result = false; switch (displayMode) { case enGrid_BlockDisplayType.Address: gridControl.Text = grid.Name_Caption; break; case enGrid_BlockDisplayType.Name: gridControl.Text = grid.Name_Control; break; case enGrid_BlockDisplayType.Value: { var state = grid as IGridBlock_State; if (state == null) { return(false); } if (Double.IsNaN(state.State_ValueDouble)) { gridControl.Text = "?"; } else { gridControl.Text = state.State_ValueDouble.zObject().AsStr(); } break; } } return(result); }
/// <summary>Return the child grid blocks.</summary> /// <param name="macroAddress">The macro address.</param> /// <param name="searchItem">The search item.</param> /// <returns></returns> /// <exception cref="System.ArgumentException"></exception> public IGridBlock_Base GetChild_MacroGridBlock(string macroAddress, enGrid_BlockDisplayType searchItem = enGrid_BlockDisplayType.Address) { var gridMacro = GridCuboid.GetChild_GridBlock(macroAddress, searchItem); return(gridMacro); }