コード例 #1
0
        public RenameVariableDialog(RenameVariableRequestView viewModel) {
            DataContext = viewModel;

            InitializeComponent();

            _firstActivation = true;
        }
コード例 #2
0
        public RenameVariableDialog(RenameVariableRequestView viewModel)
        {
            DataContext = viewModel;

            InitializeComponent();

            _firstActivation = true;
        }
コード例 #3
0
        public RenameVariableRequest GetRenameInfo(string originalName, PythonLanguageVersion languageVersion) {
            var requestView = new RenameVariableRequestView(originalName, languageVersion);
            LoadPreferences(requestView);
            var dialog = new RenameVariableDialog(requestView);
            bool res = dialog.ShowModal() ?? false;
            if (res) {
                SavePreferences(requestView);
                return requestView.GetRequest();
            }

            return null;
        }
コード例 #4
0
        public RenameVariableRequest GetRenameInfo(string originalName, PythonLanguageVersion languageVersion)
        {
            var requestView = new RenameVariableRequestView(originalName, languageVersion);

            LoadPreferences(requestView);
            var  dialog = new RenameVariableDialog(requestView);
            bool res    = dialog.ShowModal() ?? false;

            if (res)
            {
                SavePreferences(requestView);
                return(requestView.GetRequest());
            }

            return(null);
        }
コード例 #5
0
 private void LoadPreferences(RenameVariableRequestView requestView)
 {
     requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true;
 }
コード例 #6
0
 private void SavePreferences(RenameVariableRequestView requestView)
 {
     SaveBool(PreviewChangesKey, requestView.PreviewChanges);
 }
コード例 #7
0
 private void LoadPreferences(RenameVariableRequestView requestView) {
     requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true;
 }
コード例 #8
0
 private void SavePreferences(RenameVariableRequestView requestView) {
     SaveBool(PreviewChangesKey, requestView.PreviewChanges);
 }
コード例 #9
0
ファイル: RefactorRenameTests.cs プロジェクト: sadapple/PTVS
 public RenameVariableRequest GetRenameInfo(string originalName, PythonLanguageVersion languageVersion) {
     var requestView = new RenameVariableRequestView(originalName, languageVersion);
     requestView.Name = _name;
     requestView.PreviewChanges = _preview;
     requestView.SearchInComments = _searchInComments;
     requestView.SearchInStrings = _searchInStrings;
     Assert.IsTrue(requestView.IsValid);
     var request = requestView.GetRequest();
     Assert.IsNotNull(request);
     return request;
 }