private static bool CheckMidiOutput() { if (OutputDevice.DeviceCount == 0) { UiManager.ThrowError("No MIDI output devices available."); Unload(); return(false); } else { return(true); } }
internal static void Continue() { try { IsPlaying = true; sequencer.Continue(); Timer.Start(); } catch (Exception ex) { UiManager.ThrowError(ex.Message); } }
internal static void Stop() { try { IsPlaying = false; sequencer.Stop(); Timer.Stop(); } catch (Exception ex) { UiManager.ThrowError(ex.Message); } }
private static void InitOutputDevice() { try { outDevice = new OutputDevice( int.Parse(ConfigurationManager.AppSettings["outDeviceID"]) ); } catch (Exception ex) { UiManager.ThrowError(ex.Message); Unload(); } }
// TODO open file dialog to select save name internal static void SaveFile(string fileName) { Stop(); try { // sequence.SaveAsync(fileName); } catch (Exception ex) { UiManager.ThrowError(ex.Message); } // on success UiManager.mainWindow.DisableUserInterractions(); }