Пример #1
0
        void UpdateStatusBar()
        {
            var text = string.Format(
                I18N.StatusBarServerCountTpl,
                GetFilteredList().Count,
                servers.GetTotalServerCount())
                       + " "
                       + string.Format(
                I18N.StatusBarTplSelectedItem,
                servers.GetTotalSelectedServerCount(),
                GetAllServersControl().Count());

            var showPager = paging[1] > 1;

            flyPanel?.Invoke((MethodInvoker) delegate
            {
                if (showPager)
                {
                    if (paging[1] != tsdbtnPager.DropDownItems.Count)
                    {
                        UpdateStatusBarPagerMenu();
                    }

                    UpdateStatusBarPagerCheckStatus();

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

                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));
        }
Пример #2
0
        void UpdateStatusBar()
        {
            var text = string.Format(
                I18N("StatusBarServerCountTpl"),
                servers.GetTotalServerCount())
                       + " "
                       + string.Format(
                I18N("StatusBarTplSelectedItem"),
                servers.GetTotalSelectedServerCount(),
                GetAllServersControl().Count());

            var showPager = paging[1] > 1;

            flyPanel?.Invoke((MethodInvoker) delegate
            {
                if (showPager)
                {
                    if (paging[1] != tsdbtnPager.DropDownItems.Count)
                    {
                        UpdateStatusBarPagerMenu();
                    }

                    UpdateStatusBarPagerCheckStatus();

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

                tsdbtnPager.Visible  = showPager;
                tslbNextPage.Visible = showPager;
                tslbPrePage.Visible  = showPager;

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