private void GetNewReadyBox(object sender, BoxShapeEventArgs e) { string path = System.Environment.CurrentDirectory + "/Images/BoxPreview_"; if (e==null) { path += "empty.png"; } else { path += Resources.GetStringfromBoxShape(e.box); } if (File.Exists(path)) { img.Dispatcher.Invoke( new Action( delegate { img.Source = new BitmapImage(new Uri(path, UriKind.Absolute)); })); } else { img.Source = null; } }
private void AIWork(object sender, BoxShapeEventArgs e) { //myAI myAI.NewBoxArrive(activeBox.shape, readyBox.shape); ope = myAI.GetOperation(); if (ope != null) { timer1_i = 0; BeginInput(); } }