示例#1
0
        private void ChangeView(EFormView newformview)
        {
            if (CurrentFoemView == newformview) return;
            if (CurrentFoemView != EFormView.None)
            {
                if (CurrentUCView != null)
                    Controls.Remove(CurrentUCView);
            }

            UserControl newuc = null;
            IEPGView newepgview = null;

            switch (newformview)
            {
                case EFormView.None:
                    CurrentFoemView = EFormView.None;
                    return;

                case EFormView.EPG:
                    newuc = new UCEPGView();
                    newepgview = newuc as IEPGView;
                    break;

                case EFormView.EPGGrouped:
                    newuc = new UCEPGView2();
                    newepgview = newuc as IEPGView;
                    break;

                case EFormView.Scheduled:
                    newuc = new UCEPGView3();
                    newepgview = newuc as IEPGView;
                    break;

                case EFormView.EditGroups:
                    newuc = new UCEditGroups();
                    newepgview = newuc as IEPGView;
                    break;

                case EFormView.EditSources:
                    newuc = new UCSourceEditor();
                    newepgview = newuc as IEPGView;
                    break;

                case EFormView.Search:
                    newuc = new UCSearch();
                    newepgview = newuc as IEPGView;
                    break;
                case EFormView.TagedTitles:
                    newuc = new UCTagedTitles();
                    newepgview = newuc as IEPGView;
                    break;
            }

            CurrentUCView = newuc;
            CurrentEPGView = newepgview;
            Controls.Add(CurrentUCView);
            CurrentUCView.Dock = DockStyle.Fill;
            CurrentUCView.BringToFront();
            CurrentEPGView.RefreshData();
        }
示例#2
0
        private void ChangeView(EFormView newformview)
        {
            if (CurrentFoemView == newformview)
            {
                return;
            }
            if (CurrentFoemView != EFormView.None)
            {
                if (CurrentUCView != null)
                {
                    Controls.Remove(CurrentUCView);
                }
            }

            UserControl newuc      = null;
            IEPGView    newepgview = null;

            switch (newformview)
            {
            case EFormView.None:
                CurrentFoemView = EFormView.None;
                return;

            case EFormView.EPG:
                newuc      = new UCEPGView();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.EPGGrouped:
                newuc      = new UCEPGView2();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.Scheduled:
                newuc      = new UCEPGView3();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.EditGroups:
                newuc      = new UCEditGroups();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.EditSources:
                newuc      = new UCSourceEditor();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.Search:
                newuc      = new UCSearch();
                newepgview = newuc as IEPGView;
                break;

            case EFormView.TagedTitles:
                newuc      = new UCTagedTitles();
                newepgview = newuc as IEPGView;
                break;
            }

            CurrentUCView  = newuc;
            CurrentEPGView = newepgview;
            Controls.Add(CurrentUCView);
            CurrentUCView.Dock = DockStyle.Fill;
            CurrentUCView.BringToFront();
            CurrentEPGView.RefreshData();
            ApplyColorThemeA(newuc);
        }