Example #1
0
        public OptionsDialog(DTE dte)
        {
            InitializeComponent();
            OptionsHelper.Dte = dte;

            if (File.Exists(dte.Solution.FileName))
            {
                options = OptionsHelper.GetOptions();
                rootFolderTextBox.Text = options.RootFolder;
                onItemAddedAddToSVNCheckBox.Checked        = options.OnItemAddedAddToSVN;
                onItemRenamedRenameInSVNCheckBox.Checked   = options.OnItemRenamedRenameInSVN;
                onItemRemovedRemoveFromSVNCheckBox.Checked = options.OnItemRemovedRemoveFromSVN;
            }
            else
            {
                rootFolderTextBox.Enabled                  = false;
                onItemAddedAddToSVNCheckBox.Checked        = false;
                onItemRenamedRenameInSVNCheckBox.Checked   = false;
                onItemRemovedRemoveFromSVNCheckBox.Checked = false;
                okButton.Enabled     = false;
                browseButton.Enabled = false;
            }

            if (string.IsNullOrEmpty(rootFolderTextBox.Text))
            {
                rootFolderTextBox.Text = CommandHelper.GetRepositoryRoot();
            }
        }
Example #2
0
        private async Task LoadDialog()
        {
            var solution = await VS.Solutions.GetCurrentSolutionAsync();

            var solutionFilePath = solution?.FullPath;

            if (File.Exists(solutionFilePath))
            {
                options = await OptionsHelper.GetOptions();

                rootFolderTextBox.Text = options.RootFolder;
                onItemAddedAddToSVNCheckBox.Checked        = options.OnItemAddedAddToSVN;
                onItemRenamedRenameInSVNCheckBox.Checked   = options.OnItemRenamedRenameInSVN;
                onItemRemovedRemoveFromSVNCheckBox.Checked = options.OnItemRemovedRemoveFromSVN;
                closeOnEndCheckBox.Checked = options.CloseOnEnd;
            }
            else
            {
                rootFolderTextBox.Enabled                  = false;
                onItemAddedAddToSVNCheckBox.Checked        = false;
                onItemRenamedRenameInSVNCheckBox.Checked   = false;
                onItemRemovedRemoveFromSVNCheckBox.Checked = false;
                closeOnEndCheckBox.Checked                 = false;
                okButton.Enabled     = false;
                browseButton.Enabled = false;
            }

            if (string.IsNullOrEmpty(rootFolderTextBox.Text))
            {
                rootFolderTextBox.Text = await CommandHelper.GetRepositoryRoot();
            }
        }