├── VAMvarmanager.sln
├── VAMvarmanager
├── VAMvarmanager.csproj
├── VAMvarmanager - Backup.csproj
├── Properties
│ ├── Settings.settings
│ └── Settings.Designer.cs
├── frmMorphPresetMaker.resx
├── frmDuplicateItemManager.resx
├── frmVARManager.resx
├── frmMorphPresetMaker.Designer.cs
├── frmMorphPresetMaker.cs
├── frmDuplicateItemManager.Designer.cs
├── frmDuplicateItemManager.cs
├── frmVARManager.Designer.cs
└── frmVARManager.cs
├── .gitattributes
└── .gitignore
/VAMvarmanager.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32328.378
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VAMvarmanager", "VAMvarmanager\VAMvarmanager.csproj", "{5628834B-128D-414A-A594-CE709E90EC64}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {5628834B-128D-414A-A594-CE709E90EC64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {5628834B-128D-414A-A594-CE709E90EC64}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {5628834B-128D-414A-A594-CE709E90EC64}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {5628834B-128D-414A-A594-CE709E90EC64}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {2D9440E3-DEDD-4186-81D2-E83C0C98DB18}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/VAMvarmanager/VAMvarmanager.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net7.0-windows
6 | true
7 | VAMvarmanager.Program
8 | true
9 | false
10 | win-x64
11 | true
12 | true
13 | 1.0.38
14 | 1.0.38.0
15 | 1.0.38.0
16 |
17 |
18 |
19 |
20 | True
21 | True
22 | Settings.settings
23 |
24 |
25 |
26 |
27 |
28 | SettingsSingleFileGenerator
29 | Settings.Designer.cs
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/VAMvarmanager/VAMvarmanager - Backup.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WinExe
5 | net5.0-windows
6 | true
7 | VAMvarmanager.Program
8 | true
9 | true
10 | win-x64
11 | true
12 | true
13 | true
14 | 1.0.17
15 | 1.0.17.0
16 | 1.0.16.0
17 |
18 |
19 |
20 |
21 | True
22 | True
23 | Settings.settings
24 |
25 |
26 |
27 |
28 |
29 | SettingsSingleFileGenerator
30 | Settings.Designer.cs
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/VAMvarmanager/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | True
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | False
28 |
29 |
30 |
31 |
32 |
33 | 0
34 |
35 |
36 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmMorphPresetMaker.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
61 | 17, 17
62 |
63 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmDuplicateItemManager.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
61 | 17, 17
62 |
63 |
--------------------------------------------------------------------------------
/VAMvarmanager/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace VAMvarmanager.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("")]
29 | public string vamfolder {
30 | get {
31 | return ((string)(this["vamfolder"]));
32 | }
33 | set {
34 | this["vamfolder"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("")]
41 | public string backupfolder {
42 | get {
43 | return ((string)(this["backupfolder"]));
44 | }
45 | set {
46 | this["backupfolder"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | public global::System.Collections.Specialized.StringCollection creatorex {
53 | get {
54 | return ((global::System.Collections.Specialized.StringCollection)(this["creatorex"]));
55 | }
56 | set {
57 | this["creatorex"] = value;
58 | }
59 | }
60 |
61 | [global::System.Configuration.UserScopedSettingAttribute()]
62 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
63 | public global::System.Collections.Specialized.StringCollection folderex {
64 | get {
65 | return ((global::System.Collections.Specialized.StringCollection)(this["folderex"]));
66 | }
67 | set {
68 | this["folderex"] = value;
69 | }
70 | }
71 |
72 | [global::System.Configuration.UserScopedSettingAttribute()]
73 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
74 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
75 | public bool UpdateSettings {
76 | get {
77 | return ((bool)(this["UpdateSettings"]));
78 | }
79 | set {
80 | this["UpdateSettings"] = value;
81 | }
82 | }
83 |
84 | [global::System.Configuration.UserScopedSettingAttribute()]
85 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
86 | public global::System.Collections.Specialized.StringCollection mastervars {
87 | get {
88 | return ((global::System.Collections.Specialized.StringCollection)(this["mastervars"]));
89 | }
90 | set {
91 | this["mastervars"] = value;
92 | }
93 | }
94 |
95 | [global::System.Configuration.UserScopedSettingAttribute()]
96 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
97 | public global::System.Collections.Specialized.StringCollection masteritems {
98 | get {
99 | return ((global::System.Collections.Specialized.StringCollection)(this["masteritems"]));
100 | }
101 | set {
102 | this["masteritems"] = value;
103 | }
104 | }
105 |
106 | [global::System.Configuration.UserScopedSettingAttribute()]
107 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
108 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
109 | public bool skipFavorites {
110 | get {
111 | return ((bool)(this["skipFavorites"]));
112 | }
113 | set {
114 | this["skipFavorites"] = value;
115 | }
116 | }
117 |
118 | [global::System.Configuration.UserScopedSettingAttribute()]
119 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
120 | public global::System.Collections.Specialized.StringCollection lastActiveVars {
121 | get {
122 | return ((global::System.Collections.Specialized.StringCollection)(this["lastActiveVars"]));
123 | }
124 | set {
125 | this["lastActiveVars"] = value;
126 | }
127 | }
128 |
129 | [global::System.Configuration.UserScopedSettingAttribute()]
130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
131 | [global::System.Configuration.DefaultSettingValueAttribute("0")]
132 | public int lastActiveVarcount {
133 | get {
134 | return ((int)(this["lastActiveVarcount"]));
135 | }
136 | set {
137 | this["lastActiveVarcount"] = value;
138 | }
139 | }
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmVARManager.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | True
125 |
126 |
127 | True
128 |
129 |
130 | True
131 |
132 |
133 | True
134 |
135 |
136 | 181, 17
137 |
138 |
139 | 301, 17
140 |
141 |
142 | 437, 17
143 |
144 |
145 | 561, 17
146 |
147 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Oo]ut/
33 | [Ll]og/
34 | [Ll]ogs/
35 |
36 | # Visual Studio 2015/2017 cache/options directory
37 | .vs/
38 | # Uncomment if you have tasks that create the project's static files in wwwroot
39 | #wwwroot/
40 |
41 | # Visual Studio 2017 auto generated files
42 | Generated\ Files/
43 |
44 | # MSTest test Results
45 | [Tt]est[Rr]esult*/
46 | [Bb]uild[Ll]og.*
47 |
48 | # NUnit
49 | *.VisualState.xml
50 | TestResult.xml
51 | nunit-*.xml
52 |
53 | # Build Results of an ATL Project
54 | [Dd]ebugPS/
55 | [Rr]eleasePS/
56 | dlldata.c
57 |
58 | # Benchmark Results
59 | BenchmarkDotNet.Artifacts/
60 |
61 | # .NET Core
62 | project.lock.json
63 | project.fragment.lock.json
64 | artifacts/
65 |
66 | # ASP.NET Scaffolding
67 | ScaffoldingReadMe.txt
68 |
69 | # StyleCop
70 | StyleCopReport.xml
71 |
72 | # Files built by Visual Studio
73 | *_i.c
74 | *_p.c
75 | *_h.h
76 | *.ilk
77 | *.meta
78 | *.obj
79 | *.iobj
80 | *.pch
81 | *.pdb
82 | *.ipdb
83 | *.pgc
84 | *.pgd
85 | *.rsp
86 | *.sbr
87 | *.tlb
88 | *.tli
89 | *.tlh
90 | *.tmp
91 | *.tmp_proj
92 | *_wpftmp.csproj
93 | *.log
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio LightSwitch build output
298 | **/*.HTMLClient/GeneratedArtifacts
299 | **/*.DesktopClient/GeneratedArtifacts
300 | **/*.DesktopClient/ModelManifest.xml
301 | **/*.Server/GeneratedArtifacts
302 | **/*.Server/ModelManifest.xml
303 | _Pvt_Extensions
304 |
305 | # Paket dependency manager
306 | .paket/paket.exe
307 | paket-files/
308 |
309 | # FAKE - F# Make
310 | .fake/
311 |
312 | # CodeRush personal settings
313 | .cr/personal
314 |
315 | # Python Tools for Visual Studio (PTVS)
316 | __pycache__/
317 | *.pyc
318 |
319 | # Cake - Uncomment if you are using it
320 | # tools/**
321 | # !tools/packages.config
322 |
323 | # Tabs Studio
324 | *.tss
325 |
326 | # Telerik's JustMock configuration file
327 | *.jmconfig
328 |
329 | # BizTalk build output
330 | *.btp.cs
331 | *.btm.cs
332 | *.odx.cs
333 | *.xsd.cs
334 |
335 | # OpenCover UI analysis results
336 | OpenCover/
337 |
338 | # Azure Stream Analytics local run output
339 | ASALocalRun/
340 |
341 | # MSBuild Binary and Structured Log
342 | *.binlog
343 |
344 | # NVidia Nsight GPU debugger configuration file
345 | *.nvuser
346 |
347 | # MFractors (Xamarin productivity tool) working folder
348 | .mfractor/
349 |
350 | # Local History for Visual Studio
351 | .localhistory/
352 |
353 | # BeatPulse healthcheck temp database
354 | healthchecksdb
355 |
356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
357 | MigrationBackup/
358 |
359 | # Ionide (cross platform F# VS Code tools) working folder
360 | .ionide/
361 |
362 | # Fody - auto-generated XML schema
363 | FodyWeavers.xsd
--------------------------------------------------------------------------------
/VAMvarmanager/frmMorphPresetMaker.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace VAMvarmanager
2 | {
3 | partial class frmMorphPresetMaker
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.clbMorphvars = new System.Windows.Forms.CheckedListBox();
32 | this.txtPresetName = new System.Windows.Forms.TextBox();
33 | this.groupBox1 = new System.Windows.Forms.GroupBox();
34 | this.label3 = new System.Windows.Forms.Label();
35 | this.btnSaveMorphPreset = new System.Windows.Forms.Button();
36 | this.comboSex = new System.Windows.Forms.ComboBox();
37 | this.label2 = new System.Windows.Forms.Label();
38 | this.label1 = new System.Windows.Forms.Label();
39 | this.txtDefaultMorphValue = new System.Windows.Forms.TextBox();
40 | this.cbPreloadMorphs = new System.Windows.Forms.CheckBox();
41 | this.gbMorphvars = new System.Windows.Forms.GroupBox();
42 | this.gbFilters = new System.Windows.Forms.GroupBox();
43 | this.cbSortNumMorphs = new System.Windows.Forms.CheckBox();
44 | this.txtNameFilter = new System.Windows.Forms.TextBox();
45 | this.btnReturnToVM = new System.Windows.Forms.Button();
46 | this.sfdMorphPreset = new System.Windows.Forms.SaveFileDialog();
47 | this.cbOverlayPreset = new System.Windows.Forms.CheckBox();
48 | this.groupBox1.SuspendLayout();
49 | this.gbMorphvars.SuspendLayout();
50 | this.gbFilters.SuspendLayout();
51 | this.SuspendLayout();
52 | //
53 | // clbMorphvars
54 | //
55 | this.clbMorphvars.CheckOnClick = true;
56 | this.clbMorphvars.FormattingEnabled = true;
57 | this.clbMorphvars.Location = new System.Drawing.Point(6, 22);
58 | this.clbMorphvars.Name = "clbMorphvars";
59 | this.clbMorphvars.Size = new System.Drawing.Size(379, 454);
60 | this.clbMorphvars.TabIndex = 0;
61 | //
62 | // txtPresetName
63 | //
64 | this.txtPresetName.Location = new System.Drawing.Point(108, 90);
65 | this.txtPresetName.Name = "txtPresetName";
66 | this.txtPresetName.Size = new System.Drawing.Size(191, 23);
67 | this.txtPresetName.TabIndex = 1;
68 | //
69 | // groupBox1
70 | //
71 | this.groupBox1.Controls.Add(this.cbOverlayPreset);
72 | this.groupBox1.Controls.Add(this.label3);
73 | this.groupBox1.Controls.Add(this.btnSaveMorphPreset);
74 | this.groupBox1.Controls.Add(this.comboSex);
75 | this.groupBox1.Controls.Add(this.label2);
76 | this.groupBox1.Controls.Add(this.label1);
77 | this.groupBox1.Controls.Add(this.txtDefaultMorphValue);
78 | this.groupBox1.Controls.Add(this.txtPresetName);
79 | this.groupBox1.Location = new System.Drawing.Point(12, 12);
80 | this.groupBox1.Name = "groupBox1";
81 | this.groupBox1.Size = new System.Drawing.Size(305, 219);
82 | this.groupBox1.TabIndex = 2;
83 | this.groupBox1.TabStop = false;
84 | this.groupBox1.Text = "Morph Preset";
85 | //
86 | // label3
87 | //
88 | this.label3.AutoSize = true;
89 | this.label3.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
90 | this.label3.Location = new System.Drawing.Point(69, 19);
91 | this.label3.Name = "label3";
92 | this.label3.Size = new System.Drawing.Size(33, 17);
93 | this.label3.TabIndex = 8;
94 | this.label3.Text = "Sex:";
95 | //
96 | // btnSaveMorphPreset
97 | //
98 | this.btnSaveMorphPreset.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
99 | this.btnSaveMorphPreset.ForeColor = System.Drawing.SystemColors.ControlText;
100 | this.btnSaveMorphPreset.Location = new System.Drawing.Point(6, 158);
101 | this.btnSaveMorphPreset.Name = "btnSaveMorphPreset";
102 | this.btnSaveMorphPreset.Size = new System.Drawing.Size(293, 51);
103 | this.btnSaveMorphPreset.TabIndex = 7;
104 | this.btnSaveMorphPreset.Text = "Save Morph Preset";
105 | this.btnSaveMorphPreset.UseVisualStyleBackColor = true;
106 | this.btnSaveMorphPreset.Click += new System.EventHandler(this.btnSaveMorphPreset_Click);
107 | //
108 | // comboSex
109 | //
110 | this.comboSex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
111 | this.comboSex.FormattingEnabled = true;
112 | this.comboSex.Location = new System.Drawing.Point(108, 19);
113 | this.comboSex.Name = "comboSex";
114 | this.comboSex.Size = new System.Drawing.Size(121, 23);
115 | this.comboSex.TabIndex = 4;
116 | //
117 | // label2
118 | //
119 | this.label2.AutoSize = true;
120 | this.label2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
121 | this.label2.Location = new System.Drawing.Point(12, 96);
122 | this.label2.Name = "label2";
123 | this.label2.Size = new System.Drawing.Size(90, 17);
124 | this.label2.TabIndex = 4;
125 | this.label2.Text = "Preset Name:";
126 | //
127 | // label1
128 | //
129 | this.label1.AutoSize = true;
130 | this.label1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
131 | this.label1.Location = new System.Drawing.Point(6, 58);
132 | this.label1.Name = "label1";
133 | this.label1.Size = new System.Drawing.Size(96, 17);
134 | this.label1.TabIndex = 3;
135 | this.label1.Text = "Default Value:";
136 | //
137 | // txtDefaultMorphValue
138 | //
139 | this.txtDefaultMorphValue.Location = new System.Drawing.Point(108, 52);
140 | this.txtDefaultMorphValue.Name = "txtDefaultMorphValue";
141 | this.txtDefaultMorphValue.Size = new System.Drawing.Size(191, 23);
142 | this.txtDefaultMorphValue.TabIndex = 2;
143 | //
144 | // cbPreloadMorphs
145 | //
146 | this.cbPreloadMorphs.AutoSize = true;
147 | this.cbPreloadMorphs.Location = new System.Drawing.Point(6, 23);
148 | this.cbPreloadMorphs.Name = "cbPreloadMorphs";
149 | this.cbPreloadMorphs.Size = new System.Drawing.Size(217, 19);
150 | this.cbPreloadMorphs.TabIndex = 3;
151 | this.cbPreloadMorphs.Text = "Show Only vars with PreloadMorphs";
152 | this.cbPreloadMorphs.UseVisualStyleBackColor = true;
153 | this.cbPreloadMorphs.CheckedChanged += new System.EventHandler(this.cbPreloadMorphs_CheckedChanged);
154 | //
155 | // gbMorphvars
156 | //
157 | this.gbMorphvars.Controls.Add(this.clbMorphvars);
158 | this.gbMorphvars.Location = new System.Drawing.Point(323, 119);
159 | this.gbMorphvars.Name = "gbMorphvars";
160 | this.gbMorphvars.Size = new System.Drawing.Size(391, 483);
161 | this.gbMorphvars.TabIndex = 4;
162 | this.gbMorphvars.TabStop = false;
163 | this.gbMorphvars.Text = "Choose vars to include in Morph Preset";
164 | //
165 | // gbFilters
166 | //
167 | this.gbFilters.Controls.Add(this.cbSortNumMorphs);
168 | this.gbFilters.Controls.Add(this.txtNameFilter);
169 | this.gbFilters.Controls.Add(this.cbPreloadMorphs);
170 | this.gbFilters.Location = new System.Drawing.Point(323, 12);
171 | this.gbFilters.Name = "gbFilters";
172 | this.gbFilters.Size = new System.Drawing.Size(391, 101);
173 | this.gbFilters.TabIndex = 5;
174 | this.gbFilters.TabStop = false;
175 | this.gbFilters.Text = "Filters";
176 | //
177 | // cbSortNumMorphs
178 | //
179 | this.cbSortNumMorphs.AutoSize = true;
180 | this.cbSortNumMorphs.Location = new System.Drawing.Point(6, 47);
181 | this.cbSortNumMorphs.Name = "cbSortNumMorphs";
182 | this.cbSortNumMorphs.Size = new System.Drawing.Size(168, 19);
183 | this.cbSortNumMorphs.TabIndex = 4;
184 | this.cbSortNumMorphs.Text = "Sort by Number of Morphs";
185 | this.cbSortNumMorphs.UseVisualStyleBackColor = true;
186 | this.cbSortNumMorphs.CheckedChanged += new System.EventHandler(this.cbSortNumMorphs_CheckedChanged);
187 | //
188 | // txtNameFilter
189 | //
190 | this.txtNameFilter.Location = new System.Drawing.Point(6, 72);
191 | this.txtNameFilter.Name = "txtNameFilter";
192 | this.txtNameFilter.Size = new System.Drawing.Size(379, 23);
193 | this.txtNameFilter.TabIndex = 0;
194 | this.txtNameFilter.TextChanged += new System.EventHandler(this.txtNameFilter_TextChanged);
195 | //
196 | // btnReturnToVM
197 | //
198 | this.btnReturnToVM.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
199 | this.btnReturnToVM.ForeColor = System.Drawing.Color.DarkRed;
200 | this.btnReturnToVM.Location = new System.Drawing.Point(18, 545);
201 | this.btnReturnToVM.Name = "btnReturnToVM";
202 | this.btnReturnToVM.Size = new System.Drawing.Size(293, 51);
203 | this.btnReturnToVM.TabIndex = 12;
204 | this.btnReturnToVM.Text = "Return to VAR Manager";
205 | this.btnReturnToVM.UseVisualStyleBackColor = true;
206 | this.btnReturnToVM.Click += new System.EventHandler(this.btnReturnToVM_Click);
207 | //
208 | // cbOverlayPreset
209 | //
210 | this.cbOverlayPreset.AutoSize = true;
211 | this.cbOverlayPreset.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
212 | this.cbOverlayPreset.Location = new System.Drawing.Point(6, 129);
213 | this.cbOverlayPreset.Name = "cbOverlayPreset";
214 | this.cbOverlayPreset.Size = new System.Drawing.Size(116, 21);
215 | this.cbOverlayPreset.TabIndex = 5;
216 | this.cbOverlayPreset.Text = "Overlay Preset";
217 | this.cbOverlayPreset.UseVisualStyleBackColor = true;
218 | //
219 | // frmMorphPresetMaker
220 | //
221 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
222 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
223 | this.ClientSize = new System.Drawing.Size(726, 614);
224 | this.Controls.Add(this.btnReturnToVM);
225 | this.Controls.Add(this.gbFilters);
226 | this.Controls.Add(this.gbMorphvars);
227 | this.Controls.Add(this.groupBox1);
228 | this.MaximizeBox = false;
229 | this.MinimizeBox = false;
230 | this.Name = "frmMorphPresetMaker";
231 | this.ShowIcon = false;
232 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
233 | this.Text = "Morph Preset Maker";
234 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMorphPresetMaker_FormClosing);
235 | this.groupBox1.ResumeLayout(false);
236 | this.groupBox1.PerformLayout();
237 | this.gbMorphvars.ResumeLayout(false);
238 | this.gbFilters.ResumeLayout(false);
239 | this.gbFilters.PerformLayout();
240 | this.ResumeLayout(false);
241 |
242 | }
243 |
244 | #endregion
245 |
246 | private System.Windows.Forms.CheckedListBox clbMorphvars;
247 | private System.Windows.Forms.TextBox txtPresetName;
248 | private System.Windows.Forms.GroupBox groupBox1;
249 | private System.Windows.Forms.Label label2;
250 | private System.Windows.Forms.Label label1;
251 | private System.Windows.Forms.TextBox txtDefaultMorphValue;
252 | private System.Windows.Forms.CheckBox cbPreloadMorphs;
253 | private System.Windows.Forms.GroupBox gbMorphvars;
254 | private System.Windows.Forms.GroupBox gbFilters;
255 | private System.Windows.Forms.TextBox txtNameFilter;
256 | private System.Windows.Forms.Button btnReturnToVM;
257 | private System.Windows.Forms.Button btnSaveMorphPreset;
258 | private System.Windows.Forms.ComboBox comboSex;
259 | private System.Windows.Forms.Label label3;
260 | private System.Windows.Forms.CheckBox cbSortNumMorphs;
261 | private System.Windows.Forms.SaveFileDialog sfdMorphPreset;
262 | private System.Windows.Forms.CheckBox cbOverlayPreset;
263 | }
264 | }
--------------------------------------------------------------------------------
/VAMvarmanager/frmMorphPresetMaker.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.IO;
7 | using System.IO.Compression;
8 | using System.Linq;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace VAMvarmanager
14 | {
15 |
16 | public partial class frmMorphPresetMaker : Form
17 | {
18 | private frmVARManager _frmVM;
19 | private List _lstMorphVars;
20 | private List _lstSelectedVars;
21 |
22 | public frmMorphPresetMaker(frmVARManager frmVM)
23 | {
24 | InitializeComponent();
25 | _frmVM = frmVM;
26 |
27 | txtDefaultMorphValue.Text = "0.001";
28 |
29 | _lstMorphVars = _frmVM.vm.GetMorphVars();
30 |
31 | _lstSelectedVars = new List();
32 |
33 | this.clbMorphvars.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbMorphvars_ItemCheck);
34 |
35 | comboSex.Items.Clear();
36 | comboSex.Items.Add("female");
37 | comboSex.Items.Add("male");
38 | comboSex.SelectedIndex = 0;
39 | clbMorphvars.Items.Clear();
40 |
41 | foreach(var vf in _lstMorphVars)
42 | {
43 | if (vf.unpacked == false)
44 | {
45 | clbMorphvars.Items.Add(vf.fi.Name + "|" + vf.countMorphs + " Morphs".ToString(), false);
46 | }
47 | else
48 | {
49 | clbMorphvars.Items.Add(vf.di.Name + "|" + vf.countMorphs + " Morphs".ToString(), false);
50 | }
51 | }
52 |
53 | }
54 |
55 | private void clbMorphvars_ItemCheck(Object sender, ItemCheckEventArgs e)
56 | {
57 | if (e.NewValue == CheckState.Checked)
58 | {
59 | if (!_lstSelectedVars.Contains(clbMorphvars.GetItemText(clbMorphvars.Items[e.Index]).Split("|")[0]))
60 | {
61 | _lstSelectedVars.Add(clbMorphvars.GetItemText(clbMorphvars.Items[e.Index]).Split("|")[0]);
62 | }
63 | }
64 | else
65 | {
66 | if (_lstSelectedVars.Contains(clbMorphvars.GetItemText(clbMorphvars.Items[e.Index]).Split("|")[0]))
67 | {
68 | _lstSelectedVars.Remove(clbMorphvars.GetItemText(clbMorphvars.Items[e.Index]).Split("|")[0]);
69 | }
70 | }
71 | }
72 | private void txtNameFilter_TextChanged(object sender, EventArgs e)
73 | {
74 | clbFilter(ref clbMorphvars);
75 | }
76 |
77 | private void cbPreloadMorphs_CheckedChanged(object sender, EventArgs e)
78 | {
79 | clbFilter(ref clbMorphvars);
80 |
81 | }
82 |
83 | private void cbSortNumMorphs_CheckedChanged(object sender, EventArgs e)
84 | {
85 | clbFilter(ref clbMorphvars);
86 |
87 | }
88 |
89 | private void clbFilter(ref CheckedListBox clb)
90 | {
91 | IEnumerable itemsNeeded;
92 |
93 | if (cbSortNumMorphs.Checked)
94 | {
95 | itemsNeeded = from vf in _lstMorphVars
96 | where (cbPreloadMorphs.CheckState == CheckState.Checked ? vf.boolPreloadMorphs == true : 1 == 1) && (txtNameFilter.Text != "" ? vf.fi.Name.Contains(txtNameFilter.Text, StringComparison.OrdinalIgnoreCase) : 1 == 1)
97 | orderby vf.countMorphs descending
98 | select (vf.unpacked == false ? vf.fi.Name : vf.di.Name) + "|" + vf.countMorphs + " Morphs".ToString();
99 | }
100 | else
101 | {
102 | itemsNeeded = from vf in _lstMorphVars
103 | where (cbPreloadMorphs.CheckState == CheckState.Checked ? vf.boolPreloadMorphs == true : 1 == 1) && (txtNameFilter.Text != "" ? vf.fi.Name.Contains(txtNameFilter.Text, StringComparison.OrdinalIgnoreCase) : 1 == 1)
104 | orderby (vf.unpacked == false ? vf.fi.Name : vf.di.Name)
105 | select (vf.unpacked == false ? vf.fi.Name : vf.di.Name) + "|" + vf.countMorphs + " Morphs".ToString();
106 | }
107 |
108 | clb.Items.Clear();
109 |
110 | foreach (var i in itemsNeeded)
111 | {
112 | if (_lstSelectedVars != null)
113 | {
114 | if (_lstSelectedVars.Contains(i.Split("|")[0])) { clb.Items.Add(i, true); }
115 | else { clb.Items.Add(i, false); }
116 | }
117 | else { clb.Items.Add(i, false); }
118 | }
119 |
120 | }
121 |
122 | private void btnSaveMorphPreset_Click(object sender, EventArgs e)
123 | {
124 | if(double.TryParse(txtDefaultMorphValue.Text, out double number1))
125 | {
126 | Cursor = Cursors.WaitCursor;
127 |
128 | string strPresetFileName;
129 | this.sfdMorphPreset = new SaveFileDialog();
130 | sfdMorphPreset.InitialDirectory = _frmVM._strVamdir + @"\Custom\Atom\Person\Morphs";
131 | sfdMorphPreset.FileName = "Preset_" + txtPresetName.Text;
132 | sfdMorphPreset.DefaultExt = "vap";
133 | sfdMorphPreset.AddExtension = true;
134 | sfdMorphPreset.ShowDialog();
135 |
136 | strPresetFileName = sfdMorphPreset.FileName;
137 |
138 | if (strPresetFileName != null)
139 | {
140 | if (!strPresetFileName.EndsWith(".vap"))
141 | {
142 | strPresetFileName = strPresetFileName + ".vap";
143 |
144 | }
145 | }
146 |
147 | saveMorphPreset(strPresetFileName, txtDefaultMorphValue.Text);
148 |
149 | Cursor = Cursors.Default;
150 | }
151 | else
152 | {
153 | MessageBox.Show("Invalid Default Morph Value", "Invalid Default Morph Value", MessageBoxButtons.OK, MessageBoxIcon.Warning);
154 | }
155 | }
156 |
157 | private void saveMorphPreset(string strFileName, string strDefaultValue)
158 | {
159 | ZipArchive zipVar;
160 | DirectoryInfo diFolder = new DirectoryInfo(_frmVM._strVamdir + @"\AddonPackages");
161 | bool boolfirst = true;
162 | StreamReader srVmi;
163 | string strLine;
164 | string strVmiPath;
165 | var strDisplayName = default(string);
166 | string strMorphPresetText;
167 | string strMorphSexLookup = comboSex.Text == "female" ? "custom/atom/person/morphs/female" : "custom/atom/person/morphs/male";
168 |
169 | if(cbOverlayPreset.Checked)
170 | strMorphPresetText = "{ " + Environment.NewLine + " \"setUnlistedParamsToDefault\" : \"false\", " + Environment.NewLine + " \"storables\" : [ " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\", " + Environment.NewLine + " \"morphs\" : [ ";
171 | else
172 | strMorphPresetText = "{ " + Environment.NewLine + " \"setUnlistedParamsToDefault\" : \"true\", " + Environment.NewLine + " \"storables\" : [ " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\", " + Environment.NewLine + " \"morphs\" : [ ";
173 |
174 | var selectedVars = from vf in _lstMorphVars
175 | where _lstSelectedVars.Contains((vf.unpacked == false ? vf.fi.Name : vf.di.Name))
176 | select vf;
177 |
178 | foreach (var vf in selectedVars)
179 | {
180 | if(vf.unpacked == false)
181 | {
182 | zipVar = ZipFile.Open(vf.fi.FullName, ZipArchiveMode.Read);
183 |
184 | // Read morphs
185 | foreach (ZipArchiveEntry e in zipVar.Entries)
186 | {
187 | if (e.FullName.IndexOf(strMorphSexLookup, 0, StringComparison.CurrentCultureIgnoreCase) > -1 & e.FullName.EndsWith(".vmi"))
188 | {
189 | strVmiPath = vf.Name + "." + vf.version + ":/" + e.FullName;
190 | srVmi = new StreamReader(e.Open());
191 | strLine = srVmi.ReadLine();
192 | while (!srVmi.EndOfStream)
193 | {
194 | if (strLine.ToLower().Contains("displayname"))
195 | {
196 | strDisplayName = strLine.Replace("displayName", "");
197 | strDisplayName = strDisplayName.Replace("displayname", "");
198 | strDisplayName = strDisplayName.Replace("\":", "\"");
199 | strDisplayName = strDisplayName.Replace("\" :", "\"");
200 | strDisplayName = strDisplayName.Replace("\",", "\"");
201 | strDisplayName = strDisplayName.Replace("\"", "");
202 | strDisplayName = strDisplayName.Trim();
203 | break;
204 | }
205 |
206 | strLine = srVmi.ReadLine();
207 | }
208 |
209 | srVmi.Close();
210 | if (boolfirst)
211 | {
212 | boolfirst = false;
213 | strMorphPresetText += Environment.NewLine;
214 | }
215 | else
216 | {
217 | strMorphPresetText += ", " + Environment.NewLine;
218 | }
219 |
220 | strMorphPresetText += " { " + Environment.NewLine;
221 | strMorphPresetText += " \"uid\" : \"" + strVmiPath + "\", " + Environment.NewLine;
222 | strMorphPresetText += " \"name\" : \"" + strDisplayName + "\", " + Environment.NewLine;
223 | strMorphPresetText += " \"value\" : \"" + strDefaultValue + "\"" + Environment.NewLine;
224 | strMorphPresetText += " }";
225 | }
226 | }
227 | }
228 | else
229 | {
230 | // Read morphs
231 | foreach (FileInfo e in vf.di.GetFiles("*.*",SearchOption.AllDirectories))
232 | {
233 | if (e.FullName.IndexOf(strMorphSexLookup.Replace("/",@"\"), 0, StringComparison.CurrentCultureIgnoreCase) > -1 & e.FullName.EndsWith(".vmi"))
234 | {
235 | strVmiPath = vf.Name + "." + vf.version + ":/" + e.FullName.Replace(vf.di.FullName + @"\", "").Replace(@"\","/");
236 | srVmi = new StreamReader(e.FullName);
237 | strLine = srVmi.ReadLine();
238 | while (!srVmi.EndOfStream)
239 | {
240 | if (strLine.ToLower().Contains("displayname"))
241 | {
242 | strDisplayName = strLine.Replace("displayName", "");
243 | strDisplayName = strDisplayName.Replace("displayname", "");
244 | strDisplayName = strDisplayName.Replace("\":", "\"");
245 | strDisplayName = strDisplayName.Replace("\" :", "\"");
246 | strDisplayName = strDisplayName.Replace("\",", "\"");
247 | strDisplayName = strDisplayName.Replace("\"", "");
248 | strDisplayName = strDisplayName.Trim();
249 | break;
250 | }
251 |
252 | strLine = srVmi.ReadLine();
253 | }
254 |
255 | srVmi.Close();
256 | if (boolfirst)
257 | {
258 | boolfirst = false;
259 | strMorphPresetText += Environment.NewLine;
260 | }
261 | else
262 | {
263 | strMorphPresetText += ", " + Environment.NewLine;
264 | }
265 |
266 | strMorphPresetText += " { " + Environment.NewLine;
267 | strMorphPresetText += " \"uid\" : \"" + strVmiPath + "\", " + Environment.NewLine;
268 | strMorphPresetText += " \"name\" : \"" + strDisplayName + "\", " + Environment.NewLine;
269 | strMorphPresetText += " \"value\" : \"" + strDefaultValue + "\"" + Environment.NewLine;
270 | strMorphPresetText += " }";
271 | }
272 | }
273 | }
274 | }
275 |
276 | if (cbOverlayPreset.Checked)
277 | strMorphPresetText += Environment.NewLine + " ]" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\"" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\"" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\"" + Environment.NewLine + " }" + Environment.NewLine + " ]" + Environment.NewLine + "}";
278 | else
279 | strMorphPresetText += Environment.NewLine + " ]" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\"" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\", " + Environment.NewLine + " \"useMaleMorphsOnFemale\" : \"false\"" + Environment.NewLine + " }, " + Environment.NewLine + " { " + Environment.NewLine + " \"id\" : \"geometry\", " + Environment.NewLine + " \"useFemaleMorphsOnMale\" : \"false\"" + Environment.NewLine + " }" + Environment.NewLine + " ]" + Environment.NewLine + "}";
280 |
281 | // Write to preset file
282 | File.WriteAllText(strFileName, strMorphPresetText);
283 | }
284 |
285 | private void btnReturnToVM_Click(object sender, EventArgs e)
286 | {
287 | _frmVM.Show();
288 | this.Close();
289 | }
290 |
291 | private void frmMorphPresetMaker_FormClosing(object sender, FormClosingEventArgs e)
292 | {
293 | this.Hide();
294 | _frmVM.Show();
295 | }
296 | }
297 | }
298 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmDuplicateItemManager.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace VAMvarmanager
2 | {
3 | partial class frmDuplicateItemManager
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.clbDuplicatesManual = new System.Windows.Forms.CheckedListBox();
33 | this.comboSex = new System.Windows.Forms.ComboBox();
34 | this.comboType = new System.Windows.Forms.ComboBox();
35 | this.btnFindDuplicates = new System.Windows.Forms.Button();
36 | this.label1 = new System.Windows.Forms.Label();
37 | this.label2 = new System.Windows.Forms.Label();
38 | this.txtCreatorName = new System.Windows.Forms.TextBox();
39 | this.txtItemName = new System.Windows.Forms.TextBox();
40 | this.gbManualResolve = new System.Windows.Forms.GroupBox();
41 | this.cbSetMasterItem = new System.Windows.Forms.CheckBox();
42 | this.lblDuplicateManualCount = new System.Windows.Forms.Label();
43 | this.label5 = new System.Windows.Forms.Label();
44 | this.cbSetMasterAll = new System.Windows.Forms.CheckBox();
45 | this.label4 = new System.Windows.Forms.Label();
46 | this.label3 = new System.Windows.Forms.Label();
47 | this.gbConfig = new System.Windows.Forms.GroupBox();
48 | this.btnClearMasterLists = new System.Windows.Forms.Button();
49 | this.toolTipMasterVars = new System.Windows.Forms.ToolTip(this.components);
50 | this.gbDisable = new System.Windows.Forms.GroupBox();
51 | this.lblDuplicatesTotal = new System.Windows.Forms.Label();
52 | this.lblDuplicatesUnique = new System.Windows.Forms.Label();
53 | this.btnDisableDuplicates = new System.Windows.Forms.Button();
54 | this.btnReturnToVM = new System.Windows.Forms.Button();
55 | this.btnSkipItem = new System.Windows.Forms.Button();
56 | this.gbManualResolve.SuspendLayout();
57 | this.gbConfig.SuspendLayout();
58 | this.gbDisable.SuspendLayout();
59 | this.SuspendLayout();
60 | //
61 | // clbDuplicatesManual
62 | //
63 | this.clbDuplicatesManual.CheckOnClick = true;
64 | this.clbDuplicatesManual.FormattingEnabled = true;
65 | this.clbDuplicatesManual.Location = new System.Drawing.Point(6, 186);
66 | this.clbDuplicatesManual.Name = "clbDuplicatesManual";
67 | this.clbDuplicatesManual.Size = new System.Drawing.Size(392, 184);
68 | this.clbDuplicatesManual.TabIndex = 0;
69 | this.clbDuplicatesManual.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbDuplicatesManual_ItemCheck);
70 | //
71 | // comboSex
72 | //
73 | this.comboSex.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
74 | this.comboSex.FormattingEnabled = true;
75 | this.comboSex.Location = new System.Drawing.Point(150, 43);
76 | this.comboSex.Name = "comboSex";
77 | this.comboSex.Size = new System.Drawing.Size(121, 23);
78 | this.comboSex.TabIndex = 1;
79 | //
80 | // comboType
81 | //
82 | this.comboType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
83 | this.comboType.FormattingEnabled = true;
84 | this.comboType.Location = new System.Drawing.Point(6, 43);
85 | this.comboType.Name = "comboType";
86 | this.comboType.Size = new System.Drawing.Size(121, 23);
87 | this.comboType.TabIndex = 2;
88 | //
89 | // btnFindDuplicates
90 | //
91 | this.btnFindDuplicates.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
92 | this.btnFindDuplicates.Location = new System.Drawing.Point(6, 72);
93 | this.btnFindDuplicates.Name = "btnFindDuplicates";
94 | this.btnFindDuplicates.Size = new System.Drawing.Size(265, 51);
95 | this.btnFindDuplicates.TabIndex = 3;
96 | this.btnFindDuplicates.Text = "Find Duplicates";
97 | this.btnFindDuplicates.UseVisualStyleBackColor = true;
98 | this.btnFindDuplicates.Click += new System.EventHandler(this.btnFindDuplicates_Click);
99 | //
100 | // label1
101 | //
102 | this.label1.AutoSize = true;
103 | this.label1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
104 | this.label1.Location = new System.Drawing.Point(6, 19);
105 | this.label1.Name = "label1";
106 | this.label1.Size = new System.Drawing.Size(85, 21);
107 | this.label1.TabIndex = 4;
108 | this.label1.Text = "Item Type";
109 | //
110 | // label2
111 | //
112 | this.label2.AutoSize = true;
113 | this.label2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
114 | this.label2.Location = new System.Drawing.Point(150, 19);
115 | this.label2.Name = "label2";
116 | this.label2.Size = new System.Drawing.Size(37, 21);
117 | this.label2.TabIndex = 5;
118 | this.label2.Text = "Sex";
119 | //
120 | // txtCreatorName
121 | //
122 | this.txtCreatorName.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
123 | this.txtCreatorName.Location = new System.Drawing.Point(120, 40);
124 | this.txtCreatorName.Name = "txtCreatorName";
125 | this.txtCreatorName.Size = new System.Drawing.Size(276, 25);
126 | this.txtCreatorName.TabIndex = 6;
127 | //
128 | // txtItemName
129 | //
130 | this.txtItemName.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
131 | this.txtItemName.Location = new System.Drawing.Point(120, 71);
132 | this.txtItemName.Name = "txtItemName";
133 | this.txtItemName.Size = new System.Drawing.Size(276, 25);
134 | this.txtItemName.TabIndex = 7;
135 | //
136 | // gbManualResolve
137 | //
138 | this.gbManualResolve.Controls.Add(this.btnSkipItem);
139 | this.gbManualResolve.Controls.Add(this.cbSetMasterItem);
140 | this.gbManualResolve.Controls.Add(this.lblDuplicateManualCount);
141 | this.gbManualResolve.Controls.Add(this.label5);
142 | this.gbManualResolve.Controls.Add(this.cbSetMasterAll);
143 | this.gbManualResolve.Controls.Add(this.label4);
144 | this.gbManualResolve.Controls.Add(this.label3);
145 | this.gbManualResolve.Controls.Add(this.clbDuplicatesManual);
146 | this.gbManualResolve.Controls.Add(this.txtCreatorName);
147 | this.gbManualResolve.Controls.Add(this.txtItemName);
148 | this.gbManualResolve.Enabled = false;
149 | this.gbManualResolve.Location = new System.Drawing.Point(295, 12);
150 | this.gbManualResolve.Name = "gbManualResolve";
151 | this.gbManualResolve.Size = new System.Drawing.Size(403, 379);
152 | this.gbManualResolve.TabIndex = 8;
153 | this.gbManualResolve.TabStop = false;
154 | this.gbManualResolve.Text = "Manual Duplicate Resolving";
155 | //
156 | // cbSetMasterItem
157 | //
158 | this.cbSetMasterItem.AutoSize = true;
159 | this.cbSetMasterItem.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
160 | this.cbSetMasterItem.ForeColor = System.Drawing.Color.DarkMagenta;
161 | this.cbSetMasterItem.Location = new System.Drawing.Point(6, 109);
162 | this.cbSetMasterItem.Name = "cbSetMasterItem";
163 | this.cbSetMasterItem.Size = new System.Drawing.Size(281, 25);
164 | this.cbSetMasterItem.TabIndex = 11;
165 | this.cbSetMasterItem.Text = "Set var as Master for current item";
166 | this.cbSetMasterItem.UseVisualStyleBackColor = true;
167 | this.cbSetMasterItem.CheckStateChanged += new System.EventHandler(this.cbSetMasterItem_CheckStateChanged);
168 | this.cbSetMasterItem.MouseHover += new System.EventHandler(this.cbSetMasterItem_MouseHover);
169 | //
170 | // lblDuplicateManualCount
171 | //
172 | this.lblDuplicateManualCount.AutoSize = true;
173 | this.lblDuplicateManualCount.Font = new System.Drawing.Font("Segoe UI", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point);
174 | this.lblDuplicateManualCount.ForeColor = System.Drawing.Color.Green;
175 | this.lblDuplicateManualCount.Location = new System.Drawing.Point(6, 19);
176 | this.lblDuplicateManualCount.Name = "lblDuplicateManualCount";
177 | this.lblDuplicateManualCount.Size = new System.Drawing.Size(89, 21);
178 | this.lblDuplicateManualCount.TabIndex = 10;
179 | this.lblDuplicateManualCount.Text = "Item 1 of 5";
180 | //
181 | // label5
182 | //
183 | this.label5.AutoSize = true;
184 | this.label5.Location = new System.Drawing.Point(0, 168);
185 | this.label5.Name = "label5";
186 | this.label5.Size = new System.Drawing.Size(352, 15);
187 | this.label5.TabIndex = 10;
188 | this.label5.Text = "Click on var to keep enabled for selected item (others will disable)";
189 | //
190 | // cbSetMasterAll
191 | //
192 | this.cbSetMasterAll.AutoSize = true;
193 | this.cbSetMasterAll.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
194 | this.cbSetMasterAll.ForeColor = System.Drawing.Color.DarkRed;
195 | this.cbSetMasterAll.Location = new System.Drawing.Point(6, 140);
196 | this.cbSetMasterAll.Name = "cbSetMasterAll";
197 | this.cbSetMasterAll.Size = new System.Drawing.Size(278, 25);
198 | this.cbSetMasterAll.TabIndex = 10;
199 | this.cbSetMasterAll.Text = "Set var as Master for all it\'s items";
200 | this.cbSetMasterAll.UseVisualStyleBackColor = true;
201 | this.cbSetMasterAll.CheckStateChanged += new System.EventHandler(this.cbSetMasterAll_CheckStateChanged);
202 | this.cbSetMasterAll.MouseHover += new System.EventHandler(this.cbSetMasterAll_MouseHover);
203 | //
204 | // label4
205 | //
206 | this.label4.AutoSize = true;
207 | this.label4.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
208 | this.label4.Location = new System.Drawing.Point(15, 75);
209 | this.label4.Name = "label4";
210 | this.label4.Size = new System.Drawing.Size(99, 21);
211 | this.label4.TabIndex = 9;
212 | this.label4.Text = "Item Name:";
213 | //
214 | // label3
215 | //
216 | this.label3.AutoSize = true;
217 | this.label3.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
218 | this.label3.Location = new System.Drawing.Point(4, 44);
219 | this.label3.Name = "label3";
220 | this.label3.Size = new System.Drawing.Size(110, 21);
221 | this.label3.TabIndex = 8;
222 | this.label3.Text = "Item Creator:";
223 | //
224 | // gbConfig
225 | //
226 | this.gbConfig.Controls.Add(this.btnClearMasterLists);
227 | this.gbConfig.Controls.Add(this.label1);
228 | this.gbConfig.Controls.Add(this.comboType);
229 | this.gbConfig.Controls.Add(this.btnFindDuplicates);
230 | this.gbConfig.Controls.Add(this.label2);
231 | this.gbConfig.Controls.Add(this.comboSex);
232 | this.gbConfig.Location = new System.Drawing.Point(12, 12);
233 | this.gbConfig.Name = "gbConfig";
234 | this.gbConfig.Size = new System.Drawing.Size(277, 175);
235 | this.gbConfig.TabIndex = 9;
236 | this.gbConfig.TabStop = false;
237 | this.gbConfig.Text = "Config";
238 | //
239 | // btnClearMasterLists
240 | //
241 | this.btnClearMasterLists.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point);
242 | this.btnClearMasterLists.ForeColor = System.Drawing.Color.DarkRed;
243 | this.btnClearMasterLists.Location = new System.Drawing.Point(6, 129);
244 | this.btnClearMasterLists.Name = "btnClearMasterLists";
245 | this.btnClearMasterLists.Size = new System.Drawing.Size(265, 36);
246 | this.btnClearMasterLists.TabIndex = 6;
247 | this.btnClearMasterLists.Text = "Clear Saved Master Lists";
248 | this.btnClearMasterLists.UseVisualStyleBackColor = true;
249 | this.btnClearMasterLists.Click += new System.EventHandler(this.btnClearMasterLists_Click);
250 | //
251 | // gbDisable
252 | //
253 | this.gbDisable.Controls.Add(this.lblDuplicatesTotal);
254 | this.gbDisable.Controls.Add(this.lblDuplicatesUnique);
255 | this.gbDisable.Controls.Add(this.btnDisableDuplicates);
256 | this.gbDisable.Location = new System.Drawing.Point(12, 193);
257 | this.gbDisable.Name = "gbDisable";
258 | this.gbDisable.Size = new System.Drawing.Size(277, 128);
259 | this.gbDisable.TabIndex = 10;
260 | this.gbDisable.TabStop = false;
261 | this.gbDisable.Text = "Disable Duplicates";
262 | //
263 | // lblDuplicatesTotal
264 | //
265 | this.lblDuplicatesTotal.AutoSize = true;
266 | this.lblDuplicatesTotal.Font = new System.Drawing.Font("Segoe UI", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point);
267 | this.lblDuplicatesTotal.ForeColor = System.Drawing.Color.MediumBlue;
268 | this.lblDuplicatesTotal.Location = new System.Drawing.Point(6, 40);
269 | this.lblDuplicatesTotal.Name = "lblDuplicatesTotal";
270 | this.lblDuplicatesTotal.Size = new System.Drawing.Size(199, 21);
271 | this.lblDuplicatesTotal.TabIndex = 13;
272 | this.lblDuplicatesTotal.Text = "500 Total Duplicate Items";
273 | //
274 | // lblDuplicatesUnique
275 | //
276 | this.lblDuplicatesUnique.AutoSize = true;
277 | this.lblDuplicatesUnique.Font = new System.Drawing.Font("Segoe UI", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point);
278 | this.lblDuplicatesUnique.ForeColor = System.Drawing.Color.MediumBlue;
279 | this.lblDuplicatesUnique.Location = new System.Drawing.Point(6, 19);
280 | this.lblDuplicatesUnique.Name = "lblDuplicatesUnique";
281 | this.lblDuplicatesUnique.Size = new System.Drawing.Size(140, 21);
282 | this.lblDuplicatesUnique.TabIndex = 12;
283 | this.lblDuplicatesUnique.Text = "500 Unique Items";
284 | //
285 | // btnDisableDuplicates
286 | //
287 | this.btnDisableDuplicates.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
288 | this.btnDisableDuplicates.ForeColor = System.Drawing.SystemColors.ControlText;
289 | this.btnDisableDuplicates.Location = new System.Drawing.Point(6, 65);
290 | this.btnDisableDuplicates.Name = "btnDisableDuplicates";
291 | this.btnDisableDuplicates.Size = new System.Drawing.Size(265, 51);
292 | this.btnDisableDuplicates.TabIndex = 6;
293 | this.btnDisableDuplicates.Text = "Disable Duplicates";
294 | this.btnDisableDuplicates.UseVisualStyleBackColor = true;
295 | this.btnDisableDuplicates.Click += new System.EventHandler(this.btnDisableDuplicates_Click);
296 | //
297 | // btnReturnToVM
298 | //
299 | this.btnReturnToVM.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
300 | this.btnReturnToVM.ForeColor = System.Drawing.Color.DarkRed;
301 | this.btnReturnToVM.Location = new System.Drawing.Point(18, 327);
302 | this.btnReturnToVM.Name = "btnReturnToVM";
303 | this.btnReturnToVM.Size = new System.Drawing.Size(265, 51);
304 | this.btnReturnToVM.TabIndex = 11;
305 | this.btnReturnToVM.Text = "Return to VAR Manager";
306 | this.btnReturnToVM.UseVisualStyleBackColor = true;
307 | this.btnReturnToVM.Click += new System.EventHandler(this.btnReturnToVM_Click);
308 | //
309 | // btnSkipItem
310 | //
311 | this.btnSkipItem.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
312 | this.btnSkipItem.ForeColor = System.Drawing.SystemColors.ControlText;
313 | this.btnSkipItem.Location = new System.Drawing.Point(290, 109);
314 | this.btnSkipItem.Name = "btnSkipItem";
315 | this.btnSkipItem.Size = new System.Drawing.Size(103, 54);
316 | this.btnSkipItem.TabIndex = 12;
317 | this.btnSkipItem.Text = "Skip";
318 | this.btnSkipItem.UseVisualStyleBackColor = true;
319 | this.btnSkipItem.Click += new System.EventHandler(this.btnSkipItem_Click);
320 | //
321 | // frmDuplicateItemManager
322 | //
323 | this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
324 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
325 | this.ClientSize = new System.Drawing.Size(703, 398);
326 | this.Controls.Add(this.btnReturnToVM);
327 | this.Controls.Add(this.gbDisable);
328 | this.Controls.Add(this.gbConfig);
329 | this.Controls.Add(this.gbManualResolve);
330 | this.MaximizeBox = false;
331 | this.MinimizeBox = false;
332 | this.Name = "frmDuplicateItemManager";
333 | this.ShowIcon = false;
334 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
335 | this.Text = "Duplicate Item Resolver";
336 | this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmDuplicateItemManager_FormClosing);
337 | this.gbManualResolve.ResumeLayout(false);
338 | this.gbManualResolve.PerformLayout();
339 | this.gbConfig.ResumeLayout(false);
340 | this.gbConfig.PerformLayout();
341 | this.gbDisable.ResumeLayout(false);
342 | this.gbDisable.PerformLayout();
343 | this.ResumeLayout(false);
344 |
345 | }
346 |
347 | #endregion
348 |
349 | private System.Windows.Forms.CheckedListBox clbDuplicatesManual;
350 | private System.Windows.Forms.ComboBox comboSex;
351 | private System.Windows.Forms.ComboBox comboType;
352 | private System.Windows.Forms.Button btnFindDuplicates;
353 | private System.Windows.Forms.Label label1;
354 | private System.Windows.Forms.Label label2;
355 | private System.Windows.Forms.TextBox txtCreatorName;
356 | private System.Windows.Forms.TextBox txtItemName;
357 | private System.Windows.Forms.GroupBox gbManualResolve;
358 | private System.Windows.Forms.Label label4;
359 | private System.Windows.Forms.Label label3;
360 | private System.Windows.Forms.GroupBox gbConfig;
361 | private System.Windows.Forms.Label lblDuplicateManualCount;
362 | private System.Windows.Forms.Label label5;
363 | private System.Windows.Forms.CheckBox cbSetMasterAll;
364 | private System.Windows.Forms.ToolTip toolTipMasterVars;
365 | private System.Windows.Forms.CheckBox cbSetMasterItem;
366 | private System.Windows.Forms.GroupBox gbDisable;
367 | private System.Windows.Forms.Label lblDuplicatesTotal;
368 | private System.Windows.Forms.Label lblDuplicatesUnique;
369 | private System.Windows.Forms.Button btnDisableDuplicates;
370 | private System.Windows.Forms.Button btnReturnToVM;
371 | private System.Windows.Forms.Button btnClearMasterLists;
372 | private System.Windows.Forms.Button btnSkipItem;
373 | }
374 | }
--------------------------------------------------------------------------------
/VAMvarmanager/frmDuplicateItemManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Threading.Tasks;
10 | using System.Windows.Forms;
11 |
12 | namespace VAMvarmanager
13 | {
14 | public partial class frmDuplicateItemManager : Form
15 | {
16 | private frmVARManager _frmVM;
17 | private System.Collections.Specialized.StringCollection _mastervars;
18 | private List _lstmastervars;
19 | private System.Collections.Specialized.StringCollection _masteritems;
20 | private List _lstmasteritems;
21 | private List _lstVirAll;
22 | private List _lstVirManualResolve;
23 | private int _intManualIndex;
24 | private int _intManualTotal;
25 |
26 | public frmDuplicateItemManager(frmVARManager frmVM)
27 | {
28 | InitializeComponent();
29 | _frmVM = frmVM;
30 |
31 | try
32 | {
33 | var mv = (System.Collections.Specialized.StringCollection)Properties.Settings.Default["mastervars"];
34 | if(mv != null)
35 | {
36 | _mastervars = mv;
37 | _lstmastervars = mv.Cast().ToList();
38 |
39 | }
40 | else
41 | {
42 | _mastervars = null;
43 | _lstmastervars = new List();
44 | }
45 | }
46 | catch
47 | {
48 | Properties.Settings.Default["mastervars"] = null;
49 | Properties.Settings.Default.Save();
50 | }
51 |
52 | try
53 | {
54 | var mi = (System.Collections.Specialized.StringCollection)Properties.Settings.Default["masteritems"];
55 | if (mi != null)
56 | {
57 | _masteritems = mi;
58 | _lstmasteritems = mi.Cast().ToList();
59 | }
60 | else
61 | {
62 | _masteritems = null;
63 | _lstmasteritems = new List();
64 | }
65 | }
66 | catch
67 | {
68 | Properties.Settings.Default["masteritems"] = null;
69 | Properties.Settings.Default.Save();
70 | }
71 |
72 | gbManualResolve.Enabled = false;
73 | txtCreatorName.Enabled = false;
74 | txtItemName.Enabled = false;
75 | clbDuplicatesManual.Items.Clear();
76 | clbDuplicatesManual.Enabled = false;
77 | lblDuplicateManualCount.Hide();
78 | lblDuplicateManualCount.Text = "";
79 |
80 | lblDuplicatesUnique.Text = "";
81 | lblDuplicatesUnique.Hide();
82 | lblDuplicatesTotal.Text = "";
83 | lblDuplicatesTotal.Hide();
84 | btnDisableDuplicates.Enabled = false;
85 | gbDisable.Enabled = false;
86 |
87 | comboSex.Items.Clear();
88 | comboSex.Items.Add("female");
89 | comboSex.Items.Add("male");
90 | comboSex.SelectedIndex = 0;
91 | comboType.Items.Clear();
92 | comboType.Items.Add("clothing");
93 | comboType.Items.Add("hair");
94 | comboType.SelectedIndex = 0;
95 | }
96 |
97 | private void frmDuplicateItemManager_FormClosing(object sender, FormClosingEventArgs e)
98 | {
99 | this.Hide();
100 | _frmVM.Show();
101 | }
102 |
103 | private void cbSetMasterAll_MouseHover(object sender, EventArgs e)
104 | {
105 | toolTipMasterVars.Show("Saves setting in VAR Manager to set the selected var below as the master/active item for any duplicates of it's contian items," + Environment.NewLine + "now and for future runs of disable duplicates.", cbSetMasterAll);
106 |
107 | }
108 |
109 | private void cbSetMasterItem_MouseHover(object sender, EventArgs e)
110 | {
111 | toolTipMasterVars.Show("Saves setting in VAR Manager to set the selected below var as the master/active item for the current unique item," + Environment.NewLine + "now and for future runs of disable duplicates.", cbSetMasterItem);
112 | }
113 |
114 | private void btnFindDuplicates_Click(object sender, EventArgs e)
115 | {
116 | Cursor = Cursors.WaitCursor;
117 | _lstVirAll = _frmVM.vm.GetDuplicateItems(comboType.Text, comboSex.Text, _lstmastervars, _lstmasteritems);
118 |
119 | if (_lstVirAll.Any())
120 | {
121 | //Check Master Lists
122 | for(int i = 0; i < _lstVirAll.Count; i++)
123 | {
124 | if (_lstVirAll[i].varItemReplacementType != varmanager.varItemReplacement.DISABLE)
125 | {
126 | foreach (var vir in _lstVirAll[i].lstVi)
127 | {
128 | if (_lstmastervars.Contains(comboType.Text + "|" + comboSex.Text + "|" + vir.var.Name))
129 | {
130 | _lstVirAll[i].mastervar = vir.var.Name;
131 | _lstVirAll[i].varItemReplacementType = varmanager.varItemReplacement.DISABLE;
132 | continue;
133 | }
134 |
135 | foreach (string s in _lstmasteritems)
136 | {
137 | if (s.Split('|')[0] == comboType.Text && s.Split('|')[1] == comboSex.Text && s.Split('|')[3] == _lstVirAll[i].creator && s.Split('|')[4] == _lstVirAll[i].itemname)
138 | {
139 | _lstVirAll[i].mastervar = s.Split('|')[2];
140 | _lstVirAll[i].varItemReplacementType = varmanager.varItemReplacement.DISABLE;
141 | continue;
142 | }
143 | }
144 | }
145 | }
146 | }
147 |
148 | //Check Manual Resolve needed, and then get ready for auto resolve
149 | checkManualResolveNeeded();
150 | }
151 | else
152 | {
153 | //No Duplicates, Congrats!
154 | Cursor = Cursors.Default;
155 | MessageBox.Show("No Duplicates found, well done!", "No Duplicates Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
156 | }
157 | }
158 |
159 | private bool checkManualResolveNeeded()
160 | {
161 | //Same Creator duplicates first
162 | _lstVirManualResolve = (from vir in _lstVirAll
163 | where vir.varItemReplacementType == varmanager.varItemReplacement.SAMECREATOR
164 | select vir).ToList();
165 |
166 | if (_lstVirManualResolve.Any())
167 | {
168 | gbConfig.Enabled = false;
169 | _intManualIndex = 1;
170 | _intManualTotal = _lstVirManualResolve.Count();
171 |
172 | MessageBox.Show(_intManualTotal + " Duplicates where the var creater is the same as the item creator found." + Environment.NewLine + "Resolve manully first before automated duplicate disabling can be run.", "Same Creator duplicates", MessageBoxButtons.OK, MessageBoxIcon.Warning);
173 |
174 | lblDuplicateManualCount.Text = "Item " + _intManualIndex.ToString() + " of " + _intManualTotal.ToString();
175 | lblDuplicateManualCount.Show();
176 |
177 | txtCreatorName.Text = _lstVirManualResolve[0].creator;
178 | txtItemName.Text = _lstVirManualResolve[0].itemname;
179 | clbDuplicatesManual.Items.Clear();
180 |
181 | foreach (var virVar in _lstVirManualResolve[0].lstVi)
182 | {
183 | clbDuplicatesManual.Items.Add(virVar.var.Name, false);
184 | }
185 |
186 | clbDuplicatesManual.Enabled = true;
187 |
188 | gbManualResolve.Enabled = true;
189 |
190 | Cursor = Cursors.Default;
191 |
192 | return true;
193 | }
194 | else
195 | {
196 | _lstVirManualResolve = (from vir in _lstVirAll
197 | where vir.varItemReplacementType == varmanager.varItemReplacement.NOMASTER
198 | select vir).ToList();
199 |
200 | if (_lstVirManualResolve.Any())
201 | {
202 | gbConfig.Enabled = false;
203 | _intManualIndex = 1;
204 | _intManualTotal = _lstVirManualResolve.Count();
205 |
206 | MessageBox.Show(_intManualTotal + " Unresolveable duplicates found." + Environment.NewLine + "Resolve manully first before automated duplicate disabling can be run.", "Unresolveable duplicates", MessageBoxButtons.OK, MessageBoxIcon.Warning);
207 |
208 | lblDuplicateManualCount.Text = "Item " + _intManualIndex.ToString() + " of " + _intManualTotal.ToString();
209 | lblDuplicateManualCount.Show();
210 |
211 | txtCreatorName.Text = _lstVirManualResolve[0].creator;
212 | txtItemName.Text = _lstVirManualResolve[0].itemname;
213 | clbDuplicatesManual.Items.Clear();
214 |
215 | foreach (var virVar in _lstVirManualResolve[0].lstVi)
216 | {
217 | clbDuplicatesManual.Items.Add(virVar.var.Name, false);
218 | }
219 |
220 | clbDuplicatesManual.Enabled = true;
221 |
222 | gbManualResolve.Enabled = true;
223 |
224 | Cursor = Cursors.Default;
225 |
226 | return true;
227 | }
228 | else
229 | {
230 | //No manual duplicates, disable!
231 | lblDuplicatesUnique.Text = _lstVirAll.Select(v => v.creator + "|" + v.itemname).Distinct().Count().ToString() + " Unique Items with Duplicates";
232 | lblDuplicatesUnique.Show();
233 |
234 | int intTotalItems = 0;
235 | foreach(var virMain in _lstVirAll)
236 | {
237 | foreach(var vir in virMain.lstVi)
238 | {
239 | if (vir.var.Name != virMain.mastervar)
240 | {
241 | intTotalItems += 1;
242 | }
243 | }
244 | }
245 |
246 | lblDuplicatesTotal.Text = intTotalItems + " Total Duplicate Items"; ;
247 | lblDuplicatesTotal.Show();
248 | btnDisableDuplicates.Enabled = true;
249 | gbDisable.Enabled = true;
250 |
251 | Cursor = Cursors.Default;
252 |
253 | return false;
254 | }
255 | }
256 |
257 | }
258 |
259 | private void clbDuplicatesManual_ItemCheck(object sender, ItemCheckEventArgs e)
260 | {
261 | this.BeginInvoke(new Action(() =>
262 | {
263 | if(e.NewValue == CheckState.Checked)
264 | {
265 | clbDuplicatesManual.Enabled = false;
266 |
267 | string strMaster = clbDuplicatesManual.Items[e.Index].ToString();
268 |
269 | if(cbSetMasterAll.Checked)
270 | {
271 | if (_mastervars == null) { _mastervars = new System.Collections.Specialized.StringCollection(); }
272 |
273 | _mastervars.Add(comboType.Text + "|" + comboSex.Text + "|" + strMaster);
274 | _lstmastervars.Add(comboType.Text + "|" + comboSex.Text + "|" + strMaster);
275 |
276 | Properties.Settings.Default["mastervars"] = _mastervars;
277 | Properties.Settings.Default.Save();
278 | }
279 | else if (cbSetMasterItem.Checked)
280 | {
281 | if (_masteritems == null) { _masteritems = new System.Collections.Specialized.StringCollection(); }
282 |
283 | _masteritems.Add(comboType.Text + "|" + comboSex.Text + "|" + strMaster + "|" + _lstVirManualResolve[0].creator + "|" + _lstVirManualResolve[0].itemname);
284 | _lstmasteritems.Add(comboType.Text + "|" + comboSex.Text + "|" + strMaster + "|" + _lstVirManualResolve[0].creator + "|" + _lstVirManualResolve[0].itemname);
285 |
286 | Properties.Settings.Default["masteritems"] = _masteritems;
287 | Properties.Settings.Default.Save();
288 | }
289 |
290 | cbSetMasterAll.Checked = false;
291 | cbSetMasterItem.Checked = false;
292 |
293 | //Update main list
294 | for (int i = 0; i < _lstVirAll.Count(); i++)
295 | {
296 | if(_lstVirAll[i].varItemReplacementType != varmanager.varItemReplacement.DISABLE && _lstVirAll[i].creator == _lstVirManualResolve[0].creator && _lstVirAll[i].itemname == _lstVirManualResolve[0].itemname)
297 | {
298 | _lstVirAll[i].mastervar = strMaster;
299 | _lstVirAll[i].varItemReplacementType = varmanager.varItemReplacement.DISABLE;
300 | }
301 | }
302 |
303 | NextManualResolveItem();
304 |
305 | }
306 | }));
307 | }
308 |
309 | private void NextManualResolveItem()
310 | {
311 | _lstVirManualResolve.RemoveAt(0);
312 | _intManualIndex += 1;
313 |
314 | if (_lstVirManualResolve.Any())
315 | {
316 | //Check master lists for var/item and automatically disable
317 | var matchMasterLists = from vir in _lstVirManualResolve[0].lstVi
318 | where _lstmastervars.Contains(comboType.Text + "|" + comboSex.Text + "|" + vir.var.Name) || _lstmasteritems.Contains(comboType.Text + "|" + comboSex.Text + "|" + vir.var.Name + "|" + _lstVirManualResolve[0].creator + "|" + _lstVirManualResolve[0].itemname)
319 | select vir;
320 |
321 | while (matchMasterLists != null && matchMasterLists.Any())
322 | {
323 | //Match found in master lists, update main list
324 | for (int i = 0; i < _lstVirAll.Count(); i++)
325 | {
326 | if (_lstVirAll[i].varItemReplacementType != varmanager.varItemReplacement.DISABLE && _lstVirAll[i].creator == _lstVirManualResolve[0].creator && _lstVirAll[i].itemname == _lstVirManualResolve[0].itemname)
327 | {
328 | _lstVirAll[i].mastervar = matchMasterLists.First().var.Name;
329 | _lstVirAll[i].varItemReplacementType = varmanager.varItemReplacement.DISABLE;
330 | }
331 | }
332 |
333 | _lstVirManualResolve.RemoveAt(0);
334 | _intManualIndex += 1;
335 |
336 | if (_lstVirManualResolve.Any())
337 | {
338 | matchMasterLists = from vir in _lstVirManualResolve[0].lstVi
339 | where _lstmastervars.Contains(comboType.Text + "|" + comboSex.Text + "|" + vir.var.Name) || _lstmasteritems.Contains(comboType.Text + "|" + comboSex.Text + "|" + vir.var.Name + "|" + _lstVirManualResolve[0].creator + "|" + _lstVirManualResolve[0].itemname)
340 | select vir;
341 | }
342 | else
343 | {
344 | matchMasterLists = null;
345 | }
346 | }
347 |
348 | //continue manual resolve
349 | if (_lstVirManualResolve.Any())
350 | {
351 | lblDuplicateManualCount.Text = "Item " + _intManualIndex.ToString() + " of " + _intManualTotal.ToString();
352 |
353 | txtCreatorName.Text = _lstVirManualResolve[0].creator;
354 | txtItemName.Text = _lstVirManualResolve[0].itemname;
355 | clbDuplicatesManual.ClearSelected();
356 | clbDuplicatesManual.Items.Clear();
357 |
358 | foreach (var virVar in _lstVirManualResolve[0].lstVi)
359 | {
360 | clbDuplicatesManual.Items.Add(virVar.var.Name, false);
361 | }
362 |
363 | clbDuplicatesManual.Enabled = true;
364 | }
365 | else
366 | {
367 | //Done
368 | gbManualResolve.Enabled = false;
369 | txtCreatorName.Text = "";
370 | txtItemName.Text = "";
371 | clbDuplicatesManual.Enabled = false;
372 | clbDuplicatesManual.ClearSelected();
373 | clbDuplicatesManual.Items.Clear();
374 | lblDuplicateManualCount.Hide();
375 | lblDuplicateManualCount.Text = "";
376 |
377 | checkManualResolveNeeded();
378 | }
379 | }
380 | else
381 | {
382 | //Done
383 | gbManualResolve.Enabled = false;
384 | txtCreatorName.Text = "";
385 | txtItemName.Text = "";
386 | clbDuplicatesManual.Enabled = false;
387 | clbDuplicatesManual.ClearSelected();
388 | clbDuplicatesManual.Items.Clear();
389 | lblDuplicateManualCount.Hide();
390 | lblDuplicateManualCount.Text = "";
391 |
392 | checkManualResolveNeeded();
393 | }
394 | }
395 |
396 | private void cbSetMasterItem_CheckStateChanged(object sender, EventArgs e)
397 | {
398 | if(cbSetMasterItem.Checked)
399 | { cbSetMasterAll.Checked = false; }
400 |
401 | }
402 |
403 | private void cbSetMasterAll_CheckStateChanged(object sender, EventArgs e)
404 | {
405 | if (cbSetMasterAll.Checked)
406 | { cbSetMasterItem.Checked = false; }
407 | }
408 |
409 | private void btnReturnToVM_Click(object sender, EventArgs e)
410 | {
411 | _frmVM.Show();
412 | this.Close();
413 | }
414 |
415 | private void btnDisableDuplicates_Click(object sender, EventArgs e)
416 | {
417 | Cursor = Cursors.WaitCursor;
418 | string strLog = "";
419 | strLog += "itemCreator:itemName|mastervar";
420 | strLog += Environment.NewLine + " disabledvarname";
421 | strLog += Environment.NewLine + "--------------------------------------------";
422 |
423 |
424 | foreach (var virDistinct in _lstVirAll)
425 | {
426 | strLog += Environment.NewLine + virDistinct.creator + ":" + virDistinct.itemname + "|" + virDistinct.mastervar;
427 |
428 | foreach (var viDisable in virDistinct.lstVi.Where(v => v.var.Name != virDistinct.mastervar))
429 | {
430 |
431 | if (viDisable.var.unpacked == false)
432 | {
433 | //Debug.Print(viDisable.var.Name);
434 | strLog += Environment.NewLine + " " + viDisable.var.fi.Name;
435 | //Disable item
436 | _frmVM.vm.DisableDuplicateItem(viDisable.var.fi.Name, viDisable.FullName);
437 | }
438 | else
439 | {
440 | //Debug.Print(viDisable.var.Name);
441 | strLog += Environment.NewLine + " " + viDisable.var.di.Name;
442 | //Disable item
443 | _frmVM.vm.DisableDuplicateItem(viDisable.var.di.Name, viDisable.FullName);
444 | }
445 | }
446 | }
447 |
448 | gbConfig.Enabled = true;
449 |
450 | lblDuplicatesUnique.Text = "";
451 | lblDuplicatesUnique.Hide();
452 | lblDuplicatesTotal.Text = "";
453 | lblDuplicatesTotal.Hide();
454 | btnDisableDuplicates.Enabled = false;
455 | gbDisable.Enabled = false;
456 |
457 | System.IO.File.WriteAllText(_frmVM._strVamdir + @"\VARManager_DisableDuplicateLog.txt", strLog);
458 |
459 | Cursor = Cursors.Default;
460 | MessageBox.Show("Done! Log file available at:" + Environment.NewLine + _frmVM._strVamdir + @"\VARManager_DisableDuplicateLog.txt", "Done disabling duplicates!", MessageBoxButtons.OK, MessageBoxIcon.Information);
461 | }
462 |
463 | private void btnClearMasterLists_Click(object sender, EventArgs e)
464 | {
465 | Properties.Settings.Default["mastervars"] = null;
466 | Properties.Settings.Default["masteritems"] = null;
467 | Properties.Settings.Default.Save();
468 |
469 | _mastervars = null;
470 | _lstmastervars = new List();
471 |
472 | _masteritems = null;
473 | _lstmasteritems = new List();
474 | }
475 |
476 | private void btnSkipItem_Click(object sender, EventArgs e)
477 | {
478 | //Skip item
479 | for (int i = 0; i < _lstVirAll.Count(); i++)
480 | {
481 | if (_lstVirAll[i].varItemReplacementType != varmanager.varItemReplacement.DISABLE && _lstVirAll[i].creator == _lstVirManualResolve[0].creator && _lstVirAll[i].itemname == _lstVirManualResolve[0].itemname)
482 | {
483 | _lstVirAll.RemoveAt(i);
484 | }
485 | }
486 |
487 | NextManualResolveItem();
488 | }
489 | }
490 | }
491 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmVARManager.Designer.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace VAMvarmanager
3 | {
4 | partial class frmVARManager
5 | {
6 | ///
7 | /// Required designer variable.
8 | ///
9 | private System.ComponentModel.IContainer components = null;
10 |
11 | ///
12 | /// Clean up any resources being used.
13 | ///
14 | /// true if managed resources should be disposed; otherwise, false.
15 | protected override void Dispose(bool disposing)
16 | {
17 | if (disposing && (components != null))
18 | {
19 | components.Dispose();
20 | }
21 | base.Dispose(disposing);
22 | }
23 |
24 | #region Windows Form Designer generated code
25 |
26 | ///
27 | /// Required method for Designer support - do not modify
28 | /// the contents of this method with the code editor.
29 | ///
30 | private void InitializeComponent()
31 | {
32 | components = new System.ComponentModel.Container();
33 | btnVamfolder = new System.Windows.Forms.Button();
34 | btnBackupfolder = new System.Windows.Forms.Button();
35 | txtBackupfolder = new System.Windows.Forms.TextBox();
36 | txtVamfolder = new System.Windows.Forms.TextBox();
37 | btnBackupUnref = new System.Windows.Forms.Button();
38 | groupBox1 = new System.Windows.Forms.GroupBox();
39 | btnRestoreLastConfig = new System.Windows.Forms.Button();
40 | btnSaveConfig = new System.Windows.Forms.Button();
41 | btnRestoreConfig = new System.Windows.Forms.Button();
42 | btnResetSettings = new System.Windows.Forms.Button();
43 | lblBackupcount = new System.Windows.Forms.Label();
44 | label5 = new System.Windows.Forms.Label();
45 | lblVamcount = new System.Windows.Forms.Label();
46 | label3 = new System.Windows.Forms.Label();
47 | label2 = new System.Windows.Forms.Label();
48 | label1 = new System.Windows.Forms.Label();
49 | groupBox2 = new System.Windows.Forms.GroupBox();
50 | btnBackupUnrefSpec = new System.Windows.Forms.Button();
51 | btnBackupSpec = new System.Windows.Forms.Button();
52 | btnRestoreSpec = new System.Windows.Forms.Button();
53 | btnRestoreAll = new System.Windows.Forms.Button();
54 | gbCreatorEx = new System.Windows.Forms.GroupBox();
55 | clbCreatorsRestore = new System.Windows.Forms.CheckedListBox();
56 | clbCreators = new System.Windows.Forms.CheckedListBox();
57 | cbInvertCreators = new System.Windows.Forms.CheckBox();
58 | cbAllCreators = new System.Windows.Forms.CheckBox();
59 | txtCreatorFilter = new System.Windows.Forms.TextBox();
60 | gbFolderEx = new System.Windows.Forms.GroupBox();
61 | clbFoldersRestore = new System.Windows.Forms.CheckedListBox();
62 | clbFolders = new System.Windows.Forms.CheckedListBox();
63 | cbInvertFolders = new System.Windows.Forms.CheckBox();
64 | cbAllFolders = new System.Windows.Forms.CheckBox();
65 | txtFolderFilter = new System.Windows.Forms.TextBox();
66 | backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
67 | groupBox5 = new System.Windows.Forms.GroupBox();
68 | cbIgnoreHidden = new System.Windows.Forms.CheckBox();
69 | dgvTypes = new System.Windows.Forms.DataGridView();
70 | Type = new System.Windows.Forms.DataGridViewTextBoxColumn();
71 | OR = new System.Windows.Forms.DataGridViewCheckBoxColumn();
72 | AND = new System.Windows.Forms.DataGridViewCheckBoxColumn();
73 | NOT = new System.Windows.Forms.DataGridViewCheckBoxColumn();
74 | groupBox6 = new System.Windows.Forms.GroupBox();
75 | btnRestoreRef = new System.Windows.Forms.Button();
76 | groupBox7 = new System.Windows.Forms.GroupBox();
77 | btnMorphPresets = new System.Windows.Forms.Button();
78 | btnRevertpreloadmorphs = new System.Windows.Forms.Button();
79 | btnDisablepreloadmorphs = new System.Windows.Forms.Button();
80 | btnDisableClothing = new System.Windows.Forms.Button();
81 | groupBox8 = new System.Windows.Forms.GroupBox();
82 | gbPresets = new System.Windows.Forms.GroupBox();
83 | cbSkin = new System.Windows.Forms.CheckBox();
84 | cbPlugins = new System.Windows.Forms.CheckBox();
85 | cbMorphs = new System.Windows.Forms.CheckBox();
86 | cbHair = new System.Windows.Forms.CheckBox();
87 | cbClothing = new System.Windows.Forms.CheckBox();
88 | cbAppearance = new System.Windows.Forms.CheckBox();
89 | cbSavesScene = new System.Windows.Forms.CheckBox();
90 | toolTipSaves = new System.Windows.Forms.ToolTip(components);
91 | gbCreatorFilters = new System.Windows.Forms.GroupBox();
92 | gbFolderFilters = new System.Windows.Forms.GroupBox();
93 | cbRestoreEx = new System.Windows.Forms.CheckBox();
94 | cbBackupEx = new System.Windows.Forms.CheckBox();
95 | btnMoveOldVarVersions = new System.Windows.Forms.Button();
96 | gbMisc = new System.Windows.Forms.GroupBox();
97 | sfdVarConfig = new System.Windows.Forms.SaveFileDialog();
98 | ofdVarConfig = new System.Windows.Forms.OpenFileDialog();
99 | cbSkipFavorites = new System.Windows.Forms.CheckBox();
100 | dtpFilter = new System.Windows.Forms.DateTimePicker();
101 | cbDateFilter = new System.Windows.Forms.CheckBox();
102 | toolTipDateFilter = new System.Windows.Forms.ToolTip(components);
103 | cbUIAssist = new System.Windows.Forms.CheckBox();
104 | btnSaveFilters = new System.Windows.Forms.Button();
105 | btnLoadFilters = new System.Windows.Forms.Button();
106 | cbOverwrite = new System.Windows.Forms.CheckBox();
107 | groupBox1.SuspendLayout();
108 | groupBox2.SuspendLayout();
109 | gbCreatorEx.SuspendLayout();
110 | gbFolderEx.SuspendLayout();
111 | groupBox5.SuspendLayout();
112 | ((System.ComponentModel.ISupportInitialize)dgvTypes).BeginInit();
113 | groupBox6.SuspendLayout();
114 | groupBox7.SuspendLayout();
115 | groupBox8.SuspendLayout();
116 | gbPresets.SuspendLayout();
117 | gbCreatorFilters.SuspendLayout();
118 | gbFolderFilters.SuspendLayout();
119 | gbMisc.SuspendLayout();
120 | SuspendLayout();
121 | //
122 | // btnVamfolder
123 | //
124 | btnVamfolder.Location = new System.Drawing.Point(804, 22);
125 | btnVamfolder.Name = "btnVamfolder";
126 | btnVamfolder.Size = new System.Drawing.Size(246, 51);
127 | btnVamfolder.TabIndex = 0;
128 | btnVamfolder.Text = "Choose VAM Folder";
129 | btnVamfolder.UseVisualStyleBackColor = true;
130 | btnVamfolder.Click += btnVamfolder_Click;
131 | //
132 | // btnBackupfolder
133 | //
134 | btnBackupfolder.Location = new System.Drawing.Point(804, 79);
135 | btnBackupfolder.Name = "btnBackupfolder";
136 | btnBackupfolder.Size = new System.Drawing.Size(246, 51);
137 | btnBackupfolder.TabIndex = 1;
138 | btnBackupfolder.Text = "Choose Backup Folder";
139 | btnBackupfolder.UseVisualStyleBackColor = true;
140 | btnBackupfolder.Click += btnBackupfolder_Click;
141 | //
142 | // txtBackupfolder
143 | //
144 | txtBackupfolder.Location = new System.Drawing.Point(330, 52);
145 | txtBackupfolder.Name = "txtBackupfolder";
146 | txtBackupfolder.Size = new System.Drawing.Size(445, 23);
147 | txtBackupfolder.TabIndex = 2;
148 | //
149 | // txtVamfolder
150 | //
151 | txtVamfolder.Location = new System.Drawing.Point(330, 21);
152 | txtVamfolder.Name = "txtVamfolder";
153 | txtVamfolder.Size = new System.Drawing.Size(445, 23);
154 | txtVamfolder.TabIndex = 3;
155 | //
156 | // btnBackupUnref
157 | //
158 | btnBackupUnref.ForeColor = System.Drawing.Color.DarkGreen;
159 | btnBackupUnref.Location = new System.Drawing.Point(6, 22);
160 | btnBackupUnref.Name = "btnBackupUnref";
161 | btnBackupUnref.Size = new System.Drawing.Size(207, 45);
162 | btnBackupUnref.TabIndex = 4;
163 | btnBackupUnref.Text = "Backup Unreferenced vars";
164 | btnBackupUnref.UseVisualStyleBackColor = true;
165 | btnBackupUnref.Click += btnBackupUnref_Click;
166 | //
167 | // groupBox1
168 | //
169 | groupBox1.Controls.Add(btnRestoreLastConfig);
170 | groupBox1.Controls.Add(btnSaveConfig);
171 | groupBox1.Controls.Add(btnRestoreConfig);
172 | groupBox1.Controls.Add(btnResetSettings);
173 | groupBox1.Controls.Add(lblBackupcount);
174 | groupBox1.Controls.Add(label5);
175 | groupBox1.Controls.Add(lblVamcount);
176 | groupBox1.Controls.Add(label3);
177 | groupBox1.Controls.Add(label2);
178 | groupBox1.Controls.Add(label1);
179 | groupBox1.Controls.Add(txtVamfolder);
180 | groupBox1.Controls.Add(txtBackupfolder);
181 | groupBox1.Controls.Add(btnBackupfolder);
182 | groupBox1.Controls.Add(btnVamfolder);
183 | groupBox1.Location = new System.Drawing.Point(12, 12);
184 | groupBox1.Name = "groupBox1";
185 | groupBox1.Size = new System.Drawing.Size(1059, 140);
186 | groupBox1.TabIndex = 5;
187 | groupBox1.TabStop = false;
188 | groupBox1.Text = "Config";
189 | //
190 | // btnRestoreLastConfig
191 | //
192 | btnRestoreLastConfig.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
193 | btnRestoreLastConfig.ForeColor = System.Drawing.Color.ForestGreen;
194 | btnRestoreLastConfig.Location = new System.Drawing.Point(338, 96);
195 | btnRestoreLastConfig.Name = "btnRestoreLastConfig";
196 | btnRestoreLastConfig.Size = new System.Drawing.Size(160, 38);
197 | btnRestoreLastConfig.TabIndex = 15;
198 | btnRestoreLastConfig.Text = "Restore Last Config\r\n(200 active vars)";
199 | btnRestoreLastConfig.UseVisualStyleBackColor = true;
200 | btnRestoreLastConfig.Click += btnRestoreLastConfig_Click;
201 | //
202 | // btnSaveConfig
203 | //
204 | btnSaveConfig.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
205 | btnSaveConfig.ForeColor = System.Drawing.Color.OrangeRed;
206 | btnSaveConfig.Location = new System.Drawing.Point(6, 96);
207 | btnSaveConfig.Name = "btnSaveConfig";
208 | btnSaveConfig.Size = new System.Drawing.Size(160, 38);
209 | btnSaveConfig.TabIndex = 14;
210 | btnSaveConfig.Text = "Save var Config";
211 | btnSaveConfig.UseVisualStyleBackColor = true;
212 | btnSaveConfig.Click += btnSaveConfig_Click;
213 | //
214 | // btnRestoreConfig
215 | //
216 | btnRestoreConfig.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
217 | btnRestoreConfig.ForeColor = System.Drawing.Color.OrangeRed;
218 | btnRestoreConfig.Location = new System.Drawing.Point(172, 96);
219 | btnRestoreConfig.Name = "btnRestoreConfig";
220 | btnRestoreConfig.Size = new System.Drawing.Size(160, 38);
221 | btnRestoreConfig.TabIndex = 13;
222 | btnRestoreConfig.Text = "Restore var Config";
223 | btnRestoreConfig.UseVisualStyleBackColor = true;
224 | btnRestoreConfig.Click += btnRestoreConfig_Click;
225 | //
226 | // btnResetSettings
227 | //
228 | btnResetSettings.Location = new System.Drawing.Point(615, 85);
229 | btnResetSettings.Name = "btnResetSettings";
230 | btnResetSettings.Size = new System.Drawing.Size(160, 38);
231 | btnResetSettings.TabIndex = 12;
232 | btnResetSettings.Text = "Reset Settings";
233 | btnResetSettings.UseVisualStyleBackColor = true;
234 | btnResetSettings.Click += btnResetSettings_Click;
235 | //
236 | // lblBackupcount
237 | //
238 | lblBackupcount.AutoSize = true;
239 | lblBackupcount.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
240 | lblBackupcount.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
241 | lblBackupcount.Location = new System.Drawing.Point(151, 55);
242 | lblBackupcount.Name = "lblBackupcount";
243 | lblBackupcount.Size = new System.Drawing.Size(0, 19);
244 | lblBackupcount.TabIndex = 10;
245 | lblBackupcount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
246 | //
247 | // label5
248 | //
249 | label5.AutoSize = true;
250 | label5.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
251 | label5.Location = new System.Drawing.Point(14, 52);
252 | label5.Name = "label5";
253 | label5.Size = new System.Drawing.Size(131, 19);
254 | label5.TabIndex = 9;
255 | label5.Text = "var Count Backup:";
256 | label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
257 | //
258 | // lblVamcount
259 | //
260 | lblVamcount.AutoSize = true;
261 | lblVamcount.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
262 | lblVamcount.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
263 | lblVamcount.Location = new System.Drawing.Point(151, 21);
264 | lblVamcount.Name = "lblVamcount";
265 | lblVamcount.Size = new System.Drawing.Size(0, 19);
266 | lblVamcount.TabIndex = 8;
267 | lblVamcount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
268 | //
269 | // label3
270 | //
271 | label3.AutoSize = true;
272 | label3.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
273 | label3.Location = new System.Drawing.Point(32, 22);
274 | label3.Name = "label3";
275 | label3.Size = new System.Drawing.Size(113, 19);
276 | label3.TabIndex = 6;
277 | label3.Text = "var Count VAM:";
278 | label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
279 | //
280 | // label2
281 | //
282 | label2.AutoSize = true;
283 | label2.Location = new System.Drawing.Point(234, 55);
284 | label2.Name = "label2";
285 | label2.Size = new System.Drawing.Size(85, 15);
286 | label2.TabIndex = 5;
287 | label2.Text = "Backup Folder:";
288 | //
289 | // label1
290 | //
291 | label1.AutoSize = true;
292 | label1.Location = new System.Drawing.Point(220, 24);
293 | label1.Name = "label1";
294 | label1.Size = new System.Drawing.Size(99, 15);
295 | label1.TabIndex = 4;
296 | label1.Text = "VAM Root Folder:";
297 | //
298 | // groupBox2
299 | //
300 | groupBox2.Controls.Add(btnBackupUnrefSpec);
301 | groupBox2.Controls.Add(btnBackupSpec);
302 | groupBox2.Controls.Add(btnBackupUnref);
303 | groupBox2.Location = new System.Drawing.Point(12, 428);
304 | groupBox2.Name = "groupBox2";
305 | groupBox2.Size = new System.Drawing.Size(219, 180);
306 | groupBox2.TabIndex = 6;
307 | groupBox2.TabStop = false;
308 | groupBox2.Text = "Backup";
309 | //
310 | // btnBackupUnrefSpec
311 | //
312 | btnBackupUnrefSpec.ForeColor = System.Drawing.Color.DarkGreen;
313 | btnBackupUnrefSpec.Location = new System.Drawing.Point(6, 73);
314 | btnBackupUnrefSpec.Name = "btnBackupUnrefSpec";
315 | btnBackupUnrefSpec.Size = new System.Drawing.Size(207, 45);
316 | btnBackupUnrefSpec.TabIndex = 7;
317 | btnBackupUnrefSpec.Text = "Backup Unreferenced \r\nSpecific-Type vars";
318 | btnBackupUnrefSpec.UseVisualStyleBackColor = true;
319 | btnBackupUnrefSpec.Click += btnBackupUnrefSpec_Click;
320 | //
321 | // btnBackupSpec
322 | //
323 | btnBackupSpec.ForeColor = System.Drawing.Color.DarkGreen;
324 | btnBackupSpec.Location = new System.Drawing.Point(6, 126);
325 | btnBackupSpec.Name = "btnBackupSpec";
326 | btnBackupSpec.Size = new System.Drawing.Size(207, 45);
327 | btnBackupSpec.TabIndex = 6;
328 | btnBackupSpec.Text = "Backup All \r\nSpecific-Type vars";
329 | btnBackupSpec.UseVisualStyleBackColor = true;
330 | btnBackupSpec.Click += btnBackupSpec_Click;
331 | //
332 | // btnRestoreSpec
333 | //
334 | btnRestoreSpec.ForeColor = System.Drawing.Color.DarkBlue;
335 | btnRestoreSpec.Location = new System.Drawing.Point(6, 73);
336 | btnRestoreSpec.Name = "btnRestoreSpec";
337 | btnRestoreSpec.Size = new System.Drawing.Size(207, 45);
338 | btnRestoreSpec.TabIndex = 7;
339 | btnRestoreSpec.Text = "Restore All Specific-Type vars";
340 | btnRestoreSpec.UseVisualStyleBackColor = true;
341 | btnRestoreSpec.Click += btnRestoreSpec_Click;
342 | //
343 | // btnRestoreAll
344 | //
345 | btnRestoreAll.ForeColor = System.Drawing.Color.DarkBlue;
346 | btnRestoreAll.Location = new System.Drawing.Point(6, 124);
347 | btnRestoreAll.Name = "btnRestoreAll";
348 | btnRestoreAll.Size = new System.Drawing.Size(207, 45);
349 | btnRestoreAll.TabIndex = 5;
350 | btnRestoreAll.Text = "Restore All vars";
351 | btnRestoreAll.UseVisualStyleBackColor = true;
352 | btnRestoreAll.Click += btnRestoreAll_Click;
353 | //
354 | // gbCreatorEx
355 | //
356 | gbCreatorEx.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
357 | gbCreatorEx.Controls.Add(clbCreatorsRestore);
358 | gbCreatorEx.Controls.Add(clbCreators);
359 | gbCreatorEx.Location = new System.Drawing.Point(240, 255);
360 | gbCreatorEx.Name = "gbCreatorEx";
361 | gbCreatorEx.Size = new System.Drawing.Size(274, 536);
362 | gbCreatorEx.TabIndex = 7;
363 | gbCreatorEx.TabStop = false;
364 | gbCreatorEx.Text = "Creator Exceptions";
365 | //
366 | // clbCreatorsRestore
367 | //
368 | clbCreatorsRestore.CheckOnClick = true;
369 | clbCreatorsRestore.Dock = System.Windows.Forms.DockStyle.Fill;
370 | clbCreatorsRestore.FormattingEnabled = true;
371 | clbCreatorsRestore.Location = new System.Drawing.Point(3, 19);
372 | clbCreatorsRestore.Name = "clbCreatorsRestore";
373 | clbCreatorsRestore.Size = new System.Drawing.Size(268, 514);
374 | clbCreatorsRestore.TabIndex = 9;
375 | //
376 | // clbCreators
377 | //
378 | clbCreators.CheckOnClick = true;
379 | clbCreators.Dock = System.Windows.Forms.DockStyle.Fill;
380 | clbCreators.FormattingEnabled = true;
381 | clbCreators.Location = new System.Drawing.Point(3, 19);
382 | clbCreators.Name = "clbCreators";
383 | clbCreators.Size = new System.Drawing.Size(268, 514);
384 | clbCreators.TabIndex = 8;
385 | //
386 | // cbInvertCreators
387 | //
388 | cbInvertCreators.AutoSize = true;
389 | cbInvertCreators.Location = new System.Drawing.Point(52, 22);
390 | cbInvertCreators.Name = "cbInvertCreators";
391 | cbInvertCreators.Size = new System.Drawing.Size(56, 19);
392 | cbInvertCreators.TabIndex = 15;
393 | cbInvertCreators.Text = "Invert";
394 | cbInvertCreators.UseVisualStyleBackColor = true;
395 | cbInvertCreators.CheckedChanged += cbInvertCreators_CheckedChanged;
396 | //
397 | // cbAllCreators
398 | //
399 | cbAllCreators.AutoSize = true;
400 | cbAllCreators.Location = new System.Drawing.Point(6, 22);
401 | cbAllCreators.Name = "cbAllCreators";
402 | cbAllCreators.Size = new System.Drawing.Size(40, 19);
403 | cbAllCreators.TabIndex = 14;
404 | cbAllCreators.Text = "All";
405 | cbAllCreators.UseVisualStyleBackColor = true;
406 | cbAllCreators.CheckedChanged += cbAllCreators_CheckedChanged;
407 | //
408 | // txtCreatorFilter
409 | //
410 | txtCreatorFilter.Location = new System.Drawing.Point(6, 47);
411 | txtCreatorFilter.Name = "txtCreatorFilter";
412 | txtCreatorFilter.Size = new System.Drawing.Size(265, 23);
413 | txtCreatorFilter.TabIndex = 12;
414 | txtCreatorFilter.TextChanged += txtCreatorFilter_TextChanged;
415 | //
416 | // gbFolderEx
417 | //
418 | gbFolderEx.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
419 | gbFolderEx.Controls.Add(clbFoldersRestore);
420 | gbFolderEx.Controls.Add(clbFolders);
421 | gbFolderEx.Location = new System.Drawing.Point(520, 255);
422 | gbFolderEx.Name = "gbFolderEx";
423 | gbFolderEx.Size = new System.Drawing.Size(273, 536);
424 | gbFolderEx.TabIndex = 9;
425 | gbFolderEx.TabStop = false;
426 | gbFolderEx.Text = "Folder Exceptions";
427 | //
428 | // clbFoldersRestore
429 | //
430 | clbFoldersRestore.CheckOnClick = true;
431 | clbFoldersRestore.Dock = System.Windows.Forms.DockStyle.Fill;
432 | clbFoldersRestore.FormattingEnabled = true;
433 | clbFoldersRestore.HorizontalScrollbar = true;
434 | clbFoldersRestore.Location = new System.Drawing.Point(3, 19);
435 | clbFoldersRestore.Name = "clbFoldersRestore";
436 | clbFoldersRestore.Size = new System.Drawing.Size(267, 514);
437 | clbFoldersRestore.TabIndex = 9;
438 | //
439 | // clbFolders
440 | //
441 | clbFolders.CheckOnClick = true;
442 | clbFolders.Dock = System.Windows.Forms.DockStyle.Fill;
443 | clbFolders.FormattingEnabled = true;
444 | clbFolders.HorizontalScrollbar = true;
445 | clbFolders.Location = new System.Drawing.Point(3, 19);
446 | clbFolders.Name = "clbFolders";
447 | clbFolders.Size = new System.Drawing.Size(267, 514);
448 | clbFolders.TabIndex = 8;
449 | //
450 | // cbInvertFolders
451 | //
452 | cbInvertFolders.AutoSize = true;
453 | cbInvertFolders.Location = new System.Drawing.Point(52, 22);
454 | cbInvertFolders.Name = "cbInvertFolders";
455 | cbInvertFolders.Size = new System.Drawing.Size(56, 19);
456 | cbInvertFolders.TabIndex = 17;
457 | cbInvertFolders.Text = "Invert";
458 | cbInvertFolders.UseVisualStyleBackColor = true;
459 | cbInvertFolders.CheckedChanged += cbInvertFolders_CheckedChanged;
460 | //
461 | // cbAllFolders
462 | //
463 | cbAllFolders.AutoSize = true;
464 | cbAllFolders.Location = new System.Drawing.Point(6, 22);
465 | cbAllFolders.Name = "cbAllFolders";
466 | cbAllFolders.Size = new System.Drawing.Size(40, 19);
467 | cbAllFolders.TabIndex = 16;
468 | cbAllFolders.Text = "All";
469 | cbAllFolders.UseVisualStyleBackColor = true;
470 | cbAllFolders.CheckedChanged += cbAllFolders_CheckedChanged;
471 | //
472 | // txtFolderFilter
473 | //
474 | txtFolderFilter.Location = new System.Drawing.Point(6, 47);
475 | txtFolderFilter.Name = "txtFolderFilter";
476 | txtFolderFilter.Size = new System.Drawing.Size(264, 23);
477 | txtFolderFilter.TabIndex = 13;
478 | txtFolderFilter.TextChanged += txtFolderFilter_TextChanged;
479 | //
480 | // groupBox5
481 | //
482 | groupBox5.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
483 | groupBox5.Controls.Add(cbIgnoreHidden);
484 | groupBox5.Controls.Add(dgvTypes);
485 | groupBox5.Location = new System.Drawing.Point(800, 446);
486 | groupBox5.Name = "groupBox5";
487 | groupBox5.Size = new System.Drawing.Size(271, 298);
488 | groupBox5.TabIndex = 10;
489 | groupBox5.TabStop = false;
490 | groupBox5.Text = "Specific-Type Backup/Restore";
491 | //
492 | // cbIgnoreHidden
493 | //
494 | cbIgnoreHidden.AutoSize = true;
495 | cbIgnoreHidden.Location = new System.Drawing.Point(6, 22);
496 | cbIgnoreHidden.Name = "cbIgnoreHidden";
497 | cbIgnoreHidden.Size = new System.Drawing.Size(165, 19);
498 | cbIgnoreHidden.TabIndex = 19;
499 | cbIgnoreHidden.Text = "Don't Count Hidden Items";
500 | cbIgnoreHidden.UseVisualStyleBackColor = true;
501 | //
502 | // dgvTypes
503 | //
504 | dgvTypes.AllowUserToAddRows = false;
505 | dgvTypes.AllowUserToDeleteRows = false;
506 | dgvTypes.AllowUserToResizeRows = false;
507 | dgvTypes.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
508 | dgvTypes.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { Type, OR, AND, NOT });
509 | dgvTypes.Location = new System.Drawing.Point(6, 52);
510 | dgvTypes.MultiSelect = false;
511 | dgvTypes.Name = "dgvTypes";
512 | dgvTypes.ReadOnly = true;
513 | dgvTypes.RowHeadersVisible = false;
514 | dgvTypes.RowTemplate.Height = 25;
515 | dgvTypes.Size = new System.Drawing.Size(262, 237);
516 | dgvTypes.TabIndex = 14;
517 | dgvTypes.CellClick += dgvTypes_CellClick;
518 | dgvTypes.ColumnHeaderMouseClick += dgvTypes_ColumnHeaderMouseClick;
519 | //
520 | // Type
521 | //
522 | Type.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
523 | Type.HeaderText = "Type";
524 | Type.Name = "Type";
525 | Type.ReadOnly = true;
526 | //
527 | // OR
528 | //
529 | OR.HeaderText = "OR";
530 | OR.Name = "OR";
531 | OR.ReadOnly = true;
532 | OR.Width = 40;
533 | //
534 | // AND
535 | //
536 | AND.HeaderText = "AND";
537 | AND.Name = "AND";
538 | AND.ReadOnly = true;
539 | AND.Width = 40;
540 | //
541 | // NOT
542 | //
543 | NOT.HeaderText = "NOT";
544 | NOT.Name = "NOT";
545 | NOT.ReadOnly = true;
546 | NOT.Width = 40;
547 | //
548 | // groupBox6
549 | //
550 | groupBox6.Controls.Add(btnRestoreRef);
551 | groupBox6.Controls.Add(btnRestoreAll);
552 | groupBox6.Controls.Add(btnRestoreSpec);
553 | groupBox6.Location = new System.Drawing.Point(12, 614);
554 | groupBox6.Name = "groupBox6";
555 | groupBox6.Size = new System.Drawing.Size(219, 174);
556 | groupBox6.TabIndex = 11;
557 | groupBox6.TabStop = false;
558 | groupBox6.Text = "Restore";
559 | //
560 | // btnRestoreRef
561 | //
562 | btnRestoreRef.ForeColor = System.Drawing.Color.DarkBlue;
563 | btnRestoreRef.Location = new System.Drawing.Point(6, 22);
564 | btnRestoreRef.Name = "btnRestoreRef";
565 | btnRestoreRef.Size = new System.Drawing.Size(207, 45);
566 | btnRestoreRef.TabIndex = 8;
567 | btnRestoreRef.Text = "Restore All Referenced vars";
568 | btnRestoreRef.UseVisualStyleBackColor = true;
569 | btnRestoreRef.Click += btnRestoreRef_Click;
570 | //
571 | // groupBox7
572 | //
573 | groupBox7.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
574 | groupBox7.Controls.Add(btnMorphPresets);
575 | groupBox7.Controls.Add(btnRevertpreloadmorphs);
576 | groupBox7.Controls.Add(btnDisablepreloadmorphs);
577 | groupBox7.Location = new System.Drawing.Point(800, 180);
578 | groupBox7.Name = "groupBox7";
579 | groupBox7.Size = new System.Drawing.Size(271, 181);
580 | groupBox7.TabIndex = 12;
581 | groupBox7.TabStop = false;
582 | groupBox7.Text = "Morphs";
583 | //
584 | // btnMorphPresets
585 | //
586 | btnMorphPresets.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
587 | btnMorphPresets.ForeColor = System.Drawing.Color.BlueViolet;
588 | btnMorphPresets.Location = new System.Drawing.Point(9, 126);
589 | btnMorphPresets.Name = "btnMorphPresets";
590 | btnMorphPresets.Size = new System.Drawing.Size(259, 46);
591 | btnMorphPresets.TabIndex = 15;
592 | btnMorphPresets.Text = "Morph Preset Maker";
593 | btnMorphPresets.UseVisualStyleBackColor = true;
594 | btnMorphPresets.Click += btnMorphPresets_Click;
595 | //
596 | // btnRevertpreloadmorphs
597 | //
598 | btnRevertpreloadmorphs.ForeColor = System.Drawing.Color.BlueViolet;
599 | btnRevertpreloadmorphs.Location = new System.Drawing.Point(6, 75);
600 | btnRevertpreloadmorphs.Name = "btnRevertpreloadmorphs";
601 | btnRevertpreloadmorphs.Size = new System.Drawing.Size(259, 46);
602 | btnRevertpreloadmorphs.TabIndex = 14;
603 | btnRevertpreloadmorphs.Text = "Revert Preload Morphs Settings";
604 | btnRevertpreloadmorphs.UseVisualStyleBackColor = true;
605 | btnRevertpreloadmorphs.Click += btnRevertpreloadmorphs_Click;
606 | //
607 | // btnDisablepreloadmorphs
608 | //
609 | btnDisablepreloadmorphs.ForeColor = System.Drawing.Color.BlueViolet;
610 | btnDisablepreloadmorphs.Location = new System.Drawing.Point(6, 25);
611 | btnDisablepreloadmorphs.Name = "btnDisablepreloadmorphs";
612 | btnDisablepreloadmorphs.Size = new System.Drawing.Size(259, 46);
613 | btnDisablepreloadmorphs.TabIndex = 13;
614 | btnDisablepreloadmorphs.Text = "Disable Preload Morphs";
615 | btnDisablepreloadmorphs.UseVisualStyleBackColor = true;
616 | btnDisablepreloadmorphs.Click += btnDisablepreloadmorphs_Click;
617 | //
618 | // btnDisableClothing
619 | //
620 | btnDisableClothing.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
621 | btnDisableClothing.ForeColor = System.Drawing.Color.DarkRed;
622 | btnDisableClothing.Location = new System.Drawing.Point(6, 21);
623 | btnDisableClothing.Name = "btnDisableClothing";
624 | btnDisableClothing.Size = new System.Drawing.Size(259, 46);
625 | btnDisableClothing.TabIndex = 13;
626 | btnDisableClothing.Text = "Duplicate Items Resolver";
627 | btnDisableClothing.UseVisualStyleBackColor = true;
628 | btnDisableClothing.Click += btnDisableClothing_Click;
629 | //
630 | // groupBox8
631 | //
632 | groupBox8.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
633 | groupBox8.Controls.Add(btnDisableClothing);
634 | groupBox8.Location = new System.Drawing.Point(800, 367);
635 | groupBox8.Name = "groupBox8";
636 | groupBox8.Size = new System.Drawing.Size(271, 73);
637 | groupBox8.TabIndex = 15;
638 | groupBox8.TabStop = false;
639 | groupBox8.Text = "Duplicate Clothing/Hair Resolver";
640 | //
641 | // gbPresets
642 | //
643 | gbPresets.Controls.Add(cbSkin);
644 | gbPresets.Controls.Add(cbPlugins);
645 | gbPresets.Controls.Add(cbMorphs);
646 | gbPresets.Controls.Add(cbHair);
647 | gbPresets.Controls.Add(cbClothing);
648 | gbPresets.Controls.Add(cbAppearance);
649 | gbPresets.Location = new System.Drawing.Point(12, 205);
650 | gbPresets.Name = "gbPresets";
651 | gbPresets.Size = new System.Drawing.Size(219, 105);
652 | gbPresets.TabIndex = 16;
653 | gbPresets.TabStop = false;
654 | gbPresets.Text = "Scan Local Presets for References";
655 | //
656 | // cbSkin
657 | //
658 | cbSkin.AutoSize = true;
659 | cbSkin.Location = new System.Drawing.Point(6, 72);
660 | cbSkin.Name = "cbSkin";
661 | cbSkin.Size = new System.Drawing.Size(48, 19);
662 | cbSkin.TabIndex = 6;
663 | cbSkin.Text = "Skin";
664 | cbSkin.UseVisualStyleBackColor = true;
665 | //
666 | // cbPlugins
667 | //
668 | cbPlugins.AutoSize = true;
669 | cbPlugins.Location = new System.Drawing.Point(124, 72);
670 | cbPlugins.Name = "cbPlugins";
671 | cbPlugins.Size = new System.Drawing.Size(65, 19);
672 | cbPlugins.TabIndex = 5;
673 | cbPlugins.Text = "Plugins";
674 | cbPlugins.UseVisualStyleBackColor = true;
675 | //
676 | // cbMorphs
677 | //
678 | cbMorphs.AutoSize = true;
679 | cbMorphs.Location = new System.Drawing.Point(124, 47);
680 | cbMorphs.Name = "cbMorphs";
681 | cbMorphs.Size = new System.Drawing.Size(67, 19);
682 | cbMorphs.TabIndex = 4;
683 | cbMorphs.Text = "Morphs";
684 | cbMorphs.UseVisualStyleBackColor = true;
685 | //
686 | // cbHair
687 | //
688 | cbHair.AutoSize = true;
689 | cbHair.Location = new System.Drawing.Point(6, 47);
690 | cbHair.Name = "cbHair";
691 | cbHair.Size = new System.Drawing.Size(48, 19);
692 | cbHair.TabIndex = 3;
693 | cbHair.Text = "Hair";
694 | cbHair.UseVisualStyleBackColor = true;
695 | //
696 | // cbClothing
697 | //
698 | cbClothing.AutoSize = true;
699 | cbClothing.Location = new System.Drawing.Point(124, 22);
700 | cbClothing.Name = "cbClothing";
701 | cbClothing.Size = new System.Drawing.Size(72, 19);
702 | cbClothing.TabIndex = 2;
703 | cbClothing.Text = "Clothing";
704 | cbClothing.UseVisualStyleBackColor = true;
705 | //
706 | // cbAppearance
707 | //
708 | cbAppearance.AutoSize = true;
709 | cbAppearance.Location = new System.Drawing.Point(6, 22);
710 | cbAppearance.Name = "cbAppearance";
711 | cbAppearance.Size = new System.Drawing.Size(89, 19);
712 | cbAppearance.TabIndex = 1;
713 | cbAppearance.Text = "Appearence";
714 | cbAppearance.UseVisualStyleBackColor = true;
715 | //
716 | // cbSavesScene
717 | //
718 | cbSavesScene.AutoSize = true;
719 | cbSavesScene.Location = new System.Drawing.Point(15, 158);
720 | cbSavesScene.Name = "cbSavesScene";
721 | cbSavesScene.Size = new System.Drawing.Size(197, 19);
722 | cbSavesScene.TabIndex = 0;
723 | cbSavesScene.Text = "Scan Saves\\Scene for References";
724 | cbSavesScene.UseVisualStyleBackColor = true;
725 | cbSavesScene.MouseHover += cbSavesScene_MouseHover;
726 | //
727 | // gbCreatorFilters
728 | //
729 | gbCreatorFilters.Controls.Add(txtCreatorFilter);
730 | gbCreatorFilters.Controls.Add(cbAllCreators);
731 | gbCreatorFilters.Controls.Add(cbInvertCreators);
732 | gbCreatorFilters.Location = new System.Drawing.Point(240, 180);
733 | gbCreatorFilters.Name = "gbCreatorFilters";
734 | gbCreatorFilters.Size = new System.Drawing.Size(274, 77);
735 | gbCreatorFilters.TabIndex = 9;
736 | gbCreatorFilters.TabStop = false;
737 | gbCreatorFilters.Text = "Creator Filters";
738 | //
739 | // gbFolderFilters
740 | //
741 | gbFolderFilters.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
742 | gbFolderFilters.Controls.Add(txtFolderFilter);
743 | gbFolderFilters.Controls.Add(cbInvertFolders);
744 | gbFolderFilters.Controls.Add(cbAllFolders);
745 | gbFolderFilters.Location = new System.Drawing.Point(520, 180);
746 | gbFolderFilters.Name = "gbFolderFilters";
747 | gbFolderFilters.Size = new System.Drawing.Size(274, 77);
748 | gbFolderFilters.TabIndex = 16;
749 | gbFolderFilters.TabStop = false;
750 | gbFolderFilters.Text = "Folder Filters";
751 | //
752 | // cbRestoreEx
753 | //
754 | cbRestoreEx.AutoSize = true;
755 | cbRestoreEx.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
756 | cbRestoreEx.ForeColor = System.Drawing.Color.DarkBlue;
757 | cbRestoreEx.Location = new System.Drawing.Point(382, 158);
758 | cbRestoreEx.Name = "cbRestoreEx";
759 | cbRestoreEx.Size = new System.Drawing.Size(133, 19);
760 | cbRestoreEx.TabIndex = 18;
761 | cbRestoreEx.Text = "Restore Exceptions";
762 | cbRestoreEx.UseVisualStyleBackColor = true;
763 | cbRestoreEx.CheckedChanged += cbRestoreEx_CheckedChanged;
764 | //
765 | // cbBackupEx
766 | //
767 | cbBackupEx.AutoSize = true;
768 | cbBackupEx.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
769 | cbBackupEx.ForeColor = System.Drawing.Color.DarkGreen;
770 | cbBackupEx.Location = new System.Drawing.Point(246, 158);
771 | cbBackupEx.Name = "cbBackupEx";
772 | cbBackupEx.Size = new System.Drawing.Size(130, 19);
773 | cbBackupEx.TabIndex = 11;
774 | cbBackupEx.Text = "Backup Exceptions";
775 | cbBackupEx.UseVisualStyleBackColor = true;
776 | cbBackupEx.CheckedChanged += cbBackupEx_CheckedChanged;
777 | //
778 | // btnMoveOldVarVersions
779 | //
780 | btnMoveOldVarVersions.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
781 | btnMoveOldVarVersions.ForeColor = System.Drawing.SystemColors.ControlText;
782 | btnMoveOldVarVersions.Location = new System.Drawing.Point(6, 22);
783 | btnMoveOldVarVersions.Name = "btnMoveOldVarVersions";
784 | btnMoveOldVarVersions.Size = new System.Drawing.Size(207, 45);
785 | btnMoveOldVarVersions.TabIndex = 19;
786 | btnMoveOldVarVersions.Text = "Move Old Versions of vars\r\n(Unreferenced)";
787 | btnMoveOldVarVersions.UseVisualStyleBackColor = true;
788 | btnMoveOldVarVersions.Click += btnMoveOldVarVersions_Click;
789 | //
790 | // gbMisc
791 | //
792 | gbMisc.Controls.Add(btnMoveOldVarVersions);
793 | gbMisc.Location = new System.Drawing.Point(12, 346);
794 | gbMisc.Name = "gbMisc";
795 | gbMisc.Size = new System.Drawing.Size(219, 76);
796 | gbMisc.TabIndex = 20;
797 | gbMisc.TabStop = false;
798 | gbMisc.Text = "Misc";
799 | //
800 | // cbSkipFavorites
801 | //
802 | cbSkipFavorites.AutoSize = true;
803 | cbSkipFavorites.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
804 | cbSkipFavorites.ForeColor = System.Drawing.Color.Firebrick;
805 | cbSkipFavorites.Location = new System.Drawing.Point(526, 158);
806 | cbSkipFavorites.Name = "cbSkipFavorites";
807 | cbSkipFavorites.Size = new System.Drawing.Size(104, 19);
808 | cbSkipFavorites.TabIndex = 21;
809 | cbSkipFavorites.Text = "Skip Favorites";
810 | cbSkipFavorites.UseVisualStyleBackColor = true;
811 | cbSkipFavorites.CheckedChanged += cbSkipFavorites_CheckedChanged;
812 | //
813 | // dtpFilter
814 | //
815 | dtpFilter.Format = System.Windows.Forms.DateTimePickerFormat.Short;
816 | dtpFilter.Location = new System.Drawing.Point(973, 158);
817 | dtpFilter.MaxDate = new System.DateTime(2022, 6, 22, 0, 0, 0, 0);
818 | dtpFilter.MinDate = new System.DateTime(2010, 1, 1, 0, 0, 0, 0);
819 | dtpFilter.Name = "dtpFilter";
820 | dtpFilter.Size = new System.Drawing.Size(98, 23);
821 | dtpFilter.TabIndex = 22;
822 | dtpFilter.Value = new System.DateTime(2022, 6, 22, 0, 0, 0, 0);
823 | //
824 | // cbDateFilter
825 | //
826 | cbDateFilter.AutoSize = true;
827 | cbDateFilter.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
828 | cbDateFilter.ForeColor = System.Drawing.SystemColors.MenuText;
829 | cbDateFilter.Location = new System.Drawing.Point(882, 159);
830 | cbDateFilter.Name = "cbDateFilter";
831 | cbDateFilter.Size = new System.Drawing.Size(85, 19);
832 | cbDateFilter.TabIndex = 23;
833 | cbDateFilter.Text = "Date Filter";
834 | cbDateFilter.UseVisualStyleBackColor = true;
835 | cbDateFilter.CheckedChanged += cbDateFilter_CheckedChanged;
836 | cbDateFilter.MouseHover += cbDateFilter_MouseHover;
837 | //
838 | // cbUIAssist
839 | //
840 | cbUIAssist.AutoSize = true;
841 | cbUIAssist.Location = new System.Drawing.Point(15, 182);
842 | cbUIAssist.Name = "cbUIAssist";
843 | cbUIAssist.Size = new System.Drawing.Size(215, 19);
844 | cbUIAssist.TabIndex = 24;
845 | cbUIAssist.Text = "Scan UIAssist Profiles for References";
846 | cbUIAssist.UseVisualStyleBackColor = true;
847 | //
848 | // btnSaveFilters
849 | //
850 | btnSaveFilters.ForeColor = System.Drawing.Color.DarkBlue;
851 | btnSaveFilters.Location = new System.Drawing.Point(636, 153);
852 | btnSaveFilters.Name = "btnSaveFilters";
853 | btnSaveFilters.Size = new System.Drawing.Size(101, 27);
854 | btnSaveFilters.TabIndex = 16;
855 | btnSaveFilters.Text = "Save Filters";
856 | btnSaveFilters.UseVisualStyleBackColor = true;
857 | btnSaveFilters.Click += btnSaveFilters_Click;
858 | //
859 | // btnLoadFilters
860 | //
861 | btnLoadFilters.ForeColor = System.Drawing.Color.DarkGreen;
862 | btnLoadFilters.Location = new System.Drawing.Point(743, 153);
863 | btnLoadFilters.Name = "btnLoadFilters";
864 | btnLoadFilters.Size = new System.Drawing.Size(101, 27);
865 | btnLoadFilters.TabIndex = 25;
866 | btnLoadFilters.Text = "Load Filters";
867 | btnLoadFilters.UseVisualStyleBackColor = true;
868 | btnLoadFilters.Click += btnLoadFilters_Click;
869 | //
870 | // cbOverwrite
871 | //
872 | cbOverwrite.AutoSize = true;
873 | cbOverwrite.Location = new System.Drawing.Point(18, 321);
874 | cbOverwrite.Name = "cbOverwrite";
875 | cbOverwrite.Size = new System.Drawing.Size(145, 19);
876 | cbOverwrite.TabIndex = 26;
877 | cbOverwrite.Text = "Overwrite existing files";
878 | cbOverwrite.UseVisualStyleBackColor = true;
879 | //
880 | // frmVARManager
881 | //
882 | AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
883 | AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
884 | ClientSize = new System.Drawing.Size(1080, 794);
885 | Controls.Add(cbOverwrite);
886 | Controls.Add(btnLoadFilters);
887 | Controls.Add(btnSaveFilters);
888 | Controls.Add(cbUIAssist);
889 | Controls.Add(cbDateFilter);
890 | Controls.Add(dtpFilter);
891 | Controls.Add(cbSkipFavorites);
892 | Controls.Add(gbMisc);
893 | Controls.Add(cbRestoreEx);
894 | Controls.Add(gbFolderFilters);
895 | Controls.Add(cbBackupEx);
896 | Controls.Add(gbCreatorFilters);
897 | Controls.Add(gbPresets);
898 | Controls.Add(cbSavesScene);
899 | Controls.Add(groupBox8);
900 | Controls.Add(groupBox7);
901 | Controls.Add(groupBox6);
902 | Controls.Add(groupBox5);
903 | Controls.Add(gbFolderEx);
904 | Controls.Add(gbCreatorEx);
905 | Controls.Add(groupBox2);
906 | Controls.Add(groupBox1);
907 | MaximizeBox = false;
908 | MinimumSize = new System.Drawing.Size(1096, 786);
909 | Name = "frmVARManager";
910 | Text = "VAR Manager";
911 | groupBox1.ResumeLayout(false);
912 | groupBox1.PerformLayout();
913 | groupBox2.ResumeLayout(false);
914 | gbCreatorEx.ResumeLayout(false);
915 | gbFolderEx.ResumeLayout(false);
916 | groupBox5.ResumeLayout(false);
917 | groupBox5.PerformLayout();
918 | ((System.ComponentModel.ISupportInitialize)dgvTypes).EndInit();
919 | groupBox6.ResumeLayout(false);
920 | groupBox7.ResumeLayout(false);
921 | groupBox8.ResumeLayout(false);
922 | gbPresets.ResumeLayout(false);
923 | gbPresets.PerformLayout();
924 | gbCreatorFilters.ResumeLayout(false);
925 | gbCreatorFilters.PerformLayout();
926 | gbFolderFilters.ResumeLayout(false);
927 | gbFolderFilters.PerformLayout();
928 | gbMisc.ResumeLayout(false);
929 | ResumeLayout(false);
930 | PerformLayout();
931 | }
932 |
933 | #endregion
934 | private System.Windows.Forms.Button btnVamfolder;
935 | private System.Windows.Forms.Button btnBackupfolder;
936 | private System.Windows.Forms.TextBox txtBackupfolder;
937 | private System.Windows.Forms.TextBox txtVamfolder;
938 | private System.Windows.Forms.Button btnBackupUnref;
939 | private System.Windows.Forms.GroupBox groupBox1;
940 | private System.Windows.Forms.GroupBox groupBox2;
941 | private System.Windows.Forms.Button btnRestoreAll;
942 | private System.Windows.Forms.Label label2;
943 | private System.Windows.Forms.Label label1;
944 | private System.Windows.Forms.Button btnRestoreSpec;
945 | private System.Windows.Forms.GroupBox gbCreatorEx;
946 | private System.Windows.Forms.CheckedListBox clbCreators;
947 | private System.Windows.Forms.GroupBox gbFolderEx;
948 | private System.Windows.Forms.CheckedListBox clbFolders;
949 | private System.ComponentModel.BackgroundWorker backgroundWorker1;
950 | private System.Windows.Forms.GroupBox groupBox5;
951 | private System.Windows.Forms.Label lblBackupcount;
952 | private System.Windows.Forms.Label label5;
953 | private System.Windows.Forms.Label lblVamcount;
954 | private System.Windows.Forms.Label label3;
955 | private System.Windows.Forms.Button btnBackupSpec;
956 | private System.Windows.Forms.GroupBox groupBox6;
957 | private System.Windows.Forms.Button btnBackupUnrefSpec;
958 | private System.Windows.Forms.Button btnRestoreRef;
959 | private System.Windows.Forms.Button btnResetSettings;
960 | private System.Windows.Forms.TextBox txtCreatorFilter;
961 | private System.Windows.Forms.TextBox txtFolderFilter;
962 | private System.Windows.Forms.CheckBox cbInvertCreators;
963 | private System.Windows.Forms.CheckBox cbAllCreators;
964 | private System.Windows.Forms.CheckBox cbInvertFolders;
965 | private System.Windows.Forms.CheckBox cbAllFolders;
966 | private System.Windows.Forms.GroupBox groupBox7;
967 | private System.Windows.Forms.Button btnDisablepreloadmorphs;
968 | private System.Windows.Forms.Button btnRevertpreloadmorphs;
969 | private System.Windows.Forms.Button btnDisableClothing;
970 | private System.Windows.Forms.GroupBox groupBox8;
971 | private System.Windows.Forms.Button btnMorphPresets;
972 | private System.Windows.Forms.GroupBox gbPresets;
973 | private System.Windows.Forms.CheckBox cbAppearance;
974 | private System.Windows.Forms.CheckBox cbSavesScene;
975 | private System.Windows.Forms.CheckBox cbSkin;
976 | private System.Windows.Forms.CheckBox cbPlugins;
977 | private System.Windows.Forms.CheckBox cbMorphs;
978 | private System.Windows.Forms.CheckBox cbHair;
979 | private System.Windows.Forms.CheckBox cbClothing;
980 | private System.Windows.Forms.ToolTip toolTipSaves;
981 | private System.Windows.Forms.GroupBox gbCreatorFilters;
982 | private System.Windows.Forms.GroupBox gbFolderFilters;
983 | private System.Windows.Forms.CheckedListBox clbCreatorsRestore;
984 | private System.Windows.Forms.CheckedListBox clbFoldersRestore;
985 | private System.Windows.Forms.CheckBox cbRestoreEx;
986 | private System.Windows.Forms.CheckBox cbBackupEx;
987 | private System.Windows.Forms.Button btnMoveOldVarVersions;
988 | private System.Windows.Forms.GroupBox gbMisc;
989 | private System.Windows.Forms.Button btnSaveConfig;
990 | private System.Windows.Forms.Button btnRestoreConfig;
991 | private System.Windows.Forms.SaveFileDialog sfdVarConfig;
992 | private System.Windows.Forms.OpenFileDialog ofdVarConfig;
993 | private System.Windows.Forms.CheckBox cbSkipFavorites;
994 | private System.Windows.Forms.DateTimePicker dtpFilter;
995 | private System.Windows.Forms.CheckBox cbDateFilter;
996 | private System.Windows.Forms.Button btnRestoreLastConfig;
997 | private System.Windows.Forms.ToolTip toolTipDateFilter;
998 | private System.Windows.Forms.DataGridView dgvTypes;
999 | private System.Windows.Forms.CheckBox cbIgnoreHidden;
1000 | private System.Windows.Forms.DataGridViewTextBoxColumn Type;
1001 | private System.Windows.Forms.DataGridViewCheckBoxColumn OR;
1002 | private System.Windows.Forms.DataGridViewCheckBoxColumn AND;
1003 | private System.Windows.Forms.DataGridViewCheckBoxColumn NOT;
1004 | private System.Windows.Forms.CheckBox cbUIAssist;
1005 | private System.Windows.Forms.Button btnSaveFilters;
1006 | private System.Windows.Forms.Button btnLoadFilters;
1007 | private System.Windows.Forms.CheckBox cbOverwrite;
1008 | }
1009 | }
1010 |
1011 |
--------------------------------------------------------------------------------
/VAMvarmanager/frmVARManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 | using System.IO;
11 | using System.Runtime.Serialization;
12 | using System.Xml.Serialization;
13 | using static VAMvarmanager.frmVARManager;
14 |
15 | namespace VAMvarmanager
16 | {
17 | public partial class frmVARManager : Form
18 | {
19 | public varmanager vm;
20 | private FolderBrowserDialog fbVam;
21 | private FolderBrowserDialog fbBackup;
22 | private bool _enabled = false;
23 | public string _strVamdir;
24 | private string _strBackupdir;
25 | private System.Collections.Specialized.StringCollection _creatorex;
26 | private System.Collections.Specialized.StringCollection _folderex;
27 | private List _creatorListvam;
28 | private List _folderListvam;
29 | private List _creatorListbak;
30 | private List _folderListbak;
31 | private System.Collections.Specialized.StringCollection _creatorRestoreex;
32 | private System.Collections.Specialized.StringCollection _folderRestoreex;
33 | private System.Collections.Specialized.StringCollection _lastActivevars;
34 | private int _lastActivevarcount;
35 |
36 | public class vmFilterConfig
37 | {
38 | public List creatorex;
39 | public List folderex;
40 | public List creatorRestoreex;
41 | public List folderRestoreex;
42 | }
43 |
44 | public frmVARManager()
45 | {
46 | InitializeComponent();
47 | txtVamfolder.Enabled = false;
48 | txtBackupfolder.Enabled = false;
49 | txtCreatorFilter.Enabled = false;
50 | txtFolderFilter.Enabled = false;
51 |
52 | cbAllCreators.Enabled = false;
53 | cbInvertCreators.Enabled = false;
54 | cbAllFolders.Enabled = false;
55 | cbInvertFolders.Enabled = false;
56 |
57 | cbOverwrite.Enabled = false;
58 | cbSavesScene.Enabled = false;
59 | cbUIAssist.Enabled = false;
60 | gbPresets.Enabled = false;
61 |
62 | btnMorphPresets.Enabled = false;
63 | btnSaveFilters.Enabled = false;
64 | btnLoadFilters.Enabled = false;
65 |
66 | cbBackupEx.Checked = true;
67 | cbBackupEx.Enabled = false;
68 | cbRestoreEx.Checked = false;
69 | cbRestoreEx.Enabled = false;
70 | cbSkipFavorites.Enabled = false;
71 |
72 | cbDateFilter.Checked = false;
73 | cbDateFilter.Enabled = false;
74 | dtpFilter.MaxDate = DateTime.Today;
75 | dtpFilter.Enabled = false;
76 | dtpFilter.Hide();
77 |
78 | //Reset settings
79 | //Properties.Settings.Default["vamfolder"] = null;
80 | //Properties.Settings.Default["backupfolder"] = null;
81 | //Properties.Settings.Default.Save();
82 |
83 | // Copy user settings from previous application version if they exist
84 | if (Properties.Settings.Default.UpdateSettings)
85 | {
86 | Properties.Settings.Default.Upgrade();
87 | Properties.Settings.Default.Reload();
88 | Properties.Settings.Default.UpdateSettings = false;
89 | Properties.Settings.Default.Save();
90 | }
91 |
92 | this.clbFolders.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbFolders_ItemCheck);
93 | this.clbCreators.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbCreators_ItemCheck);
94 | this.clbFoldersRestore.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbFoldersRestore_ItemCheck);
95 | this.clbCreatorsRestore.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.clbCreatorsRestore_ItemCheck);
96 |
97 | _enabled = checkValiddirs();
98 |
99 | //Clear saved filters if there is an error
100 | try { _creatorex = (System.Collections.Specialized.StringCollection)Properties.Settings.Default["creatorex"]; }
101 | catch
102 | {
103 | _creatorex = null;
104 | Properties.Settings.Default["creatorex"] = null;
105 | Properties.Settings.Default.Save();
106 | }
107 |
108 | try { _folderex = (System.Collections.Specialized.StringCollection)Properties.Settings.Default["folderex"]; }
109 | catch
110 | {
111 | _folderex = null;
112 | Properties.Settings.Default["folderex"] = null;
113 | Properties.Settings.Default.Save();
114 | }
115 |
116 | try { cbSkipFavorites.Checked = (bool)Properties.Settings.Default["skipFavorites"]; }
117 | catch
118 | {
119 | cbSkipFavorites.Checked = false;
120 | }
121 |
122 | _creatorRestoreex = new System.Collections.Specialized.StringCollection();
123 | _folderRestoreex = new System.Collections.Specialized.StringCollection();
124 |
125 | cbBackupEx.Checked = true;
126 |
127 | dgvTypes.Rows.Add("Assets", false, false, false);
128 | dgvTypes.Rows.Add("Clothing", false, false, false);
129 | dgvTypes.Rows.Add("Clothing Presets", false, false, false);
130 | dgvTypes.Rows.Add("Hair", false, false, false);
131 | dgvTypes.Rows.Add("Hair Presets", false, false, false);
132 | dgvTypes.Rows.Add("Looks", false, false, false);
133 | dgvTypes.Rows.Add("Morphs", false, false, false);
134 | dgvTypes.Rows.Add("Poses", false, false, false);
135 | dgvTypes.Rows.Add("Scenes", false, false, false);
136 | dgvTypes.Rows.Add("SubScenes", false, false, false);
137 | dgvTypes.Rows.Add("Scripts", false, false, false);
138 | dgvTypes.Rows.Add("Skin Textures", false, false, false);
139 |
140 | setfunctionstatus();
141 |
142 | }
143 |
144 | private void setfunctionstatus()
145 | {
146 | Cursor = Cursors.WaitCursor;
147 |
148 | if (_enabled)
149 | {
150 | vm = new varmanager(_strVamdir, _strBackupdir);
151 |
152 | varmanager.varCounts vc = vm.GetVarCounts();
153 | lblVamcount.Text = vc.countVAMvars.ToString();
154 | lblBackupcount.Text = vc.countBackupvars.ToString();
155 |
156 | clbCreators.Items.Clear();
157 | _creatorListvam = vm.GetCreatorList();
158 |
159 | foreach (string c in _creatorListvam)
160 | {
161 | if (_creatorex == null)
162 | {
163 | clbCreators.Items.Add(c, false);
164 | }
165 | else
166 | {
167 | if (_creatorex.Contains(c)) { clbCreators.Items.Add(c, true); }
168 | else { clbCreators.Items.Add(c, false); }
169 | }
170 | }
171 |
172 | clbCreatorsRestore.Items.Clear();
173 | _creatorListbak = vm.GetCreatorList(true);
174 |
175 | foreach (string c in _creatorListbak)
176 | {
177 | clbCreatorsRestore.Items.Add(c, false);
178 | }
179 |
180 | clbFolders.Items.Clear();
181 |
182 | _folderListvam = new List();
183 |
184 | var dirs = from f in Directory.GetDirectories(_strVamdir + @"\AddonPackages", "*", SearchOption.AllDirectories)
185 | where !f.EndsWith(".var") && !f.Contains(@".var\")
186 | select f.Replace(_strVamdir + @"\AddonPackages\", "");
187 |
188 | _folderListvam.Add(@"\root\");
189 | _folderListvam.AddRange(dirs.ToList());
190 |
191 | foreach (string f in _folderListvam)
192 | {
193 | if (_folderex == null)
194 | {
195 | clbFolders.Items.Add(f, false);
196 | }
197 | else
198 | {
199 | if (_folderex.Contains(f)) {
200 | clbFolders.Items.Add(f, true);
201 | }
202 | else { clbFolders.Items.Add(f, false); }
203 | }
204 | }
205 |
206 | clbFolders.Sorted = true;
207 |
208 | for (int i = clbFolders.Items.Count - 1; i >= 0; i--)
209 | {
210 | if (clbFolders.Items[i].ToString() == @"\root\" && i != 0)
211 | {
212 | var temp = clbFolders.Items[i];
213 | bool tempChecked = clbFolders.GetItemChecked(i);
214 | clbFolders.Sorted = false;
215 | clbFolders.Items.RemoveAt(i);
216 | clbFolders.Items.Insert(0, temp);
217 | clbFolders.SetItemChecked(0, tempChecked);
218 | break;
219 | }
220 | }
221 |
222 | clbFoldersRestore.Items.Clear();
223 |
224 | _folderListbak = new List();
225 |
226 | var dirsRestore = from f in Directory.GetDirectories(_strBackupdir, "*", SearchOption.AllDirectories)
227 | where !f.EndsWith(".var") && !f.Contains(@".var\")
228 | select f.Replace(_strBackupdir + @"\", "");
229 |
230 | _folderListbak.Add(@"\root\");
231 | _folderListbak.AddRange(dirsRestore.ToList());
232 |
233 | foreach (string f in _folderListbak)
234 | {
235 | clbFoldersRestore.Items.Add(f, false);
236 | }
237 |
238 | clbFoldersRestore.Sorted = true;
239 |
240 | for (int i = clbFoldersRestore.Items.Count - 1; i >= 0; i--)
241 | {
242 | if (clbFoldersRestore.Items[i].ToString() == @"\root\" && i != 0)
243 | {
244 | var temp = clbFoldersRestore.Items[i];
245 | bool tempChecked = clbFoldersRestore.GetItemChecked(i);
246 | clbFoldersRestore.Sorted = false;
247 | clbFoldersRestore.Items.RemoveAt(i);
248 | clbFoldersRestore.Items.Insert(0, temp);
249 | clbFoldersRestore.SetItemChecked(0, tempChecked);
250 | break;
251 | }
252 | }
253 |
254 | //Check auto-saved last config
255 | try { _lastActivevars = (System.Collections.Specialized.StringCollection)Properties.Settings.Default["lastActiveVars"]; }
256 | catch
257 | {
258 | _lastActivevars = null;
259 | }
260 |
261 | try { _lastActivevarcount = (int)Properties.Settings.Default["lastActiveVarcount"]; }
262 | catch
263 | {
264 | _lastActivevarcount = 0;
265 | }
266 |
267 | if( _lastActivevarcount == 0 || _lastActivevars == null)
268 | {
269 | _lastActivevars = new System.Collections.Specialized.StringCollection();
270 | _lastActivevars.AddRange(vm.getActiveVarConfig().ToArray());
271 | Properties.Settings.Default["lastActiveVars"] = _lastActivevars;
272 | _lastActivevarcount = vm.GetVarCounts().countVAMvars;
273 | Properties.Settings.Default["lastActiveVarcount"] = _lastActivevarcount;
274 | Properties.Settings.Default.Save();
275 | }
276 |
277 | btnRestoreLastConfig.Enabled = true;
278 | btnRestoreLastConfig.Text = "Restore Last Config/Undo" + Environment.NewLine + "(" + _lastActivevarcount.ToString() + " Active vars)";
279 |
280 | if (cbRestoreEx.Checked)
281 | {
282 | this.clbCreatorsRestore.Enabled = true;
283 | this.clbCreatorsRestore.Show();
284 | this.clbFoldersRestore.Enabled = true;
285 | this.clbFoldersRestore.Show();
286 |
287 | this.clbCreators.Enabled = false;
288 | this.clbCreators.Hide();
289 | this.clbFolders.Enabled = false;
290 | this.clbFolders.Hide();
291 | }
292 | else
293 | {
294 | this.clbCreatorsRestore.Enabled = false;
295 | this.clbCreatorsRestore.Hide();
296 | this.clbFoldersRestore.Enabled = false;
297 | this.clbFoldersRestore.Hide();
298 |
299 | this.clbCreators.Enabled = true;
300 | this.clbCreators.Show();
301 | this.clbFolders.Enabled = true;
302 | this.clbFolders.Show();
303 | }
304 |
305 | this.btnBackupUnref.Enabled = true;
306 | this.btnBackupUnrefSpec.Enabled = true;
307 | this.btnBackupSpec.Enabled = true;
308 | this.btnRestoreRef.Enabled = true;
309 | this.btnRestoreSpec.Enabled = true;
310 | this.btnRestoreAll.Enabled = true;
311 | this.btnMoveOldVarVersions.Enabled = true;
312 | this.btnDisablepreloadmorphs.Enabled = true;
313 | this.btnRevertpreloadmorphs.Enabled = true;
314 | this.btnDisableClothing.Enabled = true;
315 | this.btnMorphPresets.Enabled = true;
316 | this.btnSaveFilters.Enabled = true;
317 | this.btnLoadFilters.Enabled = true;
318 | this.btnSaveConfig.Enabled = true;
319 | this.btnRestoreConfig.Enabled = true;
320 |
321 | this.txtCreatorFilter.Enabled = true;
322 | this.txtFolderFilter.Enabled = true;
323 |
324 | this.cbAllCreators.Enabled = true;
325 | this.cbInvertCreators.Enabled = true;
326 | this.cbAllFolders.Enabled = true;
327 | this.cbInvertFolders.Enabled = true;
328 |
329 | this.cbBackupEx.Enabled = true;
330 | this.cbRestoreEx.Enabled = true;
331 | this.cbSkipFavorites.Enabled = true;
332 |
333 | this.cbDateFilter.Enabled = true;
334 | this.dtpFilter.Enabled = true;
335 |
336 | this.cbOverwrite.Enabled = true;
337 | this.cbSavesScene.Enabled = true;
338 | this.cbUIAssist.Enabled = true;
339 | this.gbPresets.Enabled = true;
340 | }
341 | else
342 | {
343 | this.clbCreators.Enabled = false;
344 | this.clbCreators.Hide();
345 | this.clbFolders.Enabled = false;
346 | this.clbFolders.Hide();
347 |
348 | this.clbCreatorsRestore.Enabled = false;
349 | this.clbCreatorsRestore.Hide();
350 | this.clbFoldersRestore.Enabled = false;
351 | this.clbFoldersRestore.Hide();
352 |
353 | this.btnBackupUnref.Enabled = false;
354 | this.btnBackupUnrefSpec.Enabled = false;
355 | this.btnBackupSpec.Enabled = false;
356 | this.btnRestoreRef.Enabled = false;
357 | this.btnRestoreSpec.Enabled = false;
358 | this.btnRestoreAll.Enabled = false;
359 | this.btnMoveOldVarVersions.Enabled = false;
360 | this.btnDisablepreloadmorphs.Enabled = false;
361 | this.btnRevertpreloadmorphs.Enabled = false;
362 | this.btnDisableClothing.Enabled = false;
363 | this.btnMorphPresets.Enabled = false;
364 | this.btnSaveFilters.Enabled = false;
365 | this.btnLoadFilters.Enabled = false;
366 | this.btnSaveConfig.Enabled = false;
367 | this.btnRestoreConfig.Enabled = false;
368 |
369 | this.txtCreatorFilter.Enabled = false;
370 | this.txtFolderFilter.Enabled = false;
371 |
372 | this.cbAllCreators.Enabled = false;
373 | this.cbInvertCreators.Enabled = false;
374 | this.cbAllFolders.Enabled = false;
375 | this.cbInvertFolders.Enabled = false;
376 |
377 | this.cbBackupEx.Enabled = false;
378 | this.cbRestoreEx.Enabled = false;
379 | this.cbSkipFavorites.Enabled = false;
380 |
381 | this.cbDateFilter.Enabled = false;
382 | this.dtpFilter.Enabled = false;
383 |
384 | this.cbOverwrite.Enabled = false;
385 | this.cbSavesScene.Enabled = false;
386 | this.cbUIAssist.Enabled = false;
387 | this.gbPresets.Enabled = false;
388 |
389 | btnRestoreLastConfig.Enabled = false;
390 | btnRestoreLastConfig.Text = "Restore Last Config/Undo" + Environment.NewLine + "(0 Active vars)";
391 | }
392 |
393 | Cursor = Cursors.Default;
394 |
395 | }
396 |
397 | private bool checkValiddirs()
398 | {
399 | if ((Properties.Settings.Default["vamfolder"] != null) && System.IO.Directory.Exists(Properties.Settings.Default["vamfolder"].ToString()) && System.IO.Directory.Exists(Properties.Settings.Default["vamfolder"].ToString() + @"\AddonPackages"))
400 | {
401 | _strVamdir = Properties.Settings.Default["vamfolder"].ToString();
402 | txtVamfolder.Text = Properties.Settings.Default["vamfolder"].ToString();
403 | }
404 | else { txtVamfolder.Text = "INVALID DIRECTORY"; }
405 |
406 | if ((Properties.Settings.Default["backupfolder"] != null) && System.IO.Directory.Exists(Properties.Settings.Default["backupfolder"].ToString()))
407 | {
408 | _strBackupdir = Properties.Settings.Default["backupfolder"].ToString();
409 | txtBackupfolder.Text = Properties.Settings.Default["backupfolder"].ToString();
410 | }
411 | else { txtBackupfolder.Text = "INVALID DIRECTORY"; }
412 |
413 | if ((Properties.Settings.Default["vamfolder"] != null) && System.IO.Directory.Exists(Properties.Settings.Default["vamfolder"].ToString()) && (Properties.Settings.Default["backupfolder"] != null) && System.IO.Directory.Exists(Properties.Settings.Default["backupfolder"].ToString()) && System.IO.Directory.Exists(Properties.Settings.Default["vamfolder"].ToString() + @"\AddonPackages"))
414 | {
415 | return true;
416 | }
417 | else { return false; }
418 | }
419 |
420 | private void clbCreators_ItemCheck(Object sender, ItemCheckEventArgs e)
421 | {
422 | if (e.NewValue == CheckState.Checked && _creatorex == null)
423 | {
424 | _creatorex = new System.Collections.Specialized.StringCollection();
425 | _creatorex.Add(clbCreators.GetItemText(clbCreators.Items[e.Index]));
426 | }
427 | else if (e.NewValue == CheckState.Checked)
428 | {
429 | if (!_creatorex.Contains(clbCreators.GetItemText(clbCreators.Items[e.Index])))
430 | {
431 | _creatorex.Add(clbCreators.GetItemText(clbCreators.Items[e.Index]));
432 | }
433 | }
434 | else
435 | {
436 | if (_creatorex.Contains(clbCreators.GetItemText(clbCreators.Items[e.Index])))
437 | {
438 | _creatorex.Remove(clbCreators.GetItemText(clbCreators.Items[e.Index]));
439 | }
440 | }
441 |
442 | Properties.Settings.Default["creatorex"] = _creatorex;
443 | Properties.Settings.Default.Save();
444 | }
445 |
446 | private void clbCreatorsRestore_ItemCheck(Object sender, ItemCheckEventArgs e)
447 | {
448 | if (e.NewValue == CheckState.Checked && _creatorRestoreex == null)
449 | {
450 | _creatorRestoreex = new System.Collections.Specialized.StringCollection();
451 | _creatorRestoreex.Add(clbCreators.GetItemText(clbCreatorsRestore.Items[e.Index]));
452 | }
453 | else if (e.NewValue == CheckState.Checked)
454 | {
455 | if (!_creatorRestoreex.Contains(clbCreatorsRestore.GetItemText(clbCreatorsRestore.Items[e.Index])))
456 | {
457 | _creatorRestoreex.Add(clbCreatorsRestore.GetItemText(clbCreatorsRestore.Items[e.Index]));
458 | }
459 | }
460 | else
461 | {
462 | if (_creatorRestoreex.Contains(clbCreatorsRestore.GetItemText(clbCreatorsRestore.Items[e.Index])))
463 | {
464 | _creatorRestoreex.Remove(clbCreatorsRestore.GetItemText(clbCreatorsRestore.Items[e.Index]));
465 | }
466 | }
467 | }
468 |
469 | private void clbFolders_ItemCheck(Object sender, ItemCheckEventArgs e)
470 | {
471 | if (e.NewValue == CheckState.Checked && _folderex == null)
472 | {
473 | _folderex = new System.Collections.Specialized.StringCollection();
474 | _folderex.Add(clbFolders.GetItemText(clbFolders.Items[e.Index]));
475 | }
476 | else if (e.NewValue == CheckState.Checked)
477 | {
478 | if (!_folderex.Contains(clbFolders.GetItemText(clbFolders.Items[e.Index])))
479 | {
480 | _folderex.Add(clbFolders.GetItemText(clbFolders.Items[e.Index]));
481 | }
482 |
483 | }
484 | else
485 | {
486 | if (_folderex.Contains(clbFolders.GetItemText(clbFolders.Items[e.Index])))
487 | {
488 | _folderex.Remove(clbFolders.GetItemText(clbFolders.Items[e.Index]));
489 | }
490 | }
491 |
492 | Properties.Settings.Default["folderex"] = _folderex;
493 | Properties.Settings.Default.Save();
494 | }
495 |
496 | private void clbFoldersRestore_ItemCheck(Object sender, ItemCheckEventArgs e)
497 | {
498 | if (e.NewValue == CheckState.Checked && _folderRestoreex == null)
499 | {
500 | _folderRestoreex = new System.Collections.Specialized.StringCollection();
501 | _folderRestoreex.Add(clbFoldersRestore.GetItemText(clbFoldersRestore.Items[e.Index]));
502 | }
503 | else if (e.NewValue == CheckState.Checked)
504 | {
505 | if (!_folderRestoreex.Contains(clbFoldersRestore.GetItemText(clbFoldersRestore.Items[e.Index])))
506 | {
507 | _folderRestoreex.Add(clbFoldersRestore.GetItemText(clbFoldersRestore.Items[e.Index]));
508 | }
509 |
510 | }
511 | else
512 | {
513 | if (_folderRestoreex.Contains(clbFoldersRestore.GetItemText(clbFoldersRestore.Items[e.Index])))
514 | {
515 | _folderRestoreex.Remove(clbFoldersRestore.GetItemText(clbFoldersRestore.Items[e.Index]));
516 | }
517 | }
518 | }
519 |
520 | private void btnVamfolder_Click(object sender, EventArgs e)
521 | {
522 | this.fbVam = new FolderBrowserDialog();
523 | fbVam.RootFolder = Environment.SpecialFolder.Desktop;
524 |
525 | if(fbVam.ShowDialog() == DialogResult.OK)
526 | {
527 | Properties.Settings.Default["vamfolder"] = fbVam.SelectedPath;
528 | Properties.Settings.Default.Save();
529 |
530 | _enabled = checkValiddirs();
531 | }
532 |
533 | setfunctionstatus();
534 | }
535 |
536 | private void btnBackupfolder_Click(object sender, EventArgs e)
537 | {
538 | this.fbBackup = new FolderBrowserDialog();
539 | fbBackup.RootFolder = Environment.SpecialFolder.Desktop;
540 |
541 | if (fbBackup.ShowDialog() == DialogResult.OK)
542 | {
543 | Properties.Settings.Default["backupfolder"] = fbBackup.SelectedPath;
544 | Properties.Settings.Default.Save();
545 | txtBackupfolder.Text = Properties.Settings.Default["backupfolder"].ToString();
546 |
547 | _enabled = checkValiddirs();
548 | }
549 |
550 | setfunctionstatus();
551 | }
552 |
553 | private void btnBackupUnref_Click(object sender, EventArgs e)
554 | {
555 | Cursor = Cursors.WaitCursor;
556 |
557 | saveLastActivevars();
558 |
559 | if (cbBackupEx.Checked)
560 | {
561 | varmanager.varCounts vc = vm.BackupUnrefVarsEx(clbFolders.CheckedItems, clbCreators.CheckedItems, getLocalFileFilters(), cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
562 | lblVamcount.Text = vc.countVAMvars.ToString();
563 | lblBackupcount.Text = vc.countBackupvars.ToString();
564 | }
565 | else
566 | {
567 | varmanager.varCounts vc = vm.BackupUnrefVars(getLocalFileFilters(), cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
568 | lblVamcount.Text = vc.countVAMvars.ToString();
569 | lblBackupcount.Text = vc.countBackupvars.ToString();
570 | }
571 |
572 | setfunctionstatus();
573 |
574 | Cursor = Cursors.Default;
575 | }
576 |
577 | private void btnBackupUnrefSpec_Click(object sender, EventArgs e)
578 | {
579 | Cursor = Cursors.WaitCursor;
580 |
581 | saveLastActivevars();
582 |
583 | if (cbBackupEx.Checked)
584 | {
585 | varmanager.varCounts vc = vm.BackupUnrefSpecVarsEx(dgvTypes, cbIgnoreHidden.Checked, clbFolders.CheckedItems, clbCreators.CheckedItems, getLocalFileFilters(), cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
586 | lblVamcount.Text = vc.countVAMvars.ToString();
587 | lblBackupcount.Text = vc.countBackupvars.ToString();
588 | }
589 | else
590 | {
591 | varmanager.varCounts vc = vm.BackupUnrefSpecVars(dgvTypes, cbIgnoreHidden.Checked, getLocalFileFilters(), cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
592 | lblVamcount.Text = vc.countVAMvars.ToString();
593 | lblBackupcount.Text = vc.countBackupvars.ToString();
594 | }
595 |
596 | setfunctionstatus();
597 |
598 | Cursor = Cursors.Default;
599 | }
600 |
601 | private void btnBackupSpec_Click(object sender, EventArgs e)
602 | {
603 | Cursor = Cursors.WaitCursor;
604 |
605 | saveLastActivevars();
606 |
607 | if (cbBackupEx.Checked)
608 | {
609 | varmanager.varCounts vc = vm.BackupSpecVarsEx(dgvTypes, cbIgnoreHidden.Checked, clbFolders.CheckedItems, clbCreators.CheckedItems, cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
610 | lblVamcount.Text = vc.countVAMvars.ToString();
611 | lblBackupcount.Text = vc.countBackupvars.ToString();
612 | }
613 | else
614 | {
615 | varmanager.varCounts vc = vm.BackupSpecVars(dgvTypes, cbIgnoreHidden.Checked, cbSkipFavorites.Checked, cbDateFilter.Checked ? dtpFilter.Value : default, cbOverwrite.Checked);
616 | lblVamcount.Text = vc.countVAMvars.ToString();
617 | lblBackupcount.Text = vc.countBackupvars.ToString();
618 | }
619 |
620 | setfunctionstatus();
621 |
622 | Cursor = Cursors.Default;
623 | }
624 |
625 | private void btnRestoreRef_Click(object sender, EventArgs e)
626 | {
627 | Cursor = Cursors.WaitCursor;
628 |
629 | saveLastActivevars();
630 |
631 | if (cbRestoreEx.Checked)
632 | {
633 | varmanager.varCounts vc = vm.RestoreNeededVarsEx(getLocalFileFilters(), clbFoldersRestore.CheckedItems, clbCreatorsRestore.CheckedItems, cbOverwrite.Checked);
634 | lblVamcount.Text = vc.countVAMvars.ToString();
635 | lblBackupcount.Text = vc.countBackupvars.ToString();
636 | }
637 | else
638 | {
639 | varmanager.varCounts vc = vm.RestoreNeededVars(getLocalFileFilters(), cbOverwrite.Checked);
640 | lblVamcount.Text = vc.countVAMvars.ToString();
641 | lblBackupcount.Text = vc.countBackupvars.ToString();
642 | }
643 |
644 | setfunctionstatus();
645 |
646 | Cursor = Cursors.Default;
647 | }
648 |
649 | private void btnRestoreSpec_Click(object sender, EventArgs e)
650 | {
651 | Cursor = Cursors.WaitCursor;
652 |
653 | saveLastActivevars();
654 |
655 | if (cbRestoreEx.Checked)
656 | {
657 | varmanager.varCounts vc = vm.RestoreSpecificVarsEx(dgvTypes, cbIgnoreHidden.Checked, clbFoldersRestore.CheckedItems, clbCreatorsRestore.CheckedItems, cbOverwrite.Checked);
658 | lblVamcount.Text = vc.countVAMvars.ToString();
659 | lblBackupcount.Text = vc.countBackupvars.ToString();
660 | }
661 | else
662 | {
663 | varmanager.varCounts vc = vm.RestoreSpecificVars(dgvTypes, cbIgnoreHidden.Checked, cbOverwrite.Checked);
664 | lblVamcount.Text = vc.countVAMvars.ToString();
665 | lblBackupcount.Text = vc.countBackupvars.ToString();
666 | }
667 |
668 | setfunctionstatus();
669 |
670 | Cursor = Cursors.Default;
671 | }
672 |
673 | private void btnRestoreAll_Click(object sender, EventArgs e)
674 | {
675 | Cursor = Cursors.WaitCursor;
676 |
677 | saveLastActivevars();
678 |
679 | if (cbRestoreEx.Checked)
680 | {
681 | varmanager.varCounts vc = vm.RestoreAllvarsEx(clbFoldersRestore.CheckedItems, clbCreatorsRestore.CheckedItems, cbOverwrite.Checked);
682 | lblVamcount.Text = vc.countVAMvars.ToString();
683 | lblBackupcount.Text = vc.countBackupvars.ToString();
684 | }
685 | else
686 | {
687 | varmanager.varCounts vc = vm.RestoreAllvars(cbOverwrite.Checked);
688 | lblVamcount.Text = vc.countVAMvars.ToString();
689 | lblBackupcount.Text = vc.countBackupvars.ToString();
690 | }
691 |
692 | setfunctionstatus();
693 |
694 | Cursor = Cursors.Default;
695 | }
696 |
697 | private void btnMoveOldVarVersions_Click(object sender, EventArgs e)
698 | {
699 | Cursor = Cursors.WaitCursor;
700 |
701 | varmanager.varCounts vc = vm.MoveOldVarVersions(cbOverwrite.Checked);
702 | lblVamcount.Text = vc.countVAMvars.ToString();
703 | lblBackupcount.Text = vc.countBackupvars.ToString();
704 |
705 | setfunctionstatus();
706 |
707 | MessageBox.Show(vc.countOldvars.ToString() + " old versions of vars moved to:" + Environment.NewLine + _strVamdir + @"\_oldvars", "Old vars Moved", MessageBoxButtons.OK, MessageBoxIcon.Warning);
708 |
709 | Cursor = Cursors.Default;
710 | }
711 |
712 | private void btnResetSettings_Click(object sender, EventArgs e)
713 | {
714 | Properties.Settings.Default["vamfolder"] = null;
715 | Properties.Settings.Default["backupfolder"] = null;
716 | Properties.Settings.Default["creatorex"] = null;
717 | Properties.Settings.Default["folderex"] = null;
718 | Properties.Settings.Default.Save();
719 | txtVamfolder.Text = "";
720 | txtBackupfolder.Text = "";
721 | _creatorex = null;
722 | _folderex = null;
723 | lblVamcount.Text = "";
724 | lblBackupcount.Text = "";
725 |
726 | _enabled = false;
727 |
728 | setfunctionstatus();
729 | }
730 |
731 | private void txtCreatorFilter_TextChanged(object sender, EventArgs e)
732 | {
733 | if (cbBackupEx.Checked)
734 | {
735 | clbFilter(ref clbCreators, txtCreatorFilter.Text, _creatorListvam, _creatorex);
736 | }
737 | else
738 | {
739 | clbFilter(ref clbCreatorsRestore, txtCreatorFilter.Text, _creatorListbak, _creatorRestoreex);
740 | }
741 | }
742 |
743 | private void txtFolderFilter_TextChanged(object sender, EventArgs e)
744 | {
745 | if (cbBackupEx.Checked)
746 | {
747 | clbFilter(ref clbFolders, txtFolderFilter.Text, _folderListvam, _folderex);
748 | }
749 | else
750 | {
751 | clbFilter(ref clbFoldersRestore, txtFolderFilter.Text, _folderListbak, _folderRestoreex);
752 | }
753 | }
754 |
755 | private void cbAllCreators_CheckedChanged(object sender, EventArgs e)
756 | {
757 | Cursor = Cursors.WaitCursor;
758 | if (cbBackupEx.Checked)
759 | {
760 | clbSetAll(ref clbCreators, cbAllCreators.Checked);
761 | }
762 | else
763 | {
764 | clbSetAll(ref clbCreatorsRestore, cbAllCreators.Checked);
765 | }
766 | Cursor = Cursors.Default;
767 | }
768 |
769 | private void cbInvertCreators_CheckedChanged(object sender, EventArgs e)
770 | {
771 | Cursor = Cursors.WaitCursor;
772 | if (cbBackupEx.Checked)
773 | {
774 | clbInvert(ref clbCreators);
775 | }
776 | else
777 | {
778 | clbInvert(ref clbCreatorsRestore);
779 | }
780 | Cursor = Cursors.Default;
781 | }
782 |
783 | private void cbAllFolders_CheckedChanged(object sender, EventArgs e)
784 | {
785 | Cursor = Cursors.WaitCursor;
786 | if (cbBackupEx.Checked)
787 | {
788 | clbSetAll(ref clbFolders, cbAllFolders.Checked);
789 | }
790 | else
791 | {
792 | clbSetAll(ref clbFoldersRestore, cbAllFolders.Checked);
793 | }
794 | Cursor = Cursors.Default;
795 | }
796 |
797 | private void cbInvertFolders_CheckedChanged(object sender, EventArgs e)
798 | {
799 | Cursor = Cursors.WaitCursor;
800 | if (cbBackupEx.Checked)
801 | {
802 | clbInvert(ref clbFolders);
803 | }
804 | else
805 | {
806 | clbInvert(ref clbFoldersRestore);
807 | }
808 | Cursor = Cursors.Default;
809 | }
810 |
811 | private void clbSetAll(ref CheckedListBox clb, bool boolChecked)
812 | {
813 | for (int i = 0; i < clb.Items.Count; i++)
814 | {
815 | clb.SetItemChecked(i, boolChecked);
816 | }
817 | }
818 |
819 | private void clbInvert(ref CheckedListBox clb)
820 | {
821 | for (int i = 0; i < clb.Items.Count; i++)
822 | {
823 | clb.SetItemChecked(i, !clb.GetItemChecked(i));
824 | }
825 | }
826 |
827 | private void clbFilter(ref CheckedListBox clb, string strfilter, List fulllist, System.Collections.Specialized.StringCollection checkedlist)
828 | {
829 | var itemsNeeded = from strItem in fulllist
830 | where strItem.Contains(strfilter,StringComparison.OrdinalIgnoreCase)
831 | select strItem;
832 |
833 | clb.BeginUpdate();
834 |
835 | //Add Items
836 | foreach (var i in itemsNeeded)
837 | {
838 | if (!clb.Items.Contains(i))
839 | {
840 | if (checkedlist != null)
841 | {
842 | if (checkedlist.Contains(i)) { clb.Items.Add(i, true); }
843 | else { clb.Items.Add(i, false); }
844 | }
845 | else { clb.Items.Add(i, false); }
846 | }
847 | }
848 |
849 | //Remove Iitems
850 | for (int i = clb.Items.Count -1; i >=0; i--)
851 | {
852 | if (!itemsNeeded.Contains(clb.Items[i].ToString()))
853 | {
854 | clb.Items.RemoveAt(i);
855 | }
856 | }
857 |
858 | clb.Sorted = true;
859 |
860 | for (int i = clb.Items.Count - 1; i >= 0; i--)
861 | {
862 | if (clb.Items[i].ToString() == @"\root\" && i != 0)
863 | {
864 | var temp = clb.Items[i];
865 | bool tempChecked = clb.GetItemChecked(i);
866 | clb.Sorted = false;
867 | clb.Items.RemoveAt(i);
868 | clb.Items.Insert(0, temp);
869 | clb.SetItemChecked(0, tempChecked);
870 | break;
871 | }
872 | }
873 |
874 | clb.EndUpdate();
875 | }
876 |
877 | private void btnDisablepreloadmorphs_Click(object sender, EventArgs e)
878 | {
879 | Cursor = Cursors.WaitCursor;
880 | int test = vm.DisablePreloadMorphs();
881 | Cursor = Cursors.Default;
882 | }
883 |
884 | private void btnRevertpreloadmorphs_Click(object sender, EventArgs e)
885 | {
886 | Cursor = Cursors.WaitCursor;
887 | int test = vm.RevertPreloadMorphs();
888 | Cursor = Cursors.Default;
889 | }
890 |
891 | private void btnDisableClothing_Click(object sender, EventArgs e)
892 | {
893 | //Cursor = Cursors.WaitCursor;
894 | //Cursor = Cursors.Default;
895 | //_vm.GetDuplicateItems("clothing","female",true);
896 |
897 | frmDuplicateItemManager frmDIM = new frmDuplicateItemManager(this);
898 | this.Hide();
899 | frmDIM.Show();
900 | }
901 |
902 | private List getLocalFileFilters()
903 | {
904 | List lstReturn = new List ();
905 |
906 | lstReturn.Add(@"\Custom\PluginPresets");
907 | if (cbSavesScene.Checked) { lstReturn.Add(@"\Saves\scene"); }
908 | if (cbUIAssist.Checked) { lstReturn.Add(@"\Saves\PluginData\JayJayWon\UIAssist"); }
909 | if (cbAppearance.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Appearance"); }
910 | if (cbClothing.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Clothing"); }
911 | if (cbHair.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Hair"); }
912 | if (cbMorphs.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Morphs"); }
913 | if (cbPlugins.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Plugins"); }
914 | if (cbSkin.Checked) { lstReturn.Add(@"\Custom\Atom\Person\Skin"); }
915 |
916 | return lstReturn;
917 | }
918 |
919 | private void cbSavesScene_MouseHover(object sender, EventArgs e)
920 | {
921 | toolTipSaves.Show(@"Scans all scenes in Saves\Scene\ and all sub-folders for dependencies." + Environment.NewLine + "May take some time to complete for many files/large scenes.", cbSavesScene);
922 | }
923 |
924 | private void btnMorphPresets_Click(object sender, EventArgs e)
925 | {
926 | Cursor = Cursors.WaitCursor;
927 | frmMorphPresetMaker frmMPM = new frmMorphPresetMaker(this);
928 | this.Hide();
929 | frmMPM.Show();
930 | Cursor = Cursors.Default;
931 | }
932 |
933 | private void cbBackupEx_CheckedChanged(object sender, EventArgs e)
934 | {
935 | if (cbBackupEx.Checked)
936 | {
937 | this.cbRestoreEx.Checked = false;
938 |
939 | this.clbCreatorsRestore.Enabled = false;
940 | this.clbCreatorsRestore.Hide();
941 | this.clbFoldersRestore.Enabled = false;
942 | this.clbFoldersRestore.Hide();
943 |
944 | this.clbCreators.Enabled = true;
945 | this.clbCreators.Show();
946 | this.clbFolders.Enabled = true;
947 | this.clbFolders.Show();
948 | }
949 | else
950 | {
951 | this.clbCreators.Enabled = false;
952 | this.clbCreators.Hide();
953 | this.clbFolders.Enabled = false;
954 | this.clbFolders.Hide();
955 | }
956 | }
957 |
958 | private void cbRestoreEx_CheckedChanged(object sender, EventArgs e)
959 | {
960 | if (cbRestoreEx.Checked)
961 | {
962 | this.cbBackupEx.Checked = false;
963 |
964 | this.clbCreatorsRestore.Enabled = true;
965 | this.clbCreatorsRestore.Show();
966 | this.clbFoldersRestore.Enabled = true;
967 | this.clbFoldersRestore.Show();
968 |
969 | this.clbCreators.Enabled = false;
970 | this.clbCreators.Hide();
971 | this.clbFolders.Enabled = false;
972 | this.clbFolders.Hide();
973 | }
974 | else
975 | {
976 | this.clbCreatorsRestore.Enabled = false;
977 | this.clbCreatorsRestore.Hide();
978 | this.clbFoldersRestore.Enabled = false;
979 | this.clbFoldersRestore.Hide();
980 | }
981 | }
982 |
983 | private void btnRestoreConfig_Click(object sender, EventArgs e)
984 | {
985 | Cursor = Cursors.WaitCursor;
986 |
987 | ofdVarConfig = new OpenFileDialog();
988 | ofdVarConfig.InitialDirectory = _strVamdir;
989 | ofdVarConfig.DefaultExt = "txt";
990 | ofdVarConfig.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
991 |
992 | if (ofdVarConfig.ShowDialog() == DialogResult.OK)
993 | {
994 | saveLastActivevars();
995 |
996 | varmanager.varCounts vc = vm.RestoreVarConfig(ofdVarConfig.FileName, cbOverwrite.Checked); ;
997 | lblVamcount.Text = vc.countVAMvars.ToString();
998 | lblBackupcount.Text = vc.countBackupvars.ToString();
999 | }
1000 |
1001 | Cursor = Cursors.Default;
1002 | }
1003 |
1004 | private void btnSaveConfig_Click(object sender, EventArgs e)
1005 | {
1006 | Cursor = Cursors.WaitCursor;
1007 |
1008 | sfdVarConfig = new SaveFileDialog();
1009 | sfdVarConfig.InitialDirectory = _strVamdir;
1010 | sfdVarConfig.DefaultExt = "txt";
1011 | sfdVarConfig.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
1012 | sfdVarConfig.AddExtension = true;
1013 |
1014 | if(sfdVarConfig.ShowDialog() == DialogResult.OK)
1015 | {
1016 | vm.SaveVarConfig(sfdVarConfig.FileName);
1017 | }
1018 |
1019 | Cursor = Cursors.Default;
1020 | }
1021 |
1022 | private void cbSkipFavorites_CheckedChanged(object sender, EventArgs e)
1023 | {
1024 | Properties.Settings.Default["skipFavorites"] = cbSkipFavorites.Checked;
1025 | Properties.Settings.Default.Save();
1026 | }
1027 |
1028 | private void cbDateFilter_CheckedChanged(object sender, EventArgs e)
1029 | {
1030 | if(cbDateFilter.Checked)
1031 | {
1032 | dtpFilter.Enabled = true;
1033 | dtpFilter.Show();
1034 | }
1035 | else
1036 | {
1037 | dtpFilter.Enabled = false;
1038 | dtpFilter.Hide();
1039 | }
1040 | }
1041 |
1042 | private void cbDateFilter_MouseHover(object sender, EventArgs e)
1043 | {
1044 | toolTipDateFilter.Show("Only move vars older than the selected date. BACKUP operations only.", cbDateFilter);
1045 | }
1046 |
1047 | private void saveLastActivevars()
1048 | {
1049 | _lastActivevars = new System.Collections.Specialized.StringCollection();
1050 | _lastActivevars.AddRange(vm.getActiveVarConfig().ToArray());
1051 | Properties.Settings.Default["lastActiveVars"] = _lastActivevars;
1052 | _lastActivevarcount = vm.GetVarCounts().countVAMvars;
1053 | Properties.Settings.Default["lastActiveVarcount"] = _lastActivevarcount;
1054 | Properties.Settings.Default.Save();
1055 |
1056 | btnRestoreLastConfig.Text = "Restore Last Config/Undo" + Environment.NewLine + "(" + _lastActivevarcount.ToString() + " Active vars)";
1057 | }
1058 |
1059 | private void btnRestoreLastConfig_Click(object sender, EventArgs e)
1060 | {
1061 | Cursor = Cursors.WaitCursor;
1062 | System.Collections.Specialized.StringCollection lastActiveVarstemp = _lastActivevars;
1063 | int lastActiveVarcounttemp = _lastActivevarcount;
1064 |
1065 | saveLastActivevars();
1066 |
1067 | varmanager.varCounts vc = vm.restoreLastVarConfig(lastActiveVarstemp, cbOverwrite.Checked); ;
1068 | lblVamcount.Text = vc.countVAMvars.ToString();
1069 | lblBackupcount.Text = vc.countBackupvars.ToString();
1070 |
1071 | Cursor = Cursors.Default;
1072 | }
1073 |
1074 | private void dgvTypes_CellClick(object sender, DataGridViewCellEventArgs e)
1075 | {
1076 | if (dgvTypes.Columns[e.ColumnIndex].Name != "Type" && e.RowIndex >= 0)
1077 | {
1078 | if((bool)dgvTypes.Rows[e.RowIndex].Cells[e.ColumnIndex].Value == true)
1079 | {
1080 | dgvTypes.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = false;
1081 | }
1082 | else
1083 | {
1084 | dgvTypes.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = true;
1085 |
1086 | for (int i = 1; i < dgvTypes.ColumnCount; i++)
1087 | {
1088 | if (i != e.ColumnIndex)
1089 | {
1090 | if((bool)dgvTypes.Rows[e.RowIndex].Cells[i].Value == true)
1091 | {
1092 | dgvTypes.Rows[e.RowIndex].Cells[i].Value = false;
1093 | }
1094 | }
1095 | }
1096 | }
1097 | }
1098 |
1099 | dgvTypes.ClearSelection();
1100 | }
1101 |
1102 | private void dgvTypes_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
1103 | {
1104 | int intCountChecked = 0;
1105 |
1106 | if (dgvTypes.Columns[e.ColumnIndex].Name != "Type")
1107 | {
1108 | foreach (DataGridViewRow dgvrow in dgvTypes.Rows)
1109 | {
1110 | if ((bool)dgvrow.Cells[e.ColumnIndex].Value == false)
1111 | {
1112 | dgvrow.Cells[e.ColumnIndex].Value = true;
1113 |
1114 | for (int i = 1; i < dgvTypes.ColumnCount; i++)
1115 | {
1116 | if (i != e.ColumnIndex)
1117 | {
1118 | if ((bool)dgvrow.Cells[i].Value == true)
1119 | {
1120 | dgvrow.Cells[i].Value = false;
1121 | }
1122 | }
1123 | }
1124 | }
1125 | else
1126 | {
1127 | intCountChecked += 1;
1128 | }
1129 | }
1130 |
1131 | if (intCountChecked == dgvTypes.Rows.Count)
1132 | {
1133 | foreach (DataGridViewRow dgvrow in dgvTypes.Rows)
1134 | {
1135 | dgvrow.Cells[e.ColumnIndex].Value = false;
1136 | }
1137 | }
1138 | }
1139 | }
1140 |
1141 | private void btnSaveFilters_Click(object sender, EventArgs e)
1142 | {
1143 | Cursor = Cursors.WaitCursor;
1144 | string strFilterConfigFileName;
1145 | SaveFileDialog sfdFilters = new SaveFileDialog();
1146 |
1147 | sfdFilters.InitialDirectory = _strVamdir;
1148 | sfdFilters.FileName = "vm_filters_";
1149 | sfdFilters.DefaultExt = "xml";
1150 | sfdFilters.Filter = "XML Files (*.xml)|*.xml";
1151 | sfdFilters.AddExtension = true;
1152 |
1153 | try
1154 | {
1155 | if (sfdFilters.ShowDialog() == DialogResult.OK)
1156 | {
1157 | strFilterConfigFileName = sfdFilters.FileName;
1158 |
1159 | if (strFilterConfigFileName != null)
1160 | {
1161 | if (!strFilterConfigFileName.EndsWith(".xml"))
1162 | {
1163 | strFilterConfigFileName = strFilterConfigFileName + ".xml";
1164 |
1165 | }
1166 | }
1167 |
1168 | XmlSerializer ser = new XmlSerializer(typeof(vmFilterConfig));
1169 | TextWriter writer = new StreamWriter(strFilterConfigFileName);
1170 | List lstCreatorEx = new List();
1171 | List lstFolderEx = new List();
1172 | List lstRestoreCreatorEx = new List();
1173 | List lstRestoreFolderEx = new List();
1174 | foreach (string s in _creatorex)
1175 | {
1176 | lstCreatorEx.Add(s);
1177 | }
1178 | foreach (string s in _folderex)
1179 | {
1180 | lstFolderEx.Add(s);
1181 | }
1182 | foreach (string s in _creatorRestoreex)
1183 | {
1184 | lstRestoreCreatorEx.Add(s);
1185 | }
1186 | foreach (string s in _folderRestoreex)
1187 | {
1188 | lstRestoreFolderEx.Add(s);
1189 | }
1190 |
1191 | vmFilterConfig fc = new vmFilterConfig();
1192 | fc.creatorex = lstCreatorEx;
1193 | fc.folderex = lstFolderEx;
1194 | fc.creatorRestoreex = lstRestoreCreatorEx;
1195 | fc.folderRestoreex = lstRestoreFolderEx;
1196 |
1197 | ser.Serialize(writer, fc);
1198 | writer.Close();
1199 | }
1200 | }
1201 | catch (Exception ex)
1202 | {
1203 | string strExDetails = "Message ---\n" + ex.Message;
1204 | strExDetails += "\nStackTrace ---\n" + ex.StackTrace;
1205 | strExDetails += "\nTargetSite ---\n" + ex.TargetSite;
1206 | strExDetails += "\nInnerException ---\n" + ex.InnerException;
1207 |
1208 | MessageBox.Show(strExDetails, "Saving Filters Error",
1209 | MessageBoxButtons.OK, MessageBoxIcon.Error);
1210 | }
1211 |
1212 | Cursor = Cursors.Default;
1213 | }
1214 |
1215 | private void btnLoadFilters_Click(object sender, EventArgs e)
1216 | {
1217 | Cursor = Cursors.WaitCursor;
1218 |
1219 | string strFilterConfigFileName;
1220 | OpenFileDialog fdFilters = new OpenFileDialog();
1221 |
1222 | fdFilters.InitialDirectory = _strVamdir;
1223 | fdFilters.DefaultExt = "xml";
1224 | fdFilters.Filter = "XML Files (*.xml)|*.xml";
1225 |
1226 |
1227 | if (fdFilters.ShowDialog() == DialogResult.OK)
1228 | {
1229 | strFilterConfigFileName = fdFilters.FileName;
1230 |
1231 | try
1232 | {
1233 | XmlSerializer ser = new XmlSerializer(typeof(vmFilterConfig));
1234 | TextReader reader = new StreamReader(strFilterConfigFileName);
1235 |
1236 | vmFilterConfig fc = (vmFilterConfig)ser.Deserialize(reader);
1237 | reader.Close();
1238 |
1239 | _creatorex.Clear();
1240 | foreach (string s in fc.creatorex)
1241 | {
1242 | _creatorex.Add(s);
1243 | }
1244 | _folderex.Clear();
1245 | foreach (string s in fc.folderex)
1246 | {
1247 | _folderex.Add(s);
1248 | }
1249 | _creatorRestoreex.Clear();
1250 | foreach (string s in fc.creatorRestoreex)
1251 | {
1252 | _creatorRestoreex.Add(s);
1253 | }
1254 | _folderRestoreex.Clear();
1255 | foreach (string s in fc.folderRestoreex)
1256 | {
1257 | _folderRestoreex.Add(s);
1258 | }
1259 |
1260 | setfunctionstatus();
1261 | }
1262 | catch(Exception ex)
1263 | {
1264 | string strExDetails = "Message ---\n" + ex.Message;
1265 | strExDetails += "\nStackTrace ---\n" + ex.StackTrace;
1266 | strExDetails += "\nTargetSite ---\n" + ex.TargetSite;
1267 | strExDetails += "\nInnerException ---\n" + ex.InnerException;
1268 |
1269 | MessageBox.Show(strExDetails, "Saving Filters Error",
1270 | MessageBoxButtons.OK, MessageBoxIcon.Error);
1271 | }
1272 | }
1273 |
1274 | Cursor = Cursors.Default;
1275 | }
1276 | }
1277 | }
1278 |
--------------------------------------------------------------------------------