Ram Watch - ditch the idea of having a save-window position toggle, window position will always be saved. Hooked up window position saving, but currently it fails
This commit is contained in:
parent
581129b6d5
commit
29c018d453
|
@ -11,6 +11,8 @@
|
|||
// RamWatch Settings
|
||||
public bool AutoLoadRamWatch = false;
|
||||
public RecentFiles RecentWatches = new RecentFiles(8);
|
||||
public int RamWatchWndx = -1; //Negative numbers will be ignored even with save window position set
|
||||
public int RamWatchWndy = -1;
|
||||
|
||||
// Client Hotkey Bindings
|
||||
public string HardResetBinding = "LeftShift+Tab";
|
||||
|
|
|
@ -37,9 +37,11 @@
|
|||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.appendFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.recentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.watchesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
@ -58,10 +60,6 @@
|
|||
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
|
||||
this.WatchCountLabel = new System.Windows.Forms.Label();
|
||||
this.noneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.autoLoadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
@ -87,8 +85,6 @@
|
|||
this.appendFileToolStripMenuItem,
|
||||
this.recentToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.saveWindowPositionToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.exitToolStripMenuItem});
|
||||
this.filesToolStripMenuItem.Name = "filesToolStripMenuItem";
|
||||
this.filesToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
|
||||
|
@ -147,23 +143,34 @@
|
|||
this.recentToolStripMenuItem.Text = "Recent";
|
||||
this.recentToolStripMenuItem.DropDownOpened += new System.EventHandler(this.recentToolStripMenuItem_DropDownOpened);
|
||||
//
|
||||
// noneToolStripMenuItem
|
||||
//
|
||||
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
|
||||
this.noneToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.noneToolStripMenuItem.Text = "None";
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(132, 6);
|
||||
//
|
||||
// clearToolStripMenuItem
|
||||
//
|
||||
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
||||
this.clearToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.clearToolStripMenuItem.Text = "Clear";
|
||||
//
|
||||
// autoLoadToolStripMenuItem
|
||||
//
|
||||
this.autoLoadToolStripMenuItem.Name = "autoLoadToolStripMenuItem";
|
||||
this.autoLoadToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
|
||||
this.autoLoadToolStripMenuItem.Text = "Auto-Load";
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(201, 6);
|
||||
//
|
||||
// saveWindowPositionToolStripMenuItem
|
||||
//
|
||||
this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem";
|
||||
this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||
this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position";
|
||||
this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(201, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
|
@ -316,29 +323,6 @@
|
|||
this.WatchCountLabel.TabIndex = 4;
|
||||
this.WatchCountLabel.Text = "0 watches";
|
||||
//
|
||||
// noneToolStripMenuItem
|
||||
//
|
||||
this.noneToolStripMenuItem.Name = "noneToolStripMenuItem";
|
||||
this.noneToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.noneToolStripMenuItem.Text = "None";
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// clearToolStripMenuItem
|
||||
//
|
||||
this.clearToolStripMenuItem.Name = "clearToolStripMenuItem";
|
||||
this.clearToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.clearToolStripMenuItem.Text = "Clear";
|
||||
//
|
||||
// autoLoadToolStripMenuItem
|
||||
//
|
||||
this.autoLoadToolStripMenuItem.Name = "autoLoadToolStripMenuItem";
|
||||
this.autoLoadToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.autoLoadToolStripMenuItem.Text = "Auto-Load";
|
||||
//
|
||||
// RamWatch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -352,6 +336,7 @@
|
|||
this.Name = "RamWatch";
|
||||
this.Text = "Ram Watch";
|
||||
this.Load += new System.EventHandler(this.RamWatch_Load);
|
||||
this.LocationChanged += new System.EventHandler(this.RamWatch_LocationChanged);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
|
@ -373,8 +358,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem appendFileToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem recentToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ListView WatchListView;
|
||||
private System.Windows.Forms.ToolStripMenuItem newWatchToolStripMenuItem;
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (string.Compare(currentWatchFile, "") == 0) return;
|
||||
|
||||
SaveWatchFile(currentWatchFileFile); //TODO: only do this if changes have been made
|
||||
SaveWatchFile(currentWatchFile); //TODO: only do this if changes have been made
|
||||
}
|
||||
|
||||
private FileInfo GetSaveFileFromUser()
|
||||
|
@ -260,11 +260,6 @@ namespace BizHawk.MultiClient
|
|||
UpdateAutoLoadRamWatch();
|
||||
}
|
||||
|
||||
private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void newWatchToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddNewWatch();
|
||||
|
@ -310,6 +305,12 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void RamWatch_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (Global.Config.RamWatchWndx >= 0 && Global.Config.RamWatchWndy >= 0)
|
||||
{
|
||||
this.Left = Global.Config.RamWatchWndx;
|
||||
this.Top = Global.Config.RamWatchWndy;
|
||||
}
|
||||
//this.Location = new Point(Global.Config.RamWatchWndx, Global.Config.RamWatchWndy);
|
||||
|
||||
}
|
||||
|
||||
|
@ -411,5 +412,11 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RamWatch_LocationChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamWatchWndx = this.Location.X;
|
||||
Global.Config.RamWatchWndy = this.Location.Y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue