Skip to content

Commit

Permalink
partial #133 and #125
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorBanai committed Apr 15, 2020
1 parent 7585f70 commit bfcd39e
Show file tree
Hide file tree
Showing 4 changed files with 839 additions and 863 deletions.
14 changes: 13 additions & 1 deletion Analogy/DataProviders/AnalogyBuiltInFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class AnalogyOfflineDataProvider : IAnalogyOfflineDataProvider
public IEnumerable<string> SupportFormats { get; } = new[] { "*.xml", "*.json" };
public string InitialFolderFullPath { get; } = Environment.CurrentDirectory;
public string OptionalTitle { get; } = "Analogy Built-In Offline Readers";
public bool UseCustomColors { get; set; } = false;
public bool DisableFilePoolingOption { get; } = false;

public Task InitializeDataProviderAsync(IAnalogyLogger logger)
Expand All @@ -63,6 +64,12 @@ public void MessageOpened(AnalogyLogMessage message)
{
//nop
}

public (Color backgroundColor, Color foregroundColor) GetColorForMessage(IAnalogyLogMessage logMessage)
{
return (Color.Empty, Color.Empty);
}

public async Task<IEnumerable<AnalogyLogMessage>> Process(string fileName, CancellationToken token, ILogMessageCreatedHandler messagesHandler)
{
if (fileName.EndsWith(".xml", StringComparison.InvariantCultureIgnoreCase))
Expand Down Expand Up @@ -136,7 +143,10 @@ public bool CanOpenFile(string fileName)

public bool CanOpenAllFiles(IEnumerable<string> fileNames) => fileNames.All(CanOpenFile);

public static List<FileInfo> GetSupportedFilesInternal(DirectoryInfo dirInfo, bool recursive)
public IEnumerable<(string originalHeader, string replacementHeader)> GetReplacementHeaders() =>
Array.Empty<(string, string)>();

private static List<FileInfo> GetSupportedFilesInternal(DirectoryInfo dirInfo, bool recursive)
{
List<FileInfo> files = dirInfo.GetFiles("*.xml")
.Concat(dirInfo.GetFiles("*.json"))
Expand All @@ -158,6 +168,8 @@ public static List<FileInfo> GetSupportedFilesInternal(DirectoryInfo dirInfo, bo

return files;
}


}

public class AnalogyCustomActionFactory : IAnalogyCustomActionsFactory
Expand Down
30 changes: 8 additions & 22 deletions Analogy/UserControls/UCLogs.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions Analogy/UserControls/UCLogs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace Analogy

public partial class UCLogs : XtraUserControl, ILogMessageCreatedHandler
{
private bool simClear;
public bool ForceNoFileCaching { get; set; } = false;
public bool DoNotAddToRecentHistory { get; set; } = false;
private PagingManager PagingManager { get; set; }
Expand Down Expand Up @@ -2296,21 +2295,6 @@ private void sbtnPreDefinedFilters_Click(object sender, EventArgs e)

contextMenuStripFilters.Show(sbtnPreDefinedFilters.PointToScreen(sbtnPreDefinedFilters.Location));
}

private void timer2_Tick(object sender, EventArgs e)
{
if (simClear)
{
txtbInclude.Text = "";
simClear = false;
return;
}
else
{
txtbInclude.Text = "8 | 9";
simClear = true;
}
}
}
}

Expand Down
Loading

0 comments on commit bfcd39e

Please sign in to comment.