Example #1
0
            void entry_DialogEntryChanged(object sender, EntryEventArgs e)
            {
                if (callback != null && e != null && e.Entry != null)
                {
                    try
                    {
                        DialogEntryStatus status = e.Entry.Status;
                        if (status != lastStatus)
                        {
                            if (status.HasFlag(DialogEntryStatus.Disabled))
                            {
                                return;
                            }

                            // activation
                            if (status.HasFlag(DialogEntryStatus.Activated) && !lastStatus.HasFlag(DialogEntryStatus.Activated))
                            {
                                callback(e.Entry);
                            }
                            // checked
                            else if (status.HasFlag(DialogEntryStatus.Checked) && !lastStatus.HasFlag(DialogEntryStatus.Checked))
                            {
                                callback(e.Entry);
                            }
                        }
                    }
                    catch (Exception) { }
                }
            }
Example #2
0
 /// <summary>
 /// Raises the entry updating event.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The <see cref="Mediachase.Commerce.Catalog.Events.EntryEventArgs"/> instance containing the event data.</param>
 public void RaiseEntryUpdatingEvent(CatalogEntryDto sender, EntryEventArgs args)
 {
     if (EntryUpdating != null)
     {
         EntryUpdating(sender, args);
     }
 }
Example #3
0
 /// <summary>
 /// Entries updated.
 /// </summary>
 /// <param name="source">The source.</param>
 /// <param name="args">The <see cref="Mediachase.Commerce.Catalog.Events.EntryEventArgs"/> instance containing the event data.</param>
 public void EntryUpdated(object source, EntryEventArgs args)
 {
     if (_admin != null)
     {
         _admin.Save();
     }
 }
 void d_EntryChanged(object sender, EntryEventArgs e)
 {
     // Updates Editfield contents in D2F menu
     if (e != null && e.Entry != null && e.Entry.Type != null &&
         e.Entry.Type == DialogEntryType.EditField && e.Entry.Title != null && !e.Entry.Title.Equals(Text))
     {
         this.Text = "ef:: " + e.Entry.Title;
     }
 }
Example #5
0
 /// <summary>
 /// Handles the EntryDeactivated event when a dialog entry is deactivated.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EntryEventArgs"/> instance containing the event data.</param>
 void d_EntryDeactivated(object sender, EntryEventArgs e)
 {
     if (e != null && e.Entry != null)
     {
         DialogToolStripMenuItem entry = this.GetDialogToolStripItemWithID(e.Entry.ID);
         if (entry != null)
         {
             entry.Checked = false;
         }
     }
 }
Example #6
0
 /// <summary>
 /// Fires the <see cref="DialogEntryChanged"/> event to its listeners.
 /// </summary>
 /// <param name="e">The <see cref="EntryEventArgs"/> instance containing the event data.</param>
 protected void fire_DialogEntryChanged(EntryEventArgs e)
 {
     if (DialogEntryChanged != null)
     {
         try
         {
             DialogEntryChanged.Invoke(this, e);
         }
         catch { }
     }
 }
 private async void Entry_Returned(object sender, EntryEventArgs e)
 {
     if (e.Name == "HomeName")
     {
         homeAddressEntry.FocusEntry();
     }
     else
     {
         await CreateHomeAction();
     }
 }
Example #8
0
 private void Entry_Returned(object sender, EntryEventArgs e)
 {
     if (e.Name == "User")
     {
         passEntry.FocusEntry();
     }
     else if (e.Name == "Pass")
     {
         vM.LoginCommand.Execute(null);
     }
 }
Example #9
0
 /// <summary>
 /// Handles the EntryUnchecked event when a dialog entry is unchecked.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EntryEventArgs"/> instance containing the event data.</param>
 void d_EntryUnchecked(object sender, EntryEventArgs e)
 {
     if (e != null && e.Entry != null)
     {
         System.Diagnostics.Debug.WriteLine("???? Dialog Entry UCH " + e.Entry.Title);
         DialogToolStripMenuItem item = this.GetDialogToolStripItemWithID(e.Entry.ID);
         if (item != null && item.Checked)
         {
             item.Checked = false;
         }
     }
 }
        public void DeleteItem(RepositoryId repositoryId)
        {
            var args = new EntryEventArgs(repositoryId);

            _caches.DeleteItemFromCaches(repositoryId);
            _decoratedDataMapper.DeleteItem(repositoryId);

            if (AfterEntryDeleted != null)
            {
                AfterEntryDeleted(this, args);
            }
        }
Example #11
0
        /// <summary>
        /// Entries updating.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="args">The <see cref="Mediachase.Commerce.Catalog.Events.EntryEventArgs"/> instance containing the event data.</param>
        public void EntryUpdating(object source, EntryEventArgs args)
        {
            CatalogEntryDto dto = (CatalogEntryDto)source;

            if (_admin == null)
            {
                _admin = new LogAdmin(new LogDto());
            }

            //dto.CatalogEntry.CatalogEntryRowDeleted += new CatalogEntryDto.CatalogEntryRowChangeEventHandler(CatalogEntry_CatalogEntryRowDeleted);
            //dto.CatalogEntry.CatalogEntryRowChanged += new CatalogEntryDto.CatalogEntryRowChangeEventHandler(CatalogEntry_CatalogEntryRowChanged);
            dto.CatalogEntry.CatalogEntryRowChanging += new CatalogEntryDto.CatalogEntryRowChangeEventHandler(CatalogEntry_CatalogEntryRowChanging);
        }
        private void CatalogEv_EntryUpdated(object sender, EntryEventArgs e)
        {
            EntryChange        chg        = e.Changes.First();
            ReferenceConverter refConvert = ServiceLocator.Current.GetInstance <ReferenceConverter>();
            ContentReference   catRef     = refConvert.GetEntryContentLink(chg.EntryId);
            IContentLoader     loader     = ServiceLocator.Current.GetInstance <IContentLoader>();
            var catEntry = loader.Get <IContent>(catRef);

            var info = new List <string>
            {
                "Entry Updated Catalog Event Fired!",
                $"The name of the item updated: {catEntry.Name}"
            };

            WriteToTextFile(info);
        }
        public void DeleteItem(LexEntry item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            var args = new EntryEventArgs(item);

            _caches.DeleteItemFromCaches(item);
            _decoratedDataMapper.DeleteItem(item);

            if (AfterEntryDeleted != null)
            {
                AfterEntryDeleted(this, args);
            }
        }
Example #14
0
 private void Entry_Returned(object sender, EntryEventArgs e)
 {
     if (e.Name == "User")
     {
         vM.SendCommand.Execute(null);
     }
     else if (e.Name == "Pass")
     {
         rePassEntry.FocusEntry();
     }
     else if (e.Name == "RePass")
     {
         vM.NewPasswordCommand.Execute(null);
     }
     else if (e.Name == "Validation")
     {
         vM.SendValidationCommand.Execute(null);
     }
 }
 private void Entry_Returned(object sender, EntryEventArgs e)
 {
     if (e.Name == "Pass")
     {
         rePassEntry.FocusEntry();
     }
     else if (e.Name == "RePass")
     {
         vM.RegisterCommand.Execute(null);
     }
     else if (e.Name == "Name")
     {
         phoneEntry.FocusEntry();
     }
     else if (e.Name == "Phone")
     {
         vM.RegisterCommand.Execute(null);
     }
 }
Example #16
0
        protected virtual void entry_DialogEntryChanged(object sender, EntryEventArgs e)
        {
            if (e != null && e.Entry != null)
            {
                if (e is DetailedEntryChangedEventArgs)
                {
                    switch (((DetailedEntryChangedEventArgs)e).ChangedProperty)
                    {
                    case "ChildEntries":
                        handleChildChildEntrieEvent(e.Entry);
                        break;

                    default:
                        break;
                    }
                }

                fire_DialogEntryChanged(e);
            }
        }
Example #17
0
        private void entry_DialogEntryChanged(object sender, EntryEventArgs e)
        {
            if (e.Entry == this.Entry)
            {
                if (e is DetailedEntryChangedEventArgs)
                {
                    // TODO: check for different types ...
                    HasChanged = true;
                }
                else
                {
                    HasChanged = true;
                }

                if (HasChanged)
                {
                    buildCacheMatrix();
                }
            }
            else // ERROR: ignore
            {
                unregisterFromEvents(sender as DialogEntry);
            }
        }
Example #18
0
 static void EntryCanceledEvent(object sender, EntryEventArgs args)
 {
     Console.WriteLine("");
     Console.WriteLine("Entry canceled event:" + Environment.NewLine + SerializeJson(args, true));
     Console.WriteLine("");
 }
Example #19
0
 static void DebitAddedEvent(object sender, EntryEventArgs args)
 {
     Console.WriteLine("");
     Console.WriteLine("Debit added event:" + Environment.NewLine + SerializeJson(args, true));
     Console.WriteLine("");
 }
 private void InstanceOnLocalEntryUpdating(object sender, EntryEventArgs entryEventArgs)
 {
     _log.Debug("Entry Updating ({0}): {1}", entryEventArgs.EventName, sender.GetType().Name);
 }
 private void InstanceOnLocalEntryUpdating(object sender, EntryEventArgs e)
 {
     SendWebhookContentChangedAsync("", "").Wait();
 }
 private void InstanceOnLocalEntryUpdating(object sender, EntryEventArgs entryEventArgs)
 {
     _log.Debug("Entry Updating ({0}): {1}", entryEventArgs.EventName, sender.GetType().Name);
 }