コード例 #1
0
        private void CbCvetaLoad()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables = new DataBaseTables();
                    tables.dtCvet_TovFill();
                    tables.dependency.OnChange += CbCvetaonchange;
                    comboBox2.DataSource        = tables.dtCvet_Tov;
                    comboBox2.ValueMember       = "ID_Cvet";
                    comboBox2.DisplayMember     = "Cvet";
                }
                catch
                {
                }
            };

            Invoke(action);
        }
コード例 #2
0
        private void CvetaLoad()
        {
            Action action = () =>
            {
                try
                {
                    DataBaseTables tables = new DataBaseTables();
                    tables.dtCvet_TovFill();
                    tables.dependency.OnChange += Cvetaonchange;
                    listBox2.DataSource         = tables.dtCvet_Tov;
                    listBox2.ValueMember        = "ID_Cvet";
                    listBox2.DisplayMember      = "Cvet";
                    Thread threadCvet = new Thread(CbCvetaLoad);
                    threadCvet.Start();
                }
                catch
                {
                }
            };

            Invoke(action);
        }