Add the current database server to the title bar.
This commit is contained in:
@@ -43,16 +43,7 @@ namespace TradeBlotter.ViewModels
|
||||
public MainWindowViewModel()
|
||||
{
|
||||
anchorables=new ObservableCollection<WorkspaceViewModel>();
|
||||
String principal = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("eNavigator").Append(" ").Append("(").Append(principal).Append(")");
|
||||
sb.Append("[").Append(Utility.Is64Bit()?"64Bit":"32Bit").Append("]");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
base.DisplayName = sb.ToString();
|
||||
base.DisplayName = GetTitle();
|
||||
Dispatcher.CurrentDispatcher.BeginInvoke((Action)(() => { DisplaySplashScreen(); }), DispatcherPriority.Normal);
|
||||
DispatcherOperation viewStateOperation=Dispatcher.CurrentDispatcher.BeginInvoke((Action)(() => { LoadViewStateThreadProc(); }), DispatcherPriority.Normal);
|
||||
viewStateOperation.Completed += (s, e) =>
|
||||
@@ -63,6 +54,17 @@ namespace TradeBlotter.ViewModels
|
||||
Dispatcher.CurrentDispatcher.BeginInvoke((Action)(() => { HeadlinesThreadProc(); }), DispatcherPriority.Normal);
|
||||
}
|
||||
|
||||
private static String GetTitle()
|
||||
{
|
||||
DataSourceEx dataSource = MainDataSource.Instance.LocateDataSource("market_data");
|
||||
String principal = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("eNavigator").Append(" ").Append("(").Append(principal).Append(")");
|
||||
sb.Append("[").Append(Utility.Is64Bit()?"64Bit":"32Bit").Append("]").Append(" ");
|
||||
sb.Append("[").Append("DataSource->").Append(dataSource.Datasource).Append("]");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
private void DisplaySplashScreen()
|
||||
{
|
||||
if(System.Diagnostics.Debugger.IsAttached)return;
|
||||
|
||||
Reference in New Issue
Block a user