Ejemplo n.º 1
0
        public RenameVariableDialog(RenameVariableRequestView viewModel) {
            DataContext = viewModel;

            InitializeComponent();

            _firstActivation = true;
        }
Ejemplo n.º 2
0
        public RenameVariableDialog(RenameVariableRequestView viewModel)
        {
            DataContext = viewModel;

            InitializeComponent();

            _firstActivation = true;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 private void LoadPreferences(RenameVariableRequestView requestView)
 {
     requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true;
 }
Ejemplo n.º 6
0
 private void SavePreferences(RenameVariableRequestView requestView)
 {
     SaveBool(PreviewChangesKey, requestView.PreviewChanges);
 }
Ejemplo n.º 7
0
 private void LoadPreferences(RenameVariableRequestView requestView) {
     requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true;
 }
Ejemplo n.º 8
0
 private void SavePreferences(RenameVariableRequestView requestView) {
     SaveBool(PreviewChangesKey, requestView.PreviewChanges);
 }
Ejemplo n.º 9
0
 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;
 }