示例#1
0
 private void simpleButton4_Click(object sender, EventArgs e)
 {
     if (gridView1.FocusedRowHandle >= 0)
     {
         MD_GuideLineSimpleParam _p = gridView1.GetRow(this.gridView1.FocusedRowHandle) as MD_GuideLineSimpleParam;
         this.gridView1.BeginDataUpdate();
         ParamList.Remove(_p);
         this.gridView1.EndDataUpdate();
         this.gridView1.RefreshData();
     }
 }
示例#2
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            Dialog_AddCallParam _f  = new Dialog_AddCallParam();
            DialogResult        _dr = _f.ShowDialog();

            if (_dr == DialogResult.OK)
            {
                MD_GuideLineSimpleParam _p = new MD_GuideLineSimpleParam();
                _p.ParameterName  = _f.ParamName;
                _p.ParameterValue = _f.ParamValue;
                this.gridView1.BeginDataUpdate();
                ParamList.Add(_p);
                this.gridView1.EndDataUpdate();
                this.gridView1.RefreshData();
            }
        }
        void _w_DoWork(object sender, DoWorkEventArgs e)
        {
            int _threadIndex         = (int)e.Argument;
            BackgroundWorker _worker = sender as BackgroundWorker;
            int _currentTimes        = RunTimes--;

            while (_currentTimes > 0)
            {
                Random ran     = new Random();
                int    RandKey = ran.Next(0, CSCount);
                string _cs     = CSDataList[RandKey];
                List <MD_GuideLineSimpleParam> _plist = new List <MD_GuideLineSimpleParam>();
                foreach (string _s in _cs.Split(','))
                {
                    string[] _s1 = _s.Split('=');
                    if (_s1.Count() > 1)
                    {
                        MD_GuideLineSimpleParam _p = new MD_GuideLineSimpleParam();
                        _p.ParameterName  = _s1[0];
                        _p.ParameterValue = _s1[1];
                        _plist.Add(_p);
                    }
                }
                string _xmlData = DataConvert.Serializer(typeof(List <MD_GuideLineSimpleParam>), _plist);
                int    _ctime   = Environment.TickCount;
                string _ret     = DoTestICS(_xmlData);
                int    _useTime = Environment.TickCount - _ctime;

                TestIcsAsynReturn _r = new TestIcsAsynReturn();
                _r.Index      = AllTimes - _currentTimes;
                _r.CallData   = _cs;
                _r.ReturnData = _ret;
                _r.UsedTimes  = _useTime;

                _worker.ReportProgress(0, _r);

                _currentTimes = RunTimes--;
            }
            e.Result = _threadIndex;
        }