Example #1
0
        private void SetAttributes()
        {
            cboFromShop.AutoCompleteMode  = AutoCompleteMode.Append;
            cboToShop.AutoCompleteMode    = AutoCompleteMode.Append;
            cboFromGrade.AutoCompleteMode = AutoCompleteMode.Append;
            cboToGrade.AutoCompleteMode   = AutoCompleteMode.Append;

            string[] orderBy      = new string[] { "Priority" };
            var      smartTagList = SmartTag4MemberEx.GetListOrderBy(orderBy, true);

            SmartTagHelper oTag = new SmartTagHelper(this.gbxOptions);

            oTag.MemberSmartTagList = smartTagList;
            oTag.SetSmartTags();

            #region 設定 clickable saluation label
            lblSmartTag1.AutoSize = true;                      // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag1.Cursor   = Cursors.Hand;              // cursor over 顯示 hand cursor
            lblSmartTag1.Click   += (s, e) =>                  // 彈出 wizard
            {
                var id     = SmartTag4MemberEx.GetIdByPriority(1);
                var dialog = new SmartTag4Member_OptionsWizard();
                dialog.SmartTagId  = id;
                dialog.FormClosed += (sender, eventArgs) =>     // 關閉後 refresh 個 combo box items
                {
                    FillGrade();
                };
                dialog.ShowDialog();
            };
            #endregion
        }
Example #2
0
        private void InitialSmartTags()
        {
            string[] orderBy      = new string[] { "Priority" };
            var      smartTagList = SmartTag4MemberEx.GetListOrderBy(orderBy, true);

            SmartTagHelper oTag = new SmartTagHelper(this);

            oTag.MemberSmartTagList = smartTagList;
            oTag.SetSmartTags();

            #region 設定 clickable smart tag labels
            lblSmartTag1.AutoSize = true;                // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag1.Cursor   = Cursors.Hand;        // cursor over 顯示 hand cursor
            lblSmartTag1.Tag      = 1;                   // Tag = Priority
            lblSmartTag1.Click   += smartLabel_OnClick;  // 綁定 click event

            lblSmartTag2.AutoSize = true;                // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag2.Cursor   = Cursors.Hand;        // cursor over 顯示 hand cursor
            lblSmartTag2.Tag      = 2;                   // Tag = Priority
            lblSmartTag2.Click   += smartLabel_OnClick;  // 綁定 click event

            lblSmartTag3.AutoSize = true;                // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag3.Cursor   = Cursors.Hand;        // cursor over 顯示 hand cursor
            lblSmartTag3.Tag      = 3;                   // Tag = Priority
            lblSmartTag3.Click   += smartLabel_OnClick;  // 綁定 click event

            lblSmartTag4.AutoSize = true;                // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag4.Cursor   = Cursors.Hand;        // cursor over 顯示 hand cursor
            lblSmartTag4.Tag      = 4;                   // Tag = Priority
            lblSmartTag4.Click   += smartLabel_OnClick;  // 綁定 click event

            lblSmartTag11.AutoSize = true;               // 減少 whitespace,有字嘅位置先可以 click
            lblSmartTag11.Cursor   = Cursors.Hand;       // cursor over 顯示 hand cursor
            lblSmartTag11.Tag      = 11;                 // Tag = Priority
            lblSmartTag11.Click   += smartLabel_OnClick; // 綁定 click event
            #endregion
        }