aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Sites/Properties/Resources.Designer.cs
blob: ecefa25e7a31a6630f6a63e19819c12c6eb3cbf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//------------------------------------------------------------------------------
// <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.MachineStudio.Sites.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.MachineStudio.Sites.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;
            }
        }
    }
}
ss="n">IndexOf(FileLogger.FILE_SET_EXTENSION); int indexOfFile = 0; if (indexPos > 0) { string fileNameIndex = dateString.Substring(indexPos + FileLogger.FILE_SET_EXTENSION.Length); int.TryParse(fileNameIndex, out indexOfFile); dateString = dateString.Substring(0, indexPos); } if (!dateStrings.Contains(dateString)) { dateStrings.Add(dateString); DateTime date = DateTime.ParseExact(dateString, "dd-MM-yyyy_HH-mm-ss", CultureInfo.InvariantCulture); logFiles.Add(new LogFile() { DateTime = date, File = file, PartOfSet = indexOfFile > 0, }); } } catch (Exception ex) { LogManager.Default.Log(ex, $"Could not load embedded log file {Path.GetFileName(file)}"); } } } return logFiles; } public List<EmbeddedLogItem> Parse(LogFile logFile) { List<EmbeddedLogItem> logItems = new List<EmbeddedLogItem>(); List<LogFile> logFiles = new List<LogFile>(); FileLogger logger = LogManager.Default.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger; if (logFile.PartOfSet) { string fileName = Path.GetFileNameWithoutExtension(logFile.File); string extension = Path.GetExtension(logFile.File); int indexPos = fileName.IndexOf(FileLogger.FILE_SET_EXTENSION); if (indexPos > 0) { fileName = fileName.Substring(0, indexPos); } string[] fileEntries = Directory.GetFiles(FileLogger.DefaultLogsFolder, $"{fileName}*{extension}").Where(x => Path.GetFileName(x).StartsWith(logger.Tag) && x != logger.LogFile).OrderBy(x => x).ToArray(); foreach (var file in fileEntries) { Parse(file, logFile.DateTime, ref logItems); } } else { Parse(logFile.File, logFile.DateTime, ref logItems); } return logItems; } public void Parse(string file, DateTime datetime, ref List<EmbeddedLogItem> 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, @"\[(.*?)\]"); EmbeddedLogItem item = new EmbeddedLogItem(new PMR.Debugging.StartDebugLogResponse() { Category = (PMR.Debugging.DebugLogCategory)Enum.Parse(typeof(PMR.Debugging.DebugLogCategory), entries[1]), FileName = entries[3], LineNumber = int.Parse(entries[5]), ModuleId = int.Parse(entries[7]), Filter = int.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]); } } } public List<EmbeddedLogItem> Parse(string file, DateTime fileDate) { List<EmbeddedLogItem> logs = new List<EmbeddedLogItem>(); Parse(file, fileDate, ref logs); return logs; } } }