Example #1
0
        /* 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();
            }
        }
Example #2
0
 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();
     }
 }
Example #3
0
        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();
        }