示例#1
0
        public RecordingControls() {
            InitializeComponent();

            state = IRecorderState.Idle;
            recMan = new AudioRecManager();

            focusDiverter.GotFocus += new EventHandler(focusDiverterChanged);
            focusDiverter.LostFocus += new EventHandler(focusDiverterChanged);

            recMan.DeviceNumber = Devices.SelectedIndex;

            // call from frame level
            //PopulateDevices();
        }
示例#2
0
        public RecordingControls()
        {
            InitializeComponent();

            state = IRecorderState.Idle;
            recMan = new AudioRecManager();

            focusDiverter.GotFocus += new EventHandler(focusDiverterChanged);
            focusDiverter.LostFocus += new EventHandler(focusDiverterChanged);

            recMan.DeviceNumber = Devices.SelectedIndex;

            // call from frame level
            //PopulateDevices();
        }
示例#3
0
        private void btnRec_Click_1(object sender, EventArgs e) {
            if (state == IRecorderState.Idle) {
                if (Devices.SelectedItem == null) {
                    MessageBox.Show("Please select a device", "Device not selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                state = IRecorderState.Recording;
                ForceFocusDiversion();
                btnRec.Text = "Stop";
                btnRec.BackColor = Color.LightBlue;
                if (logicShit != null)
                    logicShit.startRecording();
            }
            else if (state == IRecorderState.Recording) {

                if (logicShit != null)
                    logicShit.stopRecording();
                btnRec.Text = "Rec";
                btnRec.BackColor = Color.Red;
                state = IRecorderState.Idle;
            }
        }
示例#4
0
        ////=============================================================================
        //// Constructor
        ////
        ////=============================================================================

        public ResumingState(IRecorderState nextState, TimeRecorderData data)
        {
            _nextState = nextState;
            _data      = data;
        }
示例#5
0
        private void btnRec_Click_1(object sender, EventArgs e)
        {
            if (state == IRecorderState.Idle) {
                if (Devices.SelectedItem == null) {
                    MessageBox.Show("Please select a device", "Device not selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                state = IRecorderState.Recording;
                ForceFocusDiversion();
                btnRec.Text = "Stop";
                btnRec.BackColor = Color.LightBlue;
                if (logicShit != null)
                    logicShit.startRecording();
            }
            else if (state == IRecorderState.Recording) {

                if (logicShit != null)
                    logicShit.stopRecording();
                btnRec.Text = "Rec";
                btnRec.BackColor = Color.Red;
                state = IRecorderState.Idle;
            }
        }
示例#6
0
        ////=============================================================================
        //// Constructor
        ////
        ////=============================================================================

        public DestroyingState(IRecorderState nextState)
        {
            _nextState = nextState;
        }
示例#7
0
        ////=============================================================================
        //// Constructor
        ////
        ////=============================================================================

        public StartingState(IRecorderState nextState)
        {
            _nextState = nextState;
        }