示例#1
0
 private Task <ObservableDiagram> RenderChordAsync(IChordFinderResult result)
 {
     return(Task <ObservableDiagram> .Factory.StartNew(() =>
     {
         ObservableDiagram od = null;
         AppVM.AppView.DoOnUIThread(() =>
         {
             try
             {
                 od = new ObservableDiagram(result.ToDiagram(Style), name: Strings.FinderResultDiagramName);
                 od.PostEditCallback = (changed) =>
                 {
                     if (changed)
                     {
                         od.Refresh();
                     }
                 };
             }
             catch (Exception ex)
             {
                 ExceptionUtils.HandleException(ex);
             }
         });
         return od;
     }));
 }
示例#2
0
        public Diagram DiagramAt(int index, ChordFinderStyle chordFinderStyle)
        {
            IChordFinderResult result = ResultAt(index);

            return(result.ToDiagram(chordFinderStyle));
        }