Exemplo n.º 1
0
 /// <summary>
 /// 初始化ShowList控件时调用此函数
 /// </summary>
 /// <param name="wordbook">需要使用的字典类</param>
 /// <param name="kind">字典类类型</param>
 /// <param name="codeValue">初始化的代码值</param>
 public void CallLookUpWindow(BaseWordbook wordbook, WordbookKind kind, string codeValue)
 {
     CallLookUpWindow(wordbook, kind, codeValue
                      , ShowListFormMode.Concision
                      , new Point(0, 0)
                      , new Size(100, 100)
                      , new Rectangle(0, 0, 1000, 600)
                      , ShowListCallType.Initialize);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 调用代码选择窗口。
        /// 初始化ShowList窗口的部分属性。这些属性因为与行为、显示效果等有关,所以需要统一设置。
        /// <param name="wordbook">默认的字典类</param>
        /// <param name="kind">字典类的类型</param>
        /// <param name="initText">查询条件初始值</param>
        /// <param name="formMode">ShowList窗口显示模式</param>
        /// <param name="initPosition">ShowListForm默认显示位置(屏幕坐标)</param>
        /// <param name="inputSize">ShowListForm输入框的尺寸</param>
        /// <param name="screenSize">调用ShowListForm的窗口所在屏幕的尺寸</param>
        /// <param name="callType">调用模式</param>
        /// </summary>
        public void CallLookUpWindow(BaseWordbook wordbook, WordbookKind kind, string initText, ShowListFormMode formMode, Point initPosition, Size inputSize, Rectangle screenSize, ShowListCallType callType)
        {
            //m_SelForm.ClearTempData();

            //// 初始化时如果没有传入初始代码则直接退出
            //if ((callType == ShowListCallType.Initialize) && (String.IsNullOrEmpty(initText)))
            //   return;

            m_SelForm.CallShowListWindow(wordbook, kind, initText, formMode
                                         , initPosition, inputSize, screenSize, callType);
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        public LookUpEditor()
        {
            try
            {
                //Add By wwj 2012-06-07 修改下来标示的符号
                ShowListButton.Caption         = "▼";
                ShowListButton.Appearance.Font = new Font("宋体", 6F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134)));

                ShowListButton.Kind    = ButtonPredefines.Glyph;
                ShowListButton.Visible = false;
                Font = new Font("宋体", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134)));

                _borderStyle = BorderStyle.FixedSingle;
                _showSButton = false;
                //_showFormImmediately = true;
                _formMode = ShowListFormMode.Concision;
                _kind     = WordbookKind.Normal;

                _minCount = 0;
                _maxCount = 1;

                ResetPropertiesValue();

                if (!DesignMode)
                {
                    BoundEventToControl();
                }


                this.ContextMenu = new ContextMenu();//bwj 20121022
            }
            catch (Exception xe)
            {
                throw xe;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// 检查指定的字典是否只包含一条记录。
 /// </summary>
 /// <param name="wordbook"></param>
 /// <param name="kind"></param>
 /// <returns>如果是的话则返回{代码,名称}对,否则返回空</returns>
 public string[] ValidateWordbookHasOneRecord(BaseWordbook wordbook, WordbookKind kind)
 {
     return(m_SelForm.ValidateWordbookHasOneRecord(wordbook, kind));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 调用代码选择窗口。
 /// 初始化ShowList窗口的部分属性。这些属性因为与行为、显示效果等有关,所以需要统一设置。
 /// <param name="wordbook">默认的字典类</param>
 /// <param name="kind">字典类的类型</param>
 /// <param name="initText">查询条件初始值</param>
 /// <param name="formMode">ShowList窗口显示模式</param>
 /// <param name="initPosition">ShowListForm默认显示位置(屏幕坐标)</param>
 /// <param name="inputSize">ShowListForm输入框的尺寸</param>
 /// <param name="screenSize">调用ShowListForm的窗口所在屏幕的尺寸</param>
 /// </summary>
 public void CallLookUpWindow(BaseWordbook wordbook, WordbookKind kind, string initText, ShowListFormMode formMode, Point initPosition, Size inputSize, Rectangle screenSize)
 {
     CallLookUpWindow(wordbook, kind, initText, formMode, initPosition, inputSize, screenSize
                      , ShowListCallType.Normal);
 }