Пример #1
0
        /// <summary>
        /// Handles the remove list button.  We first add it to the available box,
        /// then dump it off the loaded box, then go and rebuild the blocked ranges.  More
        /// info over at rebuild() on that.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void removeButton_Click(object sender, EventArgs e)
        {
            try
            {
                String item = (String)loadedBox.SelectedItem;

                // add the item to the availableBox
                availableBox.Items.Add(item);

                // remove from loaded box
                loadedBox.Items.Remove(item);

                // update serialized data
                this.g.Available_Lists.Add(item);
                this.g.data.Loaded_Lists.Remove(item);

                // go and rebuild all the ranges
                g.rebuild();
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("error adding list: " + ex.Message);
                System.Diagnostics.Debug.WriteLine(ex.StackTrace);
            }
        }
Пример #2
0
        /// <summary>
        /// Handles the remove list button.  We first add it to the available box,
        /// then dump it off the loaded box, then go and rebuild the blocked ranges.  More
        /// info over at rebuild() on that.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void removeButton_Click(object sender, EventArgs e)
        {
            try
            {
                String item = (String)loadedBox.SelectedItem;

                // add the item to the availableBox
                availableBox.Items.Add(item);

                // remove from loaded box
                loadedBox.Items.Remove(item);

                // update serialized data
                this.g.Available_Lists.Add(item);
                this.g.data.Loaded_Lists.Remove(item);

                // go and rebuild all the ranges
                g.rebuild();
            }
            catch (Exception ex)
            {
                LogCenter.Instance.LogException(ex);
            }
        }