Exemplo n.º 1
0
        private void buttonEqSave_Click(object sender, RoutedEventArgs e)
        {
            string fileName = BrowseSaveFile(m_ppwEqFilter);

            if (fileName.Length <= 0)
            {
                AddFirLog("EQ保存処理中断。\r\n");
                return;
            }

            FirSave p = new FirSave();

            p.FreqGainTable.Clear();
            p.FreqGainTable.AddRange(m_freqGainTable);
            var  xmlRW  = new WWXmlRW.XmlRW <FirSave>(fileName, false);
            bool result = xmlRW.Save(p);

            if (result)
            {
                AddFirLog(string.Format("EQ保存処理成功。{0}\r\n", fileName));
            }
            else
            {
                AddFirLog(string.Format("EQ保存処理失敗。{0}\r\n", fileName));
            }
        }
Exemplo n.º 2
0
        private void InitFirTab()
        {
            m_FirWorker = new BackgroundWorker();
            m_FirWorker.WorkerReportsProgress = true;
            m_FirWorker.DoWork                    += new DoWorkEventHandler(m_FirWorker_DoWork);
            m_FirWorker.ProgressChanged           += new ProgressChangedEventHandler(m_FirWorker_ProgressChanged);
            m_FirWorker.RunWorkerCompleted        += new RunWorkerCompletedEventHandler(m_FirWorker_RunWorkerCompleted);
            m_FirWorker.WorkerSupportsCancellation = true;

            // ファイルからEQ設定を読み込んでグラフにセットする。
            var     xmlRW = new WWXmlRW.XmlRW <FirSave>(m_firGainFileName);
            FirSave p     = xmlRW.Load();

            InitializeFreqGainTable();
            if (m_freqGainTable.Length == p.FreqGainTable.Count)
            {
                for (int i = 0; i < m_freqGainTable.Length; ++i)
                {
                    m_freqGainTable[i] = p.FreqGainTable[i];
                }
            }

            DrawFreqResponse();
        }
Exemplo n.º 3
0
        private void buttonEqSave_Click(object sender, RoutedEventArgs e)
        {
            string fileName = BrowseSaveFile(m_ppwEqFilter);
            if (fileName.Length <= 0) {
                AddFirLog("EQ保存処理中断。\r\n");
                return;
            }

            FirSave p = new FirSave();
            p.FreqGainTable.Clear();
            p.FreqGainTable.AddRange(m_freqGainTable);
            var xmlRW = new WWXmlRW.XmlRW<FirSave>(fileName, false);
            bool result = xmlRW.Save(p);
            if (result) {
                AddFirLog(string.Format("EQ保存処理成功。{0}\r\n", fileName));
            } else {
                AddFirLog(string.Format("EQ保存処理失敗。{0}\r\n", fileName));
            }
        }