From b4c530883a2a533473343825415b28b234324a8c Mon Sep 17 00:00:00 2001 From: gobbo1008 Date: Fri, 15 Sep 2017 13:40:20 +0200 Subject: [PATCH] Missed a spot Missed a call for expanding the TreeView and removing account-level checkboxes, apparently. --- ESOResearchNotifier/Form1.Designer.cs | 34 +++++++++++++-------------- ESOResearchNotifier/Form1.cs | 25 +++++++++----------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/ESOResearchNotifier/Form1.Designer.cs b/ESOResearchNotifier/Form1.Designer.cs index afe961b..710803e 100644 --- a/ESOResearchNotifier/Form1.Designer.cs +++ b/ESOResearchNotifier/Form1.Designer.cs @@ -53,8 +53,8 @@ private void InitializeComponent() this.lblDone = new System.Windows.Forms.Label(); this.lblName = new System.Windows.Forms.Label(); this.btnSortName = new System.Windows.Forms.Button(); - this.treeView1 = new ESOResearchNotifier.FixedTreeView(); this.btnSortDefault = new System.Windows.Forms.Button(); + this.treeView1 = new ESOResearchNotifier.FixedTreeView(); ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit(); this.notifyMenuStrip1.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -215,7 +215,7 @@ private void InitializeComponent() this.panelResearch.Location = new System.Drawing.Point(6, 45); this.panelResearch.Name = "panelResearch"; this.panelResearch.Size = new System.Drawing.Size(655, 413); - this.panelResearch.TabIndex = 1; + this.panelResearch.TabIndex = 7; // // linkLabel2 // @@ -250,7 +250,7 @@ private void InitializeComponent() this.btnSortTime.Location = new System.Drawing.Point(363, 17); this.btnSortTime.Name = "btnSortTime"; this.btnSortTime.Size = new System.Drawing.Size(39, 23); - this.btnSortTime.TabIndex = 7; + this.btnSortTime.TabIndex = 4; this.btnSortTime.Text = "Sort"; this.btnSortTime.UseVisualStyleBackColor = true; this.btnSortTime.Click += new System.EventHandler(this.btnSortTime_Click); @@ -261,7 +261,7 @@ private void InitializeComponent() this.label1.Location = new System.Drawing.Point(417, 22); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(158, 20); - this.label1.TabIndex = 6; + this.label1.TabIndex = 5; this.label1.Text = "Progress"; // // lblDone @@ -270,7 +270,7 @@ private void InitializeComponent() this.lblDone.Location = new System.Drawing.Point(286, 22); this.lblDone.Name = "lblDone"; this.lblDone.Size = new System.Drawing.Size(71, 20); - this.lblDone.TabIndex = 5; + this.lblDone.TabIndex = 3; this.lblDone.Text = "Finish Time"; // // lblName @@ -279,7 +279,7 @@ private void InitializeComponent() this.lblName.Location = new System.Drawing.Point(12, 22); this.lblName.Name = "lblName"; this.lblName.Size = new System.Drawing.Size(120, 23); - this.lblName.TabIndex = 3; + this.lblName.TabIndex = 1; this.lblName.Text = "Character and Item"; // // btnSortName @@ -287,11 +287,21 @@ private void InitializeComponent() this.btnSortName.Location = new System.Drawing.Point(138, 17); this.btnSortName.Name = "btnSortName"; this.btnSortName.Size = new System.Drawing.Size(39, 23); - this.btnSortName.TabIndex = 8; + this.btnSortName.TabIndex = 2; this.btnSortName.Text = "Sort"; this.btnSortName.UseVisualStyleBackColor = true; this.btnSortName.Click += new System.EventHandler(this.btnSortName_Click); // + // btnSortDefault + // + this.btnSortDefault.Location = new System.Drawing.Point(581, 17); + this.btnSortDefault.Name = "btnSortDefault"; + this.btnSortDefault.Size = new System.Drawing.Size(80, 23); + this.btnSortDefault.TabIndex = 6; + this.btnSortDefault.Text = "Reset Sorting"; + this.btnSortDefault.UseVisualStyleBackColor = true; + this.btnSortDefault.Click += new System.EventHandler(this.btnSortDefault_Click); + // // treeView1 // this.treeView1.CheckBoxes = true; @@ -304,16 +314,6 @@ private void InitializeComponent() "chDump addon at least once."); this.treeView1.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterCheck); // - // btnSortDefault - // - this.btnSortDefault.Location = new System.Drawing.Point(581, 17); - this.btnSortDefault.Name = "btnSortDefault"; - this.btnSortDefault.Size = new System.Drawing.Size(80, 23); - this.btnSortDefault.TabIndex = 9; - this.btnSortDefault.Text = "Reset Sorting"; - this.btnSortDefault.UseVisualStyleBackColor = true; - this.btnSortDefault.Click += new System.EventHandler(this.btnSortDefault_Click); - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/ESOResearchNotifier/Form1.cs b/ESOResearchNotifier/Form1.cs index cf42e26..2cc9ea3 100644 --- a/ESOResearchNotifier/Form1.cs +++ b/ESOResearchNotifier/Form1.cs @@ -141,6 +141,7 @@ private void ReadDump() { MessageBox.Show("No valid data could be found. Please run the ResearchDump addon and /reloadui.\r\nIf the problem persists, delete " + SavedVars + "\\ResearchDump.lua and run the addon.\r\nIf the problem still persists, please file an issue on GitHub, attaching your ResearchDump.lua."); } + ExpandTree(); } private void fileSystemWatcher1_Changed(object sender, System.IO.FileSystemEventArgs e) @@ -167,12 +168,7 @@ private void menuItemExit_Click(object sender, EventArgs e) { this.Close(); } - - private void button1_Click(object sender, EventArgs e) - { - this.WindowState = FormWindowState.Minimized; - } - + private void Form1_Resize(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Minimized) @@ -185,11 +181,7 @@ private void Form1_Resize(object sender, EventArgs e) this.ShowInTaskbar = true; } - foreach (TreeMetaNode Node in treeView1.Nodes) - { - HideCheckBox(treeView1, Node); - } - treeView1.ExpandAll(); + ExpandTree(); } private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) @@ -227,7 +219,7 @@ private void cboTimeout_SelectedIndexChanged(object sender, EventArgs e) XML.WriteData(ConfigPath, Config, SelectedCharacters); } - private void button1_Click_1(object sender, EventArgs e) + private void button1_Click(object sender, EventArgs e) { // Short, 10-second debug research item ResearchItem tItem = new ResearchItem(); @@ -336,15 +328,20 @@ private void EvaluateTreeView() SelectedCharacters = newSelectedCharacters; XML.WriteData(ConfigPath, Config, SelectedCharacters); + ExpandTree(); } - private void Form1_Load(object sender, EventArgs e) + private void ExpandTree() { foreach (TreeMetaNode Node in treeView1.Nodes) { HideCheckBox(treeView1, Node); } treeView1.ExpandAll(); + } + + private void Form1_Load(object sender, EventArgs e) + { EvaluateTreeView(); } @@ -395,7 +392,7 @@ private static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, /// /// Hides the checkbox for the specified node on a TreeView control. /// - private void HideCheckBox(TreeView tvw, TreeMetaNode node) + private void HideCheckBox(FixedTreeView tvw, TreeMetaNode node) { TVITEM tvi = new TVITEM(); tvi.hItem = node.Handle;