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

            #region 設定 clickable Terms label
            lblTerms.AutoSize = true;                         // 減少 whitespace,有字嘅位置先可以 click
            lblTerms.Cursor   = Cursors.Hand;                 // cursor over 顯示 hand cursor
            lblTerms.Click   += (s, e) =>                     // 彈出 wizard
            {
                var dialog = new SupplierTermsWizard();
                dialog.FormClosed += (sender, eventArgs) =>     // 關閉後 refresh 個 combo box items
                {
                    FillTermsList();
                };
                dialog.ShowDialog();
            };
            #endregion
        }
示例#2
0
        private void SetAttributes()
        {
            #region ListView Column Style
            lvPosTenderTypeList.Dock = DockStyle.Fill;

            colLN.TextAlign = HorizontalAlignment.Center;
            //colParentDept.TextAlign = HorizontalAlignment.Left;
            //colParentDept.ContentAlign = ExtendedHorizontalAlignment.Center;
            colTypeCode.TextAlign        = HorizontalAlignment.Left;
            colTypeCode.ContentAlign     = ExtendedHorizontalAlignment.Center;
            colTypeName.TextAlign        = HorizontalAlignment.Left;
            colTypeName.ContentAlign     = ExtendedHorizontalAlignment.Center;
            colTypeNameAlt1.TextAlign    = HorizontalAlignment.Left;
            colTypeNameAlt1.ContentAlign = ExtendedHorizontalAlignment.Center;
            colTypeNameAlt2.TextAlign    = HorizontalAlignment.Left;
            colTypeNameAlt2.ContentAlign = ExtendedHorizontalAlignment.Center;
            #endregion

            #region show/ hide alt1 alt2
            switch (LanguageHelper.AlternateLanguagesUsed)
            {
            case 1:
                // hide alt2
                lblTypeNameAlt2.Visible = txtTypeNameAlt2.Visible = false;
                colTypeNameAlt2.Visible = false;
                // push parent dept. up
                //lblProvince.Location = new Point(lblProvince.Location.X, lblCityNameAlt1.Location.Y);
                //cboProvince.Location = new Point(cboProvince.Location.X, txtCityNameAlt2.Location.Y);
                break;

            case 2:
                // do nothing
                break;

            case 0:
            default:
                // hide alt1 & alt2
                lblTypeNameAlt1.Visible = lblTypeNameAlt2.Visible = txtTypeNameAlt1.Visible = txtTypeNameAlt2.Visible = false;
                colTypeNameAlt1.Visible = colTypeNameAlt2.Visible = false;
                // push parent dept up
                //lblProvince.Location = new Point(lblProvince.Location.X, lblCityNameAlt1.Location.Y);
                //cboProvince.Location = new Point(cboProvince.Location.X, txtCityNameAlt1.Location.Y);
                break;
            }
            #endregion

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