mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Update DB to version 13: Add fields to sound_synths and drop music_synths.
This commit is contained in:
@@ -54,7 +54,7 @@ namespace cicm_web.Models
|
||||
public float Mhz2;
|
||||
public string Model;
|
||||
public int MusicChannels;
|
||||
public MusicSynth MusicSynth;
|
||||
public SoundSynth MusicSynth;
|
||||
public int Ram;
|
||||
public string Resolution;
|
||||
public int Rom;
|
||||
@@ -136,7 +136,7 @@ namespace cicm_web.Models
|
||||
|
||||
if(dbItem.MusicSynth > 0)
|
||||
{
|
||||
item.MusicSynth = MusicSynth.GetItem(dbItem.MusicSynth);
|
||||
item.MusicSynth = SoundSynth.GetItem(dbItem.MusicSynth);
|
||||
item.MusicChannels = dbItem.MusicChannels;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace cicm_web.Models
|
||||
public float Mhz2;
|
||||
public string Model;
|
||||
public int MusicChannels;
|
||||
public MusicSynth MusicSynth;
|
||||
public SoundSynth MusicSynth;
|
||||
public int Palette;
|
||||
public int Ram;
|
||||
public string Resolution;
|
||||
@@ -122,7 +122,7 @@ namespace cicm_web.Models
|
||||
|
||||
if(dbItem.MusicSynth > 0)
|
||||
{
|
||||
item.MusicSynth = MusicSynth.GetItem(dbItem.MusicSynth);
|
||||
item.MusicSynth = SoundSynth.GetItem(dbItem.MusicSynth);
|
||||
item.MusicChannels = dbItem.MusicChannels;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : MusicSynth.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Music Synthetizer model
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace cicm_web.Models
|
||||
{
|
||||
public class MusicSynth
|
||||
{
|
||||
public int Id;
|
||||
public string Name;
|
||||
|
||||
public static MusicSynth GetItem(int id)
|
||||
{
|
||||
Cicm.Database.Schemas.MusicSynth dbItem = Program.Database?.Operations.GetMusicSynth(id);
|
||||
return dbItem == null ? null : new MusicSynth {Name = dbItem.Name, Id = dbItem.Id};
|
||||
}
|
||||
|
||||
public static MusicSynth[] GetAllItems()
|
||||
{
|
||||
List<Cicm.Database.Schemas.MusicSynth> dbItems = null;
|
||||
bool? result = Program.Database?.Operations.GetMusicSynths(out dbItems);
|
||||
if(result == null || result.Value == false || dbItems == null) return null;
|
||||
|
||||
List<MusicSynth> items = new List<MusicSynth>();
|
||||
|
||||
foreach(Cicm.Database.Schemas.MusicSynth dbItem in dbItems)
|
||||
items.Add(new MusicSynth {Id = dbItem.Id, Name = dbItem.Name});
|
||||
|
||||
return items.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
||||
<Version>3.0.99.189</Version>
|
||||
<Version>3.0.99.192</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user