/// <summary>
        /// Get visible button count
        /// </summary>
        /// <param name="tVisibleType"></param>
        /// <returns></returns>
        internal int GetVisibleButtonCount(VisibleType tVisibleType)
        {
            int visibleItemCount = 0;

            foreach (NavigateBarButton nvb in navigateBarButtons)
            {

                // Gözükmeyecekse pas geç
                // If not displayed skip button
                if (!nvb.IsDisplayed) continue;

                switch (tVisibleType)
                {
                    case VisibleType.Unvisible:
                        {
                            if (!nvb.Visible) visibleItemCount++;
                            break;
                        }
                    case VisibleType.Visible:
                        {
                            if (nvb.Visible) visibleItemCount++;
                            break;
                        }
                    case VisibleType.All:
                        {
                            visibleItemCount++;
                            break;
                        }
                }
            }

            return visibleItemCount;
        }
		/// <summary>
		/// Initializes a new instance of the GXSettingItemAttribute class. 
		/// </summary>
		/// <param name="visible">Visibility type of the new instance.</param>
		/// <param name="storable">If True, the new instance is storable.</param>
        /// <seealso cref="VisibleType">VisibleType</seealso>
        /// <seealso cref="Storable">Storable</seealso>
		public GXSettingItemAttribute(VisibleType visible, bool storable)
		{
			m_Visible = visible;
			m_Storable = storable;
		}
		/// <summary>
		/// Initializes a new instance of the GXSettingItemAttribute class.
		/// </summary>
        /// <param name="visible">Visibility type of the new instance.</param>
        /// <param name="storable">If True, the new instance is storable.</param>
		/// <param name="category">Name of the category to which the new instance belongs.</param>
        /// <param name="editorType">Type of the editor of the new instance.</param>
        /// <seealso cref="VisibleType">VisibleType</seealso>
        /// <seealso cref="Storable">Storable</seealso>
		public GXSettingItemAttribute(VisibleType visible, bool storable, string category, Type editorType)
		{
			m_Storable = storable;
			m_Visible = visible;
			m_Category = category;
			m_Editor = editorType;
		}
Example #4
0
        public List<Autodesk.Revit.DB.View> AvailableViewSheetSet(VisibleType visibleType)
        {
            if (visibleType == VisibleType.VT_None)
                return null;

            List<Autodesk.Revit.DB.View> views = new List<Autodesk.Revit.DB.View>();
            foreach (Autodesk.Revit.DB.View view in m_viewSheetSetting.AvailableViews)
            {
                if (view.ViewType == Autodesk.Revit.DB.ViewType.DrawingSheet
                    && visibleType == VisibleType.VT_ViewOnly)
                {
                    continue;   // filter out sheets.
                }
                if (view.ViewType != Autodesk.Revit.DB.ViewType.DrawingSheet
                    && visibleType == VisibleType.VT_SheetOnly)
                {
                    continue;   // filter out views.
                }

                views.Add(view);
            }

            return views;
        }