public RenameVariableDialog(RenameVariableRequestView viewModel) { DataContext = viewModel; InitializeComponent(); _firstActivation = true; }
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; }
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); }
private void LoadPreferences(RenameVariableRequestView requestView) { requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true; }
private void SavePreferences(RenameVariableRequestView requestView) { SaveBool(PreviewChangesKey, requestView.PreviewChanges); }
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; }