Esempio n. 1
0
 //New map
 private void NewB_Click(object sender, RoutedEventArgs e)
 {
     XSizeTB.Clear();
     YSizeTB.Clear();
     XMapTB.Clear();
     CostMapTB.Clear();
     XEndTB.Clear();
     YEndTB.Clear();
     InsideField.Children.Clear();
     game.Clear();
 }
Esempio n. 2
0
 private void MapTB_TextChanged(object sender, TextChangedEventArgs e)
 {
     SCM.TBTreating(XMapTB, XSizeTB);
     SCM.TBTreating(YMapTB, YSizeTB);
     if (XMapTB.Text != "" && YMapTB.Text != "")
     {
         CostMapTB.Text = game.GetMapCell(SCM.X(XMapTB), SCM.Y(YMapTB)).Price.ToString();
     }
     if (XMapTB.Text == "" && YMapTB.Text == "")
     {
         CostMapTB.Clear();
     }
 }
Esempio n. 3
0
 private void CostMapTB_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (XMapTB.Text != "" && YMapTB.Text != "")
     {
         SCM.TBTreating(CostMapTB, MaxCost);
         if (CostMapTB.Text != "")
         {
             game.InitMapCell(SCM.X(XMapTB), SCM.Y(YMapTB), SCM.Int32(CostMapTB));
             graphicTBs[SCM.X(XMapTB), SCM.Y(YMapTB)].Text = CostMapTB.Text;
         }
     }
     else
     {
         CostMapTB.Clear();
     }
 }