提交 a3b5f35b 编写于 作者: D David Poeschl 提交者: Ivan Basov

Fixup

上级 39565cac
......@@ -231,7 +231,6 @@ internal void RemoveRestoreNotifyPropertyChanged()
NotifyPropertyChanged(nameof(CanRestore));
NotifyPropertyChanged(nameof(RestoreAutomationText));
NotifyPropertyChanged(nameof(CanEdit));
NotifyPropertyChanged(nameof(EditAutomationText));
}
internal ParameterConfiguration GetParameterConfiguration()
......@@ -477,7 +476,6 @@ private bool IsDisabled(ParameterViewModel parameterViewModel)
NotifyPropertyChanged(nameof(CanRestore));
NotifyPropertyChanged(nameof(RestoreAutomationText));
NotifyPropertyChanged(nameof(CanEdit));
NotifyPropertyChanged(nameof(EditAutomationText));
}
}
......@@ -490,7 +488,7 @@ public string MoveUpAutomationText
return string.Empty;
}
return string.Format(ServicesVSResources.Move_0_above_1, AllParameters[SelectedIndex.Value].ShortAutomationText, AllParameters[SelectedIndex.Value - 1].ParameterAutomationText);
return string.Format(ServicesVSResources.Move_0_above_1, AllParameters[SelectedIndex.Value].ShortAutomationText, AllParameters[SelectedIndex.Value - 1].ShortAutomationText);
}
}
......@@ -503,7 +501,7 @@ public string MoveDownAutomationText
return string.Empty;
}
return string.Format(ServicesVSResources.Move_0_below_1, AllParameters[SelectedIndex.Value].ShortAutomationText, AllParameters[SelectedIndex.Value + 1].ParameterAutomationText);
return string.Format(ServicesVSResources.Move_0_below_1, AllParameters[SelectedIndex.Value].ShortAutomationText, AllParameters[SelectedIndex.Value + 1].ShortAutomationText);
}
}
......@@ -635,6 +633,19 @@ internal override Parameter CreateParameter()
}
public override string ShortAutomationText => $"{Type} {Parameter}";
public override string FullAutomationText
{
get
{
var text = $"{Modifier} {Type} {Parameter}";
if (!string.IsNullOrWhiteSpace(Default))
{
text += $" = {Default}";
}
return text;
}
}
public override string Callsite => string.Empty;
......
......@@ -137,7 +137,6 @@ class MyClass
monitor.AddExpectation(Function() viewModel.CanRestore)
monitor.AddExpectation(Function() viewModel.RestoreAutomationText)
monitor.AddExpectation(Function() viewModel.CanEdit)
monitor.AddExpectation(Function() viewModel.EditAutomationText)
viewModel.Remove()
......@@ -178,7 +177,6 @@ class MyClass
selectionChangedMonitor.AddExpectation(Function() viewModel.CanRestore)
selectionChangedMonitor.AddExpectation(Function() viewModel.RestoreAutomationText)
selectionChangedMonitor.AddExpectation(Function() viewModel.CanEdit)
selectionChangedMonitor.AddExpectation(Function() viewModel.EditAutomationText)
viewModel.SelectedIndex = 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册