Skip to content

Commit b6dbd39

Browse files
committed
2 parents 7d51397 + d9b4eac commit b6dbd39

File tree

8 files changed

+104
-7
lines changed

8 files changed

+104
-7
lines changed

ESPSharp GUI/DockableForms/BookmarkListWindow.Designer.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ESPSharp GUI/DockableForms/BookmarkListWindow.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public partial class BookmarkListWindow : PluginList
1414
public BookmarkListWindow()
1515
{
1616
InitializeComponent();
17+
base.InitializeComponent();
1718

1819
TlvControl = treeListView1;
1920

@@ -25,13 +26,27 @@ public BookmarkListWindow()
2526

2627
private void btbFilter_TextChanged(object sender, EventArgs e)
2728
{
28-
2929
FilterControl(((TextBox)sender).Text);
3030
}
3131

3232
private void btnClear_Click(object sender, EventArgs e)
3333
{
3434
treeListView1.ClearObjects();
3535
}
36+
37+
private void tlvPluginList_CellClick(object sender, CellClickEventArgs e)
38+
{
39+
//RecordViewWindow.AddRecordData(e.Model);
40+
}
41+
42+
private void tlvPluginList_Expanding(object sender, TreeBranchExpandingEventArgs e)
43+
{
44+
Expanding(e.Model);
45+
}
46+
47+
private void tlvPluginsList_Collapsing(object sender, TreeBranchCollapsingEventArgs e)
48+
{
49+
Collapsing(e.Model);
50+
}
3651
}
3752
}

ESPSharp GUI/DockableForms/PluginListWindow.Designer.cs

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ESPSharp GUI/DockableForms/PluginListWindow.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public partial class PluginListWindow : PluginList
1414
public PluginListWindow()
1515
{
1616
InitializeComponent();
17+
base.InitializeComponent();
18+
1719

1820
TlvControl = tlvPluginList;
1921

@@ -39,5 +41,10 @@ private void tlvPluginList_Expanding(object sender, TreeBranchExpandingEventArgs
3941
{
4042
Expanding(e.Model);
4143
}
44+
45+
private void tlvPluginsList_Collapsing(object sender, TreeBranchCollapsingEventArgs e)
46+
{
47+
Collapsing(e.Model);
48+
}
4249
}
4350
}

ESPSharp GUI/DockableForms/RecordViewWindow.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
using System.Collections.Generic;
44
using System.Reflection;
55
using System.Text;
6-
using System.Windows.Forms;
76
using System.Xml.Linq;
87
using ESPSharp;
98
using ESPSharp_GUI.Utilities;
10-
using Fasterflect;
119
using WeifenLuo.WinFormsUI.Docking;
1210

1311
namespace ESPSharp_GUI.DockableForms

ESPSharp GUI/ESPSharp GUI.csproj

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,46 @@
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
36+
<DebugSymbols>true</DebugSymbols>
37+
<OutputPath>bin\x86\Debug\</OutputPath>
38+
<DefineConstants>DEBUG;TRACE</DefineConstants>
39+
<DebugType>full</DebugType>
40+
<PlatformTarget>x86</PlatformTarget>
41+
<ErrorReport>prompt</ErrorReport>
42+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
43+
<Prefer32Bit>true</Prefer32Bit>
44+
</PropertyGroup>
45+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
46+
<OutputPath>bin\x86\Release\</OutputPath>
47+
<DefineConstants>TRACE</DefineConstants>
48+
<Optimize>true</Optimize>
49+
<DebugType>pdbonly</DebugType>
50+
<PlatformTarget>x86</PlatformTarget>
51+
<ErrorReport>prompt</ErrorReport>
52+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
53+
<Prefer32Bit>true</Prefer32Bit>
54+
</PropertyGroup>
55+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ESPSharpGUI|AnyCPU'">
56+
<OutputPath>bin\ESPSharpGUI\</OutputPath>
57+
<DefineConstants>TRACE</DefineConstants>
58+
<Optimize>true</Optimize>
59+
<DebugType>pdbonly</DebugType>
60+
<PlatformTarget>AnyCPU</PlatformTarget>
61+
<ErrorReport>prompt</ErrorReport>
62+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
63+
<Prefer32Bit>true</Prefer32Bit>
64+
</PropertyGroup>
65+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ESPSharpGUI|x86'">
66+
<OutputPath>bin\x86\ESPSharpGUI\</OutputPath>
67+
<DefineConstants>TRACE</DefineConstants>
68+
<Optimize>true</Optimize>
69+
<DebugType>pdbonly</DebugType>
70+
<PlatformTarget>x86</PlatformTarget>
71+
<ErrorReport>prompt</ErrorReport>
72+
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
73+
<Prefer32Bit>true</Prefer32Bit>
74+
</PropertyGroup>
3575
<ItemGroup>
3676
<Reference Include="Fasterflect, Version=2.1.3.0, Culture=neutral, PublicKeyToken=38d18473284c1ca7, processorArchitecture=MSIL">
3777
<HintPath>..\packages\fasterflect.2.1.3\lib\net40\Fasterflect.dll</HintPath>
@@ -154,6 +194,9 @@
154194
<EmbeddedResource Include="DockableForms\RecordViewWindow.resx">
155195
<DependentUpon>RecordViewWindow.cs</DependentUpon>
156196
</EmbeddedResource>
197+
<EmbeddedResource Include="Extensions\PluginList.resx">
198+
<DependentUpon>PluginList.cs</DependentUpon>
199+
</EmbeddedResource>
157200
<EmbeddedResource Include="MainWindow.resx">
158201
<DependentUpon>MainWindow.cs</DependentUpon>
159202
</EmbeddedResource>

ESPSharp GUI/Extensions/PluginList.cs

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
using System;
2-
using System.Collections;
1+
using System.Collections;
32
using System.Linq;
43
using System.Windows.Forms;
54
using BrightIdeasSoftware;
65
using ESPSharp;
7-
using ESPSharp_GUI.Utilities;
86
using Fasterflect;
97
using WeifenLuo.WinFormsUI.Docking;
108

@@ -14,6 +12,22 @@ public class PluginList : DockContent
1412
{
1513
internal TreeListView TlvControl = new TreeListView();
1614

15+
internal void InitializeComponent()
16+
{
17+
this.SuspendLayout();
18+
//
19+
// PluginList
20+
//
21+
this.ClientSize = new System.Drawing.Size(284, 262);
22+
this.CloseButton = false;
23+
this.CloseButtonVisible = false;
24+
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
25+
this.HideOnClose = true;
26+
this.Name = "PluginList";
27+
this.ResumeLayout(false);
28+
29+
}
30+
1731
internal void SetupTree()
1832
{
1933
TlvControl.CanExpandGetter = delegate (object x)
@@ -121,6 +135,13 @@ internal void Expanding(object e)
121135
RecursiveExpand(TlvControl.GetChildren(e));
122136
}
123137

138+
internal void Collapsing(object e)
139+
{
140+
if (ModifierKeys == Keys.Control)
141+
if (TlvControl.IsExpanded(e))
142+
RecursiveCollapse(TlvControl.GetChildren(e));
143+
}
144+
124145
/// <summary>
125146
/// Recursively expands a group in the treelistview
126147
/// control until it cannot expand further
@@ -134,5 +155,14 @@ internal void RecursiveExpand(IEnumerable ienum)
134155
TlvControl.Expand(m);
135156
}
136157
}
158+
159+
internal void RecursiveCollapse(IEnumerable ienum)
160+
{
161+
foreach (var m in from object m in ienum where TlvControl.CanExpand(m) select m)
162+
{
163+
RecursiveCollapse(TlvControl.GetChildren(m));
164+
TlvControl.Collapse(m);
165+
}
166+
}
137167
}
138168
}

ESPSharp GUI/Utilities/PluginData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void OpenPlugins(string[] files, IProgress<string> progress)
3434
else
3535
{
3636
var plugin = new ElderScrollsPlugin(Path.GetFileName(file));
37-
plugin.ReadBinary(file);
37+
plugin.Read(file);
3838

3939
Plugins.Add(plugin);
4040
progress.Report("Loaded plugin data for: " + Path.GetFileName(file));

0 commit comments

Comments
 (0)