private void SwapMess(Swap swap, RestoreRunInfo restoreRunInfo) { indexLab.Content = "被复原:" + restoreRunInfo.index; buShuLab.Content = "步数:" + puzzleAide.StepNum; SwapLab.Content = "交换:(" + swap.Empty.ToString() + "," + swap.Entity.ToString() + ")"; mnPosLab.Content = "mn初始位置:" + restoreRunInfo.beginMnPos; indexPosLab.Content = "index初始位置:" + restoreRunInfo.entityPos; tarLab.Content = "目的地位置:" + restoreRunInfo.target; messLab.Content = "其它信息:" + restoreRunInfo.otherMess; string content = (puButs.Children[swap.Entity] as Button).Content.ToString();//被移动的图块 Button temp = mnBut; mnBut = puButs.Children[swap.Entity] as Button; mnBut.Background = Brushes.White; mnBut.Content = "mn"; temp.Background = new SolidColorBrush(Color.FromRgb(84, 255, 159));//54FF9F temp.Content = content; App.DoEvents(); int time = Convert.ToInt32(yanShi.SelectionBoxItem); if (time > 0) { Thread.Sleep(time); } }
public static void jiance(Swap swap, RestoreRunInfo restoreRunInfo) { Console.WriteLine(); Console.Write($"({swap.Empty},{swap.Entity})*"); if (restoreRunInfo != null) { Console.Write($"[index:{restoreRunInfo.index},enPos:{restoreRunInfo.entityPos},其它消息:{restoreRunInfo.otherMess}]"); } }