private void RefreshFirmwareLabel() { SystemVersion currentFirmware = _contentManager.GetCurrentFirmwareVersion(); GLib.Idle.Add(new GLib.IdleHandler(() => { _firmwareVersionLabel.Text = currentFirmware != null ? currentFirmware.VersionString : "0.0.0"; return(false); })); }
public override void ToStream(Stream output) { output.Write(TLUtils.SignatureToBytes(Signature)); AppId.ToStream(output); DeviceModel.ToStream(output); SystemVersion.ToStream(output); AppVersion.ToStream(output); SystemLangCode.ToStream(output); LangPack.ToStream(output); LangCode.ToStream(output); }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), AppId.ToBytes(), DeviceModel.ToBytes(), SystemVersion.ToBytes(), AppVersion.ToBytes(), LangCode.ToBytes(), Data.ToBytes())); }
public NSDictionary?GetAttachments(CVAttachmentMode attachmentMode) { #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS(15, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(8, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { return(Runtime.GetINativeObject <NSDictionary> (CVBufferCopyAttachments(Handle, attachmentMode), true)); } return(Runtime.GetNSObject <NSDictionary> (CVBufferGetAttachments(Handle, attachmentMode), false)); }
public void DeepCloneExample( ) { #region DeepClone SystemVersion version1 = new SystemVersion("1.2.3"); SystemVersion version2 = (SystemVersion)SoftBasic.DeepClone(version1); // 这两个版本号的值是一致的,但是属于不同的对象 #endregion }
bool IsDeprecated() { #if __MACCATALYST__ return(true); #elif IOS return(SystemVersion.CheckiOS(9, 0)); #elif MONOMAC return(SystemVersion.CheckmacOS(10, 11)); #elif TVOS || WATCH return(true); #endif }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), TokenType.ToBytes(), Token.ToBytes(), DeviceModel.ToBytes(), SystemVersion.ToBytes(), AppVersion.ToBytes(), AppSandbox.ToBytes(), LangCode.ToBytes())); }
public INSaveProfileInCarIntent(NSNumber profileNumber, string profileLabel) { // Apple created this change in 10,2 if (SystemVersion.CheckiOS(10, 2)) { InitializeHandle(InitWithProfileNumberName(profileNumber, profileLabel)); } else { InitializeHandle(InitWithProfileNumberLabel(profileNumber, profileLabel)); } }
protected INSetProfileInCarIntent(NSNumber profileNumber, string profileLabel, NSNumber defaultProfile) { // Apple created this change in 10,2 if (SystemVersion.CheckiOS(10, 2)) { InitializeHandle(InitWithProfileNumberName(profileNumber, profileLabel, defaultProfile)); } else { InitializeHandle(InitWithProfileNumberLabel(profileNumber, profileLabel, defaultProfile)); } }
/// <summary> /// 获取需要存储的数据 /// </summary> /// <returns></returns> public override string ToSaveString() { JObject json = new JObject { { nameof(SystemVersion), new JValue(SystemVersion.ToString()) }, { nameof(Announcement), new JValue(Announcement) }, { nameof(Can_Account_Login), new JValue(Can_Account_Login) }, { nameof(Account_Forbidden_Reason), new JValue(Account_Forbidden_Reason) } }; return(json.ToString()); }
public override void ToStream(Stream output) { output.Write(TLUtils.SignatureToBytes(Signature)); Flags.ToStream(output); AppId.ToStream(output); DeviceModel.ToStream(output); SystemVersion.ToStream(output); AppVersion.ToStream(output); SystemLangCode.ToStream(output); LangPack.ToStream(output); LangCode.ToStream(output); ToStream(output, _proxy, _flags, (int)InitConnectionFlags.Proxy); }
public static INBillTypeResolutionResult GetSuccess(INBillType resolvedValue) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #endif { return(SuccessWithResolvedBillType(resolvedValue)); } else { return(SuccessWithResolvedValue(resolvedValue)); } }
public static INCarSignalOptionsResolutionResult GetSuccess(INCarSignalOptions resolvedValue) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #endif { return(SuccessWithResolvedCarSignalOptions(resolvedValue)); } else { return(SuccessWithResolvedValue(resolvedValue)); } }
public virtual void ResumeAllMediaPlayback(Action?completionHandler) { #if IOS || __MACCATALYST__ if (SystemVersion.CheckiOS(15, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { SetAllMediaPlaybackSuspended(false, completionHandler); } else { _OldResumeAllMediaPlayback(completionHandler); } }
public virtual Task SuspendAllMediaPlaybackAsync() { #if IOS || __MACCATALYST__ if (SystemVersion.CheckiOS(15, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { return(SetAllMediaPlaybackSuspendedAsync(true)); } else { return(_OldSuspendAllMediaPlaybackAsync()); } }
public virtual Task PauseAllMediaPlaybackAsync() { #if IOS || __MACCATALYST__ if (SystemVersion.CheckiOS(15, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { return(_NewPauseAllMediaPlaybackAsync()); } else { return(_OldPauseAllMediaPlaybackAsync()); } }
public virtual void PauseAllMediaPlayback(Action?completionHandler) { #if IOS || __MACCATALYST__ if (SystemVersion.CheckiOS(15, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { _NewPauseAllMediaPlayback(completionHandler); } else { _OldPauseAllMediaPlayback(completionHandler); } }
public virtual void CloseAllMediaPresentations() { #if IOS || __MACCATALYST__ if (SystemVersion.CheckiOS(15, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(12, 0)) #endif { CloseAllMediaPresentationsAsync().Wait(); } else { _OldCloseAllMediaPresentations(); } }
public static INBillTypeResolutionResult GetConfirmationRequired(INBillType valueToConfirm) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #endif { return(ConfirmationRequiredWithBillTypeToConfirm(valueToConfirm)); } else { return(ConfirmationRequiredWithValueToConfirm(valueToConfirm)); } }
public bool CheckSystemVersion() { string systemVersionText = "System Version"; string versionToCompare = systemVersionText + " " + Global.GlobalREICTModel.Settings.Where(x => x.Name == systemVersionText).FirstOrDefault().Value; if (versionToCompare.ToUpper() != SystemVersion.ToUpper()) { return(false); } else { return(true); } }
public T?GetAttachment <T> (NSString key, out CVAttachmentMode attachmentMode) where T : class, INativeObject { if (key is null) { throw new ArgumentNullException(nameof(key)); } #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS(15, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(8, 0)) #endif { return(Runtime.GetINativeObject <T> (CVBufferCopyAttachment(Handle, key.Handle, out attachmentMode), true)); } return(Runtime.GetINativeObject <T> (CVBufferGetAttachment(Handle, key.Handle, out attachmentMode), false)); }
static bool CheckSystemVersion() { if (!versionCheck.HasValue) { #if MONOMAC versionCheck = SystemVersion.CheckmacOS(10, 12); #elif TVOS || IOS versionCheck = SystemVersion.CheckiOS(10, 0); #else #error Unknown platform #endif } return(versionCheck.Value); }
public static INCallRecordTypeResolutionResult GetSuccess(INCallRecordType resolvedValue) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(10, 13)) #endif { return(SuccessWithResolvedCallRecordType(resolvedValue)); } else { return(SuccessWithResolvedValue(resolvedValue)); } }
public static INCallRecordTypeResolutionResult GetConfirmationRequired(INCallRecordType valueToConfirm) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(10, 13)) #endif { return(ConfirmationRequiredWithCallRecordTypeToConfirm(valueToConfirm)); } else { return(ConfirmationRequiredWithValueToConfirm(valueToConfirm)); } }
public NSObject?GetAttachment(NSString key, out CVAttachmentMode attachmentMode) { if (key is null) { throw new ArgumentNullException(nameof(key)); } if (SystemVersion.CheckmacOS(12, 0)) { return(Runtime.GetNSObject <NSObject> (CVBufferCopyAttachment(Handle, key.Handle, out attachmentMode), true)); } else { return(Runtime.GetNSObject <NSObject> (CVBufferGetAttachment(Handle, key.Handle, out attachmentMode), false)); } }
public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired(INMessageAttributeOptions valueToConfirm) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(10, 13)) #endif { return(ConfirmationRequiredWithMessageAttributeOptionsToConfirm(valueToConfirm)); } else { return(ConfirmationRequiredWithValueToConfirm(valueToConfirm)); } }
public static INMessageAttributeOptionsResolutionResult GetSuccess(INMessageAttributeOptions resolvedValue) { #if IOS if (SystemVersion.CheckiOS(11, 0)) #elif WATCH if (SystemVersion.CheckwatchOS(4, 0)) #elif MONOMAC if (SystemVersion.CheckmacOS(10, 13)) #endif { return(SuccessWithResolvedMessageAttributeOptions(resolvedValue)); } else { return(SuccessWithResolvedValue(resolvedValue)); } }
public static INRelativeReferenceResolutionResult GetSuccess(INRelativeReference resolvedValue) { #if __WATCHOS__ throw new PlatformNotSupportedException("This class is not supported on watchOS"); #elif __IOS__ if (SystemVersion.CheckiOS(11, 0)) { return(SuccessWithResolvedRelativeReference(resolvedValue)); } else { return(SuccessWithResolvedValue(resolvedValue)); } #endif }
public static INRelativeReferenceResolutionResult GetConfirmationRequired(INRelativeReference valueToConfirm) { #if __WATCHOS__ throw new PlatformNotSupportedException("This class is not supported on watchOS"); #elif __IOS__ if (SystemVersion.CheckiOS(11, 0)) { return(ConfirmationRequiredWithRelativeReferenceToConfirm(valueToConfirm)); } else { return(ConfirmationRequiredWithValueToConfirm(valueToConfirm)); } #endif }
public override byte[] ToBytes() { return(TLUtils.Combine( TLUtils.SignatureToBytes(Signature), Flags.ToBytes(), AppId.ToBytes(), DeviceModel.ToBytes(), SystemVersion.ToBytes(), AppVersion.ToBytes(), SystemLangCode.ToBytes(), LangPack.ToBytes(), LangCode.ToBytes(), ToBytes(_proxy, _flags, (int)InitConnectionFlags.Proxy), Data.ToBytes())); }