private FrameTypesMgr m_typesMgr; // object manage FamilySymbols /// <summary> /// constructor /// </summary> /// <param name="obj">FamilySymbol object</param> /// <param name="typesMgr">FamilySymbols' manager</param> public DuplicateTypeForm(object obj, FrameTypesMgr typesMgr) { InitializeComponent(); m_copiedSymbol = obj as FamilySymbol; m_typesMgr = typesMgr; }
private FrameTypesMgr m_typesMgr; // object manage FamilySymbols #endregion Fields #region Constructors /// <summary> /// constructor /// </summary> /// <param name="obj">FamilySymbol object</param> /// <param name="typesMgr">FamilySymbols' manager</param> public DuplicateTypeForm(object obj, FrameTypesMgr typesMgr) { InitializeComponent(); m_copiedSymbol = obj as FamilySymbol; m_typesMgr = typesMgr; }
/// <summary> /// refresh the ListControl's datasource /// </summary> /// <param name="list">ListControl to be refreshed</param> private static void RefreshListControl(ListControl list, FrameTypesMgr typesMgr) { // refresh control's data list.DataSource = null; list.DataSource = typesMgr.FramingSymbols; list.DisplayMember = "Name"; list.SelectedIndex = 0; }
/// <summary> /// it is only used for object factory method /// </summary> /// <param name="commandData"></param> private FrameData(ExternalCommandData commandData) { // initialize members m_commandData = commandData; m_columnSymbolsMgr = new FrameTypesMgr(commandData); m_beambracesSymbolsMgr = new FrameTypesMgr(commandData); m_levels = new SortedList <double, Level>(); m_originalLevelSize = m_levels.Count; m_yNumber = YNumberDefault; m_xNumber = XNumberDefault; m_distance = DistanceDefault; }
int m_yNumber = XNumberDefault; // number of Columns in the Y Direction #endregion Fields #region Constructors /// <summary> /// it is only used for object factory method /// </summary> /// <param name="commandData"></param> private FrameData(ExternalCommandData commandData) { // initialize members m_commandData = commandData; m_columnSymbolsMgr = new FrameTypesMgr(commandData); m_beambracesSymbolsMgr = new FrameTypesMgr(commandData); m_levels = new SortedList<double, Level>(); m_originalLevelSize = m_levels.Count; m_yNumber = YNumberDefault; m_xNumber = XNumberDefault; m_distance = DistanceDefault; }
/// <summary> /// provide user UI to duplicate FamilySymbols /// </summary> /// <param name="typesMgr">data manager of FamilySymbols</param> /// <param name="symbol">FamilySymbol to be copied</param> /// <returns>does duplicate</returns> private static bool DuplicateSymbol(FrameTypesMgr typesMgr, Object symbol) { bool result = false; using (DuplicateTypeForm typeFrm = new DuplicateTypeForm(symbol, typesMgr)) { if (typeFrm.ShowDialog() == DialogResult.OK) { result = true; } } return result; }
/// <summary> /// provide user UI to duplicate FamilySymbols /// </summary> /// <param name="typesMgr">data manager of FamilySymbols</param> /// <param name="symbol">FamilySymbol to be copied</param> /// <returns>does duplicate</returns> private static bool DuplicateSymbol(FrameTypesMgr typesMgr, Object symbol) { bool result = false; using (DuplicateTypeForm typeFrm = new DuplicateTypeForm(symbol, typesMgr)) { if (typeFrm.ShowDialog() == DialogResult.OK) { result = true; } } return(result); }