Beispiel #1
0
        /// <summary>
        /// Called when a drop is added with a custom range.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddDropButton_Click(object sender, EventArgs e)
        {
            Button           button = (Button)sender;
            AddDropRangeForm form   = (AddDropRangeForm)button.TopLevelControl;
            Drop             drop   = (Drop)button.Tag;
            int quantity            = 1;

            if (Int32.TryParse(form.rangeTextBox.Text, out quantity))
            {
                if (quantity < drop.RangeLowBound || quantity > drop.RangeHighBound)
                {
                    return;
                }

                drop.Quantity = quantity;
                osrsDropContainers.LogDrop(drop);

                form.Close();
                hasDropFormOpen = false;
            }
        }