Exemplo n.º 1
0
 public static (DialogResult Result, object Target) RequestInput(IWin32Window parent, int enabledItemIndex, ScoreEditor editor)
 {
     using (var f = new FGoTo()) {
         f._editor           = editor;
         f._enabledItemIndex = enabledItemIndex;
         f.Localize(LanguageManager.Current);
         f.MonitorLocalizationChange();
         var r = f.ShowDialog(parent);
         f.UnmonitorLocalizationChange();
         var target = f._target;
         return(r, target);
     }
 }
Exemplo n.º 2
0
        private void CmdEditGoToMeasure_Executed(object sender, ExecutedEventArgs e)
        {
            var score = visualizer.Editor.CurrentScore;

            if (!score.HasAnyBar)
            {
                return;
            }

            var(r, t) = FGoTo.RequestInput(this, 0, visualizer.Editor);
            if (r == DialogResult.Cancel)
            {
                return;
            }

            ExecuteCmdEditGoToMenuItems(score, (r, t));
        }