data manager take charge of FamilySymbol object in current document
예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
 /// <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;
 }
예제 #4
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;
 }
예제 #5
0
파일: FrameData.cs 프로젝트: AMEE/revit
        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;
        }
예제 #6
0
 /// <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;
 }
예제 #7
0
        /// <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);
        }
예제 #8
0
 /// <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;
 }