Example #1
0
        private void addButton_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new AddCustomPlaceWindow(this, "");

            if (dlg.ShowDialog().Value)
            {
                AppSettings.Settings.CustomPlaces.Add(dlg.Path);
                customPlacesListBox.Items.Refresh();
                customPlacesListBox.Focus();
            }
        }
Example #2
0
        private void editButton_Click(object sender, RoutedEventArgs e)
        {
            int selectedIndex = customPlacesListBox.SelectedIndex;

            if (selectedIndex != -1)
            {
                var dlg = new AddCustomPlaceWindow(this, AppSettings.Settings.CustomPlaces[selectedIndex]);
                if (dlg.ShowDialog().Value)
                {
                    AppSettings.Settings.CustomPlaces[selectedIndex] = dlg.Path;
                    customPlacesListBox.Items.Refresh();
                    customPlacesListBox.Focus();
                }
            }
        }