示例#1
0
        /// <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);
        }
示例#2
0
 /// <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)
 {
 }
示例#3
0
 /// <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);
 }