コード例 #1
0
        private void DeleteButtonClicked(object sender, RoutedEventArgs e)
        {
            var index = directoriesListBox.SelectedIndex;

            if (index != -1)
            {
                _directories.RemoveAt(index);
                AppManagement.SaveSettings();
                RefreshListBox();
            }
        }
コード例 #2
0
        private void AddButtonClicked(object sender, RoutedEventArgs e)
        {
            SynchronizedDirectory dir = new SynchronizedDirectory();

            dir.name = nameTextBox.Text;
            dir.path = locationTextBox.Text;

            _directories.Add(dir);
            AppManagement.SaveSettings();

            AddToListBox(dir.name);
        }