Ejemplo n.º 1
0
 public static (DialogResult DialogResult, string MusicFileName) RequestInput(IWin32Window parent, string originalFileName)
 {
     using (var f = new FMusicSettings()) {
         f._musicFileName = originalFileName;
         f.Localize(LanguageManager.Current);
         f.MonitorLocalizationChange();
         var r = f.ShowDialog(parent);
         f.UnmonitorLocalizationChange();
         var musicFileName = f._musicFileName;
         return(r, musicFileName);
     }
 }
Ejemplo n.º 2
0
        private void CmdProjectMusicSettings_Executed(object sender, ExecutedEventArgs e)
        {
            var project = visualizer.Editor.Project;

            var(r, fileName) = FMusicSettings.RequestInput(this, project.Project.MusicFileName);
            if (r == DialogResult.Cancel)
            {
                return;
            }
            project.Project.MusicFileName = fileName;
            InformProjectModified();
        }