void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.ExceptionWindow = ((TraceLab.UI.WPF.Views.ComponentExceptionDisplay)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.ExceptionWindow = ((TraceLab.UI.WPF.Views.ComponentExceptionDisplay)(target));
         return;
     }
     this._contentLoaded = true;
 }
        private void ViewExceptionButton_Click(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;
            TraceLab.Core.ViewModels.ComponentLogInfo logInfo = button.DataContext as TraceLab.Core.ViewModels.ComponentLogInfo;
            if (logInfo != null)
            {
                ComponentExceptionDisplay display = new ComponentExceptionDisplay();
                display.ShowInTaskbar = false;
                display.ShowActivated = true;
                display.Owner = this.GetParentManager(null).GetParent<MainWindowBase>(null);
                display.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                
                //create view model
                var exceptionViewModel = new TraceLab.UI.WPF.ViewModels.ComponentExceptionDisplayViewModel(logInfo);

                display.DataContext = exceptionViewModel;
                
                display.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
                display.Title = "Component exception details";
                
                display.ShowDialog();
            }
        }
Exemple #4
0
        private void ViewExceptionButton_Click(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;

            TraceLab.Core.ViewModels.ComponentLogInfo logInfo = button.DataContext as TraceLab.Core.ViewModels.ComponentLogInfo;
            if (logInfo != null)
            {
                ComponentExceptionDisplay display = new ComponentExceptionDisplay();
                display.ShowInTaskbar         = false;
                display.ShowActivated         = true;
                display.Owner                 = this.GetParentManager(null).GetParent <MainWindowBase>(null);
                display.WindowStartupLocation = WindowStartupLocation.CenterOwner;

                //create view model
                var exceptionViewModel = new TraceLab.UI.WPF.ViewModels.ComponentExceptionDisplayViewModel(logInfo);

                display.DataContext = exceptionViewModel;

                display.SizeToContent = System.Windows.SizeToContent.WidthAndHeight;
                display.Title         = "Component exception details";

                display.ShowDialog();
            }
        }