コード例 #1
0
        private void OnResetButtonClicked(object sender, RoutedEventArgs e)
        {
            IntroText.Text              = m_initialText;
            MainGrid.AllowDrop          = true;
            PostExportButton.Visibility = Visibility.Hidden;
            ResetButton.Visibility      = Visibility.Hidden;

            GameStructure.Dispose();
        }
        private void OnResetButtonClicked(object sender, RoutedEventArgs e)
        {
            //Fileview.Clear();
            IntroText.Text              = m_initialIntroText;
            StatusText.Content          = m_initialStatusText;
            MainGrid.AllowDrop          = true;
            PostExportButton.Visibility = Visibility.Hidden;
            ResetButton.Visibility      = Visibility.Hidden;
            //OutputView.Clear();
            m_processingFiles = null;

            GameStructure.Dispose();
        }
コード例 #3
0
 /**
  * joins 2 same type Structures
  * replaces all another's structures id with current structure id
  * joins tile and meeple list
  * disposes of 2nd structure
  *
  * may be overriden in derived classes
  * eg: Monastery(does not exist), City (has to add shields too)
  */
 public virtual void JoinStructures(GameStructure another)
 {
     if (!this.CanJoin(another))
     {
         return;
     }
     //TODO: de vazut ca teoretic trebuie o lista de structuri in joc, cand se creaza o noua structura se adauga in lista respectiva, cand se face join se scoate o structura din lista respectiva
     if (this.StructureType != another.StructureType)
     {
         throw new Exception("Structures are not same type");
     }
     if (this.StructureId == another.StructureId)
     {
         throw new Exception("Nu ar trebuii sa faci join cu tine insuti");
     }
     another.ReplaceStructureId(this.StructureId);
     this.ComponentTiles.AddRange(another.ComponentTiles);
     this.MeepleList.AddRange(another.MeepleList);
     another.Dispose();
 }