コード例 #1
0
        private void Refresh()
        {
            if (Project == null)
            {
                return;
            }

            var selectedIndex = FolderListBox.SelectedIndex;

            FolderListBox.Items.Clear();

            SynchronizeOutputCheckBox.IsChecked = FolderSynchronizationManager.GetSynchronizeOutputFolderOnBuild(Project);

            foreach (var source in FolderSynchronizationManager.Folders.Where(f => f.Project == Project))
            {
                FolderListBox.Items.Add(source);
            }

            if (selectedIndex >= FolderListBox.Items.Count)
            {
                selectedIndex = FolderListBox.Items.Count - 1;
            }

            FolderListBox.SelectedIndex = selectedIndex;
        }
コード例 #2
0
        private void SetProjectSynchronization([NotNull] object sender, [NotNull] RoutedEventArgs e)
        {
            Debug.ArgumentNotNull(sender, nameof(sender));
            Debug.ArgumentNotNull(e, nameof(e));

            if (Project == null)
            {
                return;
            }

            FolderSynchronizationManager.SetSynchronizeOutputFolderOnBuild(Project, SynchronizeOutputCheckBox.IsChecked == true);
        }
コード例 #3
0
        private void Remove([NotNull] object sender, [NotNull] RoutedEventArgs e)
        {
            Debug.ArgumentNotNull(sender, nameof(sender));
            Debug.ArgumentNotNull(e, nameof(e));

            var selectedItem = FolderListBox.RemoveSelectedItem() as FolderSynchronizer;

            if (selectedItem == null)
            {
                return;
            }

            FolderSynchronizationManager.Remove(Project, selectedItem);
        }