mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-10 20:45:38 +02:00
remove Ninjacrab from name space
This commit is contained in:
parent
42a91fd801
commit
9717dae16b
41 changed files with 2039 additions and 2039 deletions
|
@ -1,100 +1,100 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4CC8B3FB-214B-42AB-8AAE-E7DC5E266EF0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Ninjacrab.PersistentWindows.Common</RootNamespace>
|
||||
<AssemblyName>PersistentWindows.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Deploy|AnyCPU'">
|
||||
<OutputPath>bin\Deploy\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Diagnostics\Log.cs" />
|
||||
<Compile Include="LaunchProcess.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LaunchProcess.Designer.cs">
|
||||
<DependentUpon>LaunchProcess.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LayoutProfile.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LayoutProfile.Designer.cs">
|
||||
<DependentUpon>LayoutProfile.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\ApplicationDisplayMetrics.cs" />
|
||||
<Compile Include="Models\DesktopDisplayMetrics.cs" />
|
||||
<Compile Include="NameDbKey.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NameDbKey.Designer.cs">
|
||||
<DependentUpon>NameDbKey.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PersistentWindowProcessor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WinApiBridge\CallWindowProcedureParam.cs" />
|
||||
<Compile Include="WinApiBridge\Display.cs" />
|
||||
<Compile Include="WinApiBridge\MonitorInfo.cs" />
|
||||
<Compile Include="WinApiBridge\SetWindowPosFlags.cs" />
|
||||
<Compile Include="WinApiBridge\ShowWindowCommands.cs" />
|
||||
<Compile Include="WinApiBridge\User32.cs" />
|
||||
<Compile Include="WinApiBridge\WindowPlacement.cs" />
|
||||
<Compile Include="WinApiBridge\WindowsMessage.cs" />
|
||||
<Compile Include="WinApiBridge\WindowsPosition.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteDB">
|
||||
<Version>5.0.13</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="LayoutProfile.resx">
|
||||
<DependentUpon>LayoutProfile.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="LaunchProcess.resx">
|
||||
<DependentUpon>LaunchProcess.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="NameDbKey.resx">
|
||||
<DependentUpon>NameDbKey.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4CC8B3FB-214B-42AB-8AAE-E7DC5E266EF0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>PersistentWindows.Common</RootNamespace>
|
||||
<AssemblyName>PersistentWindows.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Deploy|AnyCPU'">
|
||||
<OutputPath>bin\Deploy\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Diagnostics\Log.cs" />
|
||||
<Compile Include="LaunchProcess.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LaunchProcess.Designer.cs">
|
||||
<DependentUpon>LaunchProcess.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LayoutProfile.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LayoutProfile.Designer.cs">
|
||||
<DependentUpon>LayoutProfile.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\ApplicationDisplayMetrics.cs" />
|
||||
<Compile Include="Models\DesktopDisplayMetrics.cs" />
|
||||
<Compile Include="NameDbKey.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NameDbKey.Designer.cs">
|
||||
<DependentUpon>NameDbKey.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PersistentWindowProcessor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WinApiBridge\CallWindowProcedureParam.cs" />
|
||||
<Compile Include="WinApiBridge\Display.cs" />
|
||||
<Compile Include="WinApiBridge\MonitorInfo.cs" />
|
||||
<Compile Include="WinApiBridge\SetWindowPosFlags.cs" />
|
||||
<Compile Include="WinApiBridge\ShowWindowCommands.cs" />
|
||||
<Compile Include="WinApiBridge\User32.cs" />
|
||||
<Compile Include="WinApiBridge\WindowPlacement.cs" />
|
||||
<Compile Include="WinApiBridge\WindowsMessage.cs" />
|
||||
<Compile Include="WinApiBridge\WindowsPosition.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteDB">
|
||||
<Version>5.0.13</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="LayoutProfile.resx">
|
||||
<DependentUpon>LayoutProfile.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="LaunchProcess.resx">
|
||||
<DependentUpon>LaunchProcess.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="NameDbKey.resx">
|
||||
<DependentUpon>NameDbKey.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -1,104 +1,104 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.Diagnostics
|
||||
{
|
||||
public class Log
|
||||
{
|
||||
static EventLog eventLog;
|
||||
public static bool silent = false;
|
||||
public static void Init()
|
||||
{
|
||||
eventLog = new EventLog("Application");
|
||||
//eventLog.Source = System.Windows.Forms.Application.ProductName;
|
||||
eventLog.Source = "Application";
|
||||
}
|
||||
|
||||
public static void Exit()
|
||||
{
|
||||
eventLog.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when something is logged. STATIC EVENT!
|
||||
/// </summary>
|
||||
|
||||
public static void Trace(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
#if DEBUG
|
||||
var message = Format(format, args);
|
||||
Console.Write(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Info(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
#if DEBUG
|
||||
var message = Format(format, args);
|
||||
Console.Write(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Error(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
|
||||
var message = Format(format, args);
|
||||
if (message.Contains("Cannot create a file when that file already exists"))
|
||||
{
|
||||
// ignore trivial error
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.Contains("Access is denied"))
|
||||
{
|
||||
// ignore window move failure due to lack of admin privilege
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
Console.Write(message);
|
||||
#endif
|
||||
message = message.Substring(message.IndexOf("::") + 3);
|
||||
eventLog.WriteEntry(System.Windows.Forms.Application.ProductName + ": " + message, EventLogEntryType.Information, 9999, 0);
|
||||
}
|
||||
|
||||
public static void Event(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
|
||||
var message = Format(format, args);
|
||||
#if DEBUG
|
||||
Console.Write(message);
|
||||
#endif
|
||||
message = message.Substring(message.IndexOf("::") + 3);
|
||||
eventLog.WriteEntry(System.Windows.Forms.Application.ProductName + ": " + message, EventLogEntryType.Information, 9990, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Since string.Format doesn't like args being null or having no entries.
|
||||
/// </summary>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
/// <returns></returns>
|
||||
private static string Format(string format, params object[] args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return "\n";
|
||||
}
|
||||
|
||||
bool arg_null = args.Length == 0;
|
||||
return arg_null ? $"{DateTime.Now} :: " + format + "\n":
|
||||
$"{DateTime.Now} :: " + string.Format(format, args) + "\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace PersistentWindows.Common.Diagnostics
|
||||
{
|
||||
public class Log
|
||||
{
|
||||
static EventLog eventLog;
|
||||
public static bool silent = false;
|
||||
public static void Init()
|
||||
{
|
||||
eventLog = new EventLog("Application");
|
||||
//eventLog.Source = System.Windows.Forms.Application.ProductName;
|
||||
eventLog.Source = "Application";
|
||||
}
|
||||
|
||||
public static void Exit()
|
||||
{
|
||||
eventLog.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when something is logged. STATIC EVENT!
|
||||
/// </summary>
|
||||
|
||||
public static void Trace(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
#if DEBUG
|
||||
var message = Format(format, args);
|
||||
Console.Write(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Info(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
#if DEBUG
|
||||
var message = Format(format, args);
|
||||
Console.Write(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void Error(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
|
||||
var message = Format(format, args);
|
||||
if (message.Contains("Cannot create a file when that file already exists"))
|
||||
{
|
||||
// ignore trivial error
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.Contains("Access is denied"))
|
||||
{
|
||||
// ignore window move failure due to lack of admin privilege
|
||||
return;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
Console.Write(message);
|
||||
#endif
|
||||
message = message.Substring(message.IndexOf("::") + 3);
|
||||
eventLog.WriteEntry(System.Windows.Forms.Application.ProductName + ": " + message, EventLogEntryType.Information, 9999, 0);
|
||||
}
|
||||
|
||||
public static void Event(string format, params object[] args)
|
||||
{
|
||||
if (silent)
|
||||
return;
|
||||
|
||||
var message = Format(format, args);
|
||||
#if DEBUG
|
||||
Console.Write(message);
|
||||
#endif
|
||||
message = message.Substring(message.IndexOf("::") + 3);
|
||||
eventLog.WriteEntry(System.Windows.Forms.Application.ProductName + ": " + message, EventLogEntryType.Information, 9990, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Since string.Format doesn't like args being null or having no entries.
|
||||
/// </summary>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <param name="args">The args.</param>
|
||||
/// <returns></returns>
|
||||
private static string Format(string format, params object[] args)
|
||||
{
|
||||
if (string.IsNullOrEmpty(format))
|
||||
{
|
||||
return "\n";
|
||||
}
|
||||
|
||||
bool arg_null = args.Length == 0;
|
||||
return arg_null ? $"{DateTime.Now} :: " + format + "\n":
|
||||
$"{DateTime.Now} :: " + string.Format(format, args) + "\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
192
Ninjacrab.PersistentWindows.Solution/Ninjacrab.PersistentWindows.Common/LaunchProcess.Designer.cs → Ninjacrab.PersistentWindows.Solution/Common/LaunchProcess.Designer.cs
generated
Executable file → Normal file
192
Ninjacrab.PersistentWindows.Solution/Ninjacrab.PersistentWindows.Common/LaunchProcess.Designer.cs → Ninjacrab.PersistentWindows.Solution/Common/LaunchProcess.Designer.cs
generated
Executable file → Normal file
|
@ -1,97 +1,97 @@
|
|||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
{
|
||||
partial class LaunchProcess
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LaunchProcess));
|
||||
this.Yes = new System.Windows.Forms.Button();
|
||||
this.No = new System.Windows.Forms.Button();
|
||||
this.YesToAll = new System.Windows.Forms.Button();
|
||||
this.NoToAll = new System.Windows.Forms.Button();
|
||||
this.Notice = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Yes
|
||||
//
|
||||
resources.ApplyResources(this.Yes, "Yes");
|
||||
this.Yes.Name = "Yes";
|
||||
this.Yes.UseVisualStyleBackColor = true;
|
||||
this.Yes.Click += new System.EventHandler(this.Yes_Click);
|
||||
//
|
||||
// No
|
||||
//
|
||||
resources.ApplyResources(this.No, "No");
|
||||
this.No.Name = "No";
|
||||
this.No.UseVisualStyleBackColor = true;
|
||||
this.No.Click += new System.EventHandler(this.No_Click);
|
||||
//
|
||||
// YesToAll
|
||||
//
|
||||
resources.ApplyResources(this.YesToAll, "YesToAll");
|
||||
this.YesToAll.Name = "YesToAll";
|
||||
this.YesToAll.UseVisualStyleBackColor = true;
|
||||
this.YesToAll.Click += new System.EventHandler(this.YesToAll_Click);
|
||||
//
|
||||
// NoToAll
|
||||
//
|
||||
resources.ApplyResources(this.NoToAll, "NoToAll");
|
||||
this.NoToAll.Name = "NoToAll";
|
||||
this.NoToAll.UseVisualStyleBackColor = true;
|
||||
this.NoToAll.Click += new System.EventHandler(this.NoToAll_Click);
|
||||
//
|
||||
// Notice
|
||||
//
|
||||
resources.ApplyResources(this.Notice, "Notice");
|
||||
this.Notice.Name = "Notice";
|
||||
//
|
||||
// LaunchProcess
|
||||
//
|
||||
this.AcceptButton = this.Yes;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.Notice);
|
||||
this.Controls.Add(this.NoToAll);
|
||||
this.Controls.Add(this.YesToAll);
|
||||
this.Controls.Add(this.No);
|
||||
this.Controls.Add(this.Yes);
|
||||
this.Name = "LaunchProcess";
|
||||
this.Load += new System.EventHandler(this.RunProcess_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button Yes;
|
||||
private System.Windows.Forms.Button No;
|
||||
private System.Windows.Forms.Button YesToAll;
|
||||
private System.Windows.Forms.Button NoToAll;
|
||||
private System.Windows.Forms.Label Notice;
|
||||
}
|
||||
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
partial class LaunchProcess
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LaunchProcess));
|
||||
this.Yes = new System.Windows.Forms.Button();
|
||||
this.No = new System.Windows.Forms.Button();
|
||||
this.YesToAll = new System.Windows.Forms.Button();
|
||||
this.NoToAll = new System.Windows.Forms.Button();
|
||||
this.Notice = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Yes
|
||||
//
|
||||
resources.ApplyResources(this.Yes, "Yes");
|
||||
this.Yes.Name = "Yes";
|
||||
this.Yes.UseVisualStyleBackColor = true;
|
||||
this.Yes.Click += new System.EventHandler(this.Yes_Click);
|
||||
//
|
||||
// No
|
||||
//
|
||||
resources.ApplyResources(this.No, "No");
|
||||
this.No.Name = "No";
|
||||
this.No.UseVisualStyleBackColor = true;
|
||||
this.No.Click += new System.EventHandler(this.No_Click);
|
||||
//
|
||||
// YesToAll
|
||||
//
|
||||
resources.ApplyResources(this.YesToAll, "YesToAll");
|
||||
this.YesToAll.Name = "YesToAll";
|
||||
this.YesToAll.UseVisualStyleBackColor = true;
|
||||
this.YesToAll.Click += new System.EventHandler(this.YesToAll_Click);
|
||||
//
|
||||
// NoToAll
|
||||
//
|
||||
resources.ApplyResources(this.NoToAll, "NoToAll");
|
||||
this.NoToAll.Name = "NoToAll";
|
||||
this.NoToAll.UseVisualStyleBackColor = true;
|
||||
this.NoToAll.Click += new System.EventHandler(this.NoToAll_Click);
|
||||
//
|
||||
// Notice
|
||||
//
|
||||
resources.ApplyResources(this.Notice, "Notice");
|
||||
this.Notice.Name = "Notice";
|
||||
//
|
||||
// LaunchProcess
|
||||
//
|
||||
this.AcceptButton = this.Yes;
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.Notice);
|
||||
this.Controls.Add(this.NoToAll);
|
||||
this.Controls.Add(this.YesToAll);
|
||||
this.Controls.Add(this.No);
|
||||
this.Controls.Add(this.Yes);
|
||||
this.Name = "LaunchProcess";
|
||||
this.Load += new System.EventHandler(this.RunProcess_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button Yes;
|
||||
private System.Windows.Forms.Button No;
|
||||
private System.Windows.Forms.Button YesToAll;
|
||||
private System.Windows.Forms.Button NoToAll;
|
||||
private System.Windows.Forms.Label Notice;
|
||||
}
|
||||
}
|
|
@ -1,68 +1,68 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
{
|
||||
public partial class LaunchProcess : Form
|
||||
{
|
||||
public string buttonName = "None";
|
||||
|
||||
public LaunchProcess(string process, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Creating and setting the label
|
||||
Label process_name = new Label();
|
||||
process_name.Font = new Font("Calibri", 13);
|
||||
process_name.Location = new Point(Math.Max(50, 240 - process.Length * 4), 80);
|
||||
process_name.AutoSize = true;
|
||||
process_name.BorderStyle = BorderStyle.Fixed3D;
|
||||
process_name.Padding = new Padding(6);
|
||||
process_name.TextAlign = ContentAlignment.MiddleCenter;
|
||||
process_name.Text = process;
|
||||
this.Controls.Add(process_name);
|
||||
|
||||
TextBox window_title = new TextBox();
|
||||
window_title.Font = new Font("Calibri", 13);
|
||||
window_title.Location = new Point(Math.Max(50, 240 - title.Length * 4), 130);
|
||||
window_title.Width = Math.Min(400, title.Length * 10);
|
||||
window_title.TextAlign = HorizontalAlignment.Center;
|
||||
window_title.ReadOnly = true;
|
||||
window_title.Text = title;
|
||||
this.Controls.Add(window_title);
|
||||
}
|
||||
|
||||
private void RunProcess_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, EventArgs e)
|
||||
{
|
||||
var button = (Button)sender;
|
||||
buttonName = button.Name;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Yes_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void YesToAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void No_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void NoToAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
public partial class LaunchProcess : Form
|
||||
{
|
||||
public string buttonName = "None";
|
||||
|
||||
public LaunchProcess(string process, string title)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Creating and setting the label
|
||||
Label process_name = new Label();
|
||||
process_name.Font = new Font("Calibri", 13);
|
||||
process_name.Location = new Point(Math.Max(50, 240 - process.Length * 4), 80);
|
||||
process_name.AutoSize = true;
|
||||
process_name.BorderStyle = BorderStyle.Fixed3D;
|
||||
process_name.Padding = new Padding(6);
|
||||
process_name.TextAlign = ContentAlignment.MiddleCenter;
|
||||
process_name.Text = process;
|
||||
this.Controls.Add(process_name);
|
||||
|
||||
TextBox window_title = new TextBox();
|
||||
window_title.Font = new Font("Calibri", 13);
|
||||
window_title.Location = new Point(Math.Max(50, 240 - title.Length * 4), 130);
|
||||
window_title.Width = Math.Min(400, title.Length * 10);
|
||||
window_title.TextAlign = HorizontalAlignment.Center;
|
||||
window_title.ReadOnly = true;
|
||||
window_title.Text = title;
|
||||
this.Controls.Add(window_title);
|
||||
}
|
||||
|
||||
private void RunProcess_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
private void Button_Click(object sender, EventArgs e)
|
||||
{
|
||||
var button = (Button)sender;
|
||||
buttonName = button.Name;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Yes_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void YesToAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void No_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
private void NoToAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
Button_Click(sender, e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,294 +1,294 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="Yes.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="Yes.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>160, 238</value>
|
||||
</data>
|
||||
<data name="Yes.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>114, 45</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Yes.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="Yes.Text" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
</data>
|
||||
<data name=">>Yes.Name" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
</data>
|
||||
<data name=">>Yes.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Yes.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Yes.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="No.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="No.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="No.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>386, 238</value>
|
||||
</data>
|
||||
<data name="No.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 45</value>
|
||||
</data>
|
||||
<data name="No.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="No.Text" xml:space="preserve">
|
||||
<value>No</value>
|
||||
</data>
|
||||
<data name=">>No.Name" xml:space="preserve">
|
||||
<value>No</value>
|
||||
</data>
|
||||
<data name=">>No.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>No.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>No.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="YesToAll.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="YesToAll.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="YesToAll.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>160, 307</value>
|
||||
</data>
|
||||
<data name="YesToAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>114, 45</value>
|
||||
</data>
|
||||
<data name="YesToAll.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="YesToAll.Text" xml:space="preserve">
|
||||
<value>Yes to all</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Name" xml:space="preserve">
|
||||
<value>YesToAll</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="NoToAll.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="NoToAll.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="NoToAll.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>386, 307</value>
|
||||
</data>
|
||||
<data name="NoToAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 45</value>
|
||||
</data>
|
||||
<data name="NoToAll.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="NoToAll.Text" xml:space="preserve">
|
||||
<value>No to all</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Name" xml:space="preserve">
|
||||
<value>NoToAll</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="Notice.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="Notice.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="Notice.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>155, 41</value>
|
||||
</data>
|
||||
<data name="Notice.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>367, 25</value>
|
||||
</data>
|
||||
<data name="Notice.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="Notice.Text" xml:space="preserve">
|
||||
<value>Restore missing process with window title</value>
|
||||
</data>
|
||||
<data name="Notice.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>TopCenter</value>
|
||||
</data>
|
||||
<data name=">>Notice.Name" xml:space="preserve">
|
||||
<value>Notice</value>
|
||||
</data>
|
||||
<data name=">>Notice.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Notice.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Notice.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>8, 16</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>670, 390</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Launch Process</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LaunchProcess</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="Yes.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="Yes.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>160, 238</value>
|
||||
</data>
|
||||
<data name="Yes.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>114, 45</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Yes.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="Yes.Text" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
</data>
|
||||
<data name=">>Yes.Name" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
</data>
|
||||
<data name=">>Yes.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Yes.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Yes.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="No.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="No.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="No.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>386, 238</value>
|
||||
</data>
|
||||
<data name="No.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 45</value>
|
||||
</data>
|
||||
<data name="No.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="No.Text" xml:space="preserve">
|
||||
<value>No</value>
|
||||
</data>
|
||||
<data name=">>No.Name" xml:space="preserve">
|
||||
<value>No</value>
|
||||
</data>
|
||||
<data name=">>No.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>No.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>No.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="YesToAll.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="YesToAll.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="YesToAll.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>160, 307</value>
|
||||
</data>
|
||||
<data name="YesToAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>114, 45</value>
|
||||
</data>
|
||||
<data name="YesToAll.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="YesToAll.Text" xml:space="preserve">
|
||||
<value>Yes to all</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Name" xml:space="preserve">
|
||||
<value>YesToAll</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>YesToAll.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="NoToAll.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="NoToAll.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="NoToAll.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>386, 307</value>
|
||||
</data>
|
||||
<data name="NoToAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>116, 45</value>
|
||||
</data>
|
||||
<data name="NoToAll.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="NoToAll.Text" xml:space="preserve">
|
||||
<value>No to all</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Name" xml:space="preserve">
|
||||
<value>NoToAll</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>NoToAll.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="Notice.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="Notice.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Microsoft Sans Serif, 12pt</value>
|
||||
</data>
|
||||
<data name="Notice.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>155, 41</value>
|
||||
</data>
|
||||
<data name="Notice.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>367, 25</value>
|
||||
</data>
|
||||
<data name="Notice.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="Notice.Text" xml:space="preserve">
|
||||
<value>Restore missing process with window title</value>
|
||||
</data>
|
||||
<data name="Notice.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
|
||||
<value>TopCenter</value>
|
||||
</data>
|
||||
<data name=">>Notice.Name" xml:space="preserve">
|
||||
<value>Notice</value>
|
||||
</data>
|
||||
<data name=">>Notice.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>Notice.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>Notice.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>8, 16</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>670, 390</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Launch Process</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LaunchProcess</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1,7 +1,7 @@
|
|||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
partial class LayoutProfile
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
public partial class LayoutProfile : Form
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
|
||||
using Ninjacrab.PersistentWindows.Common.WinApiBridge;
|
||||
using Ninjacrab.PersistentWindows.Common.Diagnostics;
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common.Diagnostics;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.Models
|
||||
namespace PersistentWindows.Common.Models
|
||||
{
|
||||
public class DeadAppPosition
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Ninjacrab.PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.Models
|
||||
namespace PersistentWindows.Common.Models
|
||||
{
|
||||
public class DesktopDisplayMetrics
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
partial class NameDbEntry
|
||||
{
|
||||
|
@ -88,4 +88,4 @@ namespace Ninjacrab.PersistentWindows.Common
|
|||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
public partial class NameDbEntry : Form
|
||||
{
|
|
@ -14,11 +14,11 @@ using Microsoft.Win32;
|
|||
|
||||
using LiteDB;
|
||||
|
||||
using Ninjacrab.PersistentWindows.Common.Diagnostics;
|
||||
using Ninjacrab.PersistentWindows.Common.Models;
|
||||
using Ninjacrab.PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common.Diagnostics;
|
||||
using PersistentWindows.Common.Models;
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common
|
||||
namespace PersistentWindows.Common
|
||||
{
|
||||
public class PersistentWindowProcessor : IDisposable
|
||||
{
|
|
@ -1,35 +1,35 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PersistentWindows.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PersistentWindows.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2023, PersistentWindows")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("39340812-16cc-4ba7-b3ac-08f093ab98d0")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1")]
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PersistentWindows.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("PersistentWindows.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014-2023, PersistentWindows")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("39340812-16cc-4ba7-b3ac-08f093ab98d0")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.1")]
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct CallWindowProcedureParam
|
||||
{
|
||||
public IntPtr lparam;
|
||||
public IntPtr wparam;
|
||||
public WindowsMessage message;
|
||||
public IntPtr hwnd;
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct CallWindowProcedureParam
|
||||
{
|
||||
public IntPtr lparam;
|
||||
public IntPtr wparam;
|
||||
public WindowsMessage message;
|
||||
public IntPtr hwnd;
|
||||
}
|
||||
}
|
|
@ -1,40 +1,40 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
public class Display
|
||||
{
|
||||
public RECT Position;
|
||||
public uint Flags { get; internal set; }
|
||||
public String DeviceName { get; internal set; }
|
||||
|
||||
public static List<Display> GetDisplays()
|
||||
{
|
||||
List<Display> displays = new List<Display>();
|
||||
|
||||
User32.EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero,
|
||||
delegate(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)
|
||||
{
|
||||
MonitorInfo monitorInfo = new MonitorInfo();
|
||||
monitorInfo.StructureSize = Marshal.SizeOf(monitorInfo);
|
||||
bool success = User32.GetMonitorInfo(hMonitor, ref monitorInfo);
|
||||
if (success)
|
||||
{
|
||||
Display display = new Display();
|
||||
display.Position = monitorInfo.Monitor;
|
||||
display.Flags = monitorInfo.Flags;
|
||||
|
||||
//int pos = monitorInfo.DeviceName.LastIndexOf("\\") + 1;
|
||||
//display.DeviceName = monitorInfo.DeviceName.Substring(pos, monitorInfo.DeviceName.Length - pos);
|
||||
display.DeviceName = "Display";
|
||||
|
||||
displays.Add(display);
|
||||
}
|
||||
return true;
|
||||
}, IntPtr.Zero);
|
||||
return displays;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
public class Display
|
||||
{
|
||||
public RECT Position;
|
||||
public uint Flags { get; internal set; }
|
||||
public String DeviceName { get; internal set; }
|
||||
|
||||
public static List<Display> GetDisplays()
|
||||
{
|
||||
List<Display> displays = new List<Display>();
|
||||
|
||||
User32.EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero,
|
||||
delegate(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData)
|
||||
{
|
||||
MonitorInfo monitorInfo = new MonitorInfo();
|
||||
monitorInfo.StructureSize = Marshal.SizeOf(monitorInfo);
|
||||
bool success = User32.GetMonitorInfo(hMonitor, ref monitorInfo);
|
||||
if (success)
|
||||
{
|
||||
Display display = new Display();
|
||||
display.Position = monitorInfo.Monitor;
|
||||
display.Flags = monitorInfo.Flags;
|
||||
|
||||
//int pos = monitorInfo.DeviceName.LastIndexOf("\\") + 1;
|
||||
//display.DeviceName = monitorInfo.DeviceName.Substring(pos, monitorInfo.DeviceName.Length - pos);
|
||||
display.DeviceName = "Display";
|
||||
|
||||
displays.Add(display);
|
||||
}
|
||||
return true;
|
||||
}, IntPtr.Zero);
|
||||
return displays;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,19 +1,19 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct MonitorInfo
|
||||
{
|
||||
// size of a device name string
|
||||
private const int CCHDEVICENAME = 32;
|
||||
|
||||
public int StructureSize;
|
||||
public RECT Monitor;
|
||||
public RECT WorkArea;
|
||||
public uint Flags;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME)]
|
||||
public string DeviceName;
|
||||
}
|
||||
}
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
|
||||
public struct MonitorInfo
|
||||
{
|
||||
// size of a device name string
|
||||
private const int CCHDEVICENAME = 32;
|
||||
|
||||
public int StructureSize;
|
||||
public RECT Monitor;
|
||||
public RECT WorkArea;
|
||||
public uint Flags;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME)]
|
||||
public string DeviceName;
|
||||
}
|
||||
}
|
|
@ -1,65 +1,65 @@
|
|||
using System;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[Flags()]
|
||||
public enum SetWindowPosFlags : uint
|
||||
{
|
||||
/// <summary>If the calling thread and the thread that owns the window are attached to different input queues,
|
||||
/// the system posts the request to the thread that owns the window. This prevents the calling thread from
|
||||
/// blocking its execution while other threads process the request.</summary>
|
||||
/// <remarks>SWP_ASYNCWINDOWPOS</remarks>
|
||||
AsynchronousWindowPosition = 0x4000,
|
||||
/// <summary>Prevents generation of the WM_SYNCPAINT message.</summary>
|
||||
/// <remarks>SWP_DEFERERASE</remarks>
|
||||
DeferErase = 0x2000,
|
||||
/// <summary>Draws a frame (defined in the window's class description) around the window.</summary>
|
||||
/// <remarks>SWP_DRAWFRAME</remarks>
|
||||
DrawFrame = 0x0020,
|
||||
/// <summary>Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to
|
||||
/// the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE
|
||||
/// is sent only when the window's size is being changed.</summary>
|
||||
/// <remarks>SWP_FRAMECHANGED</remarks>
|
||||
FrameChanged = 0x0020,
|
||||
/// <summary>Hides the window.</summary>
|
||||
/// <remarks>SWP_HIDEWINDOW</remarks>
|
||||
HideWindow = 0x0080,
|
||||
/// <summary>Does not activate the window. If this flag is not set, the window is activated and moved to the
|
||||
/// top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter
|
||||
/// parameter).</summary>
|
||||
/// <remarks>SWP_NOACTIVATE</remarks>
|
||||
DoNotActivate = 0x0010,
|
||||
/// <summary>Discards the entire contents of the client area. If this flag is not specified, the valid
|
||||
/// contents of the client area are saved and copied back into the client area after the window is sized or
|
||||
/// repositioned.</summary>
|
||||
/// <remarks>SWP_NOCOPYBITS</remarks>
|
||||
DoNotCopyBits = 0x0100,
|
||||
/// <summary>Retains the current position (ignores X and Y parameters).</summary>
|
||||
/// <remarks>SWP_NOMOVE</remarks>
|
||||
IgnoreMove = 0x0002,
|
||||
/// <summary>Does not change the owner window's position in the Z order.</summary>
|
||||
/// <remarks>SWP_NOOWNERZORDER</remarks>
|
||||
DoNotChangeOwnerZOrder = 0x0200,
|
||||
/// <summary>Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to
|
||||
/// the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent
|
||||
/// window uncovered as a result of the window being moved. When this flag is set, the application must
|
||||
/// explicitly invalidate or redraw any parts of the window and parent window that need redrawing.</summary>
|
||||
/// <remarks>SWP_NOREDRAW</remarks>
|
||||
DoNotRedraw = 0x0008,
|
||||
/// <summary>Same as the SWP_NOOWNERZORDER flag.</summary>
|
||||
/// <remarks>SWP_NOREPOSITION</remarks>
|
||||
DoNotReposition = 0x0200,
|
||||
/// <summary>Prevents the window from receiving the WM_WINDOWPOSCHANGING message.</summary>
|
||||
/// <remarks>SWP_NOSENDCHANGING</remarks>
|
||||
DoNotSendChangingEvent = 0x0400,
|
||||
/// <summary>Retains the current size (ignores the cx and cy parameters).</summary>
|
||||
/// <remarks>SWP_NOSIZE</remarks>
|
||||
IgnoreResize = 0x0001,
|
||||
/// <summary>Retains the current Z order (ignores the hWndInsertAfter parameter).</summary>
|
||||
/// <remarks>SWP_NOZORDER</remarks>
|
||||
IgnoreZOrder = 0x0004,
|
||||
/// <summary>Displays the window.</summary>
|
||||
/// <remarks>SWP_SHOWWINDOW</remarks>
|
||||
ShowWindow = 0x0040,
|
||||
}
|
||||
}
|
||||
using System;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
[Flags()]
|
||||
public enum SetWindowPosFlags : uint
|
||||
{
|
||||
/// <summary>If the calling thread and the thread that owns the window are attached to different input queues,
|
||||
/// the system posts the request to the thread that owns the window. This prevents the calling thread from
|
||||
/// blocking its execution while other threads process the request.</summary>
|
||||
/// <remarks>SWP_ASYNCWINDOWPOS</remarks>
|
||||
AsynchronousWindowPosition = 0x4000,
|
||||
/// <summary>Prevents generation of the WM_SYNCPAINT message.</summary>
|
||||
/// <remarks>SWP_DEFERERASE</remarks>
|
||||
DeferErase = 0x2000,
|
||||
/// <summary>Draws a frame (defined in the window's class description) around the window.</summary>
|
||||
/// <remarks>SWP_DRAWFRAME</remarks>
|
||||
DrawFrame = 0x0020,
|
||||
/// <summary>Applies new frame styles set using the SetWindowLong function. Sends a WM_NCCALCSIZE message to
|
||||
/// the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE
|
||||
/// is sent only when the window's size is being changed.</summary>
|
||||
/// <remarks>SWP_FRAMECHANGED</remarks>
|
||||
FrameChanged = 0x0020,
|
||||
/// <summary>Hides the window.</summary>
|
||||
/// <remarks>SWP_HIDEWINDOW</remarks>
|
||||
HideWindow = 0x0080,
|
||||
/// <summary>Does not activate the window. If this flag is not set, the window is activated and moved to the
|
||||
/// top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter
|
||||
/// parameter).</summary>
|
||||
/// <remarks>SWP_NOACTIVATE</remarks>
|
||||
DoNotActivate = 0x0010,
|
||||
/// <summary>Discards the entire contents of the client area. If this flag is not specified, the valid
|
||||
/// contents of the client area are saved and copied back into the client area after the window is sized or
|
||||
/// repositioned.</summary>
|
||||
/// <remarks>SWP_NOCOPYBITS</remarks>
|
||||
DoNotCopyBits = 0x0100,
|
||||
/// <summary>Retains the current position (ignores X and Y parameters).</summary>
|
||||
/// <remarks>SWP_NOMOVE</remarks>
|
||||
IgnoreMove = 0x0002,
|
||||
/// <summary>Does not change the owner window's position in the Z order.</summary>
|
||||
/// <remarks>SWP_NOOWNERZORDER</remarks>
|
||||
DoNotChangeOwnerZOrder = 0x0200,
|
||||
/// <summary>Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to
|
||||
/// the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent
|
||||
/// window uncovered as a result of the window being moved. When this flag is set, the application must
|
||||
/// explicitly invalidate or redraw any parts of the window and parent window that need redrawing.</summary>
|
||||
/// <remarks>SWP_NOREDRAW</remarks>
|
||||
DoNotRedraw = 0x0008,
|
||||
/// <summary>Same as the SWP_NOOWNERZORDER flag.</summary>
|
||||
/// <remarks>SWP_NOREPOSITION</remarks>
|
||||
DoNotReposition = 0x0200,
|
||||
/// <summary>Prevents the window from receiving the WM_WINDOWPOSCHANGING message.</summary>
|
||||
/// <remarks>SWP_NOSENDCHANGING</remarks>
|
||||
DoNotSendChangingEvent = 0x0400,
|
||||
/// <summary>Retains the current size (ignores the cx and cy parameters).</summary>
|
||||
/// <remarks>SWP_NOSIZE</remarks>
|
||||
IgnoreResize = 0x0001,
|
||||
/// <summary>Retains the current Z order (ignores the hWndInsertAfter parameter).</summary>
|
||||
/// <remarks>SWP_NOZORDER</remarks>
|
||||
IgnoreZOrder = 0x0004,
|
||||
/// <summary>Displays the window.</summary>
|
||||
/// <remarks>SWP_SHOWWINDOW</remarks>
|
||||
ShowWindow = 0x0040,
|
||||
}
|
||||
}
|
|
@ -1,74 +1,74 @@
|
|||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
public enum ShowWindowCommands
|
||||
{
|
||||
/// <summary>
|
||||
/// Hides the window and activates another window.
|
||||
/// </summary>
|
||||
Hide = 0,
|
||||
/// <summary>
|
||||
/// Activates and displays a window. If the window is minimized or
|
||||
/// maximized, the system restores it to its original size and position.
|
||||
/// An application should specify this flag when displaying the window
|
||||
/// for the first time.
|
||||
/// </summary>
|
||||
Normal = 1,
|
||||
/// <summary>
|
||||
/// Activates the window and displays it as a minimized window.
|
||||
/// </summary>
|
||||
ShowMinimized = 2,
|
||||
/// <summary>
|
||||
/// Maximizes the specified window.
|
||||
/// </summary>
|
||||
Maximize = 3, // is this the right value?
|
||||
/// <summary>
|
||||
/// Activates the window and displays it as a maximized window.
|
||||
/// </summary>
|
||||
ShowMaximized = 3,
|
||||
/// <summary>
|
||||
/// Displays a window in its most recent size and position. This value
|
||||
/// is similar to <see cref="Win32.ShowWindowCommand.Normal"/>, except
|
||||
/// the window is not activated.
|
||||
/// </summary>
|
||||
ShowNoActivate = 4,
|
||||
/// <summary>
|
||||
/// Activates the window and displays it in its current size and position.
|
||||
/// </summary>
|
||||
Show = 5,
|
||||
/// <summary>
|
||||
/// Minimizes the specified window and activates the next top-level
|
||||
/// window in the Z order.
|
||||
/// </summary>
|
||||
Minimize = 6,
|
||||
/// <summary>
|
||||
/// Displays the window as a minimized window. This value is similar to
|
||||
/// <see cref="Win32.ShowWindowCommand.ShowMinimized"/>, except the
|
||||
/// window is not activated.
|
||||
/// </summary>
|
||||
ShowMinNoActive = 7,
|
||||
/// <summary>
|
||||
/// Displays the window in its current size and position. This value is
|
||||
/// similar to <see cref="Win32.ShowWindowCommand.Show"/>, except the
|
||||
/// window is not activated.
|
||||
/// </summary>
|
||||
ShowNA = 8,
|
||||
/// <summary>
|
||||
/// Activates and displays the window. If the window is minimized or
|
||||
/// maximized, the system restores it to its original size and position.
|
||||
/// An application should specify this flag when restoring a minimized window.
|
||||
/// </summary>
|
||||
Restore = 9,
|
||||
/// <summary>
|
||||
/// Sets the show state based on the SW_* value specified in the
|
||||
/// STARTUPINFO structure passed to the CreateProcess function by the
|
||||
/// program that started the application.
|
||||
/// </summary>
|
||||
ShowDefault = 10,
|
||||
/// <summary>
|
||||
/// <b>Windows 2000/XP:</b> Minimizes a window, even if the thread
|
||||
/// that owns the window is not responding. This flag should only be
|
||||
/// used when minimizing windows from a different thread.
|
||||
/// </summary>
|
||||
ForceMinimize = 11
|
||||
}
|
||||
}
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
public enum ShowWindowCommands
|
||||
{
|
||||
/// <summary>
|
||||
/// Hides the window and activates another window.
|
||||
/// </summary>
|
||||
Hide = 0,
|
||||
/// <summary>
|
||||
/// Activates and displays a window. If the window is minimized or
|
||||
/// maximized, the system restores it to its original size and position.
|
||||
/// An application should specify this flag when displaying the window
|
||||
/// for the first time.
|
||||
/// </summary>
|
||||
Normal = 1,
|
||||
/// <summary>
|
||||
/// Activates the window and displays it as a minimized window.
|
||||
/// </summary>
|
||||
ShowMinimized = 2,
|
||||
/// <summary>
|
||||
/// Maximizes the specified window.
|
||||
/// </summary>
|
||||
Maximize = 3, // is this the right value?
|
||||
/// <summary>
|
||||
/// Activates the window and displays it as a maximized window.
|
||||
/// </summary>
|
||||
ShowMaximized = 3,
|
||||
/// <summary>
|
||||
/// Displays a window in its most recent size and position. This value
|
||||
/// is similar to <see cref="Win32.ShowWindowCommand.Normal"/>, except
|
||||
/// the window is not activated.
|
||||
/// </summary>
|
||||
ShowNoActivate = 4,
|
||||
/// <summary>
|
||||
/// Activates the window and displays it in its current size and position.
|
||||
/// </summary>
|
||||
Show = 5,
|
||||
/// <summary>
|
||||
/// Minimizes the specified window and activates the next top-level
|
||||
/// window in the Z order.
|
||||
/// </summary>
|
||||
Minimize = 6,
|
||||
/// <summary>
|
||||
/// Displays the window as a minimized window. This value is similar to
|
||||
/// <see cref="Win32.ShowWindowCommand.ShowMinimized"/>, except the
|
||||
/// window is not activated.
|
||||
/// </summary>
|
||||
ShowMinNoActive = 7,
|
||||
/// <summary>
|
||||
/// Displays the window in its current size and position. This value is
|
||||
/// similar to <see cref="Win32.ShowWindowCommand.Show"/>, except the
|
||||
/// window is not activated.
|
||||
/// </summary>
|
||||
ShowNA = 8,
|
||||
/// <summary>
|
||||
/// Activates and displays the window. If the window is minimized or
|
||||
/// maximized, the system restores it to its original size and position.
|
||||
/// An application should specify this flag when restoring a minimized window.
|
||||
/// </summary>
|
||||
Restore = 9,
|
||||
/// <summary>
|
||||
/// Sets the show state based on the SW_* value specified in the
|
||||
/// STARTUPINFO structure passed to the CreateProcess function by the
|
||||
/// program that started the application.
|
||||
/// </summary>
|
||||
ShowDefault = 10,
|
||||
/// <summary>
|
||||
/// <b>Windows 2000/XP:</b> Minimizes a window, even if the thread
|
||||
/// that owns the window is not responding. This flag should only be
|
||||
/// used when minimizing windows from a different thread.
|
||||
/// </summary>
|
||||
ForceMinimize = 11
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ using System;
|
|||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
/**
|
||||
* This is a subset of events from winuser.h.
|
|
@ -1,54 +1,54 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
//[StructLayout(LayoutKind.Sequential)]
|
||||
public struct WindowPlacement
|
||||
{
|
||||
/// <summary>
|
||||
/// The length of the structure, in bytes. Before calling the GetWindowPlacement or SetWindowPlacement functions, set this member to sizeof(WINDOWPLACEMENT).
|
||||
/// <para>
|
||||
/// GetWindowPlacement and SetWindowPlacement fail if this member is not set correctly.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public int Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies flags that control the position of the minimized window and the method by which the window is restored.
|
||||
/// </summary>
|
||||
public int Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current show state of the window.
|
||||
/// </summary>
|
||||
public ShowWindowCommands ShowCmd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The coordinates of the window's upper-left corner when the window is minimized.
|
||||
/// </summary>
|
||||
public POINT MinPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The coordinates of the window's upper-left corner when the window is maximized.
|
||||
/// </summary>
|
||||
public POINT MaxPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The window's coordinates when the window is in the restored position.
|
||||
/// </summary>
|
||||
public RECT NormalPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default (empty) value.
|
||||
/// </summary>
|
||||
public static WindowPlacement Default
|
||||
{
|
||||
get
|
||||
{
|
||||
WindowPlacement result = new WindowPlacement();
|
||||
result.Length = Marshal.SizeOf(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
//[StructLayout(LayoutKind.Sequential)]
|
||||
public struct WindowPlacement
|
||||
{
|
||||
/// <summary>
|
||||
/// The length of the structure, in bytes. Before calling the GetWindowPlacement or SetWindowPlacement functions, set this member to sizeof(WINDOWPLACEMENT).
|
||||
/// <para>
|
||||
/// GetWindowPlacement and SetWindowPlacement fail if this member is not set correctly.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public int Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies flags that control the position of the minimized window and the method by which the window is restored.
|
||||
/// </summary>
|
||||
public int Flags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The current show state of the window.
|
||||
/// </summary>
|
||||
public ShowWindowCommands ShowCmd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The coordinates of the window's upper-left corner when the window is minimized.
|
||||
/// </summary>
|
||||
public POINT MinPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The coordinates of the window's upper-left corner when the window is maximized.
|
||||
/// </summary>
|
||||
public POINT MaxPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The window's coordinates when the window is in the restored position.
|
||||
/// </summary>
|
||||
public RECT NormalPosition { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default (empty) value.
|
||||
/// </summary>
|
||||
public static WindowPlacement Default
|
||||
{
|
||||
get
|
||||
{
|
||||
WindowPlacement result = new WindowPlacement();
|
||||
result.Length = Marshal.SizeOf(result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,61 +1,61 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
/*
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct WindowsPosition
|
||||
{
|
||||
public IntPtr hwnd;
|
||||
public IntPtr hwndInsertAfter;
|
||||
public int Left;
|
||||
public int Top;
|
||||
public int Width;
|
||||
public int Height;
|
||||
public int Flags;
|
||||
}
|
||||
*/
|
||||
|
||||
// workaround LiteDB compatibility issue in RECT data structure
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct POINT
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public POINT(int x, int y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
public int Left { get; set; }
|
||||
public int Top { get; set; }
|
||||
public int Right { get; set; }
|
||||
public int Bottom { get; set; }
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return Bottom - Top;
|
||||
}
|
||||
}
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return Right - Left;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("({0}, {1}), {2} x {3}", Left, Top, Width, Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PersistentWindows.Common.WinApiBridge
|
||||
{
|
||||
/*
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct WindowsPosition
|
||||
{
|
||||
public IntPtr hwnd;
|
||||
public IntPtr hwndInsertAfter;
|
||||
public int Left;
|
||||
public int Top;
|
||||
public int Width;
|
||||
public int Height;
|
||||
public int Flags;
|
||||
}
|
||||
*/
|
||||
|
||||
// workaround LiteDB compatibility issue in RECT data structure
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct POINT
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
public POINT(int x, int y)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct RECT
|
||||
{
|
||||
public int Left { get; set; }
|
||||
public int Top { get; set; }
|
||||
public int Right { get; set; }
|
||||
public int Bottom { get; set; }
|
||||
|
||||
public int Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return Bottom - Top;
|
||||
}
|
||||
}
|
||||
public int Width
|
||||
{
|
||||
get
|
||||
{
|
||||
return Right - Left;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("({0}, {1}), {2} x {3}", Left, Top, Width, Height);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.960
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninjacrab.PersistentWindows.Common", "Ninjacrab.PersistentWindows.Common\Ninjacrab.PersistentWindows.Common.csproj", "{4CC8B3FB-214B-42AB-8AAE-E7DC5E266EF0}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersistentWindows.Common", "Common\Common.csproj", "{4CC8B3FB-214B-42AB-8AAE-E7DC5E266EF0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninjacrab.PersistentWindows.SystrayShell", "Ninjacrab.PersistentWindows.SystrayShell\Ninjacrab.PersistentWindows.SystrayShell.csproj", "{A728279C-F567-4E54-8BC6-90A66DC3EF57}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersistentWindows.SystrayShell", "SystrayShell\SystrayShell.csproj", "{A728279C-F567-4E54-8BC6-90A66DC3EF57}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
|
@ -4,11 +4,11 @@ using System.Threading;
|
|||
using System.Windows.Forms;
|
||||
using System.Diagnostics;
|
||||
|
||||
using Ninjacrab.PersistentWindows.Common;
|
||||
using Ninjacrab.PersistentWindows.Common.WinApiBridge;
|
||||
using Ninjacrab.PersistentWindows.Common.Diagnostics;
|
||||
using PersistentWindows.Common;
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common.Diagnostics;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||
namespace PersistentWindows.SystrayShell
|
||||
{
|
||||
static class Program
|
||||
{
|
|
@ -8,7 +8,7 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell.Properties {
|
||||
namespace PersistentWindows.SystrayShell.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell.Properties {
|
|||
// 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", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
@ -39,7 +39,7 @@ namespace Ninjacrab.PersistentWindows.SystrayShell.Properties {
|
|||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Ninjacrab.PersistentWindows.SystrayShell.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PersistentWindows.SystrayShell.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
|
@ -69,6 +69,10 @@ namespace Ninjacrab.PersistentWindows.SystrayShell.Properties {
|
|||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon pwIconBusy {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pwIconBusy", resourceCulture);
|
|
@ -1,28 +1,24 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// 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 Ninjacrab.PersistentWindows.SystrayShell.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace PersistentWindows.SystrayShell.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
@ -1,6 +1,6 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||
namespace PersistentWindows.SystrayShell
|
||||
{
|
||||
partial class SplashForm
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||
namespace PersistentWindows.SystrayShell
|
||||
{
|
||||
public partial class SplashForm : Form
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Windows.Forms;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||
namespace PersistentWindows.SystrayShell
|
||||
{
|
||||
static class Globals
|
||||
{
|
|
@ -7,11 +7,11 @@ using System.Timers;
|
|||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
|
||||
using Ninjacrab.PersistentWindows.Common;
|
||||
using Ninjacrab.PersistentWindows.Common.Diagnostics;
|
||||
using Ninjacrab.PersistentWindows.Common.WinApiBridge;
|
||||
using PersistentWindows.Common;
|
||||
using PersistentWindows.Common.Diagnostics;
|
||||
using PersistentWindows.Common.WinApiBridge;
|
||||
|
||||
namespace Ninjacrab.PersistentWindows.SystrayShell
|
||||
namespace PersistentWindows.SystrayShell
|
||||
{
|
||||
public partial class SystrayForm : Form
|
||||
{
|
|
@ -7,7 +7,7 @@
|
|||
<ProjectGuid>{A728279C-F567-4E54-8BC6-90A66DC3EF57}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Ninjacrab.PersistentWindows.SystrayShell</RootNamespace>
|
||||
<RootNamespace>PersistentWindows.SystrayShell</RootNamespace>
|
||||
<AssemblyName>PersistentWindows</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
@ -107,9 +107,9 @@
|
|||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ninjacrab.PersistentWindows.Common\Ninjacrab.PersistentWindows.Common.csproj">
|
||||
<ProjectReference Include="..\Common\Common.csproj">
|
||||
<Project>{4cc8b3fb-214b-42ab-8aae-e7dc5e266ef0}</Project>
|
||||
<Name>Ninjacrab.PersistentWindows.Common</Name>
|
||||
<Name>PersistentWindows.Common</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
Loading…
Add table
Add a link
Reference in a new issue