/// <summary> /// Handles load data notification /// </summary> unsafe static partial void Host_HandleLoadData(ISciterNotifications host, IntPtr pns) { var datantf = (SCN_LOAD_DATA *)pns; var e = new LoadDataEventArgs(datantf->GetUri(), () => datantf->GetData()) { IsCached = datantf->outData != IntPtr.Zero, //TODO: Htmlayout do not have such property //RequestId = datantf->request_id, ResourceType = (ResourceType)datantf->dataType }; host.ProcessLoadData(e); byte[] bytes = null; if (e.IsDataAvailable) { bytes = e.GetData(); } else { bytes = SciterFactory.ResolveBinResource(e.Uri, e.ResourceType); } SciterDataReady(datantf->hwnd, e.Uri, bytes); }
/// <summary> /// Handles the LoadDataEntryEvent event of the DataUnitBase control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="args">The <see cref="LoadDataEventArgs"/> instance containing the event data.</param> private void DataUnitBase_LoadDataEntryEvent(object sender, LoadDataEventArgs args) { }
/// <summary> /// Invokes the load data entry event. /// </summary> /// <param name="args">The <see cref="LoadDataEventArgs"/> instance containing the event data.</param> protected void InvokeLoadDataEntryEvent(LoadDataEventArgs args) { LoadDataEntryEvent.Invoke(this, args); }