Skip to content

Commit 049e001

Browse files
committed
Minor code cleanup
1 parent 3fb294e commit 049e001

File tree

9 files changed

+25
-118
lines changed

9 files changed

+25
-118
lines changed

Source/ExcelDna.IntelliSense/CrossAppDomainSingleton.cs

Lines changed: 0 additions & 92 deletions
This file was deleted.

Source/ExcelDna.IntelliSense/ExcelDna.IntelliSense.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
<Reference Include="WindowsBase" />
5757
</ItemGroup>
5858
<ItemGroup>
59-
<Compile Include="CrossAppDomainSingleton.cs" />
6059
<Compile Include="FormattedText.cs" />
6160
<Compile Include="IntelliSenseDisplay.cs" />
6261
<Compile Include="IntelliSenseHelper.cs" />

Source/ExcelDna.IntelliSense/IntellisenseHelper.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ namespace ExcelDna.IntelliSense
77
{
88
// TODO: This is to be replaced by the Provider / Server info retrieval mechanism
99
// First version might run on a timer for updates.
10-
public class IntelliSenseHelper : IDisposable
10+
class IntelliSenseHelper : IDisposable
1111
{
12-
private readonly IntelliSenseDisplay _id;
13-
private readonly IIntelliSenseProvider _excelDnaProvider = new ExcelDnaIntelliSenseProvider();
14-
private readonly IIntelliSenseProvider _workbookProvider = new WorkbookIntelliSenseProvider();
12+
readonly IntelliSenseDisplay _id;
13+
readonly IIntelliSenseProvider _excelDnaProvider = new ExcelDnaIntelliSenseProvider();
14+
readonly IIntelliSenseProvider _workbookProvider = new WorkbookIntelliSenseProvider();
1515
// TODO: Others
1616

1717

Source/ExcelDna.IntelliSense/Logging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static void ProcessExitEvent(object sender, EventArgs e)
139139
s_AppDomainShutdown = true;
140140
}
141141

142-
private static void AppDomainUnloadEvent(object sender, EventArgs e)
142+
static void AppDomainUnloadEvent(object sender, EventArgs e)
143143
{
144144
Close();
145145
s_AppDomainShutdown = true;

Source/ExcelDna.IntelliSense/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
88
[assembly: AssemblyTitle("Excel-DNA IntelliSense")]
9-
[assembly: AssemblyDescription("")]
9+
[assembly: AssemblyDescription("IntelliSense service for Microsoft Excel")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("Excel-DNA")]
1212
[assembly: AssemblyProduct("Excel-DNA IntelliSense")]
13-
[assembly: AssemblyCopyright("Copyright © Excel-DNA Contributors 2013-2015")]
13+
[assembly: AssemblyCopyright("Copyright © Excel-DNA Contributors 2013-2016")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

Source/ExcelDna.IntelliSense/SingleThreadSynchronizationContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ namespace ExcelDna.IntelliSense
1212
sealed class SingleThreadSynchronizationContext : SynchronizationContext
1313
{
1414
/// <summary>The queue of work items.</summary>
15-
private readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> m_queue =
15+
readonly BlockingCollection<KeyValuePair<SendOrPostCallback, object>> m_queue =
1616
new BlockingCollection<KeyValuePair<SendOrPostCallback, object>>();
1717

1818
// /// <summary>The processing thread.</summary>
19-
// private readonly Thread m_thread = Thread.CurrentThread;
19+
// readonly Thread m_thread = Thread.CurrentThread;
2020

2121
/// <summary>Dispatches an asynchronous message to the synchronization context.</summary>
2222
/// <param name="d">The System.Threading.SendOrPostCallback delegate to call.</param>

Source/ExcelDna.IntelliSense/ToolTipForm.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ namespace ExcelDna.IntelliSense
1111
class ToolTipForm : Form
1212
{
1313
FormattedText _text;
14-
private Label label;
15-
private Label label1;
16-
private ToolTip toolTip1;
17-
private System.ComponentModel.IContainer components;
14+
Label label;
15+
Label label1;
16+
ToolTip toolTip1;
17+
System.ComponentModel.IContainer components;
1818
Win32Window _owner;
1919

2020
public ToolTipForm(IntPtr hwndOwner)
@@ -85,9 +85,9 @@ protected override bool ShowWithoutActivation
8585
// }
8686
//}
8787

88-
private const int CS_DROPSHADOW = 0x00020000;
89-
private const int WS_EX_TOOLWINDOW = 0x00000080;
90-
private const int WS_EX_NOACTIVATE = 0x08000000;
88+
const int CS_DROPSHADOW = 0x00020000;
89+
const int WS_EX_TOOLWINDOW = 0x00000080;
90+
const int WS_EX_NOACTIVATE = 0x08000000;
9191
protected override CreateParams CreateParams
9292
{
9393
get
@@ -148,7 +148,7 @@ protected override void OnPaint(PaintEventArgs e)
148148
Size = new Size(lineWidths.Max() + widthPadding, totalHeight + heightPadding);
149149
}
150150

151-
private void DrawString(Graphics g, Brush brush, ref Rectangle rect, out Size used,
151+
void DrawString(Graphics g, Brush brush, ref Rectangle rect, out Size used,
152152
StringFormat format, string text, Font font)
153153
{
154154
using (StringFormat copy = (StringFormat)format.Clone())
@@ -172,7 +172,7 @@ private void DrawString(Graphics g, Brush brush, ref Rectangle rect, out Size us
172172
}
173173
}
174174

175-
private void InitializeComponent()
175+
void InitializeComponent()
176176
{
177177
this.components = new System.ComponentModel.Container();
178178
this.label = new System.Windows.Forms.Label();

Source/ExcelDna.IntelliSense/Watchers.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public FormulaEditWatcher(WindowWatcher windowWatcher, SynchronizationContext sy
319319
}
320320

321321
// Runs on the Automation thread
322-
private void _windowWatcher_MainWindowChanged(object sender, EventArgs args)
322+
void _windowWatcher_MainWindowChanged(object sender, EventArgs args)
323323
{
324324
if (_mainWindow != null)
325325
{
@@ -572,7 +572,7 @@ void _windowWatcher_PopupListWindowChanged(object sender, WindowWatcher.WindowCh
572572
}
573573

574574
// Runs on our automation thread
575-
private void _windowWatcher_MainWindowChanged(object sender, EventArgs args)
575+
void _windowWatcher_MainWindowChanged(object sender, EventArgs args)
576576
{
577577
if (_mainWindow != null)
578578
{
@@ -645,7 +645,7 @@ void PopupListElementSelectedHandler(object sender, AutomationEventArgs e)
645645

646646
// TODO: This should be exposed as an event and popup resize should be elsewhere
647647
// Runs on an automation event thread
648-
private void PopupListStructureChangedHandler(object sender, StructureChangedEventArgs e)
648+
void PopupListStructureChangedHandler(object sender, StructureChangedEventArgs e)
649649
{
650650
// Debug.Print($">>>> PopupListWatcher.PopupListStructureChangedHandler ({e.StructureChangeType}) on thread {Thread.CurrentThread.ManagedThreadId}");
651651
// Debug.WriteLine($">>> PopupList structure changed - {e.StructureChangeType}");
@@ -709,7 +709,7 @@ private void PopupListStructureChangedHandler(object sender, StructureChangedEve
709709

710710
// CONSIDER: This will run on our automation thread
711711
// Should be OK to call MoveWindow from there - it just posts messages to the window.
712-
private void TestMoveWindow(AutomationElement listWindow, int xOffset, int yOffset)
712+
void TestMoveWindow(AutomationElement listWindow, int xOffset, int yOffset)
713713
{
714714
var hwndList = (IntPtr)(int)(listWindow.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty));
715715
var listRect = (Rect)listWindow.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty);
@@ -719,7 +719,7 @@ private void TestMoveWindow(AutomationElement listWindow, int xOffset, int yOffs
719719

720720
// Can run on our automation thread or on any automation event thread (which is also allowed to read properties)
721721
// But might fail, if the newSelectedItem is already gone by the time we run...
722-
private void UpdateSelectedItem(AutomationElement newSelectedItem)
722+
void UpdateSelectedItem(AutomationElement newSelectedItem)
723723
{
724724
if (!IsVisible || newSelectedItem == null)
725725
{
@@ -810,7 +810,7 @@ public void Dispose()
810810
// //_windowWatcher.PopupListWindowChanged += _windowWatcher_PopupListWindowChanged;
811811
// }
812812

813-
// private void _windowWatcher_SelectDataSourceWindowChanged(object sender, WindowWatcher.WindowChangedEventArgs e)
813+
// void _windowWatcher_SelectDataSourceWindowChanged(object sender, WindowWatcher.WindowChangedEventArgs e)
814814
// {
815815
// }
816816

Source/ExcelDna.IntelliSense/WinEvents.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void OnWinEventReceived(object winEventArgsObj)
119119
}
120120

121121
#region IDisposable Support
122-
private bool disposedValue = false; // To detect redundant calls
122+
bool disposedValue = false; // To detect redundant calls
123123

124124
protected virtual void Dispose(bool disposing)
125125
{

0 commit comments

Comments
 (0)