public Sampler( GraphicsDevice device, ref SamplerState samplerState ) : base(device) { var refreshSamplerStateCreateInfo = samplerState.ToRefreshSamplerStateCreateInfo(); Handle = Refresh.Refresh_CreateSampler( device.Handle, ref refreshSamplerStateCreateInfo ); }
public static string GetStringValue(this Refresh enumValue) { switch (enumValue) { case Refresh.True: return("true"); case Refresh.False: return("false"); case Refresh.WaitFor: return("wait_for"); } throw new ArgumentException($"'{enumValue.ToString()}' is not a valid value for enum 'Refresh'"); }
public async Task <bool> DeleteAsync(string id, Refresh refresh = Refresh.WaitFor) { if (string.IsNullOrWhiteSpace(id)) { throw new ArgumentException(string.Format(Utils.ARGUMENT_EMPTY_MESSAGE, nameof(id)), nameof(id)); } var response = await _client.DeleteAsync <T>(id, x => x .Refresh(refresh)); return(response.IsValid); }
public void StartConnect(Refresh callback) { _callback = callback; _saea.RemoteEndPoint = _host; _saea.AcceptSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); bool willRaiseEvent = _saea.AcceptSocket.ConnectAsync(_saea); if (!willRaiseEvent) { ProcessConnect(_saea); } }
protected virtual void Dispose(bool disposing) { if (!IsDisposed) { if (disposing) { // TODO: dispose managed state (managed objects) } Refresh.Refresh_DestroyDevice(Handle); IsDisposed = true; } }
public Texture(GraphicsDevice device, ref Campari.TextureCreateInfo textureCreateInfo) : base(device) { var refreshTextureCreateInfo = textureCreateInfo.ToRefreshTextureCreateInfo(); Handle = Refresh.Refresh_CreateTexture( device.Handle, ref refreshTextureCreateInfo ); Format = textureCreateInfo.Format; Width = textureCreateInfo.Width; Height = textureCreateInfo.Height; }
public void SetRefresh(bool isRefresh) { _isRefreshing = isRefresh; if (_isRefreshing) { VisualStateManager.GoToState(this, RefreshState, true); Refresh?.Invoke(); } else { VisualStateManager.GoToState(this, NormalState, true); } }
private void Initialize() { // startup state Address.IsEnabled = true; BusAcknowledge.Write(DigitalLevel.High); Halt.Write(DigitalLevel.High); IoRequest.Write(DigitalLevel.High); MemoryRequest.Write(DigitalLevel.High); MachineCycle1.Write(DigitalLevel.High); Refresh.Write(DigitalLevel.High); Read.Write(DigitalLevel.High); Write.Write(DigitalLevel.High); }
public HomePage() { InitializeComponent(); Refresh.SetHome(this); //#if DEBUG // requestURL = "https://us-central1-e0-rasvada.cloudfunctions.net/PageHome"; //#endif requestURL = "https://us-central1-e0-trouvailler.cloudfunctions.net/PageHome "; rassavadaEntity = new RassavadaEntity() { }; GetUser(); }
public Dictionary <int, PingerModule.IPinger> GetFromConfig() { if (!ListProtocols.Any()) { Refresh?.Invoke(this, new EventArgs()); if (!ListProtocols.Any()) { return(ListProtocols); } GetFromConfig(); } return(ListProtocols); }
public void StartDisconnect(Refresh callback) { _callback = callback; if (_saea.AcceptSocket.Connected == true) { _saea.AcceptSocket.Shutdown(SocketShutdown.Both); bool willRaiseEvent = _saea.AcceptSocket.DisconnectAsync(_saea); if (!willRaiseEvent) { ProcessDisconnectAndCloseSocket(_saea); } } }
public unsafe void SetData <T>( uint offsetInBytes, T *data, uint dataLengthInBytes ) where T : unmanaged { Refresh.Refresh_SetBufferData( Device.Handle, Handle, offsetInBytes, (IntPtr)data, dataLengthInBytes ); }
public async Task <long> DeleteAsync(Func <DeleteByQueryDescriptor <T>, IDeleteByQueryRequest> selector, Refresh refresh = Refresh.WaitFor) { if (selector == null) { throw new ArgumentNullException(string.Format(Utils.ARGUMENT_NULL_MESSAGE, nameof(selector)), nameof(selector)); } var response = await _client.DeleteByQueryAsync(selector); await _client.RefreshAsync(_client.ConnectionSettings.DefaultIndex); return(!response.IsValid ? 0 : response.Deleted); }
public void CopyTextureToBuffer( ref TextureSlice textureSlice, Buffer buffer ) { var refreshTextureSlice = textureSlice.ToRefreshTextureSlice(); Refresh.Refresh_CopyTextureToBuffer( Device.Handle, Handle, ref refreshTextureSlice, buffer.Handle ); }
private Refresh loadRefreshFromXml(SecurityElement element) { Refresh refresh = new Refresh { refreshId = StrParser.ParseHexInt(element.Attribute("RefreshId"), 0), refreshName = StrParser.ParseStr(element.Attribute("RefreshName"), ""), iconId = StrParser.ParseHexInt(element.Attribute("IconId"), 0), backgroundIconId = StrParser.ParseHexInt(element.Attribute("BackgroundIconId"), 0), vipLevel = StrParser.ParseDecInt(element.Attribute("VipLevel"), 0), priority = StrParser.ParseDecInt(element.Attribute("Priority"), 0) }; if (element.Children != null) { foreach (SecurityElement element2 in element.Children) { Counter counter; string tag = element2.Tag; if (tag != null) { if (tag != "Cost") { if (tag == "CardPack") { goto Label_010A; } if (tag == "Counter") { goto Label_0128; } } else { refresh.cost = Cost.LoadFromXml(element2); } } continue; Label_010A: refresh.cardPackIDs.Add(StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0)); continue; Label_0128: counter = new Counter(); counter.counterId = StrParser.ParseHexInt(element2.Attribute("CounterId"), 0); counter.activateNeedRefreshTime = StrParser.ParseDecInt(element2.Attribute("ActivateNeedRefreshTime"), 0); counter.closeNeedActivateTime = StrParser.ParseDecInt(element2.Attribute("CloseNeedActivateTime"), 0); counter.cardPackId = StrParser.ParseHexInt(element2.Attribute("CardPackId"), 0); refresh.counters.Add(counter); } } return(refresh); }
public override void Process(TagHelperContext context, TagHelperOutput output) { output.Attributes.Add("data-hood-media", "clear"); if (!output.Attributes.ContainsName("href") && Url.IsSet()) { output.Attributes.Add("href", Url); } if (Refresh.IsSet()) { output.Attributes.Add("data-hood-media-refresh", Refresh); } }
/// <summary> /// 获取网页授权接口调用凭证 /// </summary> public Result GetAccessToken() { string requestUrl = $"{this.RequestUrl}?{this.RequestParameter.ToString()}"; Result result = RequestResult.UploadData <Result>(requestUrl); if (result != null && result.errcode == 0) { if (this.RefreshParameter == null) { this.RefreshParameter = new Refresh(this.RequestParameter.appid, result.refresh_token); } } return(result); }
public unsafe uint PushComputeShaderParams <T>( params T[] uniforms ) where T : unmanaged { fixed(T *ptr = &uniforms[0]) { return(Refresh.Refresh_PushComputeShaderParams( Device.Handle, Handle, (IntPtr)ptr, (uint)uniforms.Length )); } }
public void ChangeSelectedIndex(int newValue, int oldValue) { try { ItemsSource[newValue].IsActive = true; ItemsSource[oldValue].IsActive = false; if (ItemsSource[newValue].UnreadCount > 0) { ItemsSource[newValue].UnreadCount = 0; Refresh?.Invoke(this, new EventArgs()); } } catch { } }
public void BindIndexBuffer( Buffer indexBuffer, uint offset, Refresh.IndexElementSize indexElementSize ) { Refresh.Refresh_BindIndexBuffer( Device.Handle, Handle, indexBuffer.Handle, offset, indexElementSize ); }
private void ListView_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { var index = ItemsSource.FindIndex(item => item == (e.OriginalSource as FrameworkElement).DataContext as HeaderModel); try { if (ItemsSource[index].UnreadCount > 0) { ItemsSource[index].UnreadCount = 0; } Refresh?.Invoke(this, new EventArgs()); } catch { } }
public void QueuePresent( ref TextureSlice textureSlice, Refresh.Filter filter ) { var refreshTextureSlice = textureSlice.ToRefreshTextureSlice(); Refresh.Refresh_QueuePresent( Device.Handle, Handle, ref refreshTextureSlice, IntPtr.Zero, filter ); }
public unsafe RenderPass( GraphicsDevice device, params Refresh.ColorTargetDescription[] colorTargetDescriptions ) : base(device) { fixed(Refresh.ColorTargetDescription *ptr = colorTargetDescriptions) { Refresh.RenderPassCreateInfo renderPassCreateInfo; renderPassCreateInfo.colorTargetCount = (uint)colorTargetDescriptions.Length; renderPassCreateInfo.colorTargetDescriptions = (IntPtr)ptr; renderPassCreateInfo.depthStencilTargetDescription = IntPtr.Zero; Handle = Refresh.Refresh_CreateRenderPass(device.Handle, ref renderPassCreateInfo); } }
public void New() { var jumpsource = new DynamicEnumParameter.Source(); IdProvider idprovider = new IdProvider(); var nodes = new List <ConversationNode>(); if (!(m_datasource is DummyDataSource)) //TODO: This could be handled more elegantly { nodes.Add(m_nodeFactory().MakeNode(m_datasource.GetNode(SpecialNodes.START_GUID)(idprovider.Next()), new Point(50, 50), new Size(10, 10))); } var file = new ConversationFile(idprovider, nodes, new List <NodeGroup>(), null, jumpsource); Select(file); Refresh.Execute(); }
public override int GetHashCode() { var hashCode = 1152426255; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(PrimaryNameServer); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(ResponsibleMailAddress); hashCode = hashCode * -1521134295 + Serial.GetHashCode(); hashCode = hashCode * -1521134295 + Refresh.GetHashCode(); hashCode = hashCode * -1521134295 + Retry.GetHashCode(); hashCode = hashCode * -1521134295 + Expire.GetHashCode(); hashCode = hashCode * -1521134295 + DefaultTtl.GetHashCode(); return(hashCode); }
public void AddMod(Mod mod) { if (mod == null) { return; } Mod oldMod = GetModFromDirectory(mod.ModDirectory); if (oldMod != null) { Remove(oldMod); } Add(mod); Refresh?.Invoke(); }
public CommandBuffer AcquireCommandBuffer() { var commandBufferHandle = Refresh.Refresh_AcquireCommandBuffer(Handle, 0); if (commandBufferPool.Count == 0) { commandBufferPool.Enqueue(new CommandBuffer(this)); } var commandBuffer = commandBufferPool.Dequeue(); commandBuffer.Handle = commandBufferHandle; return(commandBuffer); }
// NOTE: You want to wait on the device before calling this public unsafe void GetData <T>( T[] data, uint dataLengthInBytes ) where T : unmanaged { fixed(T *ptr = &data[0]) { Refresh.Refresh_GetBufferData( Device.Handle, Handle, (IntPtr)ptr, dataLengthInBytes ); } }
/// <summary> /// Initializes a new instance of the <see cref="RefLogViewModel" /> class. /// </summary> /// <exception cref="ArgumentNullException">Must have valid repository details.</exception> public RefLogViewModel() { IObservable <bool> isCurrentBranchObservable = this.WhenAnyValue(x => x.RepositoryDetails.SelectedBranch).Select(details => details != null); _refresh = ReactiveCommand.CreateFromObservable(RefreshImpl, isCurrentBranchObservable); _refresh.ToObservableChangeSet() .Sort(SortExpressionComparer <GitRefLog> .Descending(p => p.DateTime), SortOptions.UseBinarySearch) .ObserveOn(RxApp.MainThreadScheduler) .Bind(out _refLogs) .Subscribe(); this.WhenAnyValue(x => x.RepositoryDetails.SelectedBranch).Where(x => x != null).Subscribe( _ => Refresh.InvokeCommand()); }
public void DrawPrimitives( uint vertexStart, uint primitiveCount, uint vertexParamOffset, uint fragmentParamOffset ) { Refresh.Refresh_DrawPrimitives( Device.Handle, Handle, vertexStart, primitiveCount, vertexParamOffset, fragmentParamOffset ); }
public void QueuePresent( ref TextureSlice textureSlice, ref Refresh.Rect destinationRectangle, Refresh.Filter filter ) { var refreshTextureSlice = textureSlice.ToRefreshTextureSlice(); Refresh.Refresh_QueuePresent( Device.Handle, Handle, ref refreshTextureSlice, ref destinationRectangle, filter ); }
private async Task AddVaultAsync() { try { if (SelectedHardwareVault == null) { WarningMessage = "Please, select a vault."; return; } using (TransactionScope transactionScope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled)) { await EmployeeService.AddHardwareVaultAsync(EmployeeId, SelectedHardwareVault.Id); var ldapSettings = await AppSettingsService.GetLdapSettingsAsync(); if (ldapSettings?.Password != null) { var employee = await EmployeeService.GetEmployeeByIdAsync(EmployeeId); if (employee.ActiveDirectoryGuid != null) { await LdapService.AddUserToHideezKeyOwnersAsync(ldapSettings, employee.ActiveDirectoryGuid); } } transactionScope.Complete(); } await Refresh.InvokeAsync(this); await ToastService.ShowToastAsync("Vault added", ToastType.Success); await SynchronizationService.UpdateEmployeeDetails(ExceptPageId, EmployeeId); await SynchronizationService.HardwareVaultStateChanged(SelectedHardwareVault.Id); await ModalDialogService.CloseAsync(); } catch (Exception ex) { await ModalDialogService.CloseAsync(); Logger.LogError(ex.Message, ex); await ToastService.ShowToastAsync(ex.Message, ToastType.Error); } }
protected bool ShouldRefresh(HttpRemoteResponse response, out Refresh refresh) { var should = (int)response.StatusCode / 100 == 2 && response.Headers.ContainsKey("Refresh"); refresh = null; if (should) { var match = RefreshPattern.Match(response.Headers["Refresh"]); if (match.Success && match.Groups.Count == 3) refresh = new Refresh { Seconds = int.Parse(match.Groups[1].Value), Uri = match.Groups[2].Value }; } return should; }
public StateObject(CMDTYPE type, string msg, Refresh callback) { _type = type; _sendMsg = Encoding.UTF8.GetBytes(msg); _callback = callback; }
public void AddReturnItem() { if (CurrentReturnHeader != null) { _goodsReturnAddModel.IsEdit = false; //_goodsReturnAddModel.IsChanged = false; using (var dlg = new GoodsReturnAddDlg(_goodsReturnAddModel)) { var rf = new Refresh(_goodsReturnAddModel.RefreshInvoiceData); rf(); if (dlg.ShowDialog() == DialogResult.OK) { try { CurrentReturnHeader.AddNewItem(_goodsReturnAddModel.GetReturnItemObj()); _goodsReturnAddModel.GetInvoiceData().Refresh(_goodsReturnAddModel.GetReturnItemObj().InvoiceDataId); _goodsReturnAddModel.IsChanged = true; } catch (Exception e) { XtraMessageBox.Show(e.Message, "Создание позиции возврата"); } } } } }