public static void SetCameraDate(Structures set, SetDateTimeType t, string TZ, System.DateTime DT) { var messageElement = new TextMessageEncodingBindingElement(); messageElement.MessageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap12, AddressingVersion.None); HttpTransportBindingElement httpBinding = new HttpTransportBindingElement(); httpBinding.AuthenticationScheme = AuthenticationSchemes.Basic; CustomBinding bind = new CustomBinding(messageElement, httpBinding); EndpointAddress mediaAddress = new EndpointAddress(set.GetONVIF + "/onvif/Device"); DeviceClient client = new DeviceClient(bind, mediaAddress); client.ClientCredentials.UserName.UserName = set.Login; client.ClientCredentials.UserName.Password = set.Password; if (t == SetDateTimeType.Manual) { client.SetSystemDateAndTime(t, true, new ODEV.TimeZone() { TZ = TZ }, new ODEV.DateTime() { Date = new Date() { Day = DT.Day, Month = DT.Month, Year = DT.Year }, Time = new Time() { Hour = DT.Hour, Minute = DT.Minute, Second = DT.Second } }); } else { client.SetSystemDateAndTime(t, true, null, null); } }
public override void SetSystemDateAndTime(SetDateTimeType DateTimeType, bool DaylightSavings, TimeZone TimeZone, DateTime UTCDateTime) { throw new NotImplementedException(); }
void IOnVifDevice.SetSystemDateAndTime(SetDateTimeType DateTimeType, bool DaylightSavings, TimeZone TimeZone, DateTime UTCDateTime) { throw new NotImplementedException(); }