Ejemplo n.º 1
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            // Check for new mobs being fought.  If any exist, update the Mob Group dropdown list.
            if (e.DatasetChanges.Battles.Count > 0)
            {
                string mobSelected = mobsCombo.CBSelectedItem();
                flagNoUpdate = true;
                UpdateMobList();

                flagNoUpdate = true;
                mobsCombo.CBSelectItem(mobSelected);
            }

            if (e.DatasetChanges.Interactions.Count != 0)
            {
                var enfeebles = from i in e.DatasetChanges.Interactions
                                where (HarmType)i.HarmType == HarmType.Enfeeble
                                select i;

                if (enfeebles.Any())
                {
                    HandleDataset(null);
                }
            }
        }
Ejemplo n.º 2
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            bool   changesFound            = false;
            string currentlySelectedPlayer = lsAll;

            // Check for new mobs being fought.  If any exist, update the Mob Group dropdown list.
            if (e.DatasetChanges.Battles != null)
            {
                if (e.DatasetChanges.Battles.Any(x => x.RowState == DataRowState.Added))
                {
                    changesFound = true;
                }
            }

            if (e.DatasetChanges.Interactions != null)
            {
                if (e.DatasetChanges.Interactions.Any(x => x.RowState == DataRowState.Added))
                {
                    changesFound = true;
                }
            }

            if (changesFound == true)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 3
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            bool   changesFound            = false;
            string currentlySelectedPlayer = Resources.PublicResources.All;

            if (playersCombo.CBSelectedIndex() > 0)
            {
                currentlySelectedPlayer = playersCombo.CBSelectedItem();
            }

            if ((e.DatasetChanges.Combatants != null) &&
                (e.DatasetChanges.Combatants.Count > 0))
            {
                UpdatePlayerList();
                changesFound = true;

                flagNoUpdate = true;
                playersCombo.CBSelectItem(currentlySelectedPlayer);
            }

            if ((e.DatasetChanges.Items != null) &&
                (e.DatasetChanges.Items.Count > 0))
            {
                changesFound = true;
            }


            if (changesFound == true)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 4
0
 public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
 {
     if (e.DatasetChanges != null)
     {
         if (e.DatasetChanges.Battles.Any(b => (b.Killed == true) || (b.EndTime != MagicNumbers.MinSQLDateTime)))
         {
             HandleDataset(null);
         }
     }
 }
Ejemplo n.º 5
0
 public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
 {
     if (e.DatasetChanges != null)
     {
         if ((e.DatasetChanges.Combatants != null) &&
             (e.DatasetChanges.Combatants.Count > 0))
         {
             HandleDataset(null);
         }
     }
 }
Ejemplo n.º 6
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            // Parse is running.
            DisableOptions(true);

            if ((e.DatasetChanges.Combatants != null) &&
                (e.DatasetChanges.Combatants.Any(c => c.RowState == DataRowState.Added)))
            {
                UpdatePlayerList();

                if (playersCombo.CBSelectedIndex() < 0)
                {
                    flagNoUpdate = true;
                    playersCombo.CBSelectIndex(0);
                }
            }

            // Check for new mobs being fought.  If any exist, update the Mob Group dropdown list.
            if (e.DatasetChanges.Battles != null)
            {
                if (e.DatasetChanges.Battles.Any(b => b.RowState == DataRowState.Added))
                {
                    string currentSelection = mobsCombo.CBSelectedItem();

                    UpdateMobList();

                    if (groupMobs == false)
                    {
                        mobsCombo.CBSelectIndex(-1);
                    }
                    else
                    {
                        // Selected index will only get reset to -1 if the mob list changed.
                        if (mobsCombo.CBSelectedIndex() < 0)
                        {
                            mobsCombo.CBSelectItem(currentSelection);
                        }
                    }
                }
            }

            if (e.DatasetChanges.Interactions.Count != 0)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 7
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            // Check for new mobs being fought.  If any exist, update the Mob Group dropdown list.
            if (e.DatasetChanges.Battles.Count > 0)
            {
                string selectedItem = mobsCombo.CBSelectedItem();
                UpdateMobList(true);

                flagNoUpdate = true;
                mobsCombo.CBSelectItem(selectedItem);
            }

            if (e.DatasetChanges.Interactions.Count != 0)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 8
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            bool   changesFound            = false;
            string currentlySelectedPlayer = lsAll;

            if (playersCombo.CBSelectedIndex() > 0)
            {
                currentlySelectedPlayer = playersCombo.CBSelectedItem();
            }

            if (e.DatasetChanges.Combatants != null)
            {
                if (e.DatasetChanges.Combatants.Any(x => x.RowState == DataRowState.Added))
                {
                    UpdatePlayerList();
                    changesFound = true;

                    flagNoUpdate = true;
                    playersCombo.CBSelectIndex(0);
                }
            }

            // Check for new mobs being fought.  If any exist, update the Mob Group dropdown list.
            if (e.DatasetChanges.Battles != null)
            {
                if (e.DatasetChanges.Battles.Any(x => x.RowState == DataRowState.Added))
                {
                    UpdateMobList(true);
                    changesFound = true;

                    flagNoUpdate = true;
                    mobsCombo.CBSelectIndex(-1);
                }
            }

            if (currentlySelectedPlayer != playersCombo.CBSelectedItem())
            {
                flagNoUpdate = true;
                playersCombo.CBSelectItem(currentlySelectedPlayer);
            }

            if (changesFound == true)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 9
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            if (e.DatasetChanges.Interactions != null)
            {
                if (e.DatasetChanges.Interactions.Count != 0)
                {
                    var enhancements = from i in e.DatasetChanges.Interactions
                                       where (AidType)i.AidType == AidType.Enhance
                                       select i;

                    if (enhancements.Any())
                    {
                        HandleDataset(null);
                    }
                }
            }
        }
Ejemplo n.º 10
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            bool   changesFound            = false;
            string currentlySelectedPlayer = lsAll;

            if (playersCombo.CBSelectedIndex() > 0)
            {
                currentlySelectedPlayer = playersCombo.CBSelectedItem();
            }

            if (e.DatasetChanges.Combatants != null)
            {
                if (e.DatasetChanges.Combatants.Any(x => x.RowState == DataRowState.Added))
                {
                    UpdatePlayerList();
                    changesFound = true;

                    flagNoUpdate = true;
                    playersCombo.CBSelectIndex(0);
                }
            }

            if (e.DatasetChanges.Interactions != null)
            {
                if (e.DatasetChanges.Interactions.Any(x => x.RowState == DataRowState.Added))
                {
                    changesFound = true;
                }
            }

            if (currentlySelectedPlayer != playersCombo.CBSelectedItem())
            {
                flagNoUpdate = true;
                playersCombo.CBSelectItem(currentlySelectedPlayer);
            }

            if (changesFound == true)
            {
                HandleDataset(null);
            }
        }
Ejemplo n.º 11
0
        public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
        {
            if (e.DatasetChanges.ChatSpeakers != null)
            {
                if (e.DatasetChanges.ChatSpeakers.Count != 0)
                {
                    string currentSelection = speakerCombo.CBSelectedItem();
                    flagNoUpdate = true;
                    UpdateSpeakerList();
                    flagNoUpdate = true;
                    speakerCombo.CBSelectItem(currentSelection);

                    HandleDataset(e.DatasetChanges);
                    return;
                }
            }

            if (e.DatasetChanges.ChatMessages.Count != 0)
            {
                HandleDataset(e.DatasetChanges);
                return;
            }
        }
Ejemplo n.º 12
0
 public override void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
 {
     HandleDataset(e.DatasetChanges);
 }
Ejemplo n.º 13
0
 public virtual void WatchDatabaseChanged(object sender, DatabaseWatchEventArgs e)
 {
     //HandleDataset(null);
 }
Ejemplo n.º 14
0
 public virtual void WatchDatabaseChanging(object sender, DatabaseWatchEventArgs e)
 {
     //HandleDataset(e.DatasetChanges);
 }