Esempio n. 1
0
 void SaveToFile()
 {
     if (m_filter != null)
     {
         UpdateToFilter();
         int    lastIndex   = Application.ExecutablePath.LastIndexOf('\\');
         String pathFilters = Application.ExecutablePath.Remove(lastIndex, Application.ExecutablePath.Length - lastIndex)
                              + "\\filter\\";
         SaveFileDialog dlg = new SaveFileDialog();
         dlg.InitialDirectory = pathFilters;
         dlg.Filter           = "Filter file(*.flt)|*.flt";
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             m_filter.Save(dlg.FileName);
             this.Text = m_filter.Name;
         }
     }
 }