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

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

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

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

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

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

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

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