Exemplo n.º 1
0
        private void writeBooster(object sender, RoutedEventArgs e)
        {
            var f = new Safire.Library.TableModels.Fx();

            f.Author = "Deshan Alahakoon";
            f.Type   = "bstr";
            f.ID     = Guid.NewGuid().ToString();
            var b = new Booster();

            b.lg   = Settings.Default.lg;
            b.mg   = Settings.Default.mg;
            b.hg   = Settings.Default.hg;
            f.Data = Util.Serialize <Booster>(b);
            f.Name = cmbBooster.Text;
            using (var db = new SQLiteConnection(Tables.DBPath))
            {
                db.Insert(f);
            }
            RefreshCombos();
        }
Exemplo n.º 2
0
        private void suiteWrite(object sender, RoutedEventArgs e)
        {
            var suite = new Suite();
            var f     = new Safire.Library.TableModels.Fx();

            f.Author = "Deshan Alahakoon";
            f.Type   = "suite";
            f.ID     = Guid.NewGuid().ToString();
            //eq
            var eq = new List <float>();

            foreach (Slider es in EqStack.Children)
            {
                eq.Add((float)es.Value);
            }
            suite.EqValuesList = eq;
            //booster
            var bs = new Booster();

            bs.lg         = Settings.Default.lg;
            bs.mg         = Settings.Default.mg;
            bs.hg         = Settings.Default.hg;
            suite.Booster = bs;
            //stereo
            suite.StereoEn = Settings.Default.StereoWidth;
            //bassen
            suite.BassEn = Settings.Default.BassRatio;

            suite.BassEnStatus   = Settings.Default.BassBoost;
            suite.EqStatus       = Settings.Default.Equalizer;
            suite.StereoEnStatus = Settings.Default.StereoWiden;
            suite.BoosterStatus  = Settings.Default.boosters;

            f.Data = Util.Serialize <Suite>(suite);
            f.Name = cmbSuite.Text;
            using (var db = new SQLiteConnection(Tables.DBPath))
            {
                db.Insert(f);
            }
            RefreshCombos();
        }
Exemplo n.º 3
0
        private void writeEq(object sender, RoutedEventArgs e)
        {
            var f = new Safire.Library.TableModels.Fx();

            f.Author = "Deshan Alahakoon";
            f.Type   = "eq";
            f.ID     = Guid.NewGuid().ToString();
            var b = new List <float>();

            foreach (Slider es in EqStack.Children)
            {
                b.Add((float)es.Value);
            }
            f.Data = Util.Serialize <List <float> >(b);
            f.Name = cmbEq.Text;
            using (var db = new SQLiteConnection(Tables.DBPath))
            {
                db.Insert(f);
            }
            RefreshCombos();
        }