Inheritance: System.Windows.Controls.Separator
Example #1
0
 private void window1_Loaded(object sender, RoutedEventArgs e)
 {
     log.Info("Setting the UI Culture to fr-FR");
     Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR");
     //log.Info("Setting Max Width to " + SystemParameters.PrimaryScreenWidth);
     //MaxWidth = SystemParameters.PrimaryScreenWidth;
     log.Info("Initializing event handler for ListView control");
     listView1.AddHandler(ButtonBase.ClickEvent, new RoutedEventHandler(listView1_HeaderClicked));
     log.Info("Setting the RecentFileList to" + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)));
     RecentFileList.UseXmlPersister(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "YourLog4NetViewer"));
     //RecentFileList.UseXmlPersister(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "EnaxosLogViewer.filehistory.xml"));
     log.Info("Initializing the RecentFiles menu click");
     RecentFileList.MenuClick += (s, ee) => openFile(ee.FilePath);
     log.Info("Initializing Error Bitmap");
     imageError.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Error.Handle, Int32Rect.Empty, null);
     log.Info("Initializing Info Bitmap");
     imageInfo.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Information.Handle, Int32Rect.Empty, null);
     log.Info("Initializing Warn  Bitmap");
     imageWarn.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Warning.Handle, Int32Rect.Empty, null);
     log.Info("Initializing Debug Bitmap");
     imageDebug.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Question.Handle, Int32Rect.Empty, null);
     Title             = string.Format(Properties.Resources.WindowTitle + (!string.IsNullOrWhiteSpace(FileName) ? " - " + FileName : string.Empty), Assembly.GetExecutingAssembly().GetName().Version);
     log.Info("Setting the title as " + Title);
     log.Info("Applying ExpressionDark Theme");
     this.ApplyTheme("ExpressionDark");
     log.Info("Setting the GridView widths for each column");
     foreach (var gvc in GridView1.Columns)
     {
         gvc.Width = gvc.ActualWidth;
         gvc.Width = Double.NaN;
     }
     mergedFiles.ForEach(mergedFile => RecentFileList.InsertFile(mergedFile));
 }
        public Window1()
        {
            InitializeComponent();
            listView1.AddHandler(GridViewColumnHeader.ClickEvent, new RoutedEventHandler(ListView1_HeaderClicked));
            RecentFileList.UseXmlPersister();
            RecentFileList.MenuClick += (s, e) => OpenFile(e.Filepath);

            imageError.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Error.Handle, Int32Rect.Empty, null);
            imageInfo.Source  = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Information.Handle, Int32Rect.Empty, null);
            imageWarn.Source  = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Warning.Handle, Int32Rect.Empty, null);
            imageDebug.Source = Imaging.CreateBitmapSourceFromHIcon(SystemIcons.Question.Handle, Int32Rect.Empty, null);

            Title = string.Format("LogViewer  v.{0}", Assembly.GetExecutingAssembly().GetName().Version);
        }
Example #3
0
        public LogViewerWindow()
        {
            InitializeComponent();
            this.DataContext = this;
            listView1.AddHandler(ButtonBase.ClickEvent, new RoutedEventHandler(ListView1_HeaderClicked));

            RecentFileList.UseXmlPersister();
            RecentFileList.MenuClick += (s, e) => OpenFile(e.Filepath);

            InitLevelIcons();

            Title = string.Format("LogViewer  v.{0}", Assembly.GetExecutingAssembly().GetName().Version);

            EntryCollection = CollectionViewSource.GetDefaultView(Entries);
            PopulateLevelDropDown();
        }
        public Window1()
        {
            filec = new FileLogEntryController();
            lcount = new LogEntryCounter(filec.Entries);
            recentFileList = new RecentFileList(new XmlPersister(ApplicationAttributes.Get()));
            InitializeComponent();
            menu1.DataContext = this;
            listView1.ItemsSource = Entries;
            countpanel.DataContext = Count;
            textboxFileName.DataContext = filec.ObservableFileName;
            listView1.AddHandler(GridViewColumnHeader.ClickEvent, new RoutedEventHandler(ListView1_HeaderClicked));

            recentFileList.MenuClick += (s, e) => OpenFile(e.Filepath);
            Title = string.Format("LogViewer  v.{0}", Assembly.GetExecutingAssembly().GetName().Version);

            this.Loaded+=new RoutedEventHandler(Window1_Loaded);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 14 "..\..\Window1.xaml"
                ((LogViewer.MainWindow)(target)).Closed += new System.EventHandler(this.window_Closed);

            #line default
            #line hidden
                return;

            case 2:

            #line 19 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.openCanExecute);

            #line default
            #line hidden

            #line 19 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.openExecuted);

            #line default
            #line hidden
                return;

            case 3:

            #line 20 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.exitCanExecute);

            #line default
            #line hidden

            #line 20 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.exitExecuted);

            #line default
            #line hidden
                return;

            case 4:

            #line 21 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.refreshCanExecute);

            #line default
            #line hidden

            #line 21 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.refreshExecuted);

            #line default
            #line hidden
                return;

            case 5:

            #line 22 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.filterCanExexute);

            #line default
            #line hidden

            #line 22 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.filterExecuted);

            #line default
            #line hidden
                return;

            case 6:

            #line 23 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.aboutCanExecute);

            #line default
            #line hidden

            #line 23 "..\..\Window1.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.aboutExecuted);

            #line default
            #line hidden
                return;

            case 7:
                this.gridMenu = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.menu1 = ((System.Windows.Controls.Menu)(target));
                return;

            case 9:
                this.RecentFileList = ((LogViewer.RecentFileList)(target));
                return;

            case 10:
                this.MenuMergeItem = ((System.Windows.Controls.MenuItem)(target));

            #line 43 "..\..\Window1.xaml"
                this.MenuMergeItem.Click += new System.Windows.RoutedEventHandler(this.mergeFile_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.ResetSeparator = ((System.Windows.Controls.MenuItem)(target));

            #line 45 "..\..\Window1.xaml"
                this.ResetSeparator.Click += new System.Windows.RoutedEventHandler(this.resetSeparator_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.gridTopBar = ((System.Windows.Controls.Grid)(target));
                return;

            case 13:
                this.spPath = ((System.Windows.Controls.Grid)(target));
                return;

            case 14:
                this.textboxFileName = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.spCountAndSearch = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 16:
                this.spGlobalInfo = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 17:
                this.FilterIndicator = ((LogViewer.FilterActivity)(target));
                return;

            case 18:
                this.tbFiltered = ((System.Windows.Controls.TextBlock)(target));

            #line 77 "..\..\Window1.xaml"
                this.tbFiltered.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.filterIndicator_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 19:
                this.spCounters = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 20:
                this.imageError = ((System.Windows.Controls.Image)(target));

            #line 81 "..\..\Window1.xaml"
                this.imageError.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.imageError_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 21:
                this.labelErrorCount = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 22:
                this.imageWarn = ((System.Windows.Controls.Image)(target));

            #line 89 "..\..\Window1.xaml"
                this.imageWarn.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.imageWarn_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 23:
                this.labelWarnCount = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 24:
                this.imageDebug = ((System.Windows.Controls.Image)(target));

            #line 97 "..\..\Window1.xaml"
                this.imageDebug.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.imageDebug_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 25:
                this.labelDebugCount = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 26:
                this.imageInfo = ((System.Windows.Controls.Image)(target));

            #line 105 "..\..\Window1.xaml"
                this.imageInfo.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.imageInfo_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 27:
                this.labelInfoCount = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 28:
                this.spFind = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 29:
                this.image2 = ((System.Windows.Controls.Image)(target));
                return;

            case 30:
                this.label3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 31:
                this.textBoxFind = ((System.Windows.Controls.TextBox)(target));

            #line 120 "..\..\Window1.xaml"
                this.textBoxFind.KeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxFind_KeyDown);

            #line default
            #line hidden

            #line 120 "..\..\Window1.xaml"
                this.textBoxFind.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.textBoxFind_PreviewKeyDown);

            #line default
            #line hidden
                return;

            case 32:
                this.buttonFindNext = ((System.Windows.Controls.Button)(target));

            #line 121 "..\..\Window1.xaml"
                this.buttonFindNext.Click += new System.Windows.RoutedEventHandler(this.buttonFindNext_Click);

            #line default
            #line hidden
                return;

            case 33:
                this.buttonFindPrevious = ((System.Windows.Controls.Button)(target));

            #line 165 "..\..\Window1.xaml"
                this.buttonFindPrevious.Click += new System.Windows.RoutedEventHandler(this.buttonFindPrevious_Click);

            #line default
            #line hidden
                return;

            case 34:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 35:
                this.borderTop = ((System.Windows.Controls.Border)(target));
                return;

            case 36:
                this.listView1 = ((System.Windows.Controls.ListView)(target));

            #line 230 "..\..\Window1.xaml"
                this.listView1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listView1_SelectionChanged);

            #line default
            #line hidden

            #line 231 "..\..\Window1.xaml"
                this.listView1.Drop += new System.Windows.DragEventHandler(this.listView1_Drop);

            #line default
            #line hidden
                return;

            case 37:
                this.GridView1 = ((System.Windows.Controls.GridView)(target));
                return;

            case 38:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 39:
                this.bottomGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 40:
                this.image1 = ((System.Windows.Controls.Image)(target));
                return;

            case 41:
                this.textBoxLevel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 42:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 43:
                this.textBoxTimeStamp = ((System.Windows.Controls.TextBox)(target));
                return;

            case 44:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 45:
                this.textBoxMachineName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 46:
                this.labelThread = ((System.Windows.Controls.Label)(target));
                return;

            case 47:
                this.textBoxThread = ((System.Windows.Controls.TextBox)(target));
                return;

            case 48:
                this.labelNDC = ((System.Windows.Controls.Label)(target));
                return;

            case 49:
                this.textBoxNDC = ((System.Windows.Controls.TextBox)(target));
                return;

            case 50:
                this.label4 = ((System.Windows.Controls.Label)(target));
                return;

            case 51:
                this.textBoxHostName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 52:
                this.label5 = ((System.Windows.Controls.Label)(target));
                return;

            case 53:
                this.textBoxUserName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 54:
                this.label6 = ((System.Windows.Controls.Label)(target));
                return;

            case 55:
                this.textBoxApp = ((System.Windows.Controls.TextBox)(target));
                return;

            case 56:
                this.label7 = ((System.Windows.Controls.Label)(target));
                return;

            case 57:
                this.textBoxClass = ((System.Windows.Controls.TextBox)(target));
                return;

            case 58:
                this.label8 = ((System.Windows.Controls.Label)(target));
                return;

            case 59:
                this.textBoxMethod = ((System.Windows.Controls.TextBox)(target));
                return;

            case 60:
                this.label10 = ((System.Windows.Controls.Label)(target));
                return;

            case 61:
                this.textBoxIdentity = ((System.Windows.Controls.TextBox)(target));
                return;

            case 62:
                this.label6b = ((System.Windows.Controls.Label)(target));

            #line 392 "..\..\Window1.xaml"
                this.label6b.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.label6b_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 63:
                this.textBoxLog = ((System.Windows.Controls.TextBox)(target));
                return;

            case 64:
                this.labelFile = ((System.Windows.Controls.Label)(target));
                return;

            case 65:
                this.textBoxfile = ((System.Windows.Controls.TextBox)(target));
                return;

            case 66:
                this.label9 = ((System.Windows.Controls.Label)(target));
                return;

            case 67:
                this.textBoxLine = ((System.Windows.Controls.TextBox)(target));
                return;

            case 68:
                this.labelLogger = ((System.Windows.Controls.Label)(target));
                return;

            case 69:
                this.textBoxLogger = ((System.Windows.Controls.TextBox)(target));
                return;

            case 70:
                this.labelItem = ((System.Windows.Controls.Label)(target));
                return;

            case 71:
                this.textBoxItem = ((System.Windows.Controls.TextBox)(target));
                return;

            case 72:
                this.tabControl1 = ((System.Windows.Controls.TabControl)(target));
                return;

            case 73:
                this.textBoxMessage = ((System.Windows.Controls.TextBox)(target));
                return;

            case 74:
                this.textBoxThrowable = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }