Example #1
0
        private async Task <bool> _RowAction(IGRRow _Row)
        {
            GRRow <BookDisplay> Row = (GRRow <BookDisplay>)_Row;

            BookInstruction Payload = ( BookInstruction )Row.Source.Payload;

            if (Payload != null)
            {
                // Save the book here
                Payload.SaveInfo();

                // Reload the BookDisplay as Entry might changed from SaveInfo
                Row.Source = new BookDisplay(Payload.Entry);
            }

            SpiderBook Item = await SpiderBook.CreateSAsync(Row.Source.Entry.ZoneId, Row.Source.Entry.ZItemId, Payload?.BookSpiderDef);

            Item.PropertyChanged += Item_PropertyChanged;

            XParameter Metadata = Item.PSettings.Parameter("METADATA") ?? new XParameter("METADATA");

            Metadata.SetValue(new XKey("payload", Row.Source.Entry.Meta[AppKeys.GLOBAL_SSID]));
            Item.PSettings.SetParameter(Metadata);

            if (!Item.ProcessSuccess && Item.CanProcess)
            {
                await ItemProcessor.ProcessLocal(Item);
            }

            Item.PropertyChanged -= Item_PropertyChanged;

            (( BookDisplayPageExt )Extension).OpenItem(_Row);

            return(true);
        }
Example #2
0
 private void MessageBus_OnDelivery(Message Mesg)
 {
     if (Mesg.Content == AppKeys.SH_SCRIPT_REMOVE && Mesg.Payload is HubScriptItem HSI)
     {
         if (HSTable.Items is ObservableCollection <GRRow <HSDisplay> > Collection)
         {
             GRRow <HSDisplay> Row = Collection.FirstOrDefault(x => x.Source.Item == HSI);
             if (Row != null)
             {
                 Collection.Remove(Row);
             }
         }
     }
 }
Example #3
0
 public void Remove(GRRow <NameValue <string> > Row)
 {
     ((Observables <NameValue <string>, GRRow <NameValue <string> > >)ConvTable.Items).Remove(Row);
     SourceData.Remove(Row.Source);
 }
Example #4
0
 public void Delete(GRRow <IBookProcess> BkRow)
 {
     BSData.Delete(BkRow);
 }