Esempio n. 1
0
        void StopEditing(IEditableValue ev)
        {
            if (ev == null)
            {
                return;
            }
            Debug.Assert(editing);
            editing = false;

            if (!canceled)
            {
                var newText = textBox.Text;
                if (newText != originalText)
                {
                    string error;
                    try {
                        error = ev.SetValueAsText(newText);
                    }
                    catch (Exception ex) {
                        error = string.Format(dnSpy_Debugger_Resources.LocalsEditValue_Error_CouldNotWriteNewValue, ex.Message);
                    }
                    if (!string.IsNullOrEmpty(error))
                    {
                        Shared.App.MsgBox.Instance.Show(error);
                    }
                }
            }

            ev.IsEditingValue = false;
            RestoreControls();
        }
Esempio n. 2
0
        void StopEditing(IEditableValue ev)
        {
            if (ev == null)
            {
                return;
            }
            Debug.Assert(editing);
            editing = false;

            if (!canceled)
            {
                var newText = textBox.Text;
                if (newText != originalText)
                {
                    string error;
                    try {
                        error = ev.SetValueAsText(newText);
                    }
                    catch (Exception ex) {
                        error = string.Format("Could not set value: {0}", ex.Message);
                    }
                    if (!string.IsNullOrEmpty(error))
                    {
                        MainWindow.Instance.ShowMessageBox(error);
                    }
                }
            }

            ev.IsEditingValue = false;
            RestoreControls();
        }
Esempio n. 3
0
		void StopEditing(IEditableValue ev) {
			if (ev == null)
				return;
			Debug.Assert(editing);
			editing = false;

			if (!canceled) {
				var newText = textBox.Text;
				if (newText != originalText) {
					string error;
					try {
						error = ev.SetValueAsText(newText);
					}
					catch (Exception ex) {
						error = string.Format(dnSpy_Debugger_Resources.LocalsEditValue_Error_CouldNotWriteNewValue, ex.Message);
					}
					if (!string.IsNullOrEmpty(error))
						Shared.App.MsgBox.Instance.Show(error);
				}
			}

			ev.IsEditingValue = false;
			RestoreControls();
		}
Esempio n. 4
0
		void StopEditing(IEditableValue ev) {
			if (ev == null)
				return;
			Debug.Assert(editing);
			editing = false;

			if (!canceled) {
				var newText = textBox.Text;
				if (newText != originalText) {
					string error;
					try {
						error = ev.SetValueAsText(newText);
					}
					catch (Exception ex) {
						error = string.Format("Could not set value: {0}", ex.Message);
					}
					if (!string.IsNullOrEmpty(error))
						MainWindow.Instance.ShowMessageBox(error);
				}
			}

			ev.IsEditingValue = false;
			RestoreControls();
		}