Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
238 changes: 236 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,237 @@
/Properties/launchSettings.json

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
bin
obj
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
obj/
Obj/

# Visual Studio 2015 cache/options directory
.vs/
/wwwroot/dist/
/ClientApp/dist/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config

# Windows Store app package directory
AppPackages/
BundleArtifacts/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
orleans.codegen.cs

/node_modules

/yarn.lock

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe

# FAKE - F# Make
.fake/
6 changes: 1 addition & 5 deletions SharePointLogViewer/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Windows;
using System.Windows;

namespace SharePointLogViewer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Threading;
using Microsoft.Windows.Themes;
using System.Linq;

Expand Down Expand Up @@ -46,13 +45,13 @@ public class AutoCompleteManager

public IAutoCompleteDataProvider DataProvider
{
get { return _dataProvider; }
set { _dataProvider = value; }
get => _dataProvider;
set => _dataProvider = value;
}

public bool Disabled
{
get { return _disabled; }
get => _disabled;
set
{
_disabled = value;
Expand All @@ -63,10 +62,7 @@ public bool Disabled
}
}

public bool AutoCompleting
{
get { return _popup.IsOpen; }
}
public bool AutoCompleting => _popup.IsOpen;

public AutoCompleteManager()
{
Expand Down Expand Up @@ -207,8 +203,8 @@ private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
popupDelay = new Timer(_ =>
{
var dispatcher = Application.Current.Dispatcher;
string text = (string)dispatcher.Invoke(new Func<string>(() => GetWordUnderCursor()));
if (String.IsNullOrEmpty(text))
string text = (string)dispatcher.Invoke(() => GetWordUnderCursor());
if (string.IsNullOrEmpty(text))
dispatcher.Invoke((Action)(() => _popup.IsOpen = false));
else
{
Expand Down Expand Up @@ -464,7 +460,7 @@ private IntPtr HookHandler(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, r

private bool PopupOnTop
{
get { return _popupOnTop; }
get => _popupOnTop;
set
{
if (_popupOnTop == value)
Expand Down Expand Up @@ -549,8 +545,8 @@ private void UpdateText(string text, bool selectAll)
int start, end;
GetWordUnderCursor(out start, out end);

string prefix = start < _textBeforeChangedByCode.Length ? _textBeforeChangedByCode.Substring(0, start) : String.Empty;
string suffix = end < _textBeforeChangedByCode.Length ? _textBeforeChangedByCode.Substring(end + 1) : String.Empty;
string prefix = start < _textBeforeChangedByCode.Length ? _textBeforeChangedByCode.Substring(0, start) : string.Empty;
string suffix = end < _textBeforeChangedByCode.Length ? _textBeforeChangedByCode.Substring(end + 1) : string.Empty;

_textChangedByCode = true;
Debug.Print("@@@@@@@" + text);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace SharePointLogViewer.Controls.AutoCompleteTextBox
{
public class AutoCompleteTextBox : TextBox
{
private AutoCompleteManager _acm;

public AutoCompleteManager AutoCompleteManager
{
get { return _acm; }
}
public AutoCompleteManager AutoCompleteManager { get; }

public AutoCompleteTextBox()
{
_acm = new AutoCompleteManager();
_acm.DataProvider = new SimpleStaticDataProvider(Enumerable.Empty<String>());
this.Loaded += AutoCompleteTextBox_Loaded;
AutoCompleteManager = new AutoCompleteManager();
AutoCompleteManager.DataProvider = new SimpleStaticDataProvider(Enumerable.Empty<string>());
Loaded += AutoCompleteTextBox_Loaded;
}

void AutoCompleteTextBox_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
_acm.AttachTextBox(this);
AutoCompleteManager.AttachTextBox(this);
}

}
Expand Down
Loading