예제 #1
0
        private void checkedComboBox_stateRemove_TextChanged(object sender, EventArgs e)
        {
            Global.FilterValueList(this, (Control)sender);
#if NO
            Delegate_filterValue d = new Delegate_filterValue(FileterValueList);
            this.BeginInvoke(d, new object[] { sender });
#endif
        }
예제 #2
0
        private void comboBox_class_SelectedIndexChanged(object sender, EventArgs e)
        {
            Global.FilterValue(this, (Control)sender);
#if NO
            Delegate_filterValue d = new Delegate_filterValue(FileterValue);
            this.BeginInvoke(d, new object[] { sender });
#endif
        }
예제 #3
0
 // 安全版本
 public void FilterValueList(Control control)
 {
     if (this.InvokeRequired == true)
     {
         Delegate_filterValue d = new Delegate_filterValue(__FilterValueList);
         this.BeginInvoke(d, new object[] { control });
     }
     else
     {
         __FilterValueList((Control)control);
     }
 }
예제 #4
0
 // 安全版本
 public void FilterValueList(Control control)
 {
     if (this.InvokeRequired == true)
     {
         Delegate_filterValue d = new Delegate_filterValue(__FilterValueList);
         this.BeginInvoke(d, new object[] { control });
     }
     else
     {
         __FilterValueList((Control)control);
     }
 }
예제 #5
0
        // 安全版本
        public static void FilterValueEx(Control owner,
                                         Control control)
        {
            Delegate_filterValue d = new Delegate_filterValue(__FilterValueEx);

            if (owner.Created == false)
            {
                __FilterValueEx((Control)control);
            }
            else
            {
                owner.BeginInvoke(d, new object[] { control });
            }
        }
예제 #6
0
        private void valueTextChanged(object sender, EventArgs e)
        {
            this.Changed = true;

            string strControlName = "";

            if (sender is TextBox)
            {
                TextBox textbox = (TextBox)sender;
                strControlName = textbox.Name;
            }
            else if (sender is ComboBox)
            {
                if (sender == this.comboBox_type)
                {
#if NO
                    Delegate_filterValue d = new Delegate_filterValue(FileterValue);
                    this.BeginInvoke(d, new object[] { sender });
#endif
                    Global.FilterValue(this, (Control)sender);
                }
                else if (sender == this.comboBox_orderSuggestion)
                {
                    FilterValueEx(this, (Control)sender);
                }
                ComboBox combobox = (ComboBox)sender;
                strControlName = combobox.Name;
            }
            else if (sender is CheckedComboBox)
            {
                if (sender == this.checkedComboBox_state)
                {
#if NO
                    Delegate_filterValue d = new Delegate_filterValue(FileterValueList);
                    this.BeginInvoke(d, new object[] { sender });
#endif
                    Global.FilterValueList(this, (Control)sender);
                }

                CheckedComboBox combobox = (CheckedComboBox)sender;
                strControlName = combobox.Name;
            }
            else
            {
                Debug.Assert(false, "未处理的类型 " + sender.GetType().ToString());
                return;
            }

            int nRet = strControlName.IndexOf("_");
            if (nRet == -1)
            {
                Debug.Assert(false, "textbox名字中没有下划线");
                return;
            }

            string strLabelName = "label_" + strControlName.Substring(nRet + 1) + "_color";

            Label label = (Label)this.tableLayoutPanel_main.Controls[strLabelName];
            if (label == null)
            {
                Debug.Assert(false, "没有找到名字为 '" + strLabelName + "' 的Label控件");
                return;
            }

            label.BackColor = this.ColorChanged;
        }
예제 #7
0
        private void comboBox_class_SelectedIndexChanged(object sender, EventArgs e)
        {
            Global.FilterValue(this, (Control)sender);
#if NO
            Delegate_filterValue d = new Delegate_filterValue(FileterValue);
            this.BeginInvoke(d, new object[] { sender });
#endif
        }
예제 #8
0
파일: Global.cs 프로젝트: renyh1013/dp2
        // 安全版本
        /// <summary>
        /// 过滤控件中的列表值
        /// </summary>
        /// <param name="owner">控件的宿主控件</param>
        /// <param name="control">控件</param>
        public static void FilterValueList(Control owner, Control control)
        {

            Delegate_filterValue d = new Delegate_filterValue(__FilterValueList);

            if (owner.Created == false)
                __FilterValueList((Control)control);
            else
                owner.BeginInvoke(d, new object[] { control });

        }
예제 #9
0
파일: Global.cs 프로젝트: renyh1013/dp2
 // 安全版本
 public static void FilterValue(Control owner, 
     Control control)
 {
     if (owner.InvokeRequired == true)
     {
         Delegate_filterValue d = new Delegate_filterValue(__FilterValue);
         owner.BeginInvoke(d, new object[] { control });
     }
     else
     {
         __FilterValue((Control)control);
     }
 }
예제 #10
0
        void comboBox_seller_SelectedIndexChanged(object sender, EventArgs e)
        {
            FilterValue((Control)sender);
#if NO
            Delegate_filterValue d = new Delegate_filterValue(__FilterValue);
            this.Container.BeginInvoke(d, new object[] { sender });
#endif
        }
예제 #11
0
        // 安全版本
        void FilterValue(Control control)
        {
            Delegate_filterValue d = new Delegate_filterValue(__FilterValue);

            if (this.Container.Created == false)
                __FilterValue((Control)control);
            else
                this.Container.BeginInvoke(d, new object[] { control });
        }
예제 #12
0
 // 安全版本
 void FilterValue(Control control)
 {
     if (this.Container.InvokeRequired == true)
     {
         Delegate_filterValue d = new Delegate_filterValue(__FilterValue);
         this.Container.BeginInvoke(d, new object[] { control });
     }
     else
     {
         __FilterValue((Control)control);
     }
 }
예제 #13
0
        private void checkedComboBox_stateRemove_TextChanged(object sender, EventArgs e)
        {
            Global.FilterValueList(this, (Control)sender);
#if NO
            Delegate_filterValue d = new Delegate_filterValue(FileterValueList);
            this.BeginInvoke(d, new object[] { sender });
#endif
        }
예제 #14
0
        private void valueTextChanged(object sender, EventArgs e)
        {
            this.Changed = true;

            string strControlName = "";

            if (sender is TextBox)
            {
                TextBox textbox = (TextBox)sender;
                strControlName = textbox.Name;
            }
            else if (sender is ComboBox)
            {
                if (sender == this.comboBox_type)
                {
#if NO
                    Delegate_filterValue d = new Delegate_filterValue(FileterValue);
                    this.BeginInvoke(d, new object[] { sender });
#endif
                    Global.FilterValue(this, (Control)sender);
                }
                else if (sender == this.comboBox_orderSuggestion)
                {
                    FilterValueEx(this, (Control)sender);
                }
                ComboBox combobox = (ComboBox)sender;
                strControlName = combobox.Name;
            }
            else if (sender is CheckedComboBox)
            {
                if (sender == this.checkedComboBox_state)
                {
#if NO
                    Delegate_filterValue d = new Delegate_filterValue(FileterValueList);
                    this.BeginInvoke(d, new object[] { sender });
#endif
                    Global.FilterValueList(this, (Control)sender);
                }

                CheckedComboBox combobox = (CheckedComboBox)sender;
                strControlName = combobox.Name;
            }
            else
            {
                Debug.Assert(false, "未处理的类型 " + sender.GetType().ToString());
                return;
            }

            int nRet = strControlName.IndexOf("_");
            if (nRet == -1)
            {
                Debug.Assert(false, "textbox名字中没有下划线");
                return;
            }

            string strLabelName = "label_" + strControlName.Substring(nRet + 1) + "_color";

            Label label = (Label)this.tableLayoutPanel_main.Controls[strLabelName];
            if (label == null)
            {
                Debug.Assert(false, "没有找到名字为 '" + strLabelName + "' 的Label控件");
                return;
            }

            label.BackColor = this.ColorChanged;
        }