aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.LogViewer.UI
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Utilities/Tango.LogViewer.UI')
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.config62
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml26
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml.cs24
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ApplicationLogViewerParser.cs55
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/EmbeddedLogViewerParser.cs55
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ILogViewerParser.cs14
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs126
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml326
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml.cs67
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/AssemblyInfo.cs55
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.Designer.cs71
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.Designer.cs30
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Tango.LogViewer.UI.csproj147
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/ViewModels/MainViewVM.cs307
-rw-r--r--Software/Visual_Studio/Utilities/Tango.LogViewer.UI/packages.config8
17 files changed, 0 insertions, 1497 deletions
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.config b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.config
deleted file mode 100644
index bafe24888..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.config
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
- </startup>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.0.5.0" newVersion="5.0.5.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml
deleted file mode 100644
index 6d399479f..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml
+++ /dev/null
@@ -1,26 +0,0 @@
-<Application x:Class="Tango.LogViewer.UI.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:Tango.LogViewer.UI"
- xmlns:vm="clr-namespace:Tango.LogViewer.UI.ViewModels"
- StartupUri="MainWindow.xaml" Startup="App_Startup">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
- <!-- Accent and AppTheme setting -->
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" />
-
- <ResourceDictionary>
- <vm:MainViewVM x:Key="MainViewVM" />
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Application.Resources>
-</Application>
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml.cs
deleted file mode 100644
index 44d17a48a..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/App.xaml.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace Tango.LogViewer.UI
-{
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application
- {
- public static String[] StartArgs { get; set; }
-
- public void App_Startup(object sender, StartupEventArgs e)
- {
- StartArgs = e.Args;
- }
- }
-
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ApplicationLogViewerParser.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ApplicationLogViewerParser.cs
deleted file mode 100644
index 1a43a7eff..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ApplicationLogViewerParser.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Logging;
-using System.Text.RegularExpressions;
-using System.IO;
-using System.Globalization;
-
-namespace Tango.LogViewer.UI.LogViewerFileParser
-{
- public class ApplicationLogViewerParser : ILogViewerParser
- {
- public ApplicationLogViewerParser()
- {
-
- }
- public void Parse(string file, DateTime datetime, ref List<LogItemBase> logItems)
- {
- String text = File.ReadAllText(file);
- var logs = Regex.Split(text, @"(\[\d{2}:\d{2}:\d{2}.\d{2}\])");
-
- String logText = String.Empty;
-
- for (int i = 1; i < logs.Length; i += 2)
- {
- try
- {
- DateTime date = DateTime.ParseExact(logs[i].Replace("[", "").Replace("]", ""), "HH:mm:ss.ff", CultureInfo.InvariantCulture);
-
- logText = logs[i + 1];
- var matches = Regex.Matches(logText, @"(?<=\[)(.*?)(?=\])");
-
- MessageLogItem item = new MessageLogItem();
- item.TimeStamp = new DateTime(datetime.Year, datetime.Month, datetime.Day, date.Hour, date.Minute, date.Second, date.Millisecond);
- item.Category = (LogCategory)Enum.Parse(typeof(LogCategory), matches[0].ToString());
- item.CallerFile = matches[1].ToString();
- item.CallerMethodName = matches[2].ToString();
- item.CallerLineNumber = int.Parse(matches[3].ToString());
-
- int messageStartIndex = matches[3].Index + matches[3].Length + 2;
-
- item.Message = logText.Substring(messageStartIndex, logText.Length - messageStartIndex);
-
- logItems.Add(item);
- }
- catch (Exception ex)
- {
- LogManager.Default.Log(ex, "Could not parse log line: " + logText);
- }
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/EmbeddedLogViewerParser.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/EmbeddedLogViewerParser.cs
deleted file mode 100644
index 1d0028f10..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/EmbeddedLogViewerParser.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using Tango.Integration.Logging;
-using Tango.Logging;
-
-namespace Tango.LogViewer.UI.LogViewerFileParser
-{
- public class EmbeddedLogViewerParser : ILogViewerParser
- {
- public EmbeddedLogViewerParser()
- {
-
-
- }
- public void Parse(string file, DateTime datetime, ref List<LogItemBase> logItems)
- {
- String text = File.ReadAllText(file);
- var logs = Regex.Split(text, @"(\[\d{2}:\d{2}:\d{2}.\d{2}\])");
-
- for (int i = 1; i < logs.Length; i += 2)
- {
- try
- {
- DateTime date = DateTime.ParseExact(logs[i].Replace("[", "").Replace("]", ""), "HH:mm:ss.ff", CultureInfo.InvariantCulture);
- String rest = logs[i + 1];
-
- var entries = Regex.Split(rest, @"\[(.*?)\]");
-
- LogItemBase item = new EmbeddedLogItem(new PMR.Debugging.StartDebugLogResponse()
- {
- Category = (PMR.Debugging.DebugLogCategory)Enum.Parse(typeof(PMR.Debugging.DebugLogCategory), entries[1]),
- FileName = entries[3],
- LineNumber = uint.Parse(entries[5]),
- ModuleId = uint.Parse(entries[7]),
- Filter = uint.Parse(entries[9]),
- Message = new String(entries[10].Skip(2).ToArray())
- });
- item.TimeStamp = new DateTime(datetime.Year, datetime.Month, datetime.Day, date.Hour, date.Minute, date.Second, date.Millisecond);
-
- logItems.Add(item);
- }
- catch (Exception ex)
- {
- //LogManager.Default.Log(ex, "Could not parse log line: " + logs[i]);
- }
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ILogViewerParser.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ILogViewerParser.cs
deleted file mode 100644
index a0088a770..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerFileParser/ILogViewerParser.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Logging;
-
-namespace Tango.LogViewer.UI.LogViewerFileParser
-{
- public interface ILogViewerParser
- {
- void Parse(string file, DateTime datetime, ref List<LogItemBase> logItems);
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs
deleted file mode 100644
index 3615eb50a..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/LogViewerManager.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Logging;
-using Tango.LogViewer.UI.LogViewerFileParser;
-
-namespace Tango.LogViewer.UI
-{
- public class LogViewerManager
- {
- private ILogViewerParser _parser;
-
- public LogFile LogFile { get; set; }
-
- public string FileName { get; set; }
-
- public bool IsEmbeddedLog { get; set; }
-
- public int CountOfSet { get; set; }
-
- public LogViewerManager()
- {
- LogFile = null; ;
- }
-
- /// <summary>
- /// Create LogFile by given path.
- /// </summary>
- /// <param name="file">The file.</param>
- public void InitLogFile(String file)
- {
- LogFile = GetLogFile(file);
- }
-
- /// <summary>
- /// Gets set of log files by path.
- /// </summary>
- public LogFile GetLogFile(string filePath)
- {
- if (!File.Exists(filePath))
- {
- throw new IOException("File not found.");
- }
- if (Path.GetExtension(filePath) != ".log")
- {
- throw new IOException("Invalid log file extension. extension must be *.log");
- }
-
- var directoryName = Path.GetDirectoryName(filePath);
- var logfileName = Path.GetFileNameWithoutExtension(filePath);
- String fileName = logfileName;
- int index = logfileName.IndexOf("-");
- if (index >= 0)
- {
- fileName = logfileName.Substring(0, index);
- }
- int indexPos = logfileName.IndexOf(FileLogger.FILE_SET_EXTENSION);
- if (indexPos > 0)
- {
- logfileName = logfileName.Substring(0, indexPos);
- }
-
- String dateString = System.IO.Path.GetFileNameWithoutExtension(filePath).Replace($"{fileName}-", "").Replace("_session", "");
- indexPos = dateString.IndexOf(FileLogger.FILE_SET_EXTENSION);
- int indexOfFile = 0;
- CountOfSet = 0;
- if (indexPos > 0)
- {
- string fileNameIndex = dateString.Substring(indexPos + FileLogger.FILE_SET_EXTENSION.Length);
- string[] fileEntries = Directory.GetFiles(directoryName, $"{logfileName}*{Path.GetExtension(filePath)}").Where(x => Path.GetFileName(x).StartsWith(logfileName)).OrderBy(x => x).ToArray();
- CountOfSet = fileEntries.Length;
- int.TryParse(fileNameIndex, out indexOfFile);
- dateString = dateString.Substring(0, indexPos);
- }
- DateTime date = DateTime.ParseExact(dateString, "dd-MM-yyyy_HH-mm-ss", CultureInfo.InvariantCulture);
- return (new LogFile() { DateTime = date, File = filePath, FileName = logfileName, PartOfSet = indexOfFile > 0, SetStartIndex = indexOfFile, SetCount = CountOfSet });
- }
-
- /// <summary>
- /// Parses the this LogFile.
- /// </summary>
- public List<LogItemBase> Parse()
- {
- IsEmbeddedLog = false;
- FileName = "";
- List<LogItemBase> logItems = new List<LogItemBase>();
- if (LogFile == null)
- return logItems;
-
- FileName = LogFile.FileName;
-
- IsEmbeddedLog = FileName.StartsWith("Embedded");
- if (IsEmbeddedLog)
- {
- _parser = new EmbeddedLogViewerParser();
- }
- else
- {
- _parser = new ApplicationLogViewerParser();
- }
-
- if (LogFile.PartOfSet)
- {
- string extension = Path.GetExtension(LogFile.File);
- var directoryName = Path.GetDirectoryName(LogFile.File);
-
- string[] fileEntries = Directory.GetFiles(directoryName, $"{FileName}*{extension}").Where(x => Path.GetFileName(x).StartsWith(FileName)).OrderBy(x => x).ToArray();
-
- foreach (var file in fileEntries)
- {
- _parser.Parse(file, LogFile.DateTime, ref logItems);
- }
- }
- else
- {
- _parser.Parse(LogFile.File, LogFile.DateTime, ref logItems);
- }
-
- return logItems;
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml
deleted file mode 100644
index a4fc6a628..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml
+++ /dev/null
@@ -1,326 +0,0 @@
-<mahapps:MetroWindow x:Class="Tango.LogViewer.UI.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:System="clr-namespace:System;assembly=mscorlib"
- xmlns:local="clr-namespace:Tango.LogViewer.UI"
- xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:fa="http://schemas.fontawesome.io/icons/"
- xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
- mc:Ignorable="d"
- Title="Tango Log Viewer" WindowState="Maximized" ShowTitleBar="True" ShowCloseButton="True" DataContext="{StaticResource MainViewVM}" AllowDrop="True" Drop="FileWindow_Drop" Foreground="Gainsboro">
- <Window.Resources>
- <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"></converters:EnumToDescriptionConverter>
- <converters:BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
- <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"/>
- <converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
-
- <SolidColorBrush x:Key="GrayBrush5" Color="#464646"/>
- <SolidColorBrush x:Key="BorderGrayBrush" Color="#464646"/>
- <SolidColorBrush x:Key="SelectedItemBrush" Color="#007ACC"/>
-
- <Style x:Key="LogDataGridCellStyle" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="TextBlock.VerticalAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type DataGridCell}">
- <Grid Background="{TemplateBinding Background}">
- <ContentPresenter VerticalAlignment="Bottom" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsFocused" Value="False" />
- <Condition Property="DataGridCell.IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <MultiTrigger.Setters>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- </MultiTrigger.Setters>
- </MultiTrigger>
- </Style.Triggers>
- </Style>
-
- <Style x:Key="LogDataGridRowStyle" TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- <Setter Property="Cursor" Value="Hand"></Setter>
- </Trigger>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- </Trigger>
- <DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup">
- <Setter Property="Background" Value="#3F3F49"></Setter>
- <Setter Property="Foreground" Value="Gainsboro" />
- <Setter Property="FontWeight" Value="SemiBold"></Setter>
- <Setter Property="Cursor" Value="Arrow"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding LogObject}" Value="External Bridge">
- <Setter Property="Foreground" Value="#28A805" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style x:Key="EmLogDataGridRowStyle" TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- <Setter Property="Cursor" Value="Hand"></Setter>
- </Trigger>
- <Trigger Property="DataGridCell.IsSelected" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
- <Setter Property="Background" Value="Transparent"></Setter>
- </Trigger>
-
- <DataTrigger Binding="{Binding LogObject}" Value="External Bridge">
- <Setter Property="Foreground" Value="#28A805" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <DataTemplate x:Key="LogIconStyle">
- <fa:ImageAwesome Height="16" Width="14" Margin="0 0 0 0" VerticalAlignment="Top">
- <fa:ImageAwesome.Style>
- <Style TargetType="fa:ImageAwesome">
- <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Category}" Value="Info">
- <Setter Property="Icon" Value="InfoCircle"></Setter>
- <Setter Property="Foreground" Value="Gainsboro"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Warning">
- <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
- <Setter Property="Foreground" Value="DarkOrange"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Error">
- <Setter Property="Icon" Value="ExclamationTriangle"></Setter>
- <Setter Property="Foreground" Value="Red"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Critical">
- <Setter Property="Icon" Value="Bell"></Setter>
- <Setter Property="Foreground" Value="Red"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Category}" Value="Debug">
- <Setter Property="Icon" Value="Bug"></Setter>
- <Setter Property="Foreground" Value="Gray"></Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding CallerMethodName}" Value="OnStartup">
- <Setter Property="Icon" Value="ClockOutline"></Setter>
- <Setter Property="Foreground" Value="{StaticResource SelectedItemBrush}"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </fa:ImageAwesome.Style>
- </fa:ImageAwesome>
- </DataTemplate>
-
- <Style x:Key="DataGridTextColumnElementStyle" TargetType="{x:Type TextBlock}">
- <Setter Property="Margin" Value="5" />
- <Setter Property="Padding" Value="5" />
- </Style>
-
- </Window.Resources>
- <Grid IsEnabled="{Binding Loading,Converter={StaticResource BooleanInverseConverter}}">
- <Grid.RowDefinitions>
- <RowDefinition Height="28" />
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="28"/>
- <RowDefinition Height="5"/>
- </Grid.RowDefinitions>
-
- <Menu Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="10,0,0,0" BorderBrush="Transparent" Background="Transparent">
- <MenuItem Header="File" Background="Transparent">
- <MenuItem Header="Open" Command="{Binding OpeFileLogCommand}"/>
- <MenuItem Header="Exit" Click="Exit_MenuItem_Click" />
- </MenuItem>
-
- </Menu>
-
- <Grid Grid.Row="1" Margin="0 20 0 20">
- <DockPanel>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Margin="10 0 0 0">
- <TextBlock FontSize="10">Start Time:</TextBlock>
- <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center" CornerRadius="5" >
- <mahapps:TimePicker x:Name="startTimePicker" SelectedTime="{Binding StartSelectedTime}" Width="160" VerticalAlignment="Center" FontSize="16" IsClockVisible="False" Culture="{Binding Culture}" BorderBrush="{StaticResource BorderGrayBrush}" BorderThickness="0" Margin="1" Foreground="Gainsboro" />
- </Border>
- </StackPanel>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Margin="20 0 0 0">
- <TextBlock FontSize="10">End Time:</TextBlock>
- <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center" CornerRadius="5" >
- <mahapps:TimePicker x:Name="enddatePicker" SelectedTime="{Binding EndSelectedTime}" Width="160" VerticalAlignment="Center" FontSize="16" IsClockVisible="False" Culture="{Binding Culture}" PickerVisibility="HourMinute" BorderBrush="{StaticResource BorderGrayBrush}" BorderThickness="0" Margin="1" Foreground="Gainsboro"/>
- </Border>
- </StackPanel>
- <Border BorderThickness="1" BorderBrush="{StaticResource BorderGrayBrush}" VerticalAlignment="Center" Padding="10 7" CornerRadius="5" Margin="30 10 0 0">
- <StackPanel>
- <ItemsControl VerticalAlignment="Center" ItemsSource="{Binding SelectedLogCategories}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal" Margin="10 0 0 0">
- <CheckBox IsChecked="{Binding IsSelected}" VerticalAlignment="Center" BorderBrush="{StaticResource BorderGrayBrush}"></CheckBox>
- <TextBlock Text="{Binding Data}" Margin="5 0 0 0" VerticalAlignment="Center"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
- </Border>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 10 30 0">
- <fa:ImageAwesome Icon="Search" Width="24" Height="24" Foreground="#7A7A7A"/>
- <TextBox VerticalAlignment="Center" Margin="10 0 0 0" Width="300" Text="{Binding Filter,UpdateSourceTrigger=PropertyChanged, Delay=1000}" />
- </StackPanel>
-
- </DockPanel>
- </Grid>
- <Grid Grid.Row="2" >
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="28"/>
- <RowDefinition Height="1*"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2.5*"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock FontSize="14" Grid.Row="0" FontFamily="Segoe UI">Log</TextBlock>
- <StackPanel Orientation="Horizontal" Margin="0" Grid.Row="0" Grid.Column="2">
- <TextBlock FontSize="14" Margin="10 0 0 0" FontFamily="Segoe UI">Message</TextBlock>
- <CheckBox x:Name="WrapMessgeTextCheckBox" VerticalAlignment="Center" BorderBrush="{StaticResource BorderGrayBrush}" Margin="30 -5 0 0"></CheckBox>
- <TextBlock Text="Wrap message text" Margin="5 -5 0 0" VerticalAlignment="Center"></TextBlock>
- </StackPanel>
-
- <Border Visibility="{Binding IsEmbeddedLog, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Grid.Column="0" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}" Margin="0 0 10 0">
- <DataGrid x:Name="ActionGrid" HorizontalScrollBarVisibility="Disabled" Background="Transparent" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="LowQuality" MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth}" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding LogsViewSource}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"
- CellStyle="{StaticResource LogDataGridCellStyle}" RowStyle="{StaticResource LogDataGridRowStyle}" Foreground="Gainsboro">
- <DataGrid.Resources>
- <Style BasedOn="{StaticResource MetroDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
- <Setter Property="Foreground" Value="Gainsboro" />
- </Style>
- </DataGrid.Resources>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="" CellTemplate="{StaticResource LogIconStyle}"/>
- <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat=' HH:mm:ss.ff '}" Foreground="Gainsboro"/>
- <DataGridTextColumn Header="FILE" Binding="{Binding RelativeCallerFile}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
- <DataGridTextColumn Header="METHOD" Binding="{Binding CallerMethodName}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
- <DataGridTextColumn Header="LINE" Binding="{Binding CallerLineNumber}" />
- <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Grid VerticalAlignment="Center" Margin="0 5 0 5">
- <Border Height="Auto" BorderThickness="0" >
- <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" ></TextBlock>
- </Border>
- </Grid>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Border>
- <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="{Binding Loading,Converter={StaticResource BoolToVisibilityConverter}}">
- <mahapps:ProgressRing Foreground="LightGray" Width="80" Height="80"></mahapps:ProgressRing>
- <TextBlock Text="Loading..." FontStyle="Italic" Margin="0 40 0 0" FontSize="18" VerticalAlignment="Center"></TextBlock>
- </StackPanel>
- <Border Visibility="{Binding IsEmbeddedLog, Converter={StaticResource BoolToVisibilityConverter}}" Grid.Column="0" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}" Margin="0 0 10 0">
- <DataGrid x:Name="embededGrid" HorizontalScrollBarVisibility="Disabled" Background="Transparent" RenderOptions.EdgeMode="Aliased" RenderOptions.BitmapScalingMode="LowQuality" MaxWidth="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth}" AutoGenerateColumns="False" SelectionMode="Single" ItemsSource="{Binding LogsViewSource}" SelectedItem="{Binding SelectedLog}" RowHeight="40" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="True" IsReadOnly="True"
- CellStyle="{StaticResource LogDataGridCellStyle}" RowStyle="{StaticResource EmLogDataGridRowStyle}" Foreground="Gainsboro">
- <DataGrid.Resources>
- <Style BasedOn="{StaticResource MetroDataGridColumnHeader}" TargetType="{x:Type DataGridColumnHeader}">
- <Setter Property="Foreground" Value="Gainsboro" />
- </Style>
- </DataGrid.Resources>
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="ICON" CellTemplate="{StaticResource LogIconStyle}"/>
- <DataGridTextColumn Header="DATE TIME" Binding="{Binding TimeStamp,StringFormat=' HH:mm:ss.ff '}" Foreground="Gainsboro"/>
- <DataGridTextColumn Header="FILE" Binding="{Binding DebugLogResponse.FileName}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
- <DataGridTextColumn Header="LINE" Binding="{Binding DebugLogResponse.LineNumber}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
- <DataGridTextColumn Header="MODULE" Binding="{Binding DebugLogResponse.ModuleId}" ElementStyle="{StaticResource DataGridTextColumnElementStyle}"/>
- <DataGridTextColumn Header="FILTER" Binding="{Binding DebugLogResponse.Filter}" />
- <DataGridTemplateColumn Header="MESSAGE" Width="1*" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Grid VerticalAlignment="Center" Margin="0 5 0 5">
- <Border Height="Auto" BorderThickness="0" >
- <TextBlock Text="{Binding MessagePlusRepeated}" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" ></TextBlock>
- </Border>
- </Grid>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Border>
- <Border Margin="10 0 0 0" Grid.Column="2" Grid.Row="1" BorderThickness="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderBrush="{StaticResource BorderGrayBrush}">
- <TextBox BorderThickness="0" Text="{Binding Message}" IsReadOnly="True" AcceptsReturn="False" VerticalScrollBarVisibility="Auto" Foreground="Gainsboro">
- <TextBox.Style>
- <Style TargetType="TextBox" BasedOn="{StaticResource MetroTextBox}">
- <Setter Property="TextWrapping" Value="NoWrap"></Setter>
- <Setter Property="HorizontalScrollBarVisibility" Value="Auto"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=WrapMessgeTextCheckBox, Path=IsChecked}" Value="True">
- <Setter Property="TextWrapping" Value="Wrap"></Setter>
- <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- </Border>
- <GridSplitter Grid.Column="1" Grid.Row="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="4" Background="{StaticResource BorderGrayBrush}"/>
- </Grid>
- </Grid>
- <StatusBar Grid.Row="3" Grid.ColumnSpan="2" Background="Transparent">
- <StatusBar.ItemsPanel>
- <ItemsPanelTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="10" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- </Grid>
- </ItemsPanelTemplate>
- </StatusBar.ItemsPanel>
- <StatusBarItem Grid.Column="1">
- <TextBlock Text="{Binding FileName}"></TextBlock>
- </StatusBarItem>
- <Separator Grid.Column="2" Visibility="{Binding IsSet, Converter={StaticResource BoolToVisibilityConverter}}"/>
- <StatusBarItem Grid.Column="3" Visibility="{Binding IsSet, Converter={StaticResource BoolToVisibilityConverter}}">
- <TextBlock>
- <Run Text="Set: "></Run>
- <Run Text="{Binding CountOfSet}"></Run>
- </TextBlock>
- </StatusBarItem>
- </StatusBar>
- </Grid>
-</mahapps:MetroWindow>
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml.cs
deleted file mode 100644
index 541315106..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/MainWindow.xaml.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using MahApps.Metro.Controls;
-using Tango.Logging;
-using Tango.LogViewer.UI.ViewModels;
-using Path = System.IO.Path;
-
-namespace Tango.LogViewer.UI
-{
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : MetroWindow
- {
- public MainWindow()
- {
- InitializeComponent();
- ContentRendered += MainWindow_ContentRendered;
- }
-
- private void MainWindow_ContentRendered(object sender, EventArgs e)
- {
- if (App.StartArgs.Length > 0)
- {
- var vm = DataContext as MainViewVM;
- vm.LoadLogFile(App.StartArgs[0]);
- }
- }
-
- private void Exit_MenuItem_Click(object sender, RoutedEventArgs e)
- {
- Application.Current.Shutdown();
- }
-
- private void FileWindow_Drop(object sender, DragEventArgs e)
- {
- if (e.Data.GetDataPresent(DataFormats.FileDrop))
- {
- // Note that you can have more than one file.
- string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
- var file = files[0];
- HandleFile(file);
- }
-
- }
-
- private void HandleFile(string file)
- {
- var vm = DataContext as MainViewVM;
- vm.LoadLogFile(file);
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/AssemblyInfo.cs
deleted file mode 100644
index b9768b82d..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Tango.LogViewer.UI")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Tango.LogViewer.UI")]
-[assembly: AssemblyCopyright("Copyright © 2020")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
-//inside a <PropertyGroup>. For example, if you are using US english
-//in your source files, set the <UICulture> to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.Designer.cs
deleted file mode 100644
index bd996bff3..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Tango.LogViewer.UI.Properties
-{
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.LogViewer.UI.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.resx b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.resx
deleted file mode 100644
index af7dbebba..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.Designer.cs
deleted file mode 100644
index b9f2d694d..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Tango.LogViewer.UI.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.settings b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Tango.LogViewer.UI.csproj b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Tango.LogViewer.UI.csproj
deleted file mode 100644
index 66f8549a5..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/Tango.LogViewer.UI.csproj
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{511A8AD7-6BA2-4BB5-A20A-1454196C5503}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <RootNamespace>Tango.LogViewer.UI</RootNamespace>
- <AssemblyName>Tango.LogViewer.UI</AssemblyName>
- <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningLevel>4</WarningLevel>
- <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
- <Deterministic>true</Deterministic>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\Build\LogViewer\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\..\Build\LogViewer\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
- </Reference>
- <Reference Include="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
- <HintPath>..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll</HintPath>
- </Reference>
- <Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll</HintPath>
- </Reference>
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Net.Http" />
- <Reference Include="System.Xaml">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- </ItemGroup>
- <ItemGroup>
- <ApplicationDefinition Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </ApplicationDefinition>
- <Compile Include="LogViewerFileParser\ApplicationLogViewerParser.cs" />
- <Compile Include="LogViewerFileParser\EmbeddedLogViewerParser.cs" />
- <Compile Include="LogViewerFileParser\ILogViewerParser.cs" />
- <Compile Include="LogViewerManager.cs" />
- <Compile Include="ViewModels\MainViewVM.cs" />
- <Page Include="MainWindow.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="MainWindow.xaml.cs">
- <DependentUpon>MainWindow.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <None Include="packages.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj">
- <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
- <Name>Tango.Core</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.Integration\Tango.Integration.csproj">
- <Project>{4206AC58-3B57-4699-8835-90BF6DB01A61}</Project>
- <Name>Tango.Integration</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj">
- <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project>
- <Name>Tango.Logging</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj">
- <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
- <Name>Tango.PMR</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj">
- <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project>
- <Name>Tango.SharedUI</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/ViewModels/MainViewVM.cs
deleted file mode 100644
index edcdfd241..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/ViewModels/MainViewVM.cs
+++ /dev/null
@@ -1,307 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Core.Commands;
-using Tango.Logging;
-using Tango.SharedUI;
-using Tango.SharedUI.Components;
-using Microsoft.WindowsAPICodePack.Dialogs;
-using System.ComponentModel;
-using System.Windows.Data;
-using System.Diagnostics;
-using System.IO;
-using Tango.LogViewer.UI.LogViewerFileParser;
-using System.Globalization;
-using System.Windows.Input;
-using System.Windows;
-
-namespace Tango.LogViewer.UI.ViewModels
-{
- public class MainViewVM : ViewModel
- {
-
- private LogViewerManager _logViewerManager;
- #region Properties
- public SelectedObjectCollection<LogCategory> SelectedLogCategories { get; set; }
-
- private TimeSpan? _endSelectedTime;
- /// <summary>
- /// Gets or sets the end selected time of time picker.
- /// </summary>
- public TimeSpan? EndSelectedTime
- {
- get { return _endSelectedTime; }
- set
- {
- _endSelectedTime = value;
- RaisePropertyChangedAuto();
- ApplyLogsFilter();
- }
- }
-
- private TimeSpan? _startSelectedTime;
- /// <summary>
- /// Gets or sets the start selected time of time picker.
- /// </summary>
- public TimeSpan? StartSelectedTime
- {
- get { return _startSelectedTime; }
- set
- {
- _startSelectedTime = value;
- RaisePropertyChangedAuto();
- ApplyLogsFilter();
- }
- }
-
- private String _filter;
- /// <summary>
- /// Gets or sets the filter for log message.
- /// </summary>
- public String Filter
- {
- get { return _filter; }
- set
- {
- _filter = value;
- RaisePropertyChangedAuto();
- ApplyLogsFilter();
- }
- }
-
- private ObservableCollection<LogItemBase> _logs;
- /// <summary>
- /// Gets or sets the collection of LogItemBase after parsing log files.
- /// </summary>
- public ObservableCollection<LogItemBase> Logs
- {
- get { return _logs; }
- set { _logs = value; RaisePropertyChangedAuto(); }
- }
-
- private ICollectionView _logsViewSource;
-
- /// <summary>
- /// Wrapper around the Logs collection that provides filtering
- /// </summary>
- public ICollectionView LogsViewSource
- {
- get { return _logsViewSource; }
- set { _logsViewSource = value; RaisePropertyChangedAuto(); }
- }
-
- private LogItemBase _selectedLog;
- /// <summary>
- /// Gets or sets the selected log.
- /// </summary>
- public LogItemBase SelectedLog
- {
- get { return _selectedLog; }
- set { _selectedLog = value; RaisePropertyChangedAuto(); Message = _selectedLog != null ? _selectedLog.Message : ""; }
- }
-
-
- private string _fileName;
- /// <summary>
- /// Gets or sets the full path of the open file to display in Status bar.
- /// </summary>
- public string FileName
- {
- get { return _fileName; }
- set { _fileName = value; RaisePropertyChangedAuto(); }
- }
-
- private int _countOfSet;
- /// <summary>
- /// Gets or sets the count of file set to display in Status bar.
- /// </summary>
- public int CountOfSet
- {
- get { return _countOfSet; }
- set { _countOfSet = value; RaisePropertyChangedAuto(); }
- }
-
- private string _message;
- /// <summary>
- /// Gets the message of selected log item to display in right panel.
- /// </summary>
- public string Message
- {
- get { return _message; }
- set { _message = value; RaisePropertyChangedAuto(); }
-
- }
- private bool _isEmbeddedLog;
-
- public bool IsEmbeddedLog
- {
- get { return _isEmbeddedLog; }
- set { _isEmbeddedLog = value; RaisePropertyChangedAuto(); }
- }
-
- private bool _isSet;
- /// <summary>
- /// Gets or sets a value indicating whether set of files.
- /// </summary>
- public bool IsSet
- {
- get { return _isSet; }
- set { _isSet = value; RaisePropertyChangedAuto(); }
- }
-
- private bool _loading;
-
- public bool Loading
- {
- get { return _loading; }
- set { _loading = value; RaisePropertyChangedAuto(); }
- }
-
- public CultureInfo Culture { get; set; }
-
- #endregion
-
- public RelayCommand OpeFileLogCommand { get; set; }
-
- #region Constructors
- public MainViewVM()
- {
- Culture = new CultureInfo("he-IL");
-
- SelectedLogCategories = new SelectedObjectCollection<LogCategory>(new ObservableCollection<LogCategory>()
- {
- LogCategory.Info,
- LogCategory.Warning,
- LogCategory.Error,
- LogCategory.Critical,
- LogCategory.Debug,
- }, new ObservableCollection<LogCategory>()
- {
- LogCategory.Info,
- LogCategory.Warning,
- LogCategory.Error,
- LogCategory.Critical,
- LogCategory.Debug,
- });
- _logViewerManager = new LogViewerManager();
- IsSet = false;
- IsEmbeddedLog = false;
- Loading = false;
- Clear();
- OpeFileLogCommand = new RelayCommand(OpenLogFile);
- SelectedLogCategories.SynchedSource.CollectionChanged += (_, __) =>
- {
- ApplyLogsFilter();
- };
- }
- #endregion
-
- #region Loading
- /// <summary>
- /// Clears the all filters. Set filter properties to init state.
- /// </summary>
- private void Clear()
- {
- FileName = "";
- StartSelectedTime = null;
- EndSelectedTime = null;
- Filter = "";
- SelectedLog = null;
- SelectedLogCategories.SynchedSource = SelectedLogCategories.Source;
- CountOfSet = 0;
- IsSet = false;
- if (Logs != null)
- {
- Logs.Clear();
- RaisePropertyChanged("Logs");
- }
-
- }
-
- /// <summary>
- /// Opens the log file from menu.
- /// </summary>
- private void OpenLogFile()
- {
- var dialog = new CommonOpenFileDialog()
- {
- Multiselect = false,
- EnsureFileExists = true,
-
- };
- dialog.Filters.Add(new CommonFileDialogFilter("Log files", "*.log"));
- CommonFileDialogResult result = dialog.ShowDialog();
- if (result == CommonFileDialogResult.Ok)
- {
- LoadLogFile(dialog.FileName);
- }
- }
-
- /// <summary>
- /// Loads the log file from menu or command line.
- /// </summary>
- public async void LoadLogFile(String fileName)
- {
- try
- {
- Clear();
- Loading = true;
-
- Mouse.OverrideCursor = Cursors.Wait;
- _logViewerManager.InitLogFile(fileName);
- List<LogItemBase> logs = new List<LogItemBase>();
- await Task.Factory.StartNew(() =>
- {
- logs.AddRange(_logViewerManager.Parse());
- });
-
- CountOfSet = _logViewerManager.CountOfSet;
- IsSet = CountOfSet > 0 ? true : false;
- IsEmbeddedLog = _logViewerManager.IsEmbeddedLog;
- FileName = _logViewerManager.FileName;
- Logs = new ObservableCollection<LogItemBase>(logs);
- LogsViewSource = CollectionViewSource.GetDefaultView(Logs);
- StartSelectedTime = Logs.Min(x => x.TimeStamp).TimeOfDay;
- EndSelectedTime = Logs.Max(x => x.TimeStamp).TimeOfDay;
- ApplyLogsFilter();
- }
- catch (Exception ex)
- {
- Mouse.OverrideCursor = null;
- Loading = false;
- MessageBox.Show(ex.FlattenMessage());
- }
- finally
- {
- Mouse.OverrideCursor = null;
- Loading = false;
- }
- }
-
-
- #endregion
-
- #region Filtering
- /// <summary>
- /// Applies the all filters( time, categories,filter massage) to view.
- /// </summary>
- private void ApplyLogsFilter()
- {
- if (LogsViewSource != null)
- {
- LogsViewSource.Filter = (x) =>
- {
- LogItemBase log = x as LogItemBase;
- return (SelectedLogCategories.SynchedSource.Contains(log.Category) && (String.IsNullOrWhiteSpace(Filter) || log.Message.ToLower().Contains(Filter.ToLower()))
- && (StartSelectedTime == null || StartSelectedTime == TimeSpan.Zero || log.TimeStamp.TimeOfDay >= StartSelectedTime) && (EndSelectedTime == null || EndSelectedTime == TimeSpan.Zero || log.TimeStamp.TimeOfDay <= EndSelectedTime));
- };
- }
-
- }
- #endregion
-
- }
-}
diff --git a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/packages.config b/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/packages.config
deleted file mode 100644
index 0ac4ca4b4..000000000
--- a/Software/Visual_Studio/Utilities/Tango.LogViewer.UI/packages.config
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="ControlzEx" version="3.0.2.4" targetFramework="net461" />
- <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net461" />
- <package id="MahApps.Metro" version="1.6.5" targetFramework="net461" />
- <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.0" targetFramework="net461" />
- <package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net461" />
-</packages> \ No newline at end of file