private void amc_OnNewVideoSize(object sender, AxAXISMEDIACONTROLLib._IAxisMediaControlEvents_OnNewVideoSizeEvent e) { //if (e.theWidth >= 320 && e.theHeight >= 240) //{ // // Adapt window size to video size // Width += e.theWidth - amc.Width; // Height += e.theHeight - amc.Height; // if (amc.ShowStatusBar) // { // Height += 22; // } // if (amc.ShowToolbar) // { // Height += 32; // } //} }
private void amc_OnStatusChange(object sender, AxAXISMEDIACONTROLLib._IAxisMediaControlEvents_OnStatusChangeEvent e) { if ((e.theOldStatus & (int)AMC_STATUS.AMC_STATUS_RECORDING) == 0 && // was not recording (e.theNewStatus & (int)AMC_STATUS.AMC_STATUS_RECORDING) > 0) // is recording { lblestadoaxisrecord.Text = "Stop Recording"; } else { lblestadoaxisrecord.Text = "Record"; } }
private void amc_OnError(object sender, AxAXISMEDIACONTROLLib._IAxisMediaControlEvents_OnErrorEvent e) { System.Windows.Forms.MessageBox.Show(this, e.theErrorInfo, "Error code " + e.theErrorCode.ToString("X8")); }