Esempio n. 1
0
        private void SetAttributes()
        {
            lvCurrencyList.Dock = DockStyle.Fill;

            colLN.TextAlign              = HorizontalAlignment.Center;
            colCurrencyCode.TextAlign    = HorizontalAlignment.Center;
            colCurrencyCode.ContentAlign = ExtendedHorizontalAlignment.Center;
            colCountryName.TextAlign     = HorizontalAlignment.Left;
            colCountryName.ContentAlign  = ExtendedHorizontalAlignment.Center;
            colCurrencyName.TextAlign    = HorizontalAlignment.Left;
            colCurrencyName.ContentAlign = ExtendedHorizontalAlignment.Center;
            colExchangeRate.TextAlign    = HorizontalAlignment.Right;
            colExchangeRate.ContentAlign = ExtendedHorizontalAlignment.Center;
            colCreatedOn.TextAlign       = HorizontalAlignment.Right;
            colCreatedOn.ContentAlign    = ExtendedHorizontalAlignment.Center;
            colModifiedOn.TextAlign      = HorizontalAlignment.Right;
            colModifiedOn.ContentAlign   = ExtendedHorizontalAlignment.Center;

            #region 設定 clickable Class 1 label
            lblCountryName.AutoSize = true;                         // 減少 whitespace,有字嘅位置先可以 click
            lblCountryName.Cursor   = Cursors.Hand;                 // cursor over 顯示 hand cursor
            lblCountryName.Click   += (s, e) =>                     // 彈出 wizard
            {
                var dialog = new CountryWizard();
                dialog.FormClosed += (sender, eventArgs) =>     // 關閉後 refresh 個 combo box items
                {
                    FillCountryName();
                };
                dialog.ShowDialog();
            };
            #endregion

            // 2021.01.20 paulus: 唔啱用,Euro 唔係國家
            lblCountryName.Visible = cboCountryName.Visible = colCountryName.Visible = false;
        }
Esempio n. 2
0
        private void lnkCountryName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            CountryWizard countryWizard = new CountryWizard();

            countryWizard.ShowDialog();
            FillCountryName();
            this.Update();
        }