public RenameVariableDialog(RenameVariableRequestView viewModel) { DataContext = viewModel; InitializeComponent(); _firstActivation = true; }
public RenameVariableRequest GetRenameInfo(string originalName) { var requestView = new RenameVariableRequestView(originalName); LoadPreferences(requestView); var dialog = new RenameVariableDialog(requestView); var res = dialog.ShowModal() ?? false; if (!res) { return(null); } SavePreferences(requestView); return(requestView.GetRequest()); }
private static void LoadPreferences(RenameVariableRequestView requestView) { requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true; }
private static void SavePreferences(RenameVariableRequestView requestView) { SaveBool(PreviewChangesKey, requestView.PreviewChanges); }