delegate void mydelete();
DispatcherTimer dTimer = new System.Windows.Threading.DispatcherTimer();
dTimer.Tick += new EventHandler(dTimer_Tick);
dTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
dTimer.Start();
void dTimer_Tick(object sender, EventArgs e)
{
try
{
mydelete dele = new mydelete(MoveShip);
dele.Invoke();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}