Esempio n. 1
0
 public void AddSafe(CCBGameTemplate template)
 {
     CCBDirty.kDirty = true;
     lock (this)
     {
         if (null == m_templates)
         {
             m_templates = new CCBGameTemplateList();
         }
         m_templates.Add(template);
     }
 }
Esempio n. 2
0
        private void FillTemplateList(CCBGameTemplateList userTemplates)
        {
            List <CCBStockTemplate> stockTemplates = CCBStockTemplates.StockTemplateList;

            lbTemplates.Items.Clear();
            foreach (CCBStockTemplate template in stockTemplates)
            {
                lbTemplates.Items.Add(new GameTemplateEntry(template.Name, template.Template));
            }
            if (null != userTemplates)
            {
                foreach (CCBGameTemplate userTemplate in userTemplates)
                {
                    lbTemplates.Items.Add(new GameTemplateEntry(userTemplate.Name, userTemplate));
                }
            }
        }
Esempio n. 3
0
 public CCBGameData()
 {
     CCBDirty.kDirty = false;
     m_templates     = new CCBGameTemplateList();
     m_games         = new CCBGames();
 }
Esempio n. 4
0
 public GameTemplatePicker(CCBGame gameModel, DOnCreateNewGame newGameCallback, DOnCreateNewTemplate newTemplateCallback, CCBGameTemplateList userList)
 {
     InitializeComponent();
     CeebeetleWindowInit();
     if (null == gameModel)
     {
         m_modelName = InitializeNewGameButtonText("Game");
         btnAddTemplate.IsEnabled = false;
     }
     else
     {
         m_modelName = InitializeNewGameButtonText(gameModel.Name);
         m_model     = gameModel;
         tbName.Text = gameModel.Name;
     }
     btnAddTemplate.Content   = m_modelName;
     m_gameCreateCallback     = newGameCallback;
     m_templateCreateCallback = newTemplateCallback;
     FillTemplateList(userList);
     ValidateSelection();
 }