mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-21 04:43:55 +12:00
Minor fixes here and there.
This commit is contained in:
parent
c2347b25a5
commit
35f5cb15cd
|
@ -5,6 +5,7 @@ using System.Windows.Forms;
|
|||
using System.Drawing;
|
||||
|
||||
namespace OnTopReplica {
|
||||
|
||||
partial class MainForm {
|
||||
|
||||
EventHandler RequestClosingHandler;
|
||||
|
@ -74,7 +75,7 @@ namespace OnTopReplica {
|
|||
if (_currentSidePanel == null)
|
||||
return;
|
||||
|
||||
//Unhook listener
|
||||
//Unhook listener to make panel freeable
|
||||
_currentSidePanel.RequestClosing -= RequestClosingHandler;
|
||||
|
||||
//Remove side panel
|
||||
|
@ -102,4 +103,5 @@ namespace OnTopReplica {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace OnTopReplica.Native {
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ namespace OnTopReplica {
|
|||
|
||||
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) {
|
||||
string dump = string.Format("OnTopReplica-dump-{0}{1}{2}{3}{4}.txt",
|
||||
DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day,
|
||||
DateTime.UtcNow.Hour, DateTime.UtcNow.Minute);
|
||||
DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day,
|
||||
DateTime.Now.Hour, DateTime.Now.Minute);
|
||||
string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), dump);
|
||||
|
||||
using (var s = new FileStream(path, FileMode.Create)) {
|
||||
|
@ -83,6 +83,7 @@ namespace OnTopReplica {
|
|||
sw.WriteLine(".NET: {0}", Environment.Version.ToString());
|
||||
sw.WriteLine("Aero DWM: {0}", VistaControls.OsSupport.IsCompositionEnabled);
|
||||
sw.WriteLine("Launch command: {0}", Environment.CommandLine);
|
||||
sw.WriteLine("UTC time: {0} {1}", DateTime.UtcNow.ToShortDateString(), DateTime.UtcNow.ToShortTimeString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
91
OnTopReplica/SidePanels/GroupSwitchPanel.Designer.cs
generated
91
OnTopReplica/SidePanels/GroupSwitchPanel.Designer.cs
generated
|
@ -1,34 +1,34 @@
|
|||
namespace OnTopReplica.SidePanels {
|
||||
partial class GroupSwitchPanel {
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
/// <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);
|
||||
}
|
||||
/// <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 Component Designer generated code
|
||||
#region Component 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() {
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent() {
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.labelStatus = new System.Windows.Forms.Label();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonEnable = new System.Windows.Forms.Button();
|
||||
this.listWindows = new System.Windows.Forms.ListView();
|
||||
this.colName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.labelStatus = new System.Windows.Forms.Label();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -41,19 +41,29 @@
|
|||
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.groupBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(228, 296);
|
||||
this.groupBox1.TabIndex = 0;
|
||||
this.groupBox1.Size = new System.Drawing.Size(961, 592);
|
||||
this.groupBox1.TabIndex = 1;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = Strings.GroupSwitchModeTitle;
|
||||
this.groupBox1.Text = "Group switch mode:";
|
||||
//
|
||||
// labelStatus
|
||||
//
|
||||
this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelStatus.Location = new System.Drawing.Point(3, 543);
|
||||
this.labelStatus.Name = "labelStatus";
|
||||
this.labelStatus.Size = new System.Drawing.Size(952, 17);
|
||||
this.labelStatus.TabIndex = 3;
|
||||
this.labelStatus.TextAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.Location = new System.Drawing.Point(152, 267);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(885, 563);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(70, 23);
|
||||
this.buttonCancel.TabIndex = 2;
|
||||
this.buttonCancel.Text = Strings.GroupSwitchModeDisableButton;
|
||||
this.buttonCancel.Text = global::OnTopReplica.Strings.GroupSwitchModeDisableButton;
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.Cancel_click);
|
||||
//
|
||||
|
@ -61,11 +71,11 @@
|
|||
//
|
||||
this.buttonEnable.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonEnable.Image = global::OnTopReplica.Properties.Resources.xiao_ok;
|
||||
this.buttonEnable.Location = new System.Drawing.Point(12, 267);
|
||||
this.buttonEnable.Location = new System.Drawing.Point(745, 563);
|
||||
this.buttonEnable.Name = "buttonEnable";
|
||||
this.buttonEnable.Size = new System.Drawing.Size(134, 23);
|
||||
this.buttonEnable.TabIndex = 1;
|
||||
this.buttonEnable.Text = Strings.GroupSwitchModeEnableButton;
|
||||
this.buttonEnable.Text = global::OnTopReplica.Strings.GroupSwitchModeEnableButton;
|
||||
this.buttonEnable.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.buttonEnable.UseVisualStyleBackColor = true;
|
||||
this.buttonEnable.Click += new System.EventHandler(this.Enable_click);
|
||||
|
@ -83,27 +93,16 @@
|
|||
this.listWindows.LabelWrap = false;
|
||||
this.listWindows.Location = new System.Drawing.Point(6, 19);
|
||||
this.listWindows.Name = "listWindows";
|
||||
this.listWindows.Size = new System.Drawing.Size(216, 225);
|
||||
this.listWindows.Size = new System.Drawing.Size(949, 521);
|
||||
this.listWindows.TabIndex = 0;
|
||||
this.listWindows.UseCompatibleStateImageBehavior = false;
|
||||
this.listWindows.View = System.Windows.Forms.View.Details;
|
||||
//
|
||||
// colName
|
||||
//
|
||||
this.colName.Text = Strings.GroupSwitchModeWindows;
|
||||
this.colName.Text = global::OnTopReplica.Strings.GroupSwitchModeWindows;
|
||||
this.colName.Width = 220;
|
||||
//
|
||||
// labelStatus
|
||||
//
|
||||
this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.labelStatus.Location = new System.Drawing.Point(3, 247);
|
||||
this.labelStatus.Name = "labelStatus";
|
||||
this.labelStatus.Size = new System.Drawing.Size(219, 17);
|
||||
this.labelStatus.TabIndex = 3;
|
||||
this.labelStatus.Text = "";
|
||||
this.labelStatus.TextAlign = System.Drawing.ContentAlignment.BottomRight;
|
||||
//
|
||||
// GroupSwitchPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -111,19 +110,19 @@
|
|||
this.Controls.Add(this.groupBox1);
|
||||
this.MinimumSize = new System.Drawing.Size(220, 220);
|
||||
this.Name = "GroupSwitchPanel";
|
||||
this.Size = new System.Drawing.Size(228, 296);
|
||||
this.Size = new System.Drawing.Size(961, 592);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label labelStatus;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonEnable;
|
||||
private System.Windows.Forms.ListView listWindows;
|
||||
private System.Windows.Forms.ColumnHeader colName;
|
||||
private System.Windows.Forms.Label labelStatus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using OnTopReplica.Properties;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using OnTopReplica.MessagePumpProcessors;
|
||||
using OnTopReplica.WindowSeekers;
|
||||
|
||||
namespace OnTopReplica.SidePanels {
|
||||
partial class GroupSwitchPanel : SidePanel {
|
||||
|
||||
partial class GroupSwitchPanel : SidePanel {
|
||||
public GroupSwitchPanel() {
|
||||
InitializeComponent();
|
||||
}
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void OnFirstShown(MainForm form) {
|
||||
base.OnFirstShown(form);
|
||||
|
@ -24,7 +21,9 @@ namespace OnTopReplica.SidePanels {
|
|||
}
|
||||
|
||||
private void LoadWindowList() {
|
||||
var manager = new TaskWindowSeeker();
|
||||
var manager = new TaskWindowSeeker {
|
||||
SkipNotVisibleWindows = true
|
||||
};
|
||||
manager.Refresh();
|
||||
|
||||
var imageList = new ImageList();
|
||||
|
@ -52,6 +51,7 @@ namespace OnTopReplica.SidePanels {
|
|||
foreach (ListViewItem i in listWindows.SelectedItems) {
|
||||
ret.Add((WindowHandle)i.Tag);
|
||||
}
|
||||
|
||||
form.SetThumbnailGroup(ret);
|
||||
}
|
||||
else {
|
||||
|
@ -70,5 +70,6 @@ namespace OnTopReplica.SidePanels {
|
|||
OnRequestClosing();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
|
Loading…
Reference in a new issue