public RenameVariableDialog(RenameVariableRequestView viewModel)
        {
            DataContext = viewModel;

            InitializeComponent();

            _firstActivation = true;
        }
Beispiel #2
0
        public RenameVariableRequest GetRenameInfo(string originalName)
        {
            var requestView = new RenameVariableRequestView(originalName);
            LoadPreferences(requestView);
            var dialog = new RenameVariableDialog(requestView);
            bool res = dialog.ShowModal() ?? false;
            if (res) {
                SavePreferences(requestView);
                return requestView.GetRequest();
            }

            return null;
        }
Beispiel #3
0
 private void SavePreferences(RenameVariableRequestView requestView)
 {
     SaveBool(PreviewChangesKey, requestView.PreviewChanges);
 }
Beispiel #4
0
 private void LoadPreferences(RenameVariableRequestView requestView)
 {
     requestView.PreviewChanges = LoadBool(PreviewChangesKey) ?? true;
 }