Esempio n. 1
0
        public void Translate()
        {
            if (b0 == null)
            {
                return;
            }

            try
            {
                b0.Text        = UILocalize.Prev;
                b16.Text       = UILocalize.Next;
                btnSelect.Text = UILocalize.SelectTitle;

                SizeF sf = b0.CreateGraphics().MeasureString(b0.Text, b0.Font);
                b0.Width = b0.SymbolSize + (int)sf.Width + 10;

                sf        = b16.CreateGraphics().MeasureString(b16.Text, b0.Font);
                b16.Width = b16.SymbolSize + (int)sf.Width + 10;

                btnSelect.Width = (int)btnSelect.CreateGraphics().MeasureString(btnSelect.Text, btnSelect.Font).Width + 16;

                uiLabel1.Text  = UILocalize.SelectPageLeft;
                uiLabel2.Text  = UILocalize.SelectPageRight;
                edtPage.Left   = uiLabel1.Right + 3;
                uiLabel2.Left  = edtPage.Right + 3;
                btnSelect.Left = uiLabel2.Right + 3;
                p1.Width       = btnSelect.Right + 3;

                SetShowButtons();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Esempio n. 2
0
        public void Translate()
        {
            b0.Text        = UILocalize.Prev;
            b16.Text       = UILocalize.Next;
            btnSelect.Text = UILocalize.SelectTitle;

            SizeF sf = b0.CreateGraphics().MeasureString(b0.Text, b0.Font);

            b0.Width = b0.SymbolSize + (int)sf.Width + 10;

            sf        = b16.CreateGraphics().MeasureString(b16.Text, b16.Font);
            b16.Width = b16.SymbolSize + (int)sf.Width + 10;

            btnSelect.Width = (int)btnSelect.CreateGraphics().MeasureString(btnSelect.Text, btnSelect.Font).Width + 16;

            uiLabel1.Text  = UILocalize.SelectPageLeft;
            uiLabel2.Text  = UILocalize.SelectPageRight;
            edtPage.Left   = uiLabel1.Right + 3;
            uiLabel2.Left  = edtPage.Right + 3;
            btnSelect.Left = uiLabel2.Right + 3;
            p1.Width       = btnSelect.Right + 3;
            SetShowButtons();
        }