//按下按键时触发这个函数 private static void OnKeyPress(object o, KeyPressEventArgs e) { //判断按下的是 a if (e.KeyChar == 'a') { //执行移动鼠标到 100,100 位置 Yx.MoveTo(100, 100); } }
public HorizontalThrowModelingResultViewModel( Tuple <List <double>, List <Tuple <double, double> >, List <Tuple <double, double> > > numericValues) { List <double> ts = numericValues.Item1; List <Tuple <double, double> > xy = numericValues.Item2, vs = numericValues.Item3; for (int i = 0; i < ts.Count; ++i) { Yt.Add(new ObservablePoint(ts[i], xy[i].Item2)); Xt.Add(new ObservablePoint(ts[i], xy[i].Item1)); Yx.Add(new ObservablePoint(xy[i].Item1, xy[i].Item2)); Vxt.Add(new ObservablePoint(ts[i], vs[i].Item1)); Vyt.Add(new ObservablePoint(ts[i], vs[i].Item2)); } Collection.Add(new LineSeries() { Values = Yx }); }
public void Animate() { (new HorizontalThrowModelingAnimationView(Yx.Select(s => Tuple.Create(s.X, s.Y)).ToList())).Show(); }