コード例 #1
0
 private void CheckModifyTagList()
 {
     if (!string.IsNullOrEmpty(fCurTagListFile) && fModified)
     {
         using (IniFile iniFile = new IniFile(fCurTagListFile)) {
             if (PIBUtils.ShowQuestionYN(string.Concat(new string[] {
                 "List of tags: \"",
                 Path.GetFileName(fCurTagListFile),
                 "\" is changed. Save changes?"
             })))
             {
                 for (int i = 1; i <= MAX_TRENDS; i++)
                 {
                     TrendObj trendObj = TrendChart1[i - 1];
                     iniFile.WriteString("Trends", "Trend" + Convert.ToString(i), trendObj.Tag);
                     iniFile.WriteInteger("Trends", "PostAction" + Convert.ToString(i), (int)trendObj.PostAction);
                     if (trendObj.PostAction != PostAction.paNone)
                     {
                         iniFile.WriteInteger("Trends", "Mode" + Convert.ToString(i), (int)trendObj.Filter.Mode);
                         iniFile.WriteFloat("Trends", "BandWidth" + Convert.ToString(i), trendObj.Filter.BandWidth);
                         iniFile.WriteBool("Trends", "Overshoot" + Convert.ToString(i), trendObj.Filter.Overshoot);
                         iniFile.WriteInteger("Trends", "FrequencyResolution" + Convert.ToString(i), trendObj.Filter.FrequencyResolution);
                         iniFile.WriteInteger("Trends", "SuppressionDegree" + Convert.ToString(i), (int)trendObj.Filter.SuppressionDegree);
                         iniFile.WriteInteger("Trends", "SubstractionNoiseDegree" + Convert.ToString(i), (int)trendObj.Filter.SubstractionNoiseDegree);
                     }
                 }
             }
         }
     }
 }