/* Playback buttons methods */ #region Playback Buttons private void playButton_Click(object sender, EventArgs e) { if (m_ControlMode == ControlMode.Macro) { m_MacroPlayer.Play(); } else if (m_ControlMode == ControlMode.Script) { m_ScriptHost.Play(); } }
private void buttonMacroPlay_Click(object sender, EventArgs e) { if (((Control.ModifierKeys & Keys.Shift) == Keys.Shift) || string.IsNullOrEmpty(macroFile)) { OpenFileDialog dialog = new OpenFileDialog(); dialog.CheckFileExists = true; dialog.CheckPathExists = true; dialog.Multiselect = false; dialog.Filter = "Text files (*.txt)|*.txt|Macro files (*.macro)|*.macro|All files (*.*)|*.*"; dialog.Title = "Select a macro file to play"; if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { macroFile = dialog.FileName; } else { return; } } if (!string.IsNullOrEmpty(macroFile)) { MacroPlayer macroPlayer = new MacroPlayer(this, macroFile); macroPlayer.Play(); } }
private void ExecuteMacroAction(MacroAction action) { //// TODO: Load sequence from cache ////List<DualShockState> sequence = new List<DualShockState>(); UsingMacroPlayer = true; MacroPlayer.Stop(); MacroPlayer.LoadFile(action.Path); MacroPlayer.Play(); }