Example #1
0
        void UpdateStatusBar()
        {
            var text = string.Format(
                I18N.StatusBarServerCountTpl,
                GetFilteredList().Count,
                servers.CountAllServers())
                       + " "
                       + string.Format(
                I18N.StatusBarTplSelectedItem,
                servers.CountSelectedServers(),
                GetAllServersControl().Count());

            var showPager = paging[1] > 1;

            VgcApis.Libs.UI.RunInUiThread(formMain, () =>
            {
                if (showPager)
                {
                    if (paging[1] != tsdbtnPager.DropDownItems.Count)
                    {
                        UpdateStatusBarPagerMenu();
                    }

                    UpdateStatusBarPagerCheckStatus();

                    tsdbtnPager.Text = string.Format(
                        I18N.StatusBarPagerInfoTpl,
                        paging[0] + 1,
                        paging[1]);

                    formMain.Focus();
                }

                if (tsdbtnPager.Visible != showPager)
                {
                    tsdbtnPager.Visible  = showPager;
                    tslbNextPage.Visible = showPager;
                    tslbPrePage.Visible  = showPager;
                }

                if (text != tslbTotal.Text)
                {
                    tslbTotal.Text = text;
                }
            });

            LoopThroughAllServerUI(sui => sui.SetKeywords(searchKeywords));
        }