/// <summary> /// Handles the add list button action. First we add the item to the loaded /// box, then dump it off the available list, then go and build the ranges of that /// item. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addList_Click(object sender, EventArgs e) { try { String item = (String)availableBox.SelectedItem; // add the item to the loaded box loadedBox.Items.Add(item); // remove from availableBox availableBox.Items.Remove(item); // update serialized data this.g.Available_Lists.Remove(item); this.g.data.Loaded_Lists.Add(item); // go and build stuff g.buildRanges(item); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("error adding list: " + ex.Message); System.Diagnostics.Debug.WriteLine(ex.StackTrace); } }
/// <summary> /// Handles the add list button action. First we add the item to the loaded /// box, then dump it off the available list, then go and build the ranges of that /// item. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addList_Click(object sender, EventArgs e) { try { String item = (String)availableBox.SelectedItem; // add the item to the loaded box loadedBox.Items.Add(item); // remove from availableBox availableBox.Items.Remove(item); // update serialized data this.g.Available_Lists.Remove(item); this.g.data.Loaded_Lists.Add(item); // go and build stuff g.buildRanges(item); } catch (Exception ex) { LogCenter.Instance.LogException(ex); } }