Esempio n. 1
0
        // Added by Wirachai T. 2008 10 07
        //private void Control_KeyDown(object sender, KeyEventArgs e)
        //{
        //    try
        //    {
        //        // ¶éÒà»ç¹ find dialog ¨ÐÁÕ¡Òü١ event ¹ÕéäÇéà¾×èÍãËé¡´ enter áÅéÇ search ¢éÍÁÙŷѹ·Õ
        //        if (OnKeyEnterPressed == null)
        //        {
        //            Control ctrl = (Control)sender;
        //            Form form = ctrl.FindForm();

        //            if (e.KeyCode == Keys.Enter)
        //            {
        //                form.SelectNextControl(form.ActiveControl, true, true, true, true);
        //            }
        //            else if (e.KeyCode == Keys.Back)
        //            {
        //                if ((sender is DateTextBoxWithCalendar) && ((DateTextBoxWithCalendar)sender).IsEmpty())
        //                {
        //                    form.SelectNextControl(form.ActiveControl, false, true, true, false);
        //                }
        //                else if (sender is ComboBox)
        //                {
        //                    form.SelectNextControl(form.ActiveControl, false, true, true, false);
        //                }
        //                else if (((Control)sender).Text.Trim().Equals(""))
        //                {
        //                    form.SelectNextControl(form.ActiveControl, false, true, true, false);
        //                }
        //            }
        //        }
        //    }
        //    catch (Exception)
        //    {

        //    }
        //}
        // End

        private void ShowPopupValue(IValuePopup valuePopup, IValueType valueType)
        {
            if (valuePopup != null)
            {
                valuePopup.SetValues(valueType.GetValue());
                BaseValuePopup dlg = (BaseValuePopup)valuePopup;
                dlg.Location = Cursor.Position;
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    valueType.SetValue(valuePopup.GetValues());
                }
            }
        }
Esempio n. 2
0
 //Apiwat add 2007-10-02
 public FindOption(string strName, string strFieldMap, IValueType valueType1, params FindOperator[] findOperators)
 {
     m_strCaption  = strName;
     m_strName     = strName;
     m_strFieldMap = strFieldMap;
     m_valueType1  = valueType1;
     for (int i = 0; i < findOperators.Length; ++i)
     {
         m_findOperators.Add(findOperators[i]);
         if (i == 0)
         {
             this.m_selectedOperator = findOperators[0];
         }
     }
     m_popupValue1 = new DefaultValuePopup();
     m_popupValue1.AllowMultiValue = m_bAllowMultiValue;
 }