Exemplo n.º 1
0
        private void Accept_Click(object sender, ImageClickEventArgs e)
        {
            int idx = itemsTable.SelectedIndex;
            int id  = int.Parse(itemsTable.getSpecificText(idx, 0));
            SimpleBattleInfo battleInfo = _ruler.GetBattle(id, BattleType.FRIENDLY);

            battleInfo.Accepted = true;

            Universe.instance.AcceptBattle(id, _ruler);

            itemsTable.removeLine(idx);
            HttpContext.Current.Response.Redirect(OrionGlobals.getSectionBaseUrl("Battle"));
        }
Exemplo n.º 2
0
        private void UpdateTable(ItemsTable itemsTable, int battleId, int span)
        {
            IEnumerator iter = itemsTable.Controls.GetEnumerator();

            while (iter.MoveNext())
            {
                ItemsTableLine line = (ItemsTableLine)iter.Current;
                string         str  = ((ItemsTableItem)line.Controls[0]).Item;
                if (str == battleId.ToString())
                {
                    itemsTable.removeLine(line);
                    iter = itemsTable.Controls.GetEnumerator();
                }
            }

            if (itemsTable.Count == 0)
            {
                NoBattle(itemsTable, span);
            }
        }
Exemplo n.º 3
0
        private void UpdateTable(ItemsTable itemsTable, int battleId, int span)
        {
            IEnumerator iter = itemsTable.Controls.GetEnumerator();
            while( iter.MoveNext() ) {
                ItemsTableLine line = (ItemsTableLine)iter.Current;
                string str = ((ItemsTableItem)line.Controls[0]).Item;
                if( str == battleId.ToString() ) {
                    itemsTable.removeLine( line );
                    iter = itemsTable.Controls.GetEnumerator();
                }
            }

            if( itemsTable.Count == 0 ) {
                NoBattle( itemsTable, span );
            }
        }