示例#1
0
    public void DrawIcons(TabName tabName, int page)
    {
        int startIndex = --page * 8;

        switch (tabName)
        {
        case TabName.BootsTab:
            for (int i = 0; i < 8; i++, startIndex++)
            {
                if (startIndex >= playerBoots.Count)
                {
                    break;
                }
                itemCellIcons[i].GetComponent <SpriteRenderer>().sprite = playerBoots[startIndex].Sprite;
            }
            break;

        case TabName.CuirassTab:
            break;

        case TabName.GlovesTab:
            break;

        case TabName.PotionTab:
            break;

        case TabName.WeaponTab:
            break;
        }
    }
示例#2
0
        public void SaveSelectedTabToSettings(TabName t)
        {
            //save last tab
            var tab = t.ToString();

            LauncherSettings.SetValue(LauncherSettings.LAUNCHER_TAB, tab);
        }
示例#3
0
        public List <DataModel> GetListObjByLesson(TabName tabname, LessonModel lesson, bool isOnlyHard = false, bool isGetAll = false)
        {
            List <DataModel>  result     = new List <DataModel>();
            List <DataEntity> listEntity = CommonDAO.GetDataByLesson(tabname, lesson.LessonName);

            foreach (DataEntity entity in listEntity)
            {
                DataModel model = CommonUtils.MappingData <DataModel>(entity);
                model.IsHard = !string.IsNullOrEmpty(entity.Hard);
                model.IsLock = !string.IsNullOrEmpty(entity.Lock);

                if (isGetAll)
                {
                    result.Add(model);
                }
                else if (isOnlyHard)
                {
                    if (model.IsHard)
                    {
                        result.Add(model);
                    }
                }
                else if (!model.IsLock)
                {
                    result.Add(model);
                }
            }

            return(result);
        }
        public PageName GetTabPageName(TabName tab)
        {
            switch (tab)
            {
            case TabName.Revenue:
            case TabName.Spending:
                return(PageName.Summary);

            case TabName.Order:
            case TabName.PaidOrder:
            case TabName.ExportedOrder:
            case TabName.CompletedOrder:
            case TabName.CanceledOrder:
                return(PageName.Order);

            case TabName.ImportOrder:
            case TabName.WaitingImportOrd:
            case TabName.ImportedOrd:
            case TabName.CanceledImportOrd:
            case TabName.Stock:
            case TabName.Warehouse:
                return(PageName.Inventory);

            case TabName.Product:
            case TabName.Category:
            case TabName.Supplier:
                return(PageName.Product);

            case TabName.Account:
            default:
                return(PageName.Admin);
            }
        }
示例#5
0
        /// <summary>
        /// DataSet转换成List
        /// </summary>
        /// <typeparam name="T">转换类型</typeparam>
        /// <param name="dataSet">数据源</param>
        /// <param name="tableIndex">需要转换表的索引</param>
        /// <returns></returns>
        public List <TabName> DataSetToList <T>(DataSet dataSet, int tableIndex)
        {
            //确认参数有效
            if (dataSet == null || dataSet.Tables.Count <= 0 || tableIndex < 0)
            {
                return(null);
            }

            DataTable dt = dataSet.Tables[tableIndex];

            List <TabName> list = new List <TabName>();


            for (int i = 0; i < dt.Rows.Count; i++)
            {
                TabName tabName_cache = new TabName();
                tabName_cache.student_name    = dt.Rows[i][0].ToString();
                tabName_cache.student_id      = dt.Rows[i][1].ToString();
                tabName_cache.student_phone   = dt.Rows[i][2].ToString();
                tabName_cache.student_email   = dt.Rows[i][3].ToString();
                tabName_cache.student_github  = dt.Rows[i][4].ToString();
                tabName_cache.student_remarks = dt.Rows[i][5].ToString();
                list.Add(tabName_cache);
            }
            return(list);
        }
示例#6
0
 private void Ctrl_IO_List_View_Load(object sender, EventArgs e)
 {
     if (TabName != "")
     {
         strTabNames = TabName.Split(';');
     }
 }
示例#7
0
        /// <summary>
        /// Show or hide the specified TabName
        /// </summary>
        /// <param name="tabName"></param>
        /// <param name="isVisible"></param>
        public void ShowTab(TabName tabName, bool isVisible)
        {
            // the TabPage does not have a Visible property; therefore, we need
            // to permanently remove it from the TabControl.  Because of this,
            // we will maintain a list of tabs with 'tabPages' to add them back
            // to the control later.
            if (!isVisible)
            {
                foreach (TabPage item in tabControl1.TabPages)
                {
                    if (tabName != (TabName)item.Tag)
                    {
                        continue;
                    }

                    tabControl1.TabPages.Remove(item);
                    break;
                }
            }
            else
            {
                foreach (TabPage item in tabPages)
                {
                    if (tabName != (TabName)item.Tag)
                    {
                        continue;
                    }

                    tabControl1.TabPages.Add(item);
                    break;
                }
            }
        }
示例#8
0
        private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
        {
            try
            {
                TabName tab = (TabName)e.TabPage.Tag;

                switch (tab)
                {
                case TabName.QueryAnalyzer:
                    // query analyzer command(s) may create new instance of DataSet:
                    // 1) clear;
                    if (queryAnalyzer1.DataSource != null)
                    {
                        ds = queryAnalyzer1.DataSource;
                    }
                    break;

                default:
                    // nothing special need to do ...
                    break;
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }
            finally
            {
            }
        }
示例#9
0
    // Update is called once per frame
    void Update()
    {
        if (m_isStart && m_isPanelOpen)
        {
            if (s_lastActiveTab == _activeTab)
            {
                return;
            }

            if (_activeTab == TabName.TAB_NAME_CHARGE)
            {
                this.transform.FindChild("Charge/ButtonCharge").GetComponent <UIToggle>().value = true;
                ActiveTab((int)TabName.TAB_NAME_CHARGE);
            }
            else if (_activeTab == TabName.TAB_NAME_MALL)
            {
                this.transform.FindChild("Mall/ButtonMall").GetComponent <UIToggle>().value = true;
                ActiveTab((int)TabName.TAB_NAME_MALL);
            }
            else if (_activeTab == TabName.TAB_NAME_VIP)
            {
                this.transform.FindChild("VIP/Button").GetComponent <UIToggle>().value = true;
                ActiveTab((int)TabName.TAB_NAME_VIP);
            }

            s_lastActiveTab = _activeTab;
        }
    }
示例#10
0
        public IViewComponentResult Invoke(int meetingId, TabName tabName, bool isCreateMode)
        {
            var vm = new MeetingTabsViewModel {
                MeetingId = meetingId, SelectedTab = tabName, IsCreateMode = isCreateMode
            };

            return(View(vm));
        }
示例#11
0
      string ApplyBranchPermissions(DataTable dtObj)
      {
          if (!(bool)dtObj.Rows[0]["ByBranch"])
          {
              return("");
          }

          string SQL;
          string TabName;
          int    FldIndex;

          SQL = ("SELECT BranchCode FROM UserRights WHERE UserName='******' AND ObjectID=" + (_ReportID + " AND CanRun=1"))));
          SqlDataAdapter daBrns = new SqlDataAdapter(SQL, DataTools.GetConnectionStr());
          DataTable      dtBrns = new DataTable();

          daBrns.Fill(dtBrns);
          string Brns = "";

          foreach (DataRow dtr in dtBrns.Rows)
          {
              Brns = (Brns + ("'" + (dtr[0] + "',")));
          }

          if ((Brns != ""))
          {
              Brns = Brns.Substring(0, (Brns.Length - 1));
          }

          FldIndex = DataTools.GetStrSerial(DataTools.ReadField(dtObj.Rows[0]["CriteriaFields"]), "BranchCode");
          if ((FldIndex == -1))
          {
              TabName = "";
          }
          else
          {
              TabName = DataTools.GetStrPart(DataTools.ReadField(dtObj.Rows[0]["CriteriaFieldsTables"]), FldIndex);
          }

          if ((TabName.Substring(0, 1) == "@"))
          {
              if ((TabName == "@"))
              {
                  TabName = ("@" + DataTools.ReadField(dtObj.Rows[0]["Source"]));
              }

              SQL = ("({" + (TabName.Substring(1) + ".BranchCode} IN ["));
              SQL = (SQL + (Brns.Replace("'", "\"") + "])"));
          }
          else
          {
              SQL = ("((" + (((TabName == "") ? "BranchCode" : (TabName + ".BranchCode")) + (" IN (" + (Brns + ")))"))));
          }

          return(SQL);
      }
示例#12
0
 public static List <DataEntity> GetWasLearned(TabName tabname)
 {
     if (tabname == TabName.Kanji)
     {
         return(_listData.Where(x => (!string.IsNullOrEmpty(x.LastLearn) && x.Type.Equals("KJ"))).ToList());
     }
     else
     {
         return(_listData.Where(x => (!string.IsNullOrEmpty(x.LastLearn) && x.Type.Equals("TV"))).ToList());
     }
 }
示例#13
0
 public static List <DataEntity> GetDataByLesson(TabName tabname, string lesson = "")
 {
     if (tabname == TabName.Kanji)
     {
         return(_listData.Where(x => x.Lesson.Equals(lesson) && x.Type.Equals("KJ")).ToList());
     }
     else
     {
         return(_listData.Where(x => x.Lesson.Equals(lesson) && x.Type.Equals("TV")).ToList());
     }
 }
示例#14
0
 public static List <DataEntity> GetAllEntity(TabName tabname)
 {
     if (tabname == TabName.Kanji)
     {
         return(_listData.Where(x => x.Type.Equals("KJ")).ToList());
     }
     else
     {
         return(_listData.Where(x => x.Type.Equals("TV")).ToList());
     }
 }
示例#15
0
 public static List <LessonModel> GetListLesson(TabName tabname)
 {
     if (tabname == TabName.Kanji)
     {
         return(_listLesson.Where(x => x.Type.Equals("KJ")).ToList());
     }
     else
     {
         return(_listLesson.Where(x => x.Type.Equals("TV")).ToList());
     }
 }
示例#16
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            try
            {
                FormUtil.Busy(this, true);

                TabName tab = (TabName)e.TabPage.Tag;
                switch (tab)
                {
                case TabName.DataSet:
                    //if (simpleDataSetViewer1.DataSource == null)
                    simpleDataSetViewer1.DataSource = ds;
                    tabControl1.SelectedTab.Text    = tab + " - " + simpleDataSetViewer1.Count;
                    break;

                case TabName.Metadata:
                    //if (simpleMetaDataViewer1.DataSource == null)
                    simpleMetaDataViewer1.DataSource = ds;
                    tabControl1.SelectedTab.Text     = tab + " - " + simpleMetaDataViewer1.Count;
                    break;

                case TabName.Relation:
                    //if (simpleDataRelationViewer1.DataSource == null)
                    simpleDataRelationViewer1.DataSource = ds;
                    tabControl1.SelectedTab.Text         = tab + " - " + simpleDataRelationViewer1.Count;
                    break;

                case TabName.XML:
                    //if (simpleXMLViewer1.DataSource == null)
                    simpleXMLViewer1.DataSource = ds;
                    break;

                case TabName.QueryAnalyzer:
                    //if (queryAnalyzer1.DataSource == null)
                    queryAnalyzer1.DataSource = ds;
                    break;

                default:
                    throw new ArgumentOutOfRangeException("tab=" + tab);
                }
            }
            catch (Exception ex)
            {
                FormUtil.WinException(ex);
            }
            finally
            {
                FormUtil.Busy(this, false);
            }
        }
示例#17
0
        private void TabControl_SelectionChanged(object sender, object e)
        {
            TabItem tab = (TabItem)tabControl.SelectedItem;

            if (tab.Name.Equals("tabKanji"))
            {
                tabName = TabName.Kanji;
            }
            else
            {
                tabName = TabName.Kotoba;
            }
            initCheckMemo();
        }
示例#18
0
        public ObservableCollection <LessonModel> GetListLesson(TabName tabname)
        {
            ObservableCollection <LessonModel> result = null;

            result = new ObservableCollection <LessonModel>(CommonDAO.GetListLesson(tabname));
            foreach (LessonModel lesson in result)
            {
                if (string.IsNullOrEmpty(lesson.LastLearning))
                {
                    lesson.IsSelected = true;
                    break;
                }
            }
            return(result);
        }
示例#19
0
        //public void UpdateLastLearning(TabName tabName, ObservableCollection<LessonModel> lessonList)
        //{
        //    List<LessonModel> data = new List<LessonModel>(lessonList);
        //}

        public void SaveListHard(TabName tabName, ObservableCollection <DataModel> objList)
        {
            if (tabName == TabName.Kanji)
            {
                List <DataEntity> data = new List <DataEntity>();
                foreach (DataModel model in objList)
                {
                    DataEntity entity = new DataEntity()
                    {
                        Id = model.Id, Hard = model.IsHard ? "1" : string.Empty, Lock = model.IsLock ? "1" : string.Empty
                    };
                    data.Add(entity);
                }
                CommonDAO.UpdateDataIsHardAndLock(data);
            }
        }
示例#20
0
        private async void groupButton_Tapped(object sender, TappedRoutedEventArgs e)
        {
            ContentDialog content_dialog = new ContentDialog()
            {
                Title               = "删除",
                Content             = "确认删除这条数据?",
                PrimaryButtonText   = "确定",
                SecondaryButtonText = "取消",
                FullSizeDesired     = false,
            };

            content_dialog.PrimaryButtonClick += (_s, _e) => { };

            ContentDialogResult dialogResult = await content_dialog.ShowAsync();

            if (dialogResult == ContentDialogResult.Primary)
            {
                TabName tabName = dataGrid.SelectedItem as TabName;

                MySQL_Helper mysqlConnector = new MySQL_Helper();

                mysqlConnector.setConnection("root", "root", "windows_programmng");
                string condition = "学号='" + tabName.student_id.ToString() + "';";
                int    x         = mysqlConnector.deleteSql("studentinfo", condition);
                if (x == 1)
                {
                    // 删除成功后更新数据
                    DataSet        ds    = mysqlConnector.Query("studentinfo");
                    List <TabName> mlist = DataSetToList <TabName>(ds, 0);
                    dataGrid.ItemsSource = mlist;
                }
                else
                {
                    ContentDialog deleteFailed = new ContentDialog()
                    {
                        Title             = "删除失败",
                        Content           = "出现未知错误,请在控制台查看错误信息。",
                        PrimaryButtonText = "确定",
                        FullSizeDesired   = false,
                    };

                    deleteFailed.PrimaryButtonClick += (_s, _e) => { };
                    await deleteFailed.ShowAsync();
                }
            }
        }
示例#21
0
        public void SwitchToTab(TabName tab)
        {
            object select = null;

            switch (tab)
            {
            case TabName.About:
                select = About;
                break;

            case TabName.Settings:
                select = Settings;
                break;
            }
            if (select != null)
            {
                Tabs.SelectedValue = select;
            }
        }
示例#22
0
        /// <summary>
        /// 设置活动tab页
        /// </summary>
        /// <param name="tabName"></param>
        public void SetActiveTab(TabName tabName)
        {
            Control[] controls = tabControl1.Controls.Find(tabName.ToString(), false);
            tabControl1.SelectedIndex = controls[0].TabIndex;
            switch (tabName)
            {
            case TabName.BasicIndicatorOne:
                basicIndicatorOne.DataRefresh();
                break;

            case TabName.BasicIndicatorTwo:
                basicIndicatorTwo.DataRefresh();
                break;

            case TabName.BasicIndicatorThree:
                basicIndicatorThree.DataRefresh();
                break;

            case TabName.BasicIndicatorFour:
                basicIndicatorFour.DataRefresh();
                break;

            case TabName.EvalutationData:
                break;

            case TabName.HistoryEvalutation:
                historyEvalutation.UserRefresh();
                break;

            case TabName.DataStatistics:
                dataStatistics.TimeCycleRefresh();
                break;

            case TabName.SingleStatistics:
                singleStatistics.TimeCycleRefresh();
                break;

            case TabName.UserStatistics:
                userStatistics.TimeCycleRefresh();
                break;
            }
        }
示例#23
0
        public void ReloadPrevTabFromSettings()
        {
            //Restores the last opened tab
            string lastTab = LauncherSettings.GetValue(LauncherSettings.LAUNCHER_TAB);

            TabName tab = TabName.WELCOME;

            if (lastTab != null)
            {
                try
                {
                    tab = (TabName)Enum.Parse(typeof(TabName), lastTab);
                }
                catch (Exception ex)
                {
                    //MessageBox.Show(ex.ToString());
                }
            }

            SelectTab(tab);
        }
示例#24
0
        public MenuTab(int x, int y, int width, int height, TabName name, List <SObject> items) : base(x, y, width, height, true)
        {
            Name             = name;
            HoverText        = "";
            currentItemIndex = 0;
            Items            = new List <MenuTabItem>();
            foreach (SObject obj in items)
            {
                Items.Add(new MenuTabItem(obj));
            }

            ViewableItems = new List <ClickableComponent>();

            Initialize();

            upArrow         = new ClickableTextureComponent(new Rectangle(xPositionOnScreen + width + Game1.tileSize / 4, yPositionOnScreen + Game1.tileSize, 11 * Game1.pixelZoom, 12 * Game1.pixelZoom), Game1.mouseCursors, new Rectangle(421, 459, 11, 12), Game1.pixelZoom, false);
            downArrow       = new ClickableTextureComponent(new Rectangle(xPositionOnScreen + width + Game1.tileSize / 4, yPositionOnScreen + height - Game1.tileSize, 11 * Game1.pixelZoom, 12 * Game1.pixelZoom), Game1.mouseCursors, new Rectangle(421, 472, 11, 12), Game1.pixelZoom, false);
            scrollBar       = new ClickableTextureComponent(new Rectangle(upArrow.bounds.X + Game1.pixelZoom * 3, upArrow.bounds.Y + upArrow.bounds.Height + Game1.pixelZoom, 6 * Game1.pixelZoom, 10 * Game1.pixelZoom), Game1.mouseCursors, new Rectangle(435, 463, 6, 10), Game1.pixelZoom, false);
            scrollBarRunner = new Rectangle(scrollBar.bounds.X, upArrow.bounds.Y + upArrow.bounds.Height + Game1.pixelZoom, scrollBar.bounds.Width, height - Game1.tileSize * 2 - upArrow.bounds.Height - Game1.pixelZoom * 2);
            headerBounds    = new Point(xPositionOnScreen + Game1.tileSize / 4, yPositionOnScreen + Game1.tileSize * 5 / 4 + Game1.pixelZoom);

            header = new OptionsElement(TabNameToString());
        }
示例#25
0
    public void SwitchTab(TabName tabName)
    {
        int pages = 0;

        switch (tabName)
        {
        case TabName.WeaponTab:
            pages = (playerWeapons.Count % 8 > 0) ? (playerWeapons.Count / 8) + 1 : playerWeapons.Count / 8;
            break;

        case TabName.CuirassTab:
            pages = (playerCuirasses.Count % 8 > 0) ? (playerCuirasses.Count / 8) + 1 : playerCuirasses.Count / 8;
            break;

        case TabName.BootsTab:
            pages = (playerBoots.Count % 8 > 0) ? (playerBoots.Count / 8) + 1 : playerBoots.Count / 8;
            break;

        case TabName.GlovesTab:
            pages = (playerGloves.Count % 8 > 0) ? (playerGloves.Count / 8) + 1 : playerGloves.Count / 8;
            break;

        case TabName.PotionTab:
            pages = (playerPotions.Count % 8 > 0) ? (playerPotions.Count / 8) + 1 : playerPotions.Count / 8;
            break;
        }
        currentPage = 1;
        currentPageText.GetComponent <Text>().text = currentPage.ToString() + "/" + pages.ToString();

        buttonPrevious.SetActive(false);
        if (pages == 1)
        {
            buttonNext.SetActive(false);
        }

        DrawIcons(tabName, 1);
    }
        public string GetSortLink(bool renderAllTabs)
        {
            var tabCssName = String.IsNullOrEmpty(TabAnchorName)
                                 ? (IsSelected ? "viewSwitcherTabSelected" : "viewSwitcherTab")
                                 : String.Format("{0} viewSwitcherTab_{1}",
                                                 IsSelected ? "viewSwitcherTabSelected" : "viewSwitcherTab",
                                                 TabAnchorName);

            var javascriptText = string.Format(@" onclick=""{0} {1} viewSwitcherToggleTabs(this.id);"" ",
                                               String.IsNullOrEmpty(OnClickText) ? String.Empty : OnClickText + ";",
                                               renderAllTabs && !String.IsNullOrEmpty(TabAnchorName)
                                                   ? String.Format("ASC.Controls.AnchorController.move('{0}');", TabAnchorName)
                                                   : "");

            var sb = new StringBuilder();

            sb.AppendFormat(@"<li id='{0}_ViewSwitcherTab' class='{1}' {2}>{3}</li>", DivID, tabCssName, javascriptText, TabName.HtmlEncode());
            return(sb.ToString());
        }
 public void SwitchToTab(TabName tab)
 {
     object select = null;
     switch (tab)
     {
         case TabName.About:
             select = About;
             break;
         case TabName.Settings:
             select = Settings;
             break;
     }
     if (select != null)
         Tabs.SelectedValue = select;
 }
示例#28
0
    protected void LaunchPopup(Dictionary <string, string> oContext)
    {
        TabName.ucCaption     = RS.Resources.CodeMap_TabName;
        FldName.ucCaption     = RS.Resources.CodeMap_FldName;
        Value.ucCaption       = RS.Resources.CodeMap_Value;
        Description.ucCaption = RS.Resources.CodeMap_Description;
        Remark.ucCaption      = RS.Resources.CodeMap_Remark;

        TabName.ucIsRequire     = true;
        FldName.ucIsRequire     = true;
        Value.ucIsRequire       = true;
        Description.ucIsRequire = true;

        TabName.ucIsReadOnly   = false;
        FldName.ucIsReadOnly   = false;
        Value.ucIsReadOnly     = false;
        TabName.ucTextData     = "";
        FldName.ucTextData     = "";
        Value.ucTextData       = "";
        Description.ucTextData = "";
        Remark.ucTextData      = "";

        if (!string.IsNullOrEmpty(oContext["DataKeys"]))
        {
            DbHelper      db = new DbHelper(_DBName);
            CommandHelper sb = db.CreateCommandHelper();
            sb.Reset();
            sb.AppendStatement(string.Format(_MainQrySQL, _TableName));
            sb.Append(" And TabName = ").AppendParameter("TabName", oContext["DataKeys"].Split(',')[0]);
            sb.Append(" And FldName = ").AppendParameter("FldName", oContext["DataKeys"].Split(',')[1]);
            sb.Append(" And Value   = ").AppendParameter("Value", oContext["DataKeys"].Split(',')[2]);
            DataRow dr = db.ExecuteDataSet(sb.BuildCommand()).Tables[0].Rows[0];

            TabName.ucTextData     = dr["TabName"].ToString();
            FldName.ucTextData     = dr["FldName"].ToString();
            Value.ucTextData       = dr["Value"].ToString();
            Description.ucTextData = dr["Description"].ToString();
            Remark.ucTextData      = dr["Remark"].ToString();

            TabName.ucIsReadOnly = (oContext["Mode"] != "Copy") ? true : false;
            FldName.ucIsReadOnly = (oContext["Mode"] != "Copy") ? true : false;
            Value.ucIsReadOnly   = (oContext["Mode"] != "Copy") ? true : false;

            if (!string.IsNullOrEmpty(_TabName))
            {
                TabName.ucTextData   = _TabName;
                TabName.ucIsReadOnly = true;
            }

            if (!string.IsNullOrEmpty(_FldName))
            {
                FldName.ucTextData   = _FldName;
                FldName.ucIsReadOnly = true;
            }
        }
        else
        {
            if (!string.IsNullOrEmpty(_TabName))
            {
                TabName.ucTextData   = _TabName;
                TabName.ucIsReadOnly = true;
            }

            if (!string.IsNullOrEmpty(_FldName))
            {
                FldName.ucTextData   = _FldName;
                FldName.ucIsReadOnly = true;
            }
        }

        TabName.Refresh();
        FldName.Refresh();
        Value.Refresh();

        ucModalPopup1.Reset();
        ucModalPopup1.ucPopupWidth  = 580;
        ucModalPopup1.ucPopupHeight = 320;
        ucModalPopup1.ucContextData = Util.getJSON(oContext);
        ucModalPopup1.ucPanelID     = pnlEdit.ID;
        ucModalPopup1.Show();
    }
示例#29
0
        public void SelectTab(TabName tab)
        {
            //performs aestethic changes and anchors form into panel

            btnWelcome.BackColor = UnselectedButtonColor;
            btnInstall.BackColor = UnselectedButtonColor;
            btnPatch.BackColor   = UnselectedButtonColor;
            btnLaunch.BackColor  = UnselectedButtonColor;

            Form f = null;

            switch (tab)
            {
            case TabName.WELCOME:
            {
                SelectedTab          = TabName.WELCOME;
                btnWelcome.BackColor = SelectedButtonColor;

                if (wform == null)
                {
                    wform = new WelcomeForm();
                }

                f = wform;

                break;
            }

            case TabName.INSTALL:
            {
                SelectedTab          = TabName.INSTALL;
                btnInstall.BackColor = SelectedButtonColor;

                if (iform == null)
                {
                    iform = new InstallForm();
                }

                f = iform;

                break;
            }

            case TabName.PATCH:
            {
                SelectedTab        = TabName.PATCH;
                btnPatch.BackColor = SelectedButtonColor;

                if (pform == null)
                {
                    pform = new PatchForm();
                }

                f = pform;

                break;
            }

            case TabName.LAUNCH:
            {
                SelectedTab         = TabName.LAUNCH;
                btnLaunch.BackColor = SelectedButtonColor;

                if (lform == null)
                {
                    lform = new LaunchForm();
                }

                f = lform;

                break;
            }
            }

            SendFormToPanel(f);
            SaveSelectedTabToSettings(tab);
        }
示例#30
0
 public void ActiveTab(TabName activeTab)
 {
     _activeTab = activeTab;
 }
示例#31
0
 private int GetTabPosition(TabName name)
 {
     return((int)name + 1);
 }