Пример #1
0
        private void OnTabCall(DockContent tab)
        {
            TabTypes type = (tab as ICobaltTab).TabType;

            switch (type)
            {
            case TabTypes.Property:
                tab.Show(dockPanel, DockState.DockRight);
                break;

            case TabTypes.Shape:
                tab.Show(dockPanel, DockState.DockLeft);
                break;

            case TabTypes.WorkArea:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.Project:
                tab.Show(dockPanel, DockState.DockLeft);
                break;

            case TabTypes.Logbook:
                tab.Show(dockPanel, DockState.DockBottom);
                break;

            default:
            {
                tab.Show(dockPanel, DockState.Document);
                break;
            }
            }
        }
Пример #2
0
        /// <summary>
        /// Returns a tab page of a certain kind
        /// </summary>
        /// <param name="type">The type of tab (browser or favs)</param>
        /// <param name="identifier">the unique key</param>
        /// <returns></returns>
        public ITab Get(TabTypes type, string identifier)
        {
            ITab tab = null;

            if ((tab = tabs[identifier]) == null)
            {
                switch (type)
                {
                case TabTypes.Browser:
                    return(CreateBrowser(identifier));

                case TabTypes.Favorites:
                    return(CreateFavorites("Favorites"));

                default:
                    return(null);
                }
            }
            else
            {
                if (OnShowTab != null)
                {
                    OnShowTab(tab);
                }
                return(tab);
            }
        }
Пример #3
0
 public void AddTab(string title, Android.Support.V4.App.Fragment frag, TabType tp)
 {
     Titles.Add(title);
     fragments.Add(frag);
     TabTypes.Add(tp);
     NotifyDataSetChanged();
 }
Пример #4
0
 public void RemoveTab(int index)
 {
     Titles.RemoveAt(index);
     fragments.RemoveAt(index);
     TabTypes.RemoveAt(index);
     NotifyDataSetChanged();
 }
Пример #5
0
        private void OnTabCall(DockContent tab)
        {
            TabTypes type = (tab as ICobaltTab).TabType;

            switch (type)
            {
            case TabTypes.Code:
            case TabTypes.NetronDiagram:
            case TabTypes.DataGrid:
            case TabTypes.World:
            case TabTypes.Browser:
            case TabTypes.Chart:
            case TabTypes.DiagramBrowser:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.Project:
            case TabTypes.PropertyGrid:
                tab.Show(dockPanel, DockState.DockRight);
                break;

            case TabTypes.Trace:
            case TabTypes.Output:
                tab.Show(dockPanel, DockState.DockBottom);
                break;

            case TabTypes.ShapesViewer:
            case TabTypes.ShapeFavorites:
                tab.Show(dockPanel, DockState.DockLeft);
                break;
            }
        }
Пример #6
0
 private void SetTabIcon(TabTypes tabType, /*@DrawableRes*/ int drawableResId, /*@ColorRes*/ int colorResId)
 {
     TabLayout.Tab tab = tabLayout.getTabAt(tabType.ordinal());
     if (tab != null)
     {
         tab.setIcon(drawableResId);
         setTabIconColor(tab, colorResId);
     }
 }
Пример #7
0
        /// <summary>
        /// Create mixed tab
        /// </summary>
        /// <param name="types"></param>
        /// <returns></returns>
//        public bool CreateMixedTab(params object[] types) {
//            if (types.Length == 0) {
//                InnerLog("Ошибка: аргумента — длина массива равна нулю");
//                return false;
//            }
//            List<Log9KTab> tabsList = new List<Log9KTab>();
//            foreach (object type in types) {
//                bool isTabTypes = type is TabTypes;
//                bool isString = type is string;
//                if (!(isTabTypes || isString)) {
//                    InnerLog("Ошибка: в метод был передан объект не являющийся строкой/TabTypes");
//                    return false;
//                }
//                if (isTabTypes) {
//                    TabTypes tabType = (TabTypes) (type as TabTypes?);
//                    if (tabType == TabTypes.CUSTOM) {
//                        InnerLog("Для установки положения пользовательской вкладки передавайте имя вкладки в метод, а не тип CUSTOM");
//                        continue;
//                    }
//                    Log9KTab log9Ktab = GetTab(tabType);
//                    if (log9Ktab == null) {
//                        InnerLog("Не найдено вкладки с типом: " + tabType);
//                    } else {
//                        tabsList.Add(log9Ktab);
//                    }
//                }
//                if (isString) {
//                    string tabType = type as string;
//                    Log9KTab log9Ktab = GetTab(tabType);
//                    if (log9Ktab != null) {
//                        tabsList.Add(log9Ktab);
//                    } else {
//                        InnerLog("Ошибка: вкладки с типом: " + tabType + " не найдено");
//                    }
//                }
//            }
//
//            if (tabsList.Count == 0) {
//                InnerLog("Ошибка: при формировании списка вкладок был получен пустой список");
//                return false;
//            }
//
//            StringBuilder mixedTabType = new StringBuilder();
//            foreach (Log9KTab tab in tabsList) {
//                mixedTabType.Append(tab.TabTypeString);
//            }
//            string mixedTabTypeName =  mixedTabType.ToString();
//            Log9KTab t = new Log9KTab(mixedTabType.ToString());
//            if (_log9KTabsDictionary.ContainsKey(mixedTabTypeName)) {
//                InnerLog("Уже есть такая миксованая вкладка: " + mixedTabTypeName);
//                return false;
//            }
//
//            _log9KTabsDictionary.Add(mixedTabTypeName, t);
//
//            return true;
//        }


        /// <summary>
        /// Set header for tab which will be displayed in control
        /// </summary>
        /// <param name="tabType"></param>
        /// <param name="header"></param>
        public void SetTabHeader(TabTypes tabType, string header)
        {
            Log9KTab tab = GetTab(tabType);

            if (tab != null)
            {
                tab.TabHeader = header;
            }
        }
Пример #8
0
        private void OnShowTab(DockContent tab)
        {
            if (tab == null)
            {
                return;
            }
            TabTypes type = (tab as ICobaltTab).TabType;

            tab.Show(dockPanel, tab.DockState);
        }
Пример #9
0
        /// <summary>
        /// Set maximal size for observable collection (which is displayed in DataGrid) of given tab
        /// </summary>
        /// <param name="tabType"></param>
        /// <param name="maxCollectionSize"></param>
        public void SetMaxCollectionSizeForTab(TabTypes tabType, uint maxCollectionSize)
        {
            Log9KTab log9KTab = GetTab(tabType);

            if (log9KTab == null)
            {
                return;
            }
            log9KTab.LogEntryCollection.MaxCollectionSize = maxCollectionSize;
        }
Пример #10
0
    /// <summary>
    ///
    /// Function for selecting a tab of a given type
    ///
    /// </summary>
    public void SelectTab(TabTypes tabType)
    {
        selectedTab = tabType;

        RefreshCurrentList();
        //Loops through the tab list. If the tab type is of the given type then, the tab is selected
        foreach (var tab in cardListTabs)
        {
            tab.UpdateSelectedColour(tab.TabType == tabType);
        }
    }
Пример #11
0
        private void OnShowTab(DockContent tab)
        {
            if (tab == null)
            {
                return;
            }
            TabTypes type = (tab as ICobaltTab).TabType;

            tab.Show(dockPanel);
            //tab.MdiParent = this.parent;
        }
Пример #12
0
 public void SwitchToTab(TabTypes type)
 {
     foreach (var kvp in TabTypeToObj)
     {
         if (kvp.Key == type)
         {
             kvp.Value.SelectMe();
         }
         else
         {
             kvp.Value.DeselectMe();
         }
     }
 }
Пример #13
0
        static bool GetTabType(object value, out TabTypes type, out string customType)
        {
            type       = TabTypes.ALL;
            customType = "";

            if (value == null || (!(value is TabTypes) && !(value is LogEntryTypes) && !(value is Log9KEntry) && !(value is Log9KTab)))
            {
                return(false);
            }

            if (value is TabTypes)
            {
                type = (TabTypes)value;
            }
            if (value is LogEntryTypes)
            {
                bool success = Enum.TryParse(value.ToString(), out type);
                if (!success)
                {
                    return(false);
                }
            }

            if (value is Log9KEntry)
            {
                Log9KEntry e = (Log9KEntry)value;
                if (e.Type == LogEntryTypes.CUSTOM)
                {
                    customType = e.CustomType;
                }
                bool success = Enum.TryParse(e.Type.ToString(), out type);
                if (!success)
                {
                    return(false);
                }
            }

            if (value is Log9KTab)
            {
                Log9KTab t = (Log9KTab)value;
                if (t.TabType == TabTypes.CUSTOM)
                {
                    customType = t.CustomTabType;
                }
                type = t.TabType;
            }

            return(true);
        }
Пример #14
0
        /// <summary>
        /// <para>Initialization method, used by constructors, creates folder for tab, inits filenames</para>
        /// <para>Метод инициализации, используемый всеми конструкторами.
        /// Создаёт папку под вкладку, задаёт имена файлов.</para>
        /// </summary>
        /// <param name="type"></param>
        protected void Init(TabTypes type)
        {
            TabType = type;

            if (TabType != TabTypes.CUSTOM)
            {
                TabTypeString = type.ToString();
            }
            else
            {
                TabTypeString = CustomTabType;
            }

            if (IsAllTab())
            {
                _dirname = Log9KCore.Settings.Folder + "/" + Log9KUtil.GetDayMonthYearString() + "/";
            }
            else if (IsInnerLogTab())
            {
                _dirname = Log9KCore.Settings.Folder + "/" + Log9KUtil.GetDayMonthYearString() + "/" + "." + Log9KCore.INNER_LOG_TAB;
            }
            else
            {
                _dirname = Log9KCore.Settings.Folder + "/" + Log9KUtil.GetDayMonthYearString() + "/" + TabTypeString;
            }

            if (IsAllTab())
            {
                Log9KUtil.CreateDirIfNotExists(_dirname);
                _directoryNotCreated = false;
            }

            FilenameLogFile = _dirname + "/" + Log9KUtil.GetDayMonthYearHourMinuteSecondString() + Log9KCore.LOG_EXTENSION;

            try {
                // ReSharper disable once ReturnValueOfPureMethodIsNotUsed
                Path.GetFullPath(FilenameLogFile);
            } catch (Exception e) {
                Log9KCore.InnerLog("Ошибка: что-то не так с именем файла — " + e.Message, true);
            }

            FilenameTempFile = FilenameLogFile + Log9KCore.TEMP_LOG_EXTENSION;

            DuplicationsDictionary = new Dictionary <int, DuplicationNode>();

            InitCollection();

            InitTabHeader();
        }
Пример #15
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Uri defaultIconUri = new Uri(DEFAULT_ICON_URI_STRING);

            if (!(value is TabTypes))
            {
                return(defaultIconUri);
            }

            TabTypes tabType       = (TabTypes)value;
            string   tabTypeString = tabType.ToString();

            tabTypeString = tabTypeString.ToLower();
            string iconUriString = ICON_URI_PREFIX + tabTypeString + ICON_EXTENSION;

            return(new Uri(iconUriString));
        }
Пример #16
0
    /// <summary>
    ///
    /// Button function for switching the type of tab filter
    ///
    /// </summary>
    public void SwitchTabType()
    {
        switch (tabFilter)
        {
        case TabTypes.Classes:
            tabFilter = TabTypes.Resources;
            SwitchTabText();
            break;

        case TabTypes.Resources:
            tabFilter = TabTypes.Classes;
            SwitchTabText();
            break;
        }

        InitTabs();
    }
Пример #17
0
    /// <summary>
    ///
    /// Initialises the card list tab
    ///
    /// </summary>
    /// <param name="isTop">Used to determine the alignment of the text based on which side of the canvas the panel is on</param>
    public void InitTab(CardListsUI _cardListUI, TabTypes _tabType, bool isTop)
    {
        CardListUI = _cardListUI;
        TabType    = _tabType;

        tabText.text = TabType.GetEnumDescription();

        //tabText.alignment = isTop ? TextAlignmentOptions.Top : TextAlignmentOptions.Bottom;
        if (isTop)
        {
            tabText.gameObject.GetComponent <RectTransform>().SetBottom(15.0f);
        }
        else
        {
            tabText.gameObject.GetComponent <RectTransform>().SetTop(15.0f);
        }
    }
Пример #18
0
        /// <summary>
        /// Make the tab with given type active
        /// </summary>
        public void SetActiveTab(TabTypes tabType)
        {
            if (tabType == TabTypes.CUSTOM)
            {
                return;
            }
            Log9KTab tab = GetTab(tabType);

            if (tab != null)
            {
                if (!Log9KTabsCollection.Contains(tab))
                {
                    return;
                }
                Log9KUtil.BeginInvokeInUiThread(() => {
                    CurrentTab = tab;
                });
            }
        }
Пример #19
0
        public bool AddType(TaxiAppzDBContext context, VehicleTypeInfo vehicleTypeInfo, LoggedInUser loggedInUser)
        {
            var  filesStorage = StorageFactory.GetStorage();
            bool isFileMoved  = false;
            var  file         = context.TabUploadfiledetails.FirstOrDefault(t => t.Fileid == long.Parse(vehicleTypeInfo.Image));

            if (file == null)
            {
                throw new DataValidationException("File does not exist");
            }

            try
            {
                var fileName = file.Filename;
                isFileMoved = fileName == "" ? false : true;
                TabTypes tabTypes = new TabTypes();
                tabTypes.Imagename = fileName;
                tabTypes.Typename  = vehicleTypeInfo.Name;
                tabTypes.IsActive  = 1;
                tabTypes.IsDeleted = 0;
                tabTypes.CreatedAt = DateTime.UtcNow;
                tabTypes.UpdatedAt = DateTime.UtcNow;
                tabTypes.UpdatedBy = tabTypes.CreatedBy = loggedInUser.UserName;

                context.TabTypes.Add(tabTypes);
                context.SaveChanges();

                filesStorage.MoveToPersistant(file.Filename, tabTypes.Typeid.ToString(), "VechileTypes");
                isFileMoved = true;

                return(true);
            }
            catch (Exception ex)
            {
                if (!isFileMoved)
                {
                    filesStorage.MoveToTemp(file.Filename, vehicleTypeInfo.Image, "VechileTypes");
                }
                Extention.insertlog(ex.Message, "Admin", System.Reflection.MethodBase.GetCurrentMethod().Name, context);
                return(false);
            }
        }
Пример #20
0
        public override void OnAttach(Android.App.Activity activity)
        {
            base.OnAttach (activity);
            Android.Util.Log.Debug ("Leaderboard", "OnAttach");
            TabTypes tabTypes = new TabTypes ();
            TabType[] types = tabTypes.ToArray ();
            var testData = new Dictionary<string, UserStatEntry[]> {
                { "*****@*****.**", new UserStatEntry[] {
                        new UserStatEntry { Type = types[0], Given = 2, Gotten = 3 },
                        new UserStatEntry { Type = types[3], Given = 0, Gotten = 5 },
                        new UserStatEntry { Type = types[4], Given = 1, Gotten = 0 }
                    }
                }
            };

            var trans = FragmentManager.BeginTransaction ();
            foreach (var kvp in testData) {
                var frag = new UserStatisticFragment (() => kvp);
                trans.Add (Resource.Id.EntriesLayout, frag);
            }
            trans.Commit ();
        }
Пример #21
0
        private void OnTabCall(DockContent tab)
        {
            TabTypes type = (tab as ICobaltTab).TabType;

            switch (type)
            {
            case TabTypes.IOMonitoring:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.MonitorTool:
                tab.Show(dockPanel, DockState.DockLeft);
                break;

            case TabTypes.IOLogbook:
                tab.Show(dockPanel, DockState.DockBottom);
                break;

            case TabTypes.LogbookQuery:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.IOPoint:
                tab.Show(dockPanel, DockState.DockLeft);
                break;

            case TabTypes.Property:
                tab.Show(dockPanel, DockState.DockRight);
                break;

            default:
            {
                tab.Show(dockPanel, DockState.Document);
                break;
            }
            }
        }
Пример #22
0
 public ITab GetTab(TabTypes type, string identifier)
 {
     return(tabFactory.Get(type, identifier));
 }
Пример #23
0
        /// <summary>
        /// Get tab by given tab type
        /// </summary>
        /// <param name="tabType"></param>
        /// <returns></returns>
        private Log9KTab GetTab(TabTypes tabType)
        {
            string tabTypeString = tabType.ToString();

            return(GetTab(tabTypeString));
        }
Пример #24
0
 /// <summary>
 /// <para>Add new tab to Core's tab's collections, </para>
 /// <para>Use this method for adding new tabs instead of directly changing collections</para>
 /// </summary>
 /// <param name="tabType"></param>
 /// <param name="tab"></param>
 private void AddNewTab(TabTypes tabType, Log9KTab tab)
 {
     AddNewTab(tabType.ToString(), tab);
 }
Пример #25
0
 public TabCodon(string name, string text, TabTypes type)
     : base(name)
 {
     tabType   = type;
     this.text = text;
 }
Пример #26
0
 public TabCodon(string name, TabTypes type)
     : base(name)
 {
     tabType = type;
 }
Пример #27
0
        /// <summary>
        /// <para>Set order of tabs in tabs collection</para>
        /// <para>Arguments should be TabTypes and strings (for custom tabs)</para>
        /// </summary>
        /// <param name="types">Types of tabs in desired order (TabTypes and strings)</param>
        public bool SetTabOrder(params object[] types)
        {
            if (types.Length == 0)
            {
                InnerLog("Ошибка: аргумент функции SetTabOrder — длина массива равна нулю");
                return(false);
            }
            List <Log9KTab> tabsList = new List <Log9KTab>();

            foreach (object type in types)
            {
                bool isTabTypes = type is TabTypes;
                bool isString   = type is string;
                if (!(isTabTypes || isString))
                {
                    InnerLog("Ошибка: в метод SetTabOrder был передан объект не являющийся строкой/TabTypes");
                    return(false);
                }
                if (isTabTypes)
                {
                    TabTypes tabType = type as TabTypes? ?? TabTypes.INFO;
                    if (tabType == TabTypes.CUSTOM)
                    {
                        InnerLog("Для установки положения пользовательской вкладки передавайте имя вкладки в метод, а не тип CUSTOM");
                        continue;
                    }
                    Log9KTab log9Ktab = GetTab(tabType);
                    if (log9Ktab == null)
                    {
                        InnerLog("Не найдено вкладки с типом: " + tabType);
                    }
                    else
                    {
                        tabsList.Add(log9Ktab);
                    }
                }
                if (isString)
                {
                    string   tabType  = type as string;
                    Log9KTab log9Ktab = GetTab(tabType);
                    if (log9Ktab != null)
                    {
                        tabsList.Add(log9Ktab);
                    }
                    else
                    {
                        InnerLog("Ошибка: вкладки с типом: " + tabType + " не найдено");
                    }
                }
            }
            if (tabsList.Count == 0)
            {
                InnerLog("Ошибка: в методе SetTabOrder при формировании списка вкладок был получен пустой список");
                return(false);
            }
            else
            {
                Log9KTabsCollection.Clear();
                foreach (Log9KTab log9KTab in tabsList)
                {
                    Log9KTabsCollection.Add(log9KTab);
                }
                if (_isInnerLogTabVisible)
                {
                    Log9KTab innerTab = GetTab(INNER_LOG_TAB);
                    if (innerTab != null)
                    {
                        Log9KTabsCollection.Add(innerTab);
                    }
                    else
                    {
                        Error("Не найдена вкладка для логирования LogControl9K:" + INNER_LOG_TAB);
                    }
                }
                return(true);
            }
        }
 protected void rtsMain_TabClick(object sender, RadTabStripEventArgs e)
 {
     if (e.Tab == tabPermissionList)
     {
         currMode = TabTypes.PermissionList;
         gdlList.DataBind(GridList.ListMode.Permissions);
     }
     else if (e.Tab == tabPermissionCreate)
     {
         currMode = TabTypes.PermissionCreate;
     }
     else if (e.Tab == tabPermissionEdit)
     {
         currMode = TabTypes.PermissionEdit;
     }
     else if (e.Tab == tabPermissionRoles)
     {
         currMode = TabTypes.PermissionRoles;
         ComboEnable.ReloadGUI(SearchCombo.ComboModes.Permissions);
         LoadEnableView();
     }
     else if (e.Tab == tabPermissionUsers)
     {
         currMode = TabTypes.PermissionUsers;
         ComboEnable.ReloadGUI(SearchCombo.ComboModes.Permissions);
         LoadEnableView();
     }
     else if (e.Tab == tabRoleList)
     {
         currMode = TabTypes.RoleList;
         gdlList.DataBind(GridList.ListMode.Roles);
     }
     else if (e.Tab == tabRoleCreate)
     {
         currMode = TabTypes.RoleCreate;
     }
     else if (e.Tab == tabRoleEdit)
     {
         currMode = TabTypes.RoleEdit;
         ComboEdit.ReloadGUI(SearchCombo.ComboModes.Roles);
         LoadEditView();
     }
     else if (e.Tab == tabRolePermissions)
     {
         currMode = TabTypes.RolePermissions;
         ComboEnable.ReloadGUI(SearchCombo.ComboModes.Roles);
         LoadEnableView();
     }
     else if (e.Tab == tabRoleHiearchy)
     {
         currMode = TabTypes.RoleHierarchy;
         LoadSortList();
     }
     else if (e.Tab == tabUserList)
     {
         currMode = TabTypes.UserList;
     }
     else if (e.Tab == tabUserCreate)
     {
         currMode = TabTypes.UserCreate;
         LoadCreateView();
     }
     else if (e.Tab == tabUserEdit)
     {
         currMode = TabTypes.UserEdit;
         SearchEdit.ReloadGUI(SearchGrid.SearchModes.User);
         LoadEditView();
     }
     else if (e.Tab == tabUserResetPassword)
     {
         currMode = TabTypes.UserResetPassword;
         SearchSpecial.ReloadGUI(SearchGrid.SearchModes.User);
         LoadSpecialView();
     }
     else if (e.Tab == tabUserMultiPasswords)
     {
         currMode = TabTypes.UserMultiResetPassword;
     }
     else if (e.Tab == tabUserMultiRoles)
     {
         currMode = TabTypes.UserMultiRole;
     }
     else if (e.Tab == tabUserMultiSchools)
     {
         currMode = TabTypes.UserMultiSchool;
     }
     else if (e.Tab == tabUserRoles)
     {
         currMode = TabTypes.UserRoles;
         SearchEnable.ReloadGUI(SearchGrid.SearchModes.User);
         LoadEnableView();
     }
     else if (e.Tab == tabUserPermissions)
     {
         currMode = TabTypes.UserPermissions;
         SearchEnable.ReloadGUI(SearchGrid.SearchModes.User);
         LoadEnableView();
     }
     else if (e.Tab == tabUserSchools)
     {
         currMode = TabTypes.UserSchools;
         SearchEnable.ReloadGUI(SearchGrid.SearchModes.User);
         LoadEnableView();
     }
     else if (e.Tab == tabSchoolList)
     {
         currMode = TabTypes.SchoolList;
         gdlList.DataBind(GridList.ListMode.Schools);
     }
     else if (e.Tab == tabSchoolCreate)
     {
         currMode = TabTypes.SchoolCreate;
         LoadCreateView();
     }
     else if (e.Tab == tabSchoolEdit)
     {
         currMode = TabTypes.SchoolEdit;
         ComboEdit.ReloadGUI(SearchCombo.ComboModes.Schools);
         LoadEditView();
     }
     else if (e.Tab == tabPricingModuleList)
     {
         currMode = TabTypes.PricingModuleList;
         gdlList.DataBind(GridList.ListMode.PricingModules);
     }
     else if (e.Tab == tabPricingModuleStatus)
     {
         currMode = TabTypes.PricingModuleStatus;
         LoadEnableView();
     }
     else if (e.Tab == tabGradeList)
     {
         currMode = TabTypes.GradeList;
         gdlList.DataBind(GridList.ListMode.Grades);
     }
     else if (e.Tab == tabGradeCreate)
     {
         currMode = TabTypes.GradeCreate;
     }
     else if (e.Tab == tabGradeEdit)
     {
         currMode = TabTypes.GradeEdit;
     }
     else if (e.Tab == tabSubjectList)
     {
         currMode = TabTypes.SubjectList;
         gdlList.DataBind(GridList.ListMode.Subjects);
     }
     else if (e.Tab == tabSubjectCreate)
     {
         currMode = TabTypes.SubjectCreate;
         LoadCreateView();
     }
     else if (e.Tab == tabSubjectEdit)
     {
         currMode = TabTypes.SubjectEdit;
         ComboEdit.ReloadGUI(SearchCombo.ComboModes.Subjects);
         LoadEditView();
     }
     else if (e.Tab == tabPeriodList)
     {
         currMode = TabTypes.PeriodList;
         gdlList.DataBind(GridList.ListMode.Periods);
     }
 }
 public URLTabPlugin(string aLabel, string aTabUrl, TabTypes aTabType)
 {
     this.TabLabel = aLabel;
     this.TabUrl = aTabUrl;
     this.TabType = aTabType;
 }
Пример #30
0
 public URLTabPlugin(string aLabel, string aTabUrl, TabTypes aTabType)
 {
     this.TabLabel = aLabel;
     this.TabUrl   = aTabUrl;
     this.TabType  = aTabType;
 }
Пример #31
0
 /// <summary>
 /// Main constructor
 /// </summary>
 /// <param name="type"></param>
 public Log9KTab(TabTypes type)
 {
     TabType = type;
     Init(TabType);
 }
Пример #32
0
        private void OnTabCall(DockContent tab)
        {
            TabTypes type = (tab as ICobaltTab).TabType;

            switch (type)
            {
            case TabTypes.Logbook:
                tab.Show(dockPanel, DockState.DockBottom);
                break;

            case TabTypes.Property:
                tab.Show(dockPanel, DockState.DockRight);
                break;

            case TabTypes.IOCatalog:
                tab.Show(dockPanel, DockState.DockLeft);
                break;

            case TabTypes.PointArea:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.DatabaseConfiguration:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.RealTimeData:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.HistoricalData:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.HistoricalAlarm:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.LowerQuery:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.AlarmConfigurationLog:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.HistoricalStatistics:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.DatabaseBackup:
                tab.Show(dockPanel, DockState.Document);
                break;

            case TabTypes.MessageServiceConfiguration:
                tab.Show(dockPanel, DockState.Document);
                break;

            default:
            {
                tab.Show(dockPanel, DockState.Document);
                break;
            }
            }
        }