示例#1
0
        public void LoadHarps()
        {
            SQLDataClass sq  = new SQLDataClass(DatabaseFile);
            List <Harp>  lst = sq.GetAll();

            hc.AddHarps(lst);
            hc.SelectHarp(lst[0]);
        }
示例#2
0
        private void LoadDatas(string fileName)
        {
            sq = new SQLDataClass(fileName);
            List <Harp> lst = sq.GetAll();

            dgvDATA.DataSource = lst;

            SetAirSlots(lst[0]);
            FormInstances.Instance().hc.AddHarps(lst);
            HarpInstrumentFactory.HarpDatabaeObject2HarpInstrument(lst[0]);
        }
示例#3
0
        public void SaveInitialHarps(string fileName)
        {
            if (File.Exists(FormInstances.Instance().DatabaseFile))
            {
                File.Delete(FormInstances.Instance().DatabaseFile);
            }
            HarpInstrumentClass hi = HarpInstrumentFactory.SeydelDeLuxeSteelOrchestra(eKey.C_DUR);

            Harp ins = new Harp();
            List <AirSlotAttributesClass> airSlots = new List <AirSlotAttributesClass>();

            airSlots.AddRange(hi.InstrumentNotesDefinition.Keys);
            ins.AirSlots    = airSlots;
            ins.Name        = hi.Name;
            ins.Description = hi.Name;
            ins.Stamp       = DateTime.Now;
            ins.Key         = hi.Key;
            var sq = new SQLDataClass(fileName);

            sq.InsertDatas(ins);


            hi       = HarpInstrumentFactory.HohnerUnsereLieblinge(eKey.C_DUR);
            ins      = new Harp();
            airSlots = new List <AirSlotAttributesClass>();
            airSlots.AddRange(hi.InstrumentNotesDefinition.Keys);
            ins.AirSlots    = airSlots;
            ins.Name        = hi.Name;
            ins.Description = hi.Name;
            ins.Stamp       = DateTime.Now;
            ins.Key         = hi.Key;

            sq.InsertDatas(ins);

            hi       = HarpInstrumentFactory.ChroamticStandard(eKey.C_DUR);
            ins      = new Harp();
            airSlots = new List <AirSlotAttributesClass>();
            airSlots.AddRange(hi.InstrumentNotesDefinition.Keys);
            ins.AirSlots    = airSlots;
            ins.Name        = hi.Name;
            ins.Description = hi.Name;
            ins.Stamp       = DateTime.Now;
            ins.Key         = hi.Key;

            sq.InsertDatas(ins);
        }