예제 #1
0
 private void UpdateBanner()
 {
     if (mBannerImage != null)
     {
         BannerFactory.UpdateBanner(this, mBanner, mBannerImage, PwDefs.ProductName, Resources.BannerText, ref mBannerWidth);
     }
 }
예제 #2
0
        private void RecreateResizableWindowControls()
        {
            string strTitle = KPRes.PickCharacters;

            if (m_uCharCount > 0)
            {
                strTitle += " (" + m_uCharCount.ToString() + ")";
            }

            BannerFactory.UpdateBanner(this, m_bannerImage,
                                       Properties.Resources.B48x48_KGPG_Key2, strTitle,
                                       KPRes.PickCharactersDesc, ref m_nBannerWidth);

            RemoveAllCharButtons();

            bool bRtl = (this.RightToLeft == RightToLeft.Yes);

            string strWord = ((m_psWord != null) ? m_psWord.ReadString() : string.Empty);

            if (strWord.Length >= 1)
            {
                int x = 0;
                int nPnlWidth = m_pnlSelect.Width, nPnlHeight = m_pnlSelect.Height;
                for (int i = 0; i < strWord.Length; ++i)
                {
                    int w = ((nPnlWidth * (i + 1)) / strWord.Length) - x;

                    int rx = (bRtl ? (nPnlWidth - x - w) : x);

                    Button btn = new Button();
                    btn.Location = new Point(rx, 0);
                    btn.Size     = new Size(w, nPnlHeight / 2 - 1);
                    btn.Font     = m_fontChars;
                    btn.Tag      = strWord[i];
                    btn.Click   += this.OnSelectCharacter;

                    m_lButtons.Add(btn);
                    m_pnlSelect.Controls.Add(btn);

                    Label lbl = new Label();
                    lbl.Text      = (i + 1).ToString();
                    lbl.TextAlign = ContentAlignment.MiddleCenter;
                    lbl.Location  = new Point(rx - 1, nPnlHeight / 2);
                    lbl.Size      = new Size(w + 2, nPnlHeight / 2 - 3);

                    m_lLabels.Add(lbl);
                    m_pnlSelect.Controls.Add(lbl);

                    x += w;
                }
            }

            OnHideCharsCheckedChanged(null, EventArgs.Empty);
        }
예제 #3
0
        private void ProcessResize()
        {
            if (m_lCtxs == null)
            {
                return;                             // TrlUtil or design mode
            }
            string strSub = KPRes.AutoTypeEntrySelectionDescShort;
            int    n      = m_lCtxs.Count;

            if (n == 1)
            {
                strSub = KPRes.SearchEntriesFound1 + ".";
            }
            else if (n <= 0)
            {
                strSub = KPRes.SearchEntriesFound + ".";
                strSub = strSub.Replace(@"{PARAM}", "0");
            }

            BannerFactory.UpdateBanner(this, m_bannerImage,
                                       Properties.Resources.B48x48_KGPG_Key2, KPRes.AutoTypeEntrySelection,
                                       strSub, ref m_nBannerWidth);
        }
예제 #4
0
 private void ProcessResize()
 {
     BannerFactory.UpdateBanner(this, m_bannerImage,
                                Properties.Resources.B48x48_KGPG_Key2, KPRes.AutoTypeEntrySelection,
                                KPRes.AutoTypeEntrySelectionDescShort, ref m_nBannerWidth);
 }