Exemplo n.º 1
0
 public override void Initialize()
 {
     this.ManaBurn =
         new ComboEntry(
             this.Unit.SkillBook.AllSkills.FirstOrDefault(
                 x => x.Value.SourceAbility.Id == AbilityId.necronomicon_archer_mana_burn).Value);
 }
Exemplo n.º 2
0
        private ComboMove AddComboData(ComboEntry comboEntry, ComboData comboData, int depth)
        {
            if (comboData.Moves.Count <= depth)
            {
                return(null);
            }

            ComboMove move = comboData.Moves.ElementAt(depth);

            ComboEntry nextComboEntry = null;

            foreach (IComboEntry entry in comboEntry.comboEntries)
            {
                if (move.Equals(entry.Move))
                {
                    nextComboEntry = (ComboEntry)entry;
                    break;
                }
            }

            if (null == nextComboEntry)
            {
                nextComboEntry = new ComboEntry {
                    Move = move,
                };
                comboEntry.comboEntries.Add(nextComboEntry);
            }

            AddComboData(nextComboEntry, comboData, depth + 1);

            return(move);
        }
 public MyDataContext()
 {
     Entries = new ObservableCollection <ComboEntry>
     {
         new ComboEntry(),
         new ComboEntry(),
         new ComboEntry()
     };
     SelectedEntry = Entries.FirstOrDefault();
 }
Exemplo n.º 4
0
        public BaseComboBox()
        {
            AddEvents((int)Gdk.EventMask.ButtonPressMask);
            AddEvents((int)Gdk.EventMask.ButtonReleaseMask);
            ButtonPressEvent += HandleButtonPressEvent;

            entry = new ComboEntry {
                Host = this
            };
            Add(entry);
        }