Esempio n. 1
0
        public Entities.Currency Create(CurrencyPrefab prefab, bool isPrimary)
        {
            var currencyEntity = new Entities.Currency
            {
                Name      = m_entitiesByPrefab[prefab].Name,
                ShortName = m_entitiesByPrefab[prefab].ShortName,
                Symbol    = m_entitiesByPrefab[prefab].Symbol,
                IsPrimary = isPrimary
            };

            return(currencyEntity);
        }
Esempio n. 2
0
    void DeletePrefab()
    {
        prefab = new CurrencyPrefab (editingDisplay.id, editingDisplay.name);

                if (prefab.Load ())
                        prefab.Delete ();
    }
Esempio n. 3
0
 void CreatePrefab()
 {
     // Configure the correponding prefab
         prefab = new CurrencyPrefab (editingDisplay.id, editingDisplay.name);
         int subCurrency1ID = -1;
         string subCurrency1Name = "";
         string subCurrency1Icon = "";
         if (editingDisplay.subCurrency1 != null) {
             subCurrency1ID = editingDisplay.subCurrency1ID;
             subCurrency1Name = editingDisplay.subCurrency1.name;
             subCurrency1Icon = editingDisplay.subCurrency1.icon;
         }
         int subCurrency2ID = -1;
         string subCurrency2Name = "";
         string subCurrency2Icon = "";
         if (editingDisplay.subCurrency2 != null) {
             subCurrency2ID = editingDisplay.subCurrency2ID;
             subCurrency2Name = editingDisplay.subCurrency2.name;
             subCurrency2Icon = editingDisplay.subCurrency2.icon;
         }
     prefab.Save (editingDisplay.icon, subCurrency1ID, subCurrency1Name, subCurrency1Icon,
                  subCurrency2ID, subCurrency2Name, subCurrency2Icon);
 }