diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj b/src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj
index 09e47da3f7..142f3bf8df 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/AddIn.csproj
@@ -71,6 +71,7 @@
Code
+
ProfilerView.xaml
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/FindCallsOfSelected.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/FindCallsOfSelected.cs
index 21befa5451..324e167324 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/FindCallsOfSelected.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/FindCallsOfSelected.cs
@@ -30,9 +30,9 @@ namespace ICSharpCode.Profiler.AddIn.Commands
///
public override void Run()
{
- var list = GetSelectedItems().ToList();
+ var list = GetSelectedItems();
- if (list.Count > 0) {
+ if (list.Any()) {
var items = from item in list select item.Node;
List parts = new List();
@@ -44,7 +44,7 @@ namespace ICSharpCode.Profiler.AddIn.Commands
}
}
- string header = "Results";
+ string header = StringParser.Parse("${res:AddIns.Profiler.Commands.FindCallsOfSelected.TabTitle}");
Parent.CreateTab(header, "from c in Calls where " + string.Join(" || ", parts.ToArray()) + " select c");
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs
index b8311c45e5..719f74ee33 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/RunTestWithProfilerCommand.cs
@@ -20,6 +20,8 @@ namespace ICSharpCode.Profiler.AddIn.Commands
{
public class RunTestWithProfilerCommand : AbstractRunTestCommand
{
+ ProfilerRunner runner;
+
protected override void RunTests(UnitTestApplicationStartHelper helper)
{
TestRunnerCategory.AppendLine(helper.GetCommandLine());
@@ -32,7 +34,7 @@ namespace ICSharpCode.Profiler.AddIn.Commands
startInfo.WorkingDirectory = UnitTestApplicationStartHelper.UnitTestApplicationDirectory;
LoggingService.Info("starting profiler...");
- ProfilerRunner runner = new ProfilerRunner(startInfo, true, new ProfilingDataSQLiteWriter(path, true, GetUnitTestNames(helper).ToArray()));
+ runner = new ProfilerRunner(startInfo, true, new ProfilingDataSQLiteWriter(path, true, GetUnitTestNames(helper).ToArray()));
runner.RunFinished += delegate {
WorkbenchSingleton.SafeThreadCall(() => FileService.OpenFile(path));
@@ -72,22 +74,12 @@ namespace ICSharpCode.Profiler.AddIn.Commands
LoggingService.Info("shutting profiler down...");
}
- public override void Run()
- {
-// if (ProfilerService.IsProfilerLoaded && ProfilerService.CurrentProfiler.IsRunning) {
-// MessageService.ShowError("Currently there is a profiling session in progress. " +
-// "Please finish the current session before starting a new one.");
-// } else {
- base.Run();
-// }
- }
-
protected override void OnStop()
{
-// if (ProfilerService.CurrentProfiler.IsRunning) {
-// LoggingService.Info("stopping profiler...");
-// ProfilerService.CurrentProfiler.Stop();
-// }
+ if (this.runner != null && this.runner.Profiler.IsRunning) {
+ LoggingService.Info("stopping profiler...");
+ runner.Stop();
+ }
}
}
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/SetAsRoot.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/SetAsRoot.cs
index 2572f364f4..b94de9adfe 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/SetAsRoot.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/SetAsRoot.cs
@@ -44,9 +44,9 @@ namespace ICSharpCode.Profiler.AddIn.Commands
parts.Add("GetNodeByPath(" + string.Join(",", path.Select(i => i.ToString()).ToArray()) + ")");
}
- string header = "Merged Nodes: " + items.First().Name;
+ string header = string.Format(StringParser.Parse("${res:AddIns.Profiler.Commands.SetAsRoot.TabTitle}:"), items.First().Name);
if (nameId == null)
- header = "Merged Nodes";
+ header = StringParser.Parse("${res:AddIns.Profiler.Commands.SetAsRoot.TabTitle}:");
Parent.CreateTab(header, "Merge(" + string.Join(",", parts.ToArray()) + ")");
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/ShowFunctions.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/ShowFunctions.cs
index ea2b8fd116..bd4973dfce 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/ShowFunctions.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Commands/ShowFunctions.cs
@@ -29,9 +29,8 @@ namespace ICSharpCode.Profiler.AddIn.Commands
public override void Run()
{
var selectedItem = GetSelectedItems().FirstOrDefault();
-
if (selectedItem != null)
- Parent.CreateTab("All functions for " + selectedItem.GetSignature(),
+ Parent.CreateTab(string.Format(StringParser.Parse("${res:AddIns.Profiler.Commands.ShowFunctions.TabTitle}"), selectedItem.GetSignature()),
"from f in Functions where f.Signature == \"" + selectedItem.GetSignature() + "\" select f");
}
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml
index b714a0eaa8..c4f4b5efa6 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml
@@ -1,11 +1,12 @@
-
+
@@ -13,24 +14,21 @@
-
+
-
-Select the path of the executable you want to profile.
-Optionally you can specify working directory and command line arguments to start the process.
-
-
+
+
-
+
-
+
-
-
+
+
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
index d01b98dd94..1729a67acb 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Dialogs/ProfileExecutableForm.xaml.cs
@@ -60,7 +60,7 @@ namespace ICSharpCode.Profiler.AddIn.Dialogs
MessageService.ShowError(ex.Message);
}
} catch (ArgumentNullException) {
- MessageService.ShowError("Invalid data, please try again!");
+ MessageService.ShowError(StringParser.Parse("${res:AddIns.Profiler.ProfileExecutable.ErrorMessage}"));
} catch (FileNotFoundException ex) {
MessageService.ShowError(ex.Message);
} catch (DirectoryNotFoundException ex2) {
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs
index 0b37f643ef..7696b555f3 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/ProfilerRunner.cs
@@ -65,9 +65,8 @@ namespace ICSharpCode.Profiler.AddIn
}
PrintProfilerOptions();
-
- this.profiler.RegisterFailed += delegate { MessageService.ShowError("Could not register the profiler into COM Registry. Cannot start profiling!"); };
- this.profiler.DeregisterFailed += delegate { MessageService.ShowError("Could not unregister the profiler from COM Registry!"); };
+ this.profiler.RegisterFailed += delegate { MessageService.ShowError("${res:AddIns.Profiler.Messages.RegisterFailed}"); };
+ this.profiler.DeregisterFailed += delegate { MessageService.ShowError("${res:AddIns.Profiler.Messages.UnregisterFailed}"); };
this.profiler.OutputUpdated += delegate { SetOutputText(profiler.ProfilerOutput); };
this.profiler.SessionEnded += delegate { FinishSession(); };
}
@@ -84,7 +83,7 @@ namespace ICSharpCode.Profiler.AddIn
void FinishSession()
{
- using (AsynchronousWaitDialog dlg = AsynchronousWaitDialog.ShowWaitDialog("Preparing for analysis", true)) {
+ using (AsynchronousWaitDialog dlg = AsynchronousWaitDialog.ShowWaitDialog(StringParser.Parse("${res:AddIns.Profiler.Messages.PreparingForAnalysis}"), true)) {
profiler.Dispose();
WorkbenchSingleton.SafeThreadAsyncCall(() => { controlWindow.AllowClose = true; this.controlWindow.Close(); });
@@ -122,18 +121,17 @@ namespace ICSharpCode.Profiler.AddIn
return null;
if (!currentProj.IsStartable) {
- if (MessageService.AskQuestion("This project cannot be started. Do you want to profile the solution's StartUp project instead?")) {
+ if (MessageService.AskQuestion("${res:AddIns.Profiler.Messages.NoStartableProjectWantToProfileStartupProject}")) {
currentProj = ProjectService.OpenSolution.StartupProject as AbstractProject;
if (currentProj == null) {
- MessageService.ShowError("No startable project was found. Aborting ...");
+ MessageService.ShowError("${res:AddIns.Profiler.Messages.NoStartableProjectFound}");
return null;
}
} else
return null;
}
if (!File.Exists(currentProj.OutputAssemblyFullPath)) {
- MessageService.ShowError("This project cannot be started because the executable file was not found, " +
- "please ensure that the project and all its depencies are built correctly!");
+ MessageService.ShowError("${res:AddIns.Profiler.Messages.FileNotFound}");
return null;
}
@@ -147,26 +145,26 @@ namespace ICSharpCode.Profiler.AddIn
static void EnsureProfileCategory()
{
if (profileCategory == null) {
- MessageViewCategory.Create(ref profileCategory, "Profile", "Profile");
+ MessageViewCategory.Create(ref profileCategory, "Profile", StringParser.Parse("${res:AddIns.Profiler.MessageViewCategory}"));
}
}
public static void SetOutputText(string text)
{
EnsureProfileCategory();
- profileCategory.SetText(text);
+ profileCategory.SetText(StringParser.Parse(text));
}
public static void AppendOutputText(string text)
{
EnsureProfileCategory();
- profileCategory.AppendText(text);
+ profileCategory.AppendText(StringParser.Parse(text));
}
public static void AppendOutputLine(string text)
{
EnsureProfileCategory();
- profileCategory.AppendLine(text);
+ profileCategory.AppendLine(StringParser.Parse(text));
}
#endregion
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/SharpDevelopTranslation.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/SharpDevelopTranslation.cs
new file mode 100644
index 0000000000..c51d314daa
--- /dev/null
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/SharpDevelopTranslation.cs
@@ -0,0 +1,78 @@
+//
+//
+//
+//
+// $Revision$
+//
+using ICSharpCode.Core;
+using System;
+using ICSharpCode.Profiler.Controls;
+
+namespace ICSharpCode.Profiler.AddIn
+{
+ ///
+ /// Description of SharpDevelopTranslation.
+ ///
+ public class SharpDevelopTranslation : ControlsTranslation
+ {
+ public override string WaitBarText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.WaitBarText}"); }
+ }
+
+ public override string NameColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.NameColumnText}"); }
+ }
+
+ public override string CallCountColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.CallCountColumnText}"); }
+ }
+
+ public override string CallsText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.CallsText}"); }
+ }
+
+ public override string CpuCyclesText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.CpuCyclesText}"); }
+ }
+
+ public override string ExecuteQueryText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.ExecuteQueryText}"); }
+ }
+
+ public override string ExpandHotPathSubtreeText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.ExpandHotPathSubtreeText}"); }
+ }
+
+ public override string SearchLabelText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.SearchLabelText}"); }
+ }
+
+ public override string ShowQueryBarText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.ShowQueryBarText}"); }
+ }
+
+ public override string TimePercentageOfParentColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimePercentageOfParentColumnText}"); }
+ }
+
+ public override string TimeSpentColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimeSpentColumnText}"); }
+ }
+
+ public override string TimeSpentPerCallColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimeSpentPerCallColumnText}"); }
+ }
+
+ public override string TimeSpentSelfColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimeSpentSelfColumnText}"); }
+ }
+
+ public override string TimeSpentSelfPerCallColumnText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimeSpentSelfPerCallColumnText}"); }
+ }
+
+ public override string TimeText {
+ get { return StringParser.Parse("${res:AddIns.Profiler.ProfilingView.TimeText}"); }
+ }
+ }
+}
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml
index 65b9fc792f..2dac3d655b 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml
@@ -1,6 +1,7 @@
@@ -29,21 +30,20 @@
-
-
+
+
-
+
-
-
+
diff --git a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs
index 62a69a2f0e..9a798ba296 100644
--- a/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/AddIn/Src/Views/ProfilerView.xaml.cs
@@ -33,11 +33,14 @@ namespace ICSharpCode.Profiler.AddIn.Views
this.timeLine.SelectedStartIndex = 0;
this.timeLine.SelectedEndIndex = this.timeLine.ValuesList.Count;
+ var translation = new SharpDevelopTranslation();
+
foreach (TabItem item in this.tabView.Items) {
if (item.Content != null) {
QueryView view = item.Content as QueryView;
view.Reporter = new ErrorReporter(UpdateErrorList);
view.Provider = provider;
+ view.Translation = translation;
view.SetRange(this.timeLine.SelectedStartIndex, this.timeLine.SelectedEndIndex);
view.ContextMenuOpening += delegate(object sender, ContextMenuEventArgs e) {
object source = (e.OriginalSource is Shape) ? e.OriginalSource : view;
@@ -87,7 +90,7 @@ namespace ICSharpCode.Profiler.AddIn.Views
e.CanExecute = this.timeLine.IsEnabled && this.timeLine.ValuesList.Count > 0;
}
- void closeButton_Click(object sender, RoutedEventArgs e)
+ void CloseButtonClick(object sender, RoutedEventArgs e)
{
int index = tabView.Items.IndexOf(((Button)sender).Tag);
if (index == tabView.SelectedIndex)
@@ -108,7 +111,7 @@ namespace ICSharpCode.Profiler.AddIn.Views
);
}
- void tabView_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ void TabViewSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (dummyTab.IsSelected)
Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => CreateTab("New Tab", string.Empty)));
@@ -168,7 +171,7 @@ namespace ICSharpCode.Profiler.AddIn.Views
newTab.Header = new StackPanel { Orientation = Orientation.Horizontal, Children = { header, closeButton } };
- closeButton.Click += new RoutedEventHandler(closeButton_Click);
+ closeButton.Click += new RoutedEventHandler(CloseButtonClick);
closeButton.Tag = newTab;
QueryView view;
@@ -225,7 +228,7 @@ namespace ICSharpCode.Profiler.AddIn.Views
return index;
}
- void mnuClearQueryHistoryClick(object sender, RoutedEventArgs e)
+ void ClearQueryHistoryClick(object sender, RoutedEventArgs e)
{
while (mnuQueryHistory.Items.Count > 2)
mnuQueryHistory.Items.RemoveAt(2);
diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/CallTreeNodeViewModel.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/CallTreeNodeViewModel.cs
index 936b25add8..3361965b52 100644
--- a/src/AddIns/Misc/Profiler/Frontend/Controls/CallTreeNodeViewModel.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/Controls/CallTreeNodeViewModel.cs
@@ -140,7 +140,7 @@ namespace ICSharpCode.Profiler.Controls
return text;
}
- public object CreateToolTip()
+ public object CreateToolTip(ControlsTranslation translation)
{
if (node.IsThread)
return Name; // only name for threads
@@ -151,11 +151,11 @@ namespace ICSharpCode.Profiler.Controls
((!string.IsNullOrEmpty(node.ReturnType)) ? node.ReturnType + " " : ""),
new Bold { Inlines = { node.Name } },
"(" + ((node.Parameters.Count > 0) ? string.Join(", ", node.Parameters.ToArray()) : "") + ")\n",
- new Bold { Inlines = { "CPU Cycles:" } },
+ new Bold { Inlines = { translation.CpuCyclesText } },
" " + node.CpuCyclesSpent + "\n",
- new Bold { Inlines = { "Time:" } },
+ new Bold { Inlines = { translation.TimeText } },
" " + node.TimeSpent.ToString("f6") + "ms\n",
- new Bold { Inlines = { "Calls:" } },
+ new Bold { Inlines = { translation.CallsText } },
" " + node.CallCount.ToString()
}
};
@@ -382,7 +382,6 @@ namespace ICSharpCode.Profiler.Controls
}
#region IViewModel Member
-
int visibleElementCount = 1;
public virtual int VisibleElementCount
@@ -397,7 +396,6 @@ namespace ICSharpCode.Profiler.Controls
return new Thickness((level - 1) * 12, 0, 2, 0);
}
}
-
#endregion
}
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/ControlsTranslation.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/ControlsTranslation.cs
index 8ddbf8783f..94f9268da4 100644
--- a/src/AddIns/Misc/Profiler/Frontend/Controls/ControlsTranslation.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/Controls/ControlsTranslation.cs
@@ -18,5 +18,89 @@ namespace ICSharpCode.Profiler.Controls
return "Refreshing view, please wait ...";
}
}
+
+ public virtual string NameColumnText {
+ get {
+ return "Name";
+ }
+ }
+
+ public virtual string CallCountColumnText {
+ get {
+ return "Call count";
+ }
+ }
+
+ public virtual string TimeSpentColumnText {
+ get {
+ return "Time spent";
+ }
+ }
+
+ public virtual string TimeSpentSelfColumnText {
+ get {
+ return "Time spent (self)";
+ }
+ }
+
+ public virtual string TimeSpentPerCallColumnText {
+ get {
+ return "Time spent/call";
+ }
+ }
+
+ public virtual string TimeSpentSelfPerCallColumnText {
+ get {
+ return "Time spent (self)/call";
+ }
+ }
+
+ public virtual string TimePercentageOfParentColumnText {
+ get {
+ return "% of parent";
+ }
+ }
+
+ public virtual string SearchLabelText {
+ get {
+ return "Search:";
+ }
+ }
+
+ public virtual string ShowQueryBarText {
+ get {
+ return "Show query bar";
+ }
+ }
+
+ public virtual string ExecuteQueryText {
+ get {
+ return "Execute query";
+ }
+ }
+
+ public virtual string ExpandHotPathSubtreeText {
+ get {
+ return "Expand selected hot path";
+ }
+ }
+
+ public virtual string CpuCyclesText {
+ get {
+ return "CPU cycles:";
+ }
+ }
+
+ public virtual string TimeText {
+ get {
+ return "Time:";
+ }
+ }
+
+ public virtual string CallsText {
+ get {
+ return "Calls:";
+ }
+ }
}
}
diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml
index 677da8169d..0234eb9727 100644
--- a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml
+++ b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml
@@ -1,4 +1,4 @@
-
@@ -71,7 +71,7 @@
-
+
@@ -84,42 +84,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -139,18 +139,18 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
+
diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs
index 71f6de489c..07747c6e5e 100644
--- a/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/Controls/QueryView.xaml.cs
@@ -70,7 +70,13 @@ namespace ICSharpCode.Profiler.Controls
get { return (bool)GetValue(ShowQueryItemsProperty); }
}
- public ControlsTranslation Translation { get; set; }
+ public static readonly DependencyProperty TranslationProperty = DependencyProperty.Register(
+ "Translation", typeof(ControlsTranslation), typeof(QueryView));
+
+ public ControlsTranslation Translation {
+ set { SetValue(TranslationProperty, value); }
+ get { return (ControlsTranslation)GetValue(TranslationProperty); }
+ }
#endregion
void txtSearchKeyDown(object sender, KeyEventArgs e)
diff --git a/src/AddIns/Misc/Profiler/Frontend/Controls/RingDiagramControl.cs b/src/AddIns/Misc/Profiler/Frontend/Controls/RingDiagramControl.cs
index a0c09e9b1e..df3801480d 100644
--- a/src/AddIns/Misc/Profiler/Frontend/Controls/RingDiagramControl.cs
+++ b/src/AddIns/Misc/Profiler/Frontend/Controls/RingDiagramControl.cs
@@ -32,6 +32,14 @@ namespace ICSharpCode.Profiler.Controls
set { SetValue(SelectedRootProperty, value); }
}
+ public static readonly DependencyProperty TranslationProperty = DependencyProperty.Register(
+ "Translation", typeof(ControlsTranslation), typeof(RingDiagramControl));
+
+ public ControlsTranslation Translation {
+ set { SetValue(TranslationProperty, value); }
+ get { return (ControlsTranslation)GetValue(TranslationProperty); }
+ }
+
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
@@ -43,6 +51,7 @@ namespace ICSharpCode.Profiler.Controls
{
this.hierarchyStack = new Stack();
this.task = new SingleTask(this.Dispatcher);
+ this.Translation = new ControlsTranslation();
}
void Update(CallTreeNodeViewModel item)
@@ -73,7 +82,7 @@ namespace ICSharpCode.Profiler.Controls
ell.HorizontalAlignment = HorizontalAlignment.Center;
ell.Fill = Brushes.Gray;
ell.Stroke = Brushes.Black;
- ell.ToolTip = item.CreateToolTip();
+ ell.ToolTip = item.CreateToolTip(Translation);
ell.Tag = item;
ell.MouseLeftButtonDown += (sender, e) =>
@@ -151,11 +160,10 @@ namespace ICSharpCode.Profiler.Controls
p.WedgeAngle = wedgeAngle;
p.RotationAngle = rotationAngle;
p.Stroke = Brushes.Black;
- p.ToolTip = node.CreateToolTip();
+ p.ToolTip = node.CreateToolTip(Translation);
p.VerticalAlignment = VerticalAlignment.Center;
p.HorizontalAlignment = HorizontalAlignment.Center;
p.Tag = node;
- //p.ContextMenu = this.ContextMenu.;
p.MouseLeftButtonDown += new MouseButtonEventHandler(
delegate(object sender, MouseButtonEventArgs e) {