Minor code reorganization.

This commit is contained in:
Lorenz Cuno Klopfenstein 2010-07-01 03:15:50 +02:00
parent a097979ce3
commit d9d31c3eed
6 changed files with 9 additions and 37 deletions

View file

@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OnTopReplica {
/// <summary>
/// Describes a fullscreen mode used by OnTopReplica.
/// </summary>
public enum FullscreenMode {
/// <summary>
/// Normal non-topmost fullscreen mode.
/// </summary>
Normal,
/// <summary>
/// Topmost fullscreen mode.
/// </summary>
AlwaysOnTop,
/// <summary>
/// Clickthrough overlay mode.
/// </summary>
ClickThrough
}
}

View file

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace OnTopReplica {
namespace OnTopReplica.Native {
public static class CommonControls {
[DllImport("comctl32.dll", EntryPoint = "InitCommonControlsEx", CallingConvention = CallingConvention.StdCall)]

View file

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace OnTopReplica {
namespace OnTopReplica.Native {
static class WindowsSevenMethods {

View file

@ -163,10 +163,9 @@
<DependentUpon>GroupSwitchPanel.cs</DependentUpon>
</Compile>
<Compile Include="StoredRegionComparer.cs" />
<Compile Include="WindowsSevenMethods.cs" />
<None Include="CommonControls.cs" />
<Compile Include="Native\WindowsSevenMethods.cs" />
<None Include="Native\CommonControls.cs" />
<Compile Include="EnumerationExtensions.cs" />
<Compile Include="FullscreenMode.cs" />
<Compile Include="MessagePumpProcessors\HotKeyManager.cs" />
<Compile Include="PlatformSupport.cs" />
<Compile Include="Platforms\Other.cs" />

View file

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using OnTopReplica.Native;
using VistaControls.Dwm;
using System.Windows.Forms;
namespace OnTopReplica.Platforms {
class WindowsSeven : WindowsVista {

View file

@ -12,7 +12,7 @@ namespace OnTopReplica {
public StoredRegion Region { get; set; }
}
const int cMaxWindowTitleLength = 55;
const int MaxWindowTitleLength = 55;
public static void PopulateMenu(Form ownerForm, WindowManager windowManager, ToolStrip menu,
WindowHandle currentHandle, EventHandler clickHandler) {
@ -37,8 +37,8 @@ namespace OnTopReplica {
var tsi = new ToolStripMenuItem();
//Window title
if (h.Title.Length > cMaxWindowTitleLength) {
tsi.Text = h.Title.Substring(0, cMaxWindowTitleLength) + "...";
if (h.Title.Length > MaxWindowTitleLength) {
tsi.Text = h.Title.Substring(0, MaxWindowTitleLength) + "...";
tsi.ToolTipText = h.Title;
}
else