From 4cf17eb16e3a1af7e42fe63ed841c7d61a737f88 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Mon, 12 Jan 2026 09:57:30 +0500 Subject: [PATCH 01/10] Skip invalid VAR archives during UpdateDB --- varManager_backend/src/jobs/update_db.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/varManager_backend/src/jobs/update_db.rs b/varManager_backend/src/jobs/update_db.rs index 5c370cd..750fbc5 100644 --- a/varManager_backend/src/jobs/update_db.rs +++ b/varManager_backend/src/jobs/update_db.rs @@ -154,7 +154,17 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St move_to_not_comply(&varspath_async, var_file, &reporter_async)?; continue; } - Err(ProcessError::Io(err)) => return Err(err), + Err(ProcessError::Io(err)) => { + if is_invalid_var_archive(&err) { + reporter_async.log(format!( + "Skipping invalid VAR archive {} ({})", + var_file.display(), + err + )); + continue; + } + return Err(err); + } } let progress = 10 + ((idx + 1) * 80 / total_vars) as u8; @@ -651,6 +661,14 @@ enum ProcessError { Io(String), } + +fn is_invalid_var_archive(err: &str) -> bool { + let err_lc = err.to_lowercase(); + err_lc.contains("invalid local file header") + || err_lc.contains("invalid zip archive") + || err_lc.contains("invalid zip") +} + fn process_var_file( dependency_regex: &Regex, varspath: &Path, From 89eb6e46974820441524eb188b09564a612ce270 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Mon, 12 Jan 2026 12:55:22 +0500 Subject: [PATCH 02/10] add export missing --- .gitignore | 2 + _archived/DragNDrop/AssemblyInfo.cs | 58 - _archived/DragNDrop/DragAndDropListView.cs | 404 -- _archived/DragNDrop/DragAndDropListView.resx | 42 - _archived/DragNDrop/DragNDrop.csproj | 133 - _archived/DragNDrop/DragNDrop.dll | Bin 20480 -> 0 bytes _archived/HUB/Class1.cs | 8 - _archived/HUB/HUB.csproj | 7 - _archived/README.md | 65 - _archived/StarRatingControl/AssemblyInfo.cs | 58 - .../StarRatingControl/StarRatingControl.cs | 349 -- .../StarRatingControl.csproj | 129 - .../StarRatingControl/StarRatingControl.resx | 42 - .../Enumerations/CheckBoxState.cs | 15 - .../ThreeStateTreeView/ThreeStateTreeView.cs | 80 - .../ThreeStateTreeView.csproj | 80 - _archived/cleanup_deadlock.bat | 42 - _archived/dotnet-desktop.yml.backup | 89 - _archived/varManager.sln | 48 - _archived/varManager/App.config | 58 - _archived/varManager/Backend/BackendClient.cs | 220 - .../varManager/Backend/BackendSession.cs | 263 -- _archived/varManager/Comm.cs | 459 -- .../varManager/Custom/Scripts/MorphMerger.cs | 592 --- .../varManager/Custom/Scripts/loadscene.cs | 726 --- .../varManager/Data/VarManagerContext.cs | 225 - _archived/varManager/Form1.Designer.cs | 1660 ------- _archived/varManager/Form1.cs | 4008 ----------------- _archived/varManager/Form1.resx | 424 -- _archived/varManager/Form2.Designer.cs | 40 - _archived/varManager/Form2.cs | 20 - _archived/varManager/FormAnalysis.Designer.cs | 449 -- _archived/varManager/FormAnalysis.cs | 1242 ----- _archived/varManager/FormAnalysis.resx | 293 -- _archived/varManager/FormHub.Designer.cs | 679 --- _archived/varManager/FormHub.cs | 1118 ----- _archived/varManager/FormHub.resx | 411 -- .../varManager/FormMissingVars.Designer.cs | 771 ---- _archived/varManager/FormMissingVars.cs | 598 --- _archived/varManager/FormMissingVars.resx | 366 -- _archived/varManager/FormScenes.Designer.cs | 1023 ----- _archived/varManager/FormScenes.cs | 1275 ------ _archived/varManager/FormScenes.resx | 299 -- _archived/varManager/FormSettings.Designer.cs | 224 - _archived/varManager/FormSettings.cs | 83 - _archived/varManager/FormSettings.resx | 129 - .../varManager/FormStaleVars.Designer.cs | 166 - _archived/varManager/FormStaleVars.cs | 27 - _archived/varManager/FormStaleVars.resx | 120 - .../varManager/FormSwitchAdd.Designer.cs | 93 - _archived/varManager/FormSwitchAdd.cs | 34 - _archived/varManager/FormSwitchAdd.resx | 120 - .../varManager/FormSwitchRename.Designer.cs | 119 - _archived/varManager/FormSwitchRename.cs | 45 - _archived/varManager/FormSwitchRename.resx | 120 - .../varManager/FormUninstallVars.Designer.cs | 617 --- _archived/varManager/FormUninstallVars.cs | 297 -- _archived/varManager/FormUninstallVars.resx | 150 - .../varManager/FormVarDetail.Designer.cs | 294 -- _archived/varManager/FormVarDetail.cs | 201 - _archived/varManager/FormVarDetail.resx | 141 - _archived/varManager/FormVarsMove.Designer.cs | 185 - _archived/varManager/FormVarsMove.cs | 44 - _archived/varManager/FormVarsMove.resx | 120 - _archived/varManager/HubItem.Designer.cs | 311 -- _archived/varManager/HubItem.cs | 420 -- _archived/varManager/HubItem.resx | 123 - .../20250807184700_Initial.Designer.cs | 251 -- .../Migrations/20250807184700_Initial.cs | 143 - .../VarManagerContextModelSnapshot.cs | 248 - _archived/varManager/Models/Dependency.cs | 17 - _archived/varManager/Models/HideFav.cs | 17 - _archived/varManager/Models/InstallStatus.cs | 15 - .../varManager/Models/SavedDependency.cs | 21 - _archived/varManager/Models/Scene.cs | 26 - _archived/varManager/Models/ScenesView.cs | 21 - _archived/varManager/Models/Var.cs | 71 - _archived/varManager/PrepareSaves.Designer.cs | 222 - _archived/varManager/PrepareSaves.cs | 273 -- _archived/varManager/PrepareSaves.resx | 123 - _archived/varManager/Program.cs | 21 - .../varManager/Properties/AssemblyInfo.cs | 37 - .../Properties/Resources.Designer.cs | 143 - .../varManager/Properties/Resources.resx | 145 - .../Properties/Settings.Designer.cs | 144 - .../varManager/Properties/Settings.settings | 38 - _archived/varManager/Resources/IconHub.ico | Bin 45451 -> 0 bytes _archived/varManager/Resources/hub.ico | Bin 16958 -> 0 bytes _archived/varManager/Resources/hub.png | Bin 4127 -> 0 bytes _archived/varManager/Resources/star.psd | Bin 106490 -> 0 bytes _archived/varManager/Resources/starEmpty.png | Bin 5181 -> 0 bytes _archived/varManager/Resources/starFull.png | Bin 5159 -> 0 bytes _archived/varManager/Resources/starHalf.png | Bin 6457 -> 0 bytes .../varManager/Resources/starOneQuarter.png | Bin 6370 -> 0 bytes .../varManager/Resources/starTriQuarter.png | Bin 6634 -> 0 bytes .../varManager/Resources/vam_logo_hub.png | Bin 7720 -> 0 bytes _archived/varManager/SimpleJSON/JSON.cs | 14 - _archived/varManager/SimpleJSON/JSONArray.cs | 173 - .../varManager/SimpleJSON/JSONBinaryTag.cs | 23 - _archived/varManager/SimpleJSON/JSONClass.cs | 259 -- _archived/varManager/SimpleJSON/JSONData.cs | 112 - .../varManager/SimpleJSON/JSONLazyCreator.cs | 236 - _archived/varManager/SimpleJSON/JSONNode.cs | 695 --- _archived/varManager/SimpleLogger.cs | 167 - _archived/varManager/ThreeStateTreeview.cs | 279 -- _archived/varManager/VarManager.ico | Bin 9662 -> 0 bytes _archived/varManager/app.manifest | 78 - _archived/varManager/icoVarManager.ico | Bin 9662 -> 0 bytes _archived/varManager/meta.json | 456 -- _archived/varManager/vam.png | Bin 19715 -> 0 bytes _archived/varManager/varManager.csproj | 305 -- _archived/varManager/varManager.mdb | Bin 413696 -> 0 bytes varmanager_flutter/lib/app/app.dart | 67 +- varmanager_flutter/lib/app/providers.dart | 23 +- varmanager_flutter/lib/app/theme.dart | 32 +- varmanager_flutter/lib/core/app_version.dart | 6 +- .../lib/core/backend/backend_client.dart | 60 +- .../core/backend/backend_process_manager.dart | 4 +- .../lib/core/backend/download_controller.dart | 5 +- .../lib/core/backend/job_runner.dart | 7 +- .../lib/core/models/config.dart | 8 +- .../lib/core/models/download_models.dart | 11 +- .../lib/core/models/extra_models.dart | 37 +- .../lib/core/models/job_models.dart | 28 +- .../lib/core/models/var_models.dart | 8 +- .../lib/features/analysis/analysis_page.dart | 103 +- .../bootstrap/bootstrap_controller.dart | 47 +- .../features/bootstrap/bootstrap_gate.dart | 175 +- .../features/bootstrap/bootstrap_state.dart | 7 +- .../lib/features/home/home_page.dart | 516 ++- .../lib/features/home/providers.dart | 56 +- .../features/home/widgets/preview_panel.dart | 130 +- .../lib/features/hub/hub_page.dart | 1037 +++-- .../missing_vars/missing_vars_page.dart | 427 +- .../prepare_saves/prepare_saves_page.dart | 48 +- .../lib/features/scenes/scenes_page.dart | 196 +- .../lib/features/settings/settings_page.dart | 70 +- .../uninstall_vars/uninstall_vars_page.dart | 179 +- .../features/var_detail/var_detail_page.dart | 94 +- varmanager_flutter/lib/l10n/app_en.arb | 2 + .../lib/l10n/app_localizations.dart | 12 + .../lib/l10n/app_localizations_en.dart | 6 + .../lib/l10n/app_localizations_zh.dart | 6 + varmanager_flutter/lib/l10n/app_zh.arb | 2 + .../lib/l10n/locale_config.dart | 5 +- varmanager_flutter/lib/main.dart | 5 +- .../lib/widgets/download_manager.dart | 65 +- .../lib/widgets/image_preview_dialog.dart | 53 +- .../lib/widgets/job_log_panel.dart | 7 +- .../lib/widgets/lazy_dropdown_field.dart | 18 +- 150 files changed, 2118 insertions(+), 29270 deletions(-) delete mode 100644 _archived/DragNDrop/AssemblyInfo.cs delete mode 100644 _archived/DragNDrop/DragAndDropListView.cs delete mode 100644 _archived/DragNDrop/DragAndDropListView.resx delete mode 100644 _archived/DragNDrop/DragNDrop.csproj delete mode 100644 _archived/DragNDrop/DragNDrop.dll delete mode 100644 _archived/HUB/Class1.cs delete mode 100644 _archived/HUB/HUB.csproj delete mode 100644 _archived/README.md delete mode 100644 _archived/StarRatingControl/AssemblyInfo.cs delete mode 100644 _archived/StarRatingControl/StarRatingControl.cs delete mode 100644 _archived/StarRatingControl/StarRatingControl.csproj delete mode 100644 _archived/StarRatingControl/StarRatingControl.resx delete mode 100644 _archived/ThreeStateTreeView/Enumerations/CheckBoxState.cs delete mode 100644 _archived/ThreeStateTreeView/ThreeStateTreeView.cs delete mode 100644 _archived/ThreeStateTreeView/ThreeStateTreeView.csproj delete mode 100644 _archived/cleanup_deadlock.bat delete mode 100644 _archived/dotnet-desktop.yml.backup delete mode 100644 _archived/varManager.sln delete mode 100644 _archived/varManager/App.config delete mode 100644 _archived/varManager/Backend/BackendClient.cs delete mode 100644 _archived/varManager/Backend/BackendSession.cs delete mode 100644 _archived/varManager/Comm.cs delete mode 100644 _archived/varManager/Custom/Scripts/MorphMerger.cs delete mode 100644 _archived/varManager/Custom/Scripts/loadscene.cs delete mode 100644 _archived/varManager/Data/VarManagerContext.cs delete mode 100644 _archived/varManager/Form1.Designer.cs delete mode 100644 _archived/varManager/Form1.cs delete mode 100644 _archived/varManager/Form1.resx delete mode 100644 _archived/varManager/Form2.Designer.cs delete mode 100644 _archived/varManager/Form2.cs delete mode 100644 _archived/varManager/FormAnalysis.Designer.cs delete mode 100644 _archived/varManager/FormAnalysis.cs delete mode 100644 _archived/varManager/FormAnalysis.resx delete mode 100644 _archived/varManager/FormHub.Designer.cs delete mode 100644 _archived/varManager/FormHub.cs delete mode 100644 _archived/varManager/FormHub.resx delete mode 100644 _archived/varManager/FormMissingVars.Designer.cs delete mode 100644 _archived/varManager/FormMissingVars.cs delete mode 100644 _archived/varManager/FormMissingVars.resx delete mode 100644 _archived/varManager/FormScenes.Designer.cs delete mode 100644 _archived/varManager/FormScenes.cs delete mode 100644 _archived/varManager/FormScenes.resx delete mode 100644 _archived/varManager/FormSettings.Designer.cs delete mode 100644 _archived/varManager/FormSettings.cs delete mode 100644 _archived/varManager/FormSettings.resx delete mode 100644 _archived/varManager/FormStaleVars.Designer.cs delete mode 100644 _archived/varManager/FormStaleVars.cs delete mode 100644 _archived/varManager/FormStaleVars.resx delete mode 100644 _archived/varManager/FormSwitchAdd.Designer.cs delete mode 100644 _archived/varManager/FormSwitchAdd.cs delete mode 100644 _archived/varManager/FormSwitchAdd.resx delete mode 100644 _archived/varManager/FormSwitchRename.Designer.cs delete mode 100644 _archived/varManager/FormSwitchRename.cs delete mode 100644 _archived/varManager/FormSwitchRename.resx delete mode 100644 _archived/varManager/FormUninstallVars.Designer.cs delete mode 100644 _archived/varManager/FormUninstallVars.cs delete mode 100644 _archived/varManager/FormUninstallVars.resx delete mode 100644 _archived/varManager/FormVarDetail.Designer.cs delete mode 100644 _archived/varManager/FormVarDetail.cs delete mode 100644 _archived/varManager/FormVarDetail.resx delete mode 100644 _archived/varManager/FormVarsMove.Designer.cs delete mode 100644 _archived/varManager/FormVarsMove.cs delete mode 100644 _archived/varManager/FormVarsMove.resx delete mode 100644 _archived/varManager/HubItem.Designer.cs delete mode 100644 _archived/varManager/HubItem.cs delete mode 100644 _archived/varManager/HubItem.resx delete mode 100644 _archived/varManager/Migrations/20250807184700_Initial.Designer.cs delete mode 100644 _archived/varManager/Migrations/20250807184700_Initial.cs delete mode 100644 _archived/varManager/Migrations/VarManagerContextModelSnapshot.cs delete mode 100644 _archived/varManager/Models/Dependency.cs delete mode 100644 _archived/varManager/Models/HideFav.cs delete mode 100644 _archived/varManager/Models/InstallStatus.cs delete mode 100644 _archived/varManager/Models/SavedDependency.cs delete mode 100644 _archived/varManager/Models/Scene.cs delete mode 100644 _archived/varManager/Models/ScenesView.cs delete mode 100644 _archived/varManager/Models/Var.cs delete mode 100644 _archived/varManager/PrepareSaves.Designer.cs delete mode 100644 _archived/varManager/PrepareSaves.cs delete mode 100644 _archived/varManager/PrepareSaves.resx delete mode 100644 _archived/varManager/Program.cs delete mode 100644 _archived/varManager/Properties/AssemblyInfo.cs delete mode 100644 _archived/varManager/Properties/Resources.Designer.cs delete mode 100644 _archived/varManager/Properties/Resources.resx delete mode 100644 _archived/varManager/Properties/Settings.Designer.cs delete mode 100644 _archived/varManager/Properties/Settings.settings delete mode 100644 _archived/varManager/Resources/IconHub.ico delete mode 100644 _archived/varManager/Resources/hub.ico delete mode 100644 _archived/varManager/Resources/hub.png delete mode 100644 _archived/varManager/Resources/star.psd delete mode 100644 _archived/varManager/Resources/starEmpty.png delete mode 100644 _archived/varManager/Resources/starFull.png delete mode 100644 _archived/varManager/Resources/starHalf.png delete mode 100644 _archived/varManager/Resources/starOneQuarter.png delete mode 100644 _archived/varManager/Resources/starTriQuarter.png delete mode 100644 _archived/varManager/Resources/vam_logo_hub.png delete mode 100644 _archived/varManager/SimpleJSON/JSON.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONArray.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONBinaryTag.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONClass.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONData.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONLazyCreator.cs delete mode 100644 _archived/varManager/SimpleJSON/JSONNode.cs delete mode 100644 _archived/varManager/SimpleLogger.cs delete mode 100644 _archived/varManager/ThreeStateTreeview.cs delete mode 100644 _archived/varManager/VarManager.ico delete mode 100644 _archived/varManager/app.manifest delete mode 100644 _archived/varManager/icoVarManager.ico delete mode 100644 _archived/varManager/meta.json delete mode 100644 _archived/varManager/vam.png delete mode 100644 _archived/varManager/varManager.csproj delete mode 100644 _archived/varManager/varManager.mdb diff --git a/.gitignore b/.gitignore index bf746cb..8fa320e 100644 --- a/.gitignore +++ b/.gitignore @@ -388,3 +388,5 @@ varmanager_flutter/app.*.map.json varmanager_flutter/android/app/debug varmanager_flutter/android/app/profile varmanager_flutter/android/app/release +CLAUDE.md +AGENTS.md diff --git a/_archived/DragNDrop/AssemblyInfo.cs b/_archived/DragNDrop/AssemblyInfo.cs deleted file mode 100644 index 9e0fc91..0000000 --- a/_archived/DragNDrop/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.0.1")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] -[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/_archived/DragNDrop/DragAndDropListView.cs b/_archived/DragNDrop/DragAndDropListView.cs deleted file mode 100644 index d65fc4d..0000000 --- a/_archived/DragNDrop/DragAndDropListView.cs +++ /dev/null @@ -1,404 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; - -namespace DragNDrop -{ - public class DragAndDropListView : ListView - { - #region Private Members - - private ListViewItem m_previousItem; - private bool m_allowReorder; - private bool m_allowSelfDrop; - private Color m_lineColor; - - #endregion - - #region Public Properties - - [Category("Behavior")] - public bool AllowReorder - { - get { return m_allowReorder; } - set { m_allowReorder = value; } - } - - public bool AllowSelfDrop - { - get { return m_allowSelfDrop; } - set { m_allowSelfDrop = value; } - } - - [Category("Appearance")] - public Color LineColor - { - get { return m_lineColor; } - set { m_lineColor = value; } - } - - #endregion - - #region Protected and Public Methods - - public DragAndDropListView() : base() - { - m_allowReorder = true; - m_lineColor = Color.Red; - } - - //定义委托 - public delegate void DragDropHandle(object sender, DragEventArgs e); - //定义事件 - public event DragDropHandle ListViewDragDrop; - private void EventListViewDragDrop(object sender, DragEventArgs e) - { - if (ListViewDragDrop != null) - ListViewDragDrop(sender, e); - } - - protected override void OnDragDrop(DragEventArgs drgevent) - { - if (!m_allowReorder) - { - base.OnDragDrop(drgevent); - return; - } - /* - // get the currently hovered row that the items will be dragged to - Point clientPoint = base.PointToClient(new Point(drgevent.X, drgevent.Y)); - ListViewItem hoverItem = base.GetItemAt(clientPoint.X, clientPoint.Y); - - if (!drgevent.Data.GetDataPresent(typeof(DragItemData).ToString()) || - ((DragItemData)drgevent.Data.GetData(typeof(DragItemData).ToString())).ListView == null || - ((DragItemData)drgevent.Data.GetData(typeof(DragItemData).ToString())).DragItemIndexs.Count == 0) - return; - - // retrieve the drag item data - DragItemData data = (DragItemData)drgevent.Data.GetData(typeof(DragItemData).ToString()); - - if (hoverItem == null || !m_allowSelfDrop) - { - // the user does not wish to re-order the items, just append to the end - for (int i = 0; i < data.DragItemIndexs.Count; i++) - { - ListViewItem newItem = data.ListView.Items[(int)(data.DragItemIndexs[i])]; - base.Items.Add(newItem); - } - } - else - { - // the user wishes to re-order the items - - // get the index of the hover item - int hoverIndex = hoverItem.Index; - - // determine if the items to be dropped are from - // this list view. If they are, perform a hack - // to increment the hover index so that the items - // get moved properly. - if (this == data.ListView) - { - if (hoverIndex > base.SelectedItems[0].Index) - hoverIndex++; - } - - // insert the new items into the list view - // by inserting the items reversely from the array list - for (int i = data.DragItemIndexs.Count - 1; i >= 0; i--) - { - ListViewItem newItem = data.ListView.Items[(int)(data.DragItemIndexs[i])]; - base.Items.Insert(hoverIndex, newItem); - } - } - - // remove all the selected items from the previous list view - // if the list view was found - if (data.ListView != null) - { - List listitemindex = new List(); - foreach (int itemindexToRemove in data.ListView.SelectedIndices) - { - listitemindex.Add(itemindexToRemove); - } - listitemindex.Sort(); - listitemindex.Reverse(); - foreach (int itemindexToRemove in listitemindex) - { - data.ListView.Items.RemoveAt(itemindexToRemove); - } - - } - */ - - // set the back color of the previous item, then nullify it - if (m_previousItem != null) - { - m_previousItem = null; - } - - - EventListViewDragDrop(this, drgevent); - this.Invalidate(); - - // call the base on drag drop to raise the event - base.OnDragDrop(drgevent); - } - - protected override void OnDragOver(DragEventArgs drgevent) - { - if (!m_allowReorder) - { - base.OnDragOver(drgevent); - return; - } - - if (!drgevent.Data.GetDataPresent(typeof(DragItemData).ToString())) - { - // the item(s) being dragged do not have any data associated - drgevent.Effect = DragDropEffects.None; - return; - } - if (!m_allowSelfDrop) - { - DragItemData data = (DragItemData)drgevent.Data.GetData(typeof(DragItemData).ToString()); - if (this == data.ListView) - { - // the item(s) being dragged do not have any data associated - drgevent.Effect = DragDropEffects.None; - return; - } - } - /* - if (base.Items.Count > 0) - { - // get the currently hovered row that the items will be dragged to - Point clientPoint = base.PointToClient(new Point(drgevent.X, drgevent.Y)); - ListViewItem hoverItem = base.GetItemAt(clientPoint.X, clientPoint.Y); - - Graphics g = this.CreateGraphics(); - - if (hoverItem == null) - { - //MessageBox.Show(base.GetChildAtPoint(new Point(clientPoint.X, clientPoint.Y)).GetType().ToString()); - - // no item was found, so no drop should take place - drgevent.Effect = DragDropEffects.Move; - - if (m_previousItem != null) - { - m_previousItem = null; - Invalidate(); - } - - hoverItem = base.Items[base.Items.Count - 1]; - - if (this.View == View.Details || this.View == View.List) - { - g.DrawLine(new Pen(m_lineColor, 2), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X + this.Bounds.Width, hoverItem.Bounds.Y + hoverItem.Bounds.Height)); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + hoverItem.Bounds.Height - 5), new Point(hoverItem.Bounds.X + 5, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + hoverItem.Bounds.Height + 5) }); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(this.Bounds.Width - 4, hoverItem.Bounds.Y + hoverItem.Bounds.Height - 5), new Point(this.Bounds.Width - 9, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(this.Bounds.Width - 4, hoverItem.Bounds.Y + hoverItem.Bounds.Height + 5) }); - } - else - { - g.DrawLine(new Pen(m_lineColor, 2), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width, hoverItem.Bounds.Y + hoverItem.Bounds.Height)); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width - 5, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width + 5, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width, hoverItem.Bounds.Y + 5) }); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width - 5, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width + 5, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X + hoverItem.Bounds.Width, hoverItem.Bounds.Y + hoverItem.Bounds.Height - 5) }); - } - - // call the base OnDragOver event - base.OnDragOver(drgevent); - - return; - } - - // determine if the user is currently hovering over a new - // item. If so, set the previous item's back color back - // to the default color. - if ((m_previousItem != null && m_previousItem != hoverItem) || m_previousItem == null) - { - this.Invalidate(); - } - - // set the background color of the item being hovered - // and assign the previous item to the item being hovered - //hoverItem.BackColor = Color.Beige; - m_previousItem = hoverItem; - - if (this.View == View.Details || this.View == View.List) - { - g.DrawLine(new Pen(m_lineColor, 2), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X + this.Bounds.Width, hoverItem.Bounds.Y)); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y - 5), new Point(hoverItem.Bounds.X + 5, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + 5) }); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(this.Bounds.Width - 4, hoverItem.Bounds.Y - 5), new Point(this.Bounds.Width - 9, hoverItem.Bounds.Y), new Point(this.Bounds.Width - 4, hoverItem.Bounds.Y + 5) }); - } - else - { - g.DrawLine(new Pen(m_lineColor, 2), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + hoverItem.Bounds.Height)); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X - 5, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X + 5, hoverItem.Bounds.Y), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + 5) }); - g.FillPolygon(new SolidBrush(m_lineColor), new Point[] { new Point(hoverItem.Bounds.X - 5, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X + 5, hoverItem.Bounds.Y + hoverItem.Bounds.Height), new Point(hoverItem.Bounds.X, hoverItem.Bounds.Y + hoverItem.Bounds.Height - 5) }); - } - - // go through each of the selected items, and if any of the - // selected items have the same index as the item being - // hovered, disable dropping. - foreach (int itemToMove in base.SelectedIndices) - { - if (itemToMove == hoverItem.Index) - { - drgevent.Effect = DragDropEffects.None; - hoverItem.EnsureVisible(); - return; - } - } - - // ensure that the hover item is visible - hoverItem.EnsureVisible(); - } - */ - // everything is fine, allow the user to move the items - drgevent.Effect = DragDropEffects.Move; - - // call the base OnDragOver event - base.OnDragOver(drgevent); - } - - protected override void OnDragEnter(DragEventArgs drgevent) - { - if (!m_allowReorder) - { - base.OnDragEnter(drgevent); - return; - } - - if (!drgevent.Data.GetDataPresent(typeof(DragItemData).ToString())) - { - // the item(s) being dragged do not have any data associated - drgevent.Effect = DragDropEffects.None; - return; - } - - // everything is fine, allow the user to move the items - drgevent.Effect = DragDropEffects.Move; - - // call the base OnDragEnter event - base.OnDragEnter(drgevent); - } - - protected override void OnItemDrag(ItemDragEventArgs e) - { - if (!m_allowReorder) - { - base.OnItemDrag(e); - return; - } - - // call the DoDragDrop method - base.DoDragDrop(GetDataForDragDrop(), DragDropEffects.Move); - - // call the base OnItemDrag event - base.OnItemDrag(e); - } - - protected override void OnLostFocus(EventArgs e) - { - // reset the selected items background and remove the previous item - ResetOutOfRange(); - - Invalidate(); - - // call the OnLostFocus event - base.OnLostFocus(e); - } - - protected override void OnDragLeave(EventArgs e) - { - // reset the selected items background and remove the previous item - ResetOutOfRange(); - - Invalidate(); - - // call the base OnDragLeave event - base.OnDragLeave(e); - } - - #endregion - - #region Private Methods - - private DragItemData GetDataForDragDrop() - { - // create a drag item data object that will be used to pass along with the drag and drop - DragItemData data = new DragItemData(this); - - // go through each of the selected items and - // add them to the drag items collection - // by creating a clone of the list item - /* - foreach (ListViewItem item in this.SelectedItems) - { - data.DragItems.Add(item.Clone()); - } - */ - foreach (var itemindex in this.SelectedIndices) - { - data.DragItemIndexs.Add(itemindex); - } - return data; - } - - private void ResetOutOfRange() - { - // determine if the previous item exists, - // if it does, reset the background and release - // the previous item - if (m_previousItem != null) - { - m_previousItem = null; - } - - } - - #endregion - - #region DragItemData Class - - public class DragItemData - { - #region Private Members - - private DragAndDropListView m_listView; - private ArrayList m_dragItemindexs; - - #endregion - - #region Public Properties - - public DragAndDropListView ListView - { - get { return m_listView; } - } - - public ArrayList DragItemIndexs - { - get { return m_dragItemindexs; } - } - - #endregion - - #region Public Methods and Implementation - - public DragItemData(DragAndDropListView listView) - { - m_listView = listView; - m_dragItemindexs = new ArrayList(); - } - - #endregion - } - - #endregion - } -} diff --git a/_archived/DragNDrop/DragAndDropListView.resx b/_archived/DragNDrop/DragAndDropListView.resx deleted file mode 100644 index 3f337e0..0000000 --- a/_archived/DragNDrop/DragAndDropListView.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/_archived/DragNDrop/DragNDrop.csproj b/_archived/DragNDrop/DragNDrop.csproj deleted file mode 100644 index 6625a4a..0000000 --- a/_archived/DragNDrop/DragNDrop.csproj +++ /dev/null @@ -1,133 +0,0 @@ -锘 - - - Local - 7.10.3077 - 2.0 - {C7E21F05-C166-4DCC-8429-EC8A4C1A67B6} - Debug - AnyCPU - - - DragNDrop - - JScript - Grid - IE50 - false - Library - DragNDrop - OnBuildSuccess - - - - - - 0.0 - v4.8 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - bin\Debug\ - false - 285212672 - false - - DEBUG;TRACE - - true - 4096 - false - - false - false - false - false - 4 - full - prompt - MinimumRecommendedRules.ruleset - false - x64 - - - bin\Release\ - false - 285212672 - false - - TRACE - - false - 4096 - false - - true - false - false - false - 4 - none - prompt - MinimumRecommendedRules.ruleset - false - - - - System - - - System.Data - - - System.Drawing - - - System.Drawing.Design - - - System.Windows.Forms - - - System.XML - - - - - Code - - - Component - - - DragAndDropListView.cs - - - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - \ No newline at end of file diff --git a/_archived/DragNDrop/DragNDrop.dll b/_archived/DragNDrop/DragNDrop.dll deleted file mode 100644 index 1c40ea7f561a78131f5237054ed239a02c6dcab4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20480 zcmeHNeQX@pai6!l_bHO@9<47^wokIHoFwu>>cf(3NhU=~79B~XNs5-zsPge{MP7Bc zkKWyr#L7w}BQdJNZW}a3-6Uw;x=k7*KB zM~c?!Z{F^admlEXCP;y1pR}_x^JeDF%=_N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ff --git a/_archived/HUB/Class1.cs b/_archived/HUB/Class1.cs deleted file mode 100644 index a1bf484..0000000 --- a/_archived/HUB/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -锘縰sing System; - -namespace HUB -{ - public class Class1 - { - } -} diff --git a/_archived/HUB/HUB.csproj b/_archived/HUB/HUB.csproj deleted file mode 100644 index f208d30..0000000 --- a/_archived/HUB/HUB.csproj +++ /dev/null @@ -1,7 +0,0 @@ - - - - net5.0 - - - diff --git a/_archived/README.md b/_archived/README.md deleted file mode 100644 index 016c5a2..0000000 --- a/_archived/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Archived C# Projects - -This directory contains the legacy C# WinForms implementation of varManager (v1.0.4.x). - -## Contents - -- **varManager/** - Main C# WinForms application (.NET 9.0) -- **DragNDrop/** - Custom drag-and-drop ListView control -- **StarRatingControl/** - Star rating control -- **ThreeStateTreeView/** - Three-state tree view control -- **HUB/** - Empty placeholder project -- **packages/** - NuGet package cache -- **varManager.sln** - Visual Studio solution file - -## Status - -鈿狅笍 **This code is no longer actively maintained.** - -All functionality has been migrated to the new Flutter + Rust architecture (v2.0.0+). - -## Why Archived? - -The v2.0.0 release represents a complete architectural rewrite: -- **Old:** C# WinForms + .NET Runtime + EF Core + SQLite -- **New:** Flutter UI + Rust Backend + SQLite - -The new architecture provides: -- Cross-platform support (Windows/macOS/Linux) -- Better performance (Rust backend) -- Modern UI (Material Design 3) -- No .NET Runtime dependency -- Smaller deployment size -- Easier maintenance - -## Reference Use Only - -This code is kept for: -- Historical reference -- Understanding migration decisions -- Fallback if critical issues arise with v2.0.0 - -## Running the Old C# Version - -If you need to run the legacy version: - -1. Requirements: - - .NET 9.0 Runtime - - Windows OS - - Visual Studio 2022 or higher (for building) - -2. Build: - ``` - cd _archived - dotnet build varManager.sln - ``` - -3. Run: - ``` - cd varManager/bin/Debug/net9.0-windows - varManager.exe - ``` - -## Migration to v2.0.0 - -See the main [README.md](../README.md) for migration instructions. Your database and configuration will work seamlessly with the new version. diff --git a/_archived/StarRatingControl/AssemblyInfo.cs b/_archived/StarRatingControl/AssemblyInfo.cs deleted file mode 100644 index 9f89a32..0000000 --- a/_archived/StarRatingControl/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/_archived/StarRatingControl/StarRatingControl.cs b/_archived/StarRatingControl/StarRatingControl.cs deleted file mode 100644 index 38ebfc9..0000000 --- a/_archived/StarRatingControl/StarRatingControl.cs +++ /dev/null @@ -1,349 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Drawing; -using System.Drawing.Drawing2D; - -namespace RatingControls -{ - public class StarRatingControl : System.Windows.Forms.Control - { - public StarRatingControl() - { - SetStyle(ControlStyles.AllPaintingInWmPaint, true); - SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.DoubleBuffer, true); - SetStyle(ControlStyles.ResizeRedraw, true); - - Width = 120; - Height = 18; - - m_starAreas = new Rectangle[StarCount]; - } - - #region Properties - - public int LeftMargin - { - get - { - return m_leftMargin; - } - set - { - if ( m_leftMargin != value ) - { - m_leftMargin = value; - Invalidate(); - } - } - } - - public int RightMargin - { - get - { - return m_rightMargin; - } - set - { - if ( m_rightMargin != value ) - { - m_rightMargin = value; - Invalidate(); - } - } - } - - public int TopMargin - { - get - { - return m_topMargin; - } - set - { - if ( m_topMargin != value ) - { - m_topMargin = value; - Invalidate(); - } - } - } - - public int BottomMargin - { - get - { - return m_bottomMargin; - } - set - { - if ( m_bottomMargin != value ) - { - m_bottomMargin = value; - Invalidate(); - } - } - } - - public int StarSpacing - { - get - { - return m_starSpacing; - } - set - { - if ( m_starSpacing != value ) - { - m_starSpacing = value; - Invalidate(); - } - } - } - - public int StarCount - { - get - { - return m_starCount; - } - set - { - if ( m_starCount != value ) - { - m_starCount = value; - m_starAreas = new Rectangle[m_starCount]; - Invalidate(); - } - } - } - - public bool IsHovering - { - get - { - return m_hovering; - } - } - - public Color OutlineColor - { - get - { - return m_outlineColor; - } - set - { - if ( m_outlineColor != value ) - { - m_outlineColor = value; - Invalidate(); - } - } - } - - public Color HoverColor - { - get - { - return m_hoverColor; - } - set - { - if ( m_hoverColor != value ) - { - m_hoverColor = value; - Invalidate(); - } - } - } - - public Color SelectedColor - { - get - { - return m_selectedColor; - } - set - { - if ( m_selectedColor != value ) - { - m_selectedColor = value; - Invalidate(); - } - } - } - - public int OutlineThickness - { - get - { - return m_outlineThickness; - } - set - { - if ( m_outlineThickness != value ) - { - m_outlineThickness = value; - Invalidate(); - } - } - } - - public double HoverStar - { - get - { - return m_hoverStar; - } - } - - public int SelectedStar - { - get - { - return m_selectedStar; - } - } - - #endregion - - protected override void OnPaint(PaintEventArgs pe) - { - pe.Graphics.Clear(BackColor); - - int starWidth = (Width - (LeftMargin + RightMargin + (StarSpacing * (StarCount - 1)))) / StarCount; - int starHeight = (Height - (TopMargin + BottomMargin)); - - Rectangle drawArea = new Rectangle(LeftMargin, TopMargin, starWidth, starHeight); - - for ( int i = 0 ; i < StarCount; ++i ) - { - m_starAreas[i].X = drawArea.X - StarSpacing / 2; - m_starAreas[i].Y = drawArea.Y; - m_starAreas[i].Width = drawArea.Width + StarSpacing / 2; - m_starAreas[i].Height = drawArea.Height; - - DrawStar ( pe.Graphics, drawArea, i ); - - drawArea.X += drawArea.Width + StarSpacing; - } - - base.OnPaint ( pe ); - } - - protected void DrawStar ( Graphics g, Rectangle rect, int starAreaIndex ) - { - Brush fillBrush; - Pen outlinePen = new Pen ( OutlineColor, OutlineThickness ); - - if ( m_hovering && m_hoverStar > starAreaIndex ) - { - fillBrush = new LinearGradientBrush(rect, HoverColor, BackColor, LinearGradientMode.ForwardDiagonal); - } - else if ( (!m_hovering) && m_selectedStar > starAreaIndex ) - { - fillBrush = new LinearGradientBrush(rect, SelectedColor, BackColor, LinearGradientMode.ForwardDiagonal); - } - else - { - fillBrush = new SolidBrush ( BackColor ); - } - - PointF[] p = new PointF[10]; - p[0].X = rect.X + (rect.Width / 2); - p[0].Y = rect.Y; - p[1].X = rect.X + (42 * rect.Width / 64); - p[1].Y = rect.Y + (19 * rect.Height / 64); - p[2].X = rect.X + rect.Width; - p[2].Y = rect.Y + (22 * rect.Height / 64); - p[3].X = rect.X + (48 * rect.Width / 64); - p[3].Y = rect.Y + (38 * rect.Height / 64); - p[4].X = rect.X + (52 * rect.Width / 64); - p[4].Y = rect.Y + rect.Height; - p[5].X = rect.X + (rect.Width / 2); - p[5].Y = rect.Y + (52 * rect.Height / 64); - p[6].X = rect.X + (12 * rect.Width / 64); - p[6].Y = rect.Y + rect.Height; - p[7].X = rect.X + rect.Width / 4; - p[7].Y = rect.Y + (38 * rect.Height / 64); - p[8].X = rect.X; - p[8].Y = rect.Y + (22 * rect.Height / 64); - p[9].X = rect.X + (22 * rect.Width / 64); - p[9].Y = rect.Y + (19 * rect.Height / 64); - p.GetValue() - g.FillPolygon ( fillBrush, p ); - g.DrawPolygon ( outlinePen, p ); - } - - protected override void OnMouseEnter ( System.EventArgs ea ) - { - m_hovering = true; - Invalidate(); - base.OnMouseEnter ( ea ); - } - - protected override void OnMouseLeave ( System.EventArgs ea ) - { - m_hovering = false; - Invalidate(); - base.OnMouseLeave ( ea ); - } - - protected override void OnMouseMove ( MouseEventArgs args ) - { - for ( int i = 0 ; i < StarCount ; ++i ) - { - if ( m_starAreas[i].Contains(args.X, args.Y) ) - { - m_hoverStar = i + 1; - Invalidate(); - break; - } - } - - base.OnMouseMove ( args ); - } - - protected override void OnClick ( System.EventArgs args ) - { - Point p = PointToClient ( MousePosition ); - - for ( int i = 0 ; i < StarCount ; ++i ) - { - if ( m_starAreas[i].Contains(p) ) - { - m_hoverStar = i + 1; - m_selectedStar = i + 1; - Invalidate(); - break; - } - } - - base.OnClick ( args ); - } - - #region Protected Data - - protected int m_leftMargin = 2; - protected int m_rightMargin = 2; - protected int m_topMargin = 2; - protected int m_bottomMargin = 2; - protected int m_starSpacing = 8; - protected int m_starCount = 5; - protected Rectangle[] m_starAreas; - protected bool m_hovering = false; - - protected double m_hoverStar = 0; - protected int m_selectedStar = 0; - - protected Color m_outlineColor = Color.DarkGray; - protected Color m_hoverColor = Color.Yellow; - protected Color m_selectedColor = Color.RoyalBlue; - - protected int m_outlineThickness = 1; - - #endregion - } -} diff --git a/_archived/StarRatingControl/StarRatingControl.csproj b/_archived/StarRatingControl/StarRatingControl.csproj deleted file mode 100644 index 495a0a4..0000000 --- a/_archived/StarRatingControl/StarRatingControl.csproj +++ /dev/null @@ -1,129 +0,0 @@ -锘 - - - Local - 7.10.3077 - 2.0 - {4F9EA4F5-182C-4402-B21C-CB8EB96DE958} - Debug - AnyCPU - - - StarRatingControl - - JScript - Grid - IE50 - false - Library - StarRatingControl - OnBuildSuccess - - - - - - 0.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - v4.8 - - - - bin\Debug\ - false - 285212672 - false - - DEBUG;TRACE - - true - 4096 - false - - false - false - false - false - 4 - full - prompt - MinimumRecommendedRules.ruleset - false - - - bin\Release\ - false - 285212672 - false - - TRACE - - false - 4096 - false - - true - false - false - false - 4 - none - prompt - MinimumRecommendedRules.ruleset - false - - - - System - - - System.Data - - - System.Drawing - - - System.Windows.Forms - - - System.XML - - - - - Code - - - Component - - - StarRatingControl.cs - - - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - \ No newline at end of file diff --git a/_archived/StarRatingControl/StarRatingControl.resx b/_archived/StarRatingControl/StarRatingControl.resx deleted file mode 100644 index 3f337e0..0000000 --- a/_archived/StarRatingControl/StarRatingControl.resx +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.0.0.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - diff --git a/_archived/ThreeStateTreeView/Enumerations/CheckBoxState.cs b/_archived/ThreeStateTreeView/Enumerations/CheckBoxState.cs deleted file mode 100644 index 6a14210..0000000 --- a/_archived/ThreeStateTreeView/Enumerations/CheckBoxState.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Ascentium.Research.Windows.Forms.Components.Enumerations -{ - /// - /// The available states for a ThreeStateCheckBox. - /// - [FlagsAttribute] - public enum CheckBoxState - { - Unchecked = 1, - Checked = 2, - Indeterminate = CheckBoxState.Unchecked | CheckBoxState.Checked - } -} diff --git a/_archived/ThreeStateTreeView/ThreeStateTreeView.cs b/_archived/ThreeStateTreeView/ThreeStateTreeView.cs deleted file mode 100644 index 0c41314..0000000 --- a/_archived/ThreeStateTreeView/ThreeStateTreeView.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.ComponentModel; -using System.Text; -using System.Windows.Forms; - -namespace Ascentium.Research.Windows.Forms.Components -{ - /// - /// ThreeStateTreeNode inherits from TreeView - /// and adds the ability to cascade state changes to related nodes, i.e. child nodes and or parent nodes, as well as to optionally - /// use the three state functionality. - /// - public class ThreeStateTreeView : TreeView - { - #region Constructors - /// - /// Initializes a new instance of the ThreeStateTreeView class in addition to intializing - /// the base class (TreeView Constructor). - /// - public ThreeStateTreeView() : base() - { - } - #endregion - - #region Public Properties - /// - /// Flag. If true, use three state checkboxes, otherwise, use the default behavior of the TreeView and associated TreeNodes. - /// - private bool mUseThreeStateCheckBoxes = true; - [Category("Three State TreeView"), - Description("Flag. If true, use three state checkboxes, otherwise, use the default behavior of the TreeView and associated TreeNodes."), - DefaultValue(true), - TypeConverter(typeof(bool)), - Editor("System.Boolean", typeof(bool))] - public bool UseThreeStateCheckBoxes - { - get { return this.mUseThreeStateCheckBoxes; } - set { this.mUseThreeStateCheckBoxes = value; } - } - #endregion - - #region Overrides - /// - /// Raises the AfterCheck event. - /// - /// A TreeViewEventArgs containing the event data. - protected override void OnAfterCheck(TreeViewEventArgs e) - { - base.OnAfterCheck(e); - - if (this.UseThreeStateCheckBoxes) - { - switch (e.Action) - { - case TreeViewAction.ByKeyboard: - case TreeViewAction.ByMouse: - { - if (e.Node is ThreeStateTreeNode) - { - // Toggle to the next state. - ThreeStateTreeNode tn = e.Node as ThreeStateTreeNode; - tn.Toggle(); - } - - break; - } - case TreeViewAction.Collapse: - case TreeViewAction.Expand: - case TreeViewAction.Unknown: - default: - { - // Do nothing. - break; - } - } - } - } - #endregion - } -} diff --git a/_archived/ThreeStateTreeView/ThreeStateTreeView.csproj b/_archived/ThreeStateTreeView/ThreeStateTreeView.csproj deleted file mode 100644 index 18e2fcb..0000000 --- a/_archived/ThreeStateTreeView/ThreeStateTreeView.csproj +++ /dev/null @@ -1,80 +0,0 @@ -锘 - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {43DD8879-E9F0-4577-A410-6FA118914300} - Library - Properties - Ascentium.Research.Windows.Forms.Components - Ascentium.Research.Windows.Forms.Components - - - - - - - 2.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - MinimumRecommendedRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - MinimumRecommendedRules.ruleset - - - - - - - Component - - - - - - - - - False - .NET Framework 3.5 SP1 - false - - - \ No newline at end of file diff --git a/_archived/cleanup_deadlock.bat b/_archived/cleanup_deadlock.bat deleted file mode 100644 index a051167..0000000 --- a/_archived/cleanup_deadlock.bat +++ /dev/null @@ -1,42 +0,0 @@ -@echo off -echo VarManager 姝婚攣娓呯悊宸ュ叿 -echo ======================== - -echo 姝e湪妫鏌arManager杩涚▼... -tasklist | findstr "varManager" > nul -if %errorlevel% == 0 ( - echo 鍙戠幇VarManager杩涚▼锛屾鍦ㄥ己鍒剁粨鏉... - taskkill /F /IM varManager.exe /T > nul 2>&1 - timeout /t 3 > nul - echo 杩涚▼宸茬粨鏉熴 -) else ( - echo 鏈彂鐜癡arManager杩涚▼銆 -) - -echo. -echo 姝e湪娓呯悊涓存椂鏂囦欢... - -if exist "varsForInstall.txt" ( - del "varsForInstall.txt" > nul 2>&1 - echo 宸插垹闄: varsForInstall.txt -) - -if exist "*.lock" ( - del "*.lock" > nul 2>&1 - echo 宸插垹闄: 閿佹枃浠 -) - -if exist "*.tmp" ( - del "*.tmp" > nul 2>&1 - echo 宸插垹闄: 涓存椂鏂囦欢 -) - -echo. -echo 姝e湪绛夊緟绯荤粺閲婃斁璧勬簮... -timeout /t 3 > nul - -echo. -echo 姝婚攣娓呯悊瀹屾垚锛 -echo 鐜板湪鍙互閲嶆柊鍚姩VarManager銆 -echo. -pause \ No newline at end of file diff --git a/_archived/dotnet-desktop.yml.backup b/_archived/dotnet-desktop.yml.backup deleted file mode 100644 index 76265ab..0000000 --- a/_archived/dotnet-desktop.yml.backup +++ /dev/null @@ -1,89 +0,0 @@ -name: .NET Core Desktop - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - strategy: - matrix: - configuration: [Release] - - runs-on: windows-latest - - env: - Solution_Name: varManager.sln # 瑙e喅鏂规鍚嶇О - Project_Path: varManager/varManager.csproj # 椤圭洰璺緞 - Project_Version: v1.0.4.13 # 椤圭洰鐗堟湰 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # Clone the external project to the correct directory - - name: Clone DgvFilterPopup - run: git clone --branch main https://github.com/farosch/DgvFilterPopup.git ../DgvFilterPopup - - # Install the .NET Core workload - - name: Install .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 6.0.x - 9.0.x - - # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v2 - - # Restore the application to populate the obj folder with RuntimeIdentifiers - - name: Restore the application - run: msbuild ${{ env.Solution_Name }} /t:Restore /p:Configuration=${{ matrix.configuration }} - - # Decode the base 64 encoded pfx and save the Signing_Certificate - - name: Decode the pfx - run: | - $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") - $certificatePath = "varManager/GitHubActionsWorkflow.pfx" - [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) - - # Build the project - - name: Build the project - run: msbuild ${{ env.Project_Path }} /p:Configuration=${{ matrix.configuration }} - - # Package the application with self-contained deployment - - name: Package the application - run: | - dotnet publish ${{ env.Project_Path }} -c ${{ matrix.configuration }} -r win-x64 --self-contained true -p:PublishSingleFile=true -p:PackageCertificateKeyFile="varManager/GitHubActionsWorkflow.pfx" -p:PackageCertificatePassword=${{ secrets.Pfx_Key }} - - # Remove the pfx - - name: Remove the pfx - run: Remove-Item -path "varManager/GitHubActionsWorkflow.pfx" - - # Clone vam_downloader repository and build it - - name: Clone vam_downloader - run: git clone --branch master https://github.com/bustesoul/vam_downloader.git ../vam_downloader - - - name: Build vam_downloader - run: | - cd ../vam_downloader - rustup toolchain install stable-x86_64-pc-windows-msvc - rustup default stable-x86_64-pc-windows-msvc - cargo build --release --target x86_64-pc-windows-msvc -j $env:NUMBER_OF_PROCESSORS - - - name: Copy vam_downloader to plugin directory - run: | - mkdir -p varManager/bin/${{ matrix.configuration }}/net9.0-windows/win-x64/publish/plugin - cp ../vam_downloader/target/x86_64-pc-windows-msvc/release/vam_downloader.exe varManager/bin/${{ matrix.configuration }}/net9.0-windows/win-x64/publish/plugin/ - - # Upload the build artifacts - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: varManager_${{ env.Project_Version }} - path: varManager/bin/${{ matrix.configuration }}/net9.0-windows/win-x64/publish diff --git a/_archived/varManager.sln b/_archived/varManager.sln deleted file mode 100644 index a6ef910..0000000 --- a/_archived/varManager.sln +++ /dev/null @@ -1,48 +0,0 @@ -锘 -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.1.32407.343 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "varManager", "varManager\varManager.csproj", "{EA2A1B27-CA81-4DBF-8E10-97A0243B6184}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DgvFilterPopup", "..\DgvFilterPopup\DgvFilterPopup\DgvFilterPopup.csproj", "{4B9BE5FD-303E-4270-9C4D-FA3BDE6C34EB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragNDrop", "DragNDrop\DragNDrop.csproj", "{C7E21F05-C166-4DCC-8429-EC8A4C1A67B6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MMDLoader", "MMDLoader\MMDLoader.csproj", "{60569535-F3F9-4412-82D8-9EB84DA0CFD6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadScene", "LoadScene\LoadScene.csproj", "{8D90CE12-F58A-4AD9-81E6-A93B3D6BB2EE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EA2A1B27-CA81-4DBF-8E10-97A0243B6184}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EA2A1B27-CA81-4DBF-8E10-97A0243B6184}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EA2A1B27-CA81-4DBF-8E10-97A0243B6184}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EA2A1B27-CA81-4DBF-8E10-97A0243B6184}.Release|Any CPU.Build.0 = Release|Any CPU - {4B9BE5FD-303E-4270-9C4D-FA3BDE6C34EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B9BE5FD-303E-4270-9C4D-FA3BDE6C34EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B9BE5FD-303E-4270-9C4D-FA3BDE6C34EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B9BE5FD-303E-4270-9C4D-FA3BDE6C34EB}.Release|Any CPU.Build.0 = Release|Any CPU - {C7E21F05-C166-4DCC-8429-EC8A4C1A67B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7E21F05-C166-4DCC-8429-EC8A4C1A67B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7E21F05-C166-4DCC-8429-EC8A4C1A67B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7E21F05-C166-4DCC-8429-EC8A4C1A67B6}.Release|Any CPU.Build.0 = Release|Any CPU - {60569535-F3F9-4412-82D8-9EB84DA0CFD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60569535-F3F9-4412-82D8-9EB84DA0CFD6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {60569535-F3F9-4412-82D8-9EB84DA0CFD6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60569535-F3F9-4412-82D8-9EB84DA0CFD6}.Release|Any CPU.Build.0 = Release|Any CPU - {8D90CE12-F58A-4AD9-81E6-A93B3D6BB2EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8D90CE12-F58A-4AD9-81E6-A93B3D6BB2EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8D90CE12-F58A-4AD9-81E6-A93B3D6BB2EE}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D0040F30-0947-4707-95E7-97AFD37A5633} - EndGlobalSection -EndGlobal diff --git a/_archived/varManager/App.config b/_archived/varManager/App.config deleted file mode 100644 index e42aad8..0000000 --- a/_archived/varManager/App.config +++ /dev/null @@ -1,58 +0,0 @@ - - - - -
- - - - - - - - - - - - d:\vars - - - d:\virt_a_mate - - - True - - - True - - - False - - - True - - - True - - - False - - - - - - - - - - - - - - - - - - diff --git a/_archived/varManager/Backend/BackendClient.cs b/_archived/varManager/Backend/BackendClient.cs deleted file mode 100644 index be4cc0f..0000000 --- a/_archived/varManager/Backend/BackendClient.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using System.Net.Http; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading; -using System.Threading.Tasks; - -namespace varManager.Backend -{ - public sealed class BackendClient - { - private readonly HttpClient _http; - private readonly JsonSerializerOptions _jsonOptions; - - public BackendClient(string baseUrl) - { - _http = new HttpClient { BaseAddress = new Uri(baseUrl, UriKind.Absolute) }; - _jsonOptions = new JsonSerializerOptions - { - PropertyNameCaseInsensitive = true, - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull - }; - } - - public async Task HealthAsync(CancellationToken ct) - { - try - { - using var resp = await _http.GetAsync("health", ct).ConfigureAwait(false); - return resp.IsSuccessStatusCode; - } - catch - { - return false; - } - } - - public Task GetConfigAsync(CancellationToken ct) - { - return GetAsync("config", ct); - } - - public Task StartJobAsync(string kind, object? args, CancellationToken ct) - { - if (string.IsNullOrWhiteSpace(kind)) - { - throw new ArgumentException("kind is required", nameof(kind)); - } - var payload = new StartJobRequest { Kind = kind, Args = args }; - return PostAsync("jobs", payload, ct); - } - - public Task GetJobAsync(ulong id, CancellationToken ct) - { - return GetAsync($"jobs/{id}", ct); - } - - public Task GetJobLogsAsync(ulong id, ulong? from, CancellationToken ct) - { - var url = from.HasValue ? $"jobs/{id}/logs?from={from.Value}" : $"jobs/{id}/logs"; - return GetAsync(url, ct); - } - - public Task GetJobResultAsync(ulong id, CancellationToken ct) - { - return GetAsync($"jobs/{id}/result", ct); - } - - public Task ShutdownAsync(CancellationToken ct) - { - return PostAsync("shutdown", new { }, ct); - } - - private async Task GetAsync(string path, CancellationToken ct) - { - using var resp = await _http.GetAsync(path, ct).ConfigureAwait(false); - var json = await resp.Content.ReadAsStringAsync(ct).ConfigureAwait(false); - if (!resp.IsSuccessStatusCode) - { - throw new InvalidOperationException($"backend error: {resp.StatusCode} {json}"); - } - var result = JsonSerializer.Deserialize(json, _jsonOptions); - if (result == null) - { - throw new InvalidOperationException("backend response is empty"); - } - return result; - } - - private async Task PostAsync(string path, object? body, CancellationToken ct) - { - using var content = new StringContent( - JsonSerializer.Serialize(body, _jsonOptions), - Encoding.UTF8, - "application/json"); - using var resp = await _http.PostAsync(path, content, ct).ConfigureAwait(false); - var json = await resp.Content.ReadAsStringAsync(ct).ConfigureAwait(false); - if (!resp.IsSuccessStatusCode) - { - throw new InvalidOperationException($"backend error: {resp.StatusCode} {json}"); - } - var result = JsonSerializer.Deserialize(json, _jsonOptions); - if (result == null) - { - throw new InvalidOperationException("backend response is empty"); - } - return result; - } - - private async Task PostAsync(string path, object? body, CancellationToken ct) - { - using var content = new StringContent( - JsonSerializer.Serialize(body, _jsonOptions), - Encoding.UTF8, - "application/json"); - using var resp = await _http.PostAsync(path, content, ct).ConfigureAwait(false); - if (!resp.IsSuccessStatusCode) - { - var json = await resp.Content.ReadAsStringAsync(ct).ConfigureAwait(false); - throw new InvalidOperationException($"backend error: {resp.StatusCode} {json}"); - } - } - } - - public sealed class BackendConfig - { - [JsonPropertyName("listen_host")] - public string? ListenHost { get; set; } - [JsonPropertyName("listen_port")] - public int ListenPort { get; set; } - [JsonPropertyName("log_level")] - public string? LogLevel { get; set; } - [JsonPropertyName("job_concurrency")] - public int JobConcurrency { get; set; } - [JsonPropertyName("varspath")] - public string? Varspath { get; set; } - [JsonPropertyName("vampath")] - public string? Vampath { get; set; } - [JsonPropertyName("vam_exec")] - public string? VamExec { get; set; } - [JsonPropertyName("downloader_path")] - public string? DownloaderPath { get; set; } - [JsonPropertyName("downloader_save_path")] - public string? DownloaderSavePath { get; set; } - } - - public sealed class StartJobRequest - { - [JsonPropertyName("kind")] - public string Kind { get; set; } = string.Empty; - [JsonPropertyName("args")] - public object? Args { get; set; } - } - - public sealed class StartJobResponse - { - [JsonPropertyName("id")] - public ulong Id { get; set; } - [JsonPropertyName("status")] - public string Status { get; set; } = string.Empty; - } - - public sealed class JobView - { - [JsonPropertyName("id")] - public ulong Id { get; set; } - [JsonPropertyName("kind")] - public string Kind { get; set; } = string.Empty; - [JsonPropertyName("status")] - public string Status { get; set; } = string.Empty; - [JsonPropertyName("progress")] - public int Progress { get; set; } - [JsonPropertyName("message")] - public string Message { get; set; } = string.Empty; - [JsonPropertyName("error")] - public string? Error { get; set; } - [JsonPropertyName("log_offset")] - public ulong LogOffset { get; set; } - [JsonPropertyName("log_count")] - public ulong LogCount { get; set; } - [JsonPropertyName("result_available")] - public bool ResultAvailable { get; set; } - } - - public sealed class JobLogsResponse - { - [JsonPropertyName("id")] - public ulong Id { get; set; } - [JsonPropertyName("from")] - public ulong From { get; set; } - [JsonPropertyName("next")] - public ulong Next { get; set; } - [JsonPropertyName("dropped")] - public bool Dropped { get; set; } - [JsonPropertyName("lines")] - public string[] Lines { get; set; } = Array.Empty(); - } - - public sealed class JobResultResponse - { - [JsonPropertyName("id")] - public ulong Id { get; set; } - [JsonPropertyName("result")] - public JsonElement Result { get; set; } - } - - public sealed class BackendJobResult - { - public BackendJobResult(JobView job, JsonElement? result) - { - Job = job; - Result = result; - } - - public JobView Job { get; } - public JsonElement? Result { get; } - public bool Succeeded => string.Equals(Job.Status, "succeeded", StringComparison.OrdinalIgnoreCase); - } -} diff --git a/_archived/varManager/Backend/BackendSession.cs b/_archived/varManager/Backend/BackendSession.cs deleted file mode 100644 index 4f35b52..0000000 --- a/_archived/varManager/Backend/BackendSession.cs +++ /dev/null @@ -1,263 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using varManager.Properties; - -namespace varManager.Backend -{ - public static class BackendSession - { - private static readonly SemaphoreSlim s_lock = new SemaphoreSlim(1, 1); - private static BackendClient? s_client; - private static BackendConfig? s_config; - private static Process? s_process; - private static string? s_baseUrl; - - public static BackendConfig? Config => s_config; - - public static async Task EnsureStartedAsync(Action? log, CancellationToken ct) - { - await s_lock.WaitAsync(ct).ConfigureAwait(false); - try - { - if (s_client == null || string.IsNullOrEmpty(s_baseUrl)) - { - s_baseUrl = ResolveBaseUrl(); - s_client = new BackendClient(s_baseUrl); - } - - if (await s_client.HealthAsync(ct).ConfigureAwait(false)) - { - await RefreshConfigAsync(log, ct).ConfigureAwait(false); - return; - } - - StartProcess(log); - - var deadline = DateTime.UtcNow.AddSeconds(10); - while (DateTime.UtcNow < deadline) - { - if (await s_client.HealthAsync(ct).ConfigureAwait(false)) - { - await RefreshConfigAsync(log, ct).ConfigureAwait(false); - return; - } - await Task.Delay(200, ct).ConfigureAwait(false); - } - - throw new InvalidOperationException("鍚庣鍚姩瓒呮椂"); - } - finally - { - s_lock.Release(); - } - } - - public static async Task RunJobAsync( - string kind, - object? args, - Action? log, - CancellationToken ct) - { - await EnsureStartedAsync(log, ct).ConfigureAwait(false); - if (s_client == null) - { - throw new InvalidOperationException("鍚庣鏈垵濮嬪寲"); - } - - var start = await s_client.StartJobAsync(kind, args, ct).ConfigureAwait(false); - ulong id = start.Id; - ulong? from = null; - JobView job; - - while (true) - { - job = await s_client.GetJobAsync(id, ct).ConfigureAwait(false); - var logs = await s_client.GetJobLogsAsync(id, from, ct).ConfigureAwait(false); - if (logs.Dropped) - { - log?.Invoke("鍚庣鏃ュ織宸叉埅鏂"); - } - foreach (var line in logs.Lines) - { - log?.Invoke(line); - } - from = logs.Next; - - if (string.Equals(job.Status, "succeeded", StringComparison.OrdinalIgnoreCase) || - string.Equals(job.Status, "failed", StringComparison.OrdinalIgnoreCase)) - { - break; - } - - await Task.Delay(300, ct).ConfigureAwait(false); - } - - var finalLogs = await s_client.GetJobLogsAsync(id, from, ct).ConfigureAwait(false); - if (finalLogs.Dropped) - { - log?.Invoke("鍚庣鏃ュ織宸叉埅鏂"); - } - foreach (var line in finalLogs.Lines) - { - log?.Invoke(line); - } - - JsonElement? result = null; - if (job.ResultAvailable) - { - var jobResult = await s_client.GetJobResultAsync(id, ct).ConfigureAwait(false); - result = jobResult.Result; - } - - if (string.Equals(job.Status, "failed", StringComparison.OrdinalIgnoreCase)) - { - if (!string.IsNullOrEmpty(job.Error)) - { - log?.Invoke($"error: {job.Error}"); - } - else - { - log?.Invoke($"error: 鍚庣浣滀笟澶辫触 ({kind})"); - } - } - - return new BackendJobResult(job, result); - } - - public static BackendJobResult RunJob( - string kind, - object? args, - Action? log, - CancellationToken ct) - { - return RunJobAsync(kind, args, log, ct).GetAwaiter().GetResult(); - } - - public static async Task ShutdownAsync(Action? log, CancellationToken ct) - { - BackendClient? client = s_client; - Process? proc = s_process; - - if (client != null) - { - try - { - await client.ShutdownAsync(ct).ConfigureAwait(false); - } - catch (Exception ex) - { - log?.Invoke($"shutdown failed: {ex.Message}"); - } - } - - if (proc != null && !proc.HasExited) - { - try - { - if (!proc.WaitForExit(2000)) - { - proc.Kill(true); - } - } - catch (Exception ex) - { - log?.Invoke($"kill backend failed: {ex.Message}"); - } - } - } - - public static void ApplyConfigToSettings(BackendConfig config) - { - Settings.Default.varspath = config.Varspath ?? string.Empty; - Settings.Default.vampath = config.Vampath ?? string.Empty; - if (config.VamExec != null) - { - Settings.Default.defaultVamExec = config.VamExec; - } - } - - private static async Task RefreshConfigAsync(Action? log, CancellationToken ct) - { - if (s_client == null) - { - return; - } - try - { - s_config = await s_client.GetConfigAsync(ct).ConfigureAwait(false); - if (s_config != null) - { - ApplyConfigToSettings(s_config); - } - } - catch (Exception ex) - { - log?.Invoke($"璇诲彇鍚庣閰嶇疆澶辫触: {ex.Message}"); - } - } - - private static void StartProcess(Action? log) - { - if (s_process != null && !s_process.HasExited) - { - return; - } - - string exePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "varManager_backend.exe"); - if (!File.Exists(exePath)) - { - throw new FileNotFoundException($"鍚庣绋嬪簭涓嶅瓨鍦: {exePath}"); - } - - var startInfo = new ProcessStartInfo - { - FileName = exePath, - WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory, - UseShellExecute = false, - CreateNoWindow = true - }; - - s_process = Process.Start(startInfo); - log?.Invoke("鍚庣宸插惎鍔"); - } - - private static string ResolveBaseUrl() - { - string host = "127.0.0.1"; - int port = 57123; - string cfgPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "config.json"); - if (File.Exists(cfgPath)) - { - try - { - var json = File.ReadAllText(cfgPath); - using var doc = JsonDocument.Parse(json); - if (doc.RootElement.TryGetProperty("listen_host", out var hostProp)) - { - var value = hostProp.GetString(); - if (!string.IsNullOrWhiteSpace(value)) - { - host = value; - } - } - if (doc.RootElement.TryGetProperty("listen_port", out var portProp)) - { - if (portProp.ValueKind == JsonValueKind.Number && portProp.TryGetInt32(out var portValue)) - { - port = portValue; - } - } - } - catch - { - // ignore config parse errors; fallback to defaults - } - } - return $"http://{host}:{port}/"; - } - } -} diff --git a/_archived/varManager/Comm.cs b/_archived/varManager/Comm.cs deleted file mode 100644 index f49586c..0000000 --- a/_archived/varManager/Comm.cs +++ /dev/null @@ -1,459 +0,0 @@ -锘縰sing System; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; - -namespace varManager -{ - static class Comm - { - public static void LocateFile(string filePath) - { - if (!File.Exists(filePath)) - { - return; - } - - // combine the arguments together - // it doesn't matter if there is a space after ',' - string argument = "/select, \"" + filePath + "\""; - - System.Diagnostics.Process.Start("explorer.exe", argument); - } - public static string ValidFileName(string filename) - { - foreach (char c in Path.GetInvalidFileNameChars()) - filename = filename.Replace(System.Char.ToString(c), ""); - return filename; - } - public static void DirectoryMoveAll(string sourceDir, string destDir) - { - if (Directory.Exists(destDir)) - { - foreach (string sourcefile in Directory.GetFiles(sourceDir, "*", SearchOption.TopDirectoryOnly)) - { - string destfile = sourcefile.Replace(sourceDir, destDir); - if (!File.Exists(destfile)) - File.Move(sourcefile, destfile); - } - foreach (string sourcesubdir in Directory.GetDirectories(sourceDir, "*", SearchOption.TopDirectoryOnly)) - { - string destsubdir = sourcesubdir.Replace(sourceDir, destDir); - DirectoryMoveAll(sourcesubdir, destsubdir); - } - if ((Directory.GetFiles(sourceDir, "*", SearchOption.AllDirectories).Length <= 0) && (Directory.GetDirectories(sourceDir, "*", SearchOption.TopDirectoryOnly).Length <= 0)) - { - Directory.Delete(sourceDir); - } - } - else - { - Directory.Move(sourceDir, destDir); - } - } - - [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] - public static extern bool CreateHardLink( - string lpFileName, - string lpExistingFileName, - IntPtr lpSecurityAttributes - ); - [Flags] - public enum SYMBOLIC_LINK_FLAG - { - File = 0, - Directory = 1, - AllowUnprivilegedCreate = 2 - } - - [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - [return: System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.I1)] - public static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, SYMBOLIC_LINK_FLAG dwFlags); - - [DllImport("kernel32.dll")] - static extern bool GetFileSizeEx(IntPtr hFile, out long lpFileSize); - - /// - /// Creates a relative path from one file or folder to another. - /// - /// Contains the directory that defines the start of the relative path. - /// Contains the path that defines the endpoint of the relative path. - /// The relative path from the start directory to the end path or toPath if the paths are not related. - /// - /// - /// - public static String MakeRelativePath(String fromPath, String toPath) - { - - if (String.IsNullOrEmpty(fromPath)) throw new ArgumentNullException("fromPath"); - if (String.IsNullOrEmpty(toPath)) throw new ArgumentNullException("toPath"); - if (fromPath.Last() != Path.DirectorySeparatorChar) - fromPath += Path.DirectorySeparatorChar; - Uri fromUri = new Uri(fromPath); - Uri toUri = new Uri(toPath); - - if (fromUri.Scheme != toUri.Scheme) { return toPath; } // path can't be made relative. - - Uri relativeUri = fromUri.MakeRelativeUri(toUri); - String relativePath = Uri.UnescapeDataString(relativeUri.ToString()); - - if (toUri.Scheme.Equals("file", StringComparison.InvariantCultureIgnoreCase)) - { - relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); - } - - return relativePath; - } - // This is based on the code at http://www.flexhex.com/docs/articles/hard-links.phtml - - private const uint IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003; // Moiunt point or junction, see winnt.h - private const uint IO_REPARSE_TAG_SYMLINK = 0xA000000C; // SYMLINK or SYMLINKD (see http://wesnerm.blogs.com/net_undocumented/2006/10/index.html) - private const UInt32 SE_PRIVILEGE_ENABLED = 0x00000002; - private const string SE_BACKUP_NAME = "SeBackupPrivilege"; - private const uint FILE_FLAG_BACKUP_SEMANTICS = 0x02000000; - private const uint FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000; - private const uint FILE_DEVICE_FILE_SYSTEM = 9; - private const uint FILE_ANY_ACCESS = 0; - private const uint METHOD_BUFFERED = 0; - private const int MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024; - private const uint TOKEN_ADJUST_PRIVILEGES = 0x0020; - private const int FSCTL_GET_REPARSE_POINT = 42; - - // This is the official version of the data buffer, see http://msdn2.microsoft.com/en-us/library/ms791514.aspx - // not the one used at http://www.flexhex.com/docs/articles/hard-links.phtml - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - private struct REPARSE_DATA_BUFFER - { - public uint ReparseTag; - public short ReparseDataLength; - public short Reserved; - public short SubsNameOffset; - public short SubsNameLength; - public short PrintNameOffset; - public short PrintNameLength; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = MAXIMUM_REPARSE_DATA_BUFFER_SIZE)] - public char[] ReparseTarget; - } - - [StructLayout(LayoutKind.Sequential)] - private struct LUID - { - public UInt32 LowPart; - public Int32 HighPart; - } - - [StructLayout(LayoutKind.Sequential)] - private struct LUID_AND_ATTRIBUTES - { - public LUID Luid; - public UInt32 Attributes; - } - - private struct TOKEN_PRIVILEGES - { - public UInt32 PrivilegeCount; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] // !! think we only need one - public LUID_AND_ATTRIBUTES[] Privileges; - } - - [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true, CharSet = CharSet.Auto)] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool DeviceIoControl( - IntPtr hDevice, - uint dwIoControlCode, - IntPtr lpInBuffer, - uint nInBufferSize, - //IntPtr lpOutBuffer, - out REPARSE_DATA_BUFFER outBuffer, - uint nOutBufferSize, - out uint lpBytesReturned, - IntPtr lpOverlapped); - - [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)] - private static extern IntPtr CreateFile( - string fileName, - [MarshalAs(UnmanagedType.U4)] uint fileAccess, - [MarshalAs(UnmanagedType.U4)] FileShare fileShare, - int securityAttributes, - [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, - uint flags, - IntPtr template); - - [DllImport("advapi32.dll", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool OpenProcessToken(IntPtr ProcessHandle, - UInt32 DesiredAccess, out IntPtr TokenHandle); - - [DllImport("kernel32.dll")] - private static extern IntPtr GetCurrentProcess(); - - [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool LookupPrivilegeValue(string lpSystemName, string lpName, - out LUID lpLuid); - - [DllImport("advapi32.dll", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool AdjustTokenPrivileges(IntPtr TokenHandle, - [MarshalAs(UnmanagedType.Bool)] bool DisableAllPrivileges, - ref TOKEN_PRIVILEGES NewState, - Int32 BufferLength, - //ref TOKEN_PRIVILEGES PreviousState, !! for some reason this won't accept null - IntPtr PreviousState, - IntPtr ReturnLength); - - [DllImport("kernel32.dll", SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool CloseHandle(IntPtr hObject); - - public enum TagType - { - None = 0, - MountPoint = 1, - SymbolicLink = 2, - JunctionPoint = 3 - } - - /// - /// Takes a full path to a reparse point and finds the target. - /// - /// Full path of the reparse point - public static string ReparsePoint(string path) - { - Debug.Assert(!string.IsNullOrEmpty(path) && path.Length > 2 && path[1] == ':' && path[2] == '\\'); - string normalisedTarget = ""; - TagType tag = TagType.None; - bool success; - int lastError; - // Apparently we need to have backup privileges - IntPtr token; - TOKEN_PRIVILEGES tokenPrivileges = new TOKEN_PRIVILEGES(); - tokenPrivileges.Privileges = new LUID_AND_ATTRIBUTES[1]; - success = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, out token); - lastError = Marshal.GetLastWin32Error(); - if (success) - { - success = LookupPrivilegeValue(null, SE_BACKUP_NAME, out tokenPrivileges.Privileges[0].Luid); // null for local system - lastError = Marshal.GetLastWin32Error(); - if (success) - { - tokenPrivileges.PrivilegeCount = 1; - tokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - success = AdjustTokenPrivileges(token, false, ref tokenPrivileges, Marshal.SizeOf(tokenPrivileges), IntPtr.Zero, IntPtr.Zero); - lastError = Marshal.GetLastWin32Error(); - } - CloseHandle(token); - } - - if (success) - { - // Open the file and get its handle - IntPtr handle = CreateFile(path, 0x80000000, FileShare.None, 0, FileMode.Open, FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, IntPtr.Zero); - lastError = Marshal.GetLastWin32Error(); - if (handle.ToInt32() >= 0) - { - REPARSE_DATA_BUFFER buffer = new REPARSE_DATA_BUFFER(); - // Make up the control code - see CTL_CODE on ntddk.h - uint controlCode = (FILE_DEVICE_FILE_SYSTEM << 16) | (FILE_ANY_ACCESS << 14) | (FSCTL_GET_REPARSE_POINT << 2) | METHOD_BUFFERED; - uint bytesReturned; - success = DeviceIoControl(handle, controlCode, IntPtr.Zero, 0, out buffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, out bytesReturned, IntPtr.Zero); - lastError = Marshal.GetLastWin32Error(); - if (success) - { - string subsString = ""; - string printString = ""; - // Note that according to http://wesnerm.blogs.com/net_undocumented/2006/10/symbolic_links_.html - // Symbolic links store relative paths, while junctions use absolute paths - // however, they can in fact be either, and may or may not have a leading \. - Debug.Assert(buffer.ReparseTag == IO_REPARSE_TAG_SYMLINK || buffer.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT, - "Unrecognised reparse tag"); // We only recognise these two - if (buffer.ReparseTag == IO_REPARSE_TAG_SYMLINK) - { - // for some reason symlinks seem to have an extra two characters on the front - subsString = new string(buffer.ReparseTarget, (buffer.SubsNameOffset / 2 + 2), buffer.SubsNameLength / 2); - printString = new string(buffer.ReparseTarget, (buffer.PrintNameOffset / 2 + 2), buffer.PrintNameLength / 2); - tag = TagType.SymbolicLink; - } - else if (buffer.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT) - { - // This could be a junction or a mounted drive - a mounted drive starts with "\\??\\Volume" - subsString = new string(buffer.ReparseTarget, buffer.SubsNameOffset / 2, buffer.SubsNameLength / 2); - printString = new string(buffer.ReparseTarget, buffer.PrintNameOffset / 2, buffer.PrintNameLength / 2); - tag = subsString.StartsWith(@"\??\Volume") ? TagType.MountPoint : TagType.JunctionPoint; - } - Debug.Assert(!(string.IsNullOrEmpty(subsString) && string.IsNullOrEmpty(printString)), "Failed to retrieve parse point"); - // the printstring should give us what we want - if (!string.IsNullOrEmpty(printString)) - { - normalisedTarget = printString; - } - else - { - // if not we can use the substring with a bit of tweaking - normalisedTarget = subsString; - Debug.Assert(normalisedTarget.Length > 2, "Target string too short"); - Debug.Assert( - (normalisedTarget.StartsWith(@"\??\") && (normalisedTarget[5] == ':' || normalisedTarget.StartsWith(@"\??\Volume")) || - (!normalisedTarget.StartsWith(@"\??\") && normalisedTarget[1] != ':')), - "Malformed subsString"); - // Junction points must be absolute - Debug.Assert( - buffer.ReparseTag == IO_REPARSE_TAG_SYMLINK || - normalisedTarget.StartsWith(@"\??\Volume") || - normalisedTarget[1] == ':', - "Relative junction point"); - if (normalisedTarget.StartsWith(@"\??\")) - { - normalisedTarget = normalisedTarget.Substring(4); - } - } - string actualTarget = normalisedTarget; - // Symlinks can be relative. - if (buffer.ReparseTag == IO_REPARSE_TAG_SYMLINK && (normalisedTarget.Length < 2 || normalisedTarget[1] != ':')) - { - // it's relative, we need to tack it onto the path - if (normalisedTarget[0] == '\\') - { - normalisedTarget = normalisedTarget.Substring(1); - } - if (path.EndsWith(@"\")) - { - path = path.Substring(0, path.Length - 1); - } - // Need to take the symlink name off the path - normalisedTarget = path.Substring(0, path.LastIndexOf('\\')) + @"\" + normalisedTarget; - // Note that if the symlink target path contains any ..s these are not normalised but returned as is. - } - // Remove any final slash for consistency - if (normalisedTarget.EndsWith("\\")) - { - normalisedTarget = normalisedTarget.Substring(0, normalisedTarget.Length - 1); - } - } - CloseHandle(handle); - } - else if (lastError == 5) - { - success = false; - } - else - { - throw new Win32Exception(lastError); - } - - } - return normalisedTarget; - } - - public static bool SetSymboLinkFileTime(string path, DateTime createtime, DateTime lastwritetime) - { - Debug.Assert(!string.IsNullOrEmpty(path) && path.Length > 2 && path[1] == ':' && path[2] == '\\'); - bool success; - int lastError; - // Apparently we need to have backup privileges - IntPtr token; - TOKEN_PRIVILEGES tokenPrivileges = new TOKEN_PRIVILEGES(); - tokenPrivileges.Privileges = new LUID_AND_ATTRIBUTES[1]; - success = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, out token); - lastError = Marshal.GetLastWin32Error(); - if (success) - { - success = LookupPrivilegeValue(null, SE_BACKUP_NAME, out tokenPrivileges.Privileges[0].Luid); // null for local system - lastError = Marshal.GetLastWin32Error(); - if (success) - { - tokenPrivileges.PrivilegeCount = 1; - tokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - success = AdjustTokenPrivileges(token, false, ref tokenPrivileges, Marshal.SizeOf(tokenPrivileges), IntPtr.Zero, IntPtr.Zero); - lastError = Marshal.GetLastWin32Error(); - } - CloseHandle(token); - } - - if (success) - { - // Open the file and get its handle - IntPtr handle = CreateFile(path, 0x40000000, FileShare.ReadWrite | FileShare.Delete, - 0, FileMode.Open, 0x00200000, IntPtr.Zero); - lastError = Marshal.GetLastWin32Error(); - if (handle.ToInt32() >= 0) - { - var basicInfo = new FileInformation(); - //basicInfo.FILE_BASIC_INFO.CreationTime = createtime.ToFileTime(); - //basicInfo.FILE_BASIC_INFO.LastWriteTime = lastwritetime.ToFileTime(); - basicInfo.FILE_BASIC_INFO = new FILE_BASIC_INFO() - { - CreationTime = createtime.ToFileTime(), - LastAccessTime = -1, - LastWriteTime = lastwritetime.ToFileTime(), - ChangeTime = -1, - FileAttributes = 0 - }; - success = SetFileInformationByHandle(handle, FileInformationClass.FileBasicInfo, ref basicInfo, Marshal.SizeOf(basicInfo.FILE_BASIC_INFO)); - if (!success) - { - throw new Win32Exception(Marshal.GetLastWin32Error()); - } - CloseHandle(handle); - } - } - return success; - } - - enum FileInformationClass : int - { - FileBasicInfo = 0, - FileStandardInfo = 1, - FileNameInfo = 2, - FileRenameInfo = 3, - FileDispositionInfo = 4, - FileAllocationInfo = 5, - FileEndOfFileInfo = 6, - FileStreamInfo = 7, - FileCompressionInfo = 8, - FileAttributeTagInfo = 9, - FileIdBothDirectoryInfo = 10, // 0xA - FileIdBothDirectoryRestartInfo = 11, // 0xB - FileIoPriorityHintInfo = 12, // 0xC - FileRemoteProtocolInfo = 13, // 0xD - FileFullDirectoryInfo = 14, // 0xE - FileFullDirectoryRestartInfo = 15, // 0xF - FileStorageInfo = 16, // 0x10 - FileAlignmentInfo = 17, // 0x11 - FileIdInfo = 18, // 0x12 - FileIdExtdDirectoryInfo = 19, // 0x13 - FileIdExtdDirectoryRestartInfo = 20, // 0x14 - } - [StructLayout(LayoutKind.Sequential)] - private struct FILE_BASIC_INFO - { - public Int64 CreationTime; - public Int64 LastAccessTime; - public Int64 LastWriteTime; - public Int64 ChangeTime; - public UInt32 FileAttributes; - } - [StructLayout(LayoutKind.Sequential)] - struct FILE_DISPOSITION_INFO - { - public bool DeleteFile; - } - [StructLayout(LayoutKind.Explicit)] - struct FileInformation - { - [FieldOffset(0)] - public FILE_BASIC_INFO FILE_BASIC_INFO; - [FieldOffset(0)] - public FILE_DISPOSITION_INFO FILE_DISPOSITION_INFO; - } - [DllImport("Kernel32.dll", SetLastError = true)] - private static extern bool SetFileInformationByHandle(IntPtr hFile, - FileInformationClass FileInformationClass, - ref FileInformation FileInformation, - Int32 dwBufferSize); - - - } -} diff --git a/_archived/varManager/Custom/Scripts/MorphMerger.cs b/_archived/varManager/Custom/Scripts/MorphMerger.cs deleted file mode 100644 index d714fc7..0000000 --- a/_archived/varManager/Custom/Scripts/MorphMerger.cs +++ /dev/null @@ -1,592 +0,0 @@ -锘/* -MIT License - -Copyright (c) 2019 ProjectCanyon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -using System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using UnityEngine.UI; - -namespace MorphMerger -{ - public class MorphMerger : MVRScript - { - private Atom _person; - - private UIDynamicButton _refreshButton; - private UIDynamicButton _selectAllButton; - private UIDynamicButton _selectNoneButton; - private UIDynamicButton _mergeButton; - private UIDynamicButton _splitButton; - - private List _mainBank; - private List _genitalBank; - - private DAZCharacterSelector _characterSelector; - - private UIDynamicTextField _titleTextField; - private UIDynamicTextField _infoTextField; - private UIDynamicTextField _resultTextField; - - private InputField _morphNameInputField; - private InputField _groupNameInputField; - private InputField _regionNameInputField; - - public override void Init() - { - try - { - pluginLabelJSON.val = "MorphMerger v1.0.7b (by ProjectCanyon, chokaphi, patch by MeshedVR)."; - - if (containingAtom.type != "Person") - { - SuperController.LogError($"This plugin is for use with 'Person' atom only, not '{containingAtom.type}'"); - return; - } - - _person = containingAtom; - - _characterSelector = _person.GetComponentInChildren(); - if (_characterSelector == null) - throw new InvalidOperationException("Missing DAZCharacterSelector"); - - _titleTextField = CreateTextField(new JSONStorableString("info", "Morph Merger")); - _titleTextField.height = 12; - _titleTextField.UItext.fontSize = 72; - _titleTextField.UItext.alignment = TextAnchor.LowerCenter; - _titleTextField.UItext.fontStyle = FontStyle.Bold; - - var infoBuilder = new StringBuilder(); - - infoBuilder.AppendLine(); - infoBuilder.AppendLine("Select morphs on the right to include them into the merged morph."); - infoBuilder.AppendLine(); - infoBuilder.AppendLine("Morph colors are greener the more impact they are having."); - infoBuilder.AppendLine(); - infoBuilder.AppendLine("Disable auto behaviours to prevent them showing."); - infoBuilder.AppendLine(); - infoBuilder.AppendLine("Morph will not show up until hard reset via main menu, or VAM restart."); - - _infoTextField = CreateTextField(new JSONStorableString("info", infoBuilder.ToString())); - _infoTextField.height = 450; - _infoTextField.UItext.fontSize = 32; - - _mainBank = new List(); - _genitalBank = new List(); - - _refreshButton = CreateButton("Refresh", rightSide: true); - _refreshButton.buttonColor = Color.yellow; - if (_refreshButton != null) - _refreshButton.button.onClick.AddListener(Refresh); - - _selectAllButton = CreateButton("Select All", rightSide: true); - if (_selectAllButton != null) - _selectAllButton.button.onClick.AddListener(() => - { - foreach (SelectableMorph selectableMorph in _mainBank.Concat(_genitalBank)) - selectableMorph.Storable.val = selectableMorph.Selected = true; - }); - - _selectNoneButton = CreateButton("Select None", rightSide: true); - if (_selectNoneButton != null) - _selectNoneButton.button.onClick.AddListener(() => - { - foreach (SelectableMorph selectableMorph in _mainBank.Concat(_genitalBank)) - selectableMorph.Storable.val = selectableMorph.Selected = false; - }); - - var morphNameLabel = CreateTextField(new JSONStorableString("morphName", "Morph Name")); - morphNameLabel.UItext.fontSize = 36; - morphNameLabel.backgroundColor = Color.clear; - - SetLayoutHeight(morphNameLabel, 48); - - var morphNameTextField = CreateTextField(new JSONStorableString(name, "My Morph")); - _morphNameInputField = morphNameTextField.gameObject.AddComponent(); - _morphNameInputField.textComponent = morphNameTextField.UItext; - _morphNameInputField.text = "My Morph"; - morphNameTextField.height = 18; - morphNameTextField.backgroundColor = Color.white; - _morphNameInputField.textComponent.fontSize = 36; - - SetLayoutHeight(morphNameTextField, 48); - - var groupNameLabel = CreateTextField(new JSONStorableString("groupName", "Group")); - groupNameLabel.height = 12; - groupNameLabel.UItext.fontSize = 36; - groupNameLabel.backgroundColor = Color.clear; - - SetLayoutHeight(groupNameLabel, 48); - - var groupNameTextField = CreateTextField(new JSONStorableString(name, "_MorphMerger")); - _groupNameInputField = groupNameTextField.gameObject.AddComponent(); - _groupNameInputField.textComponent = groupNameTextField.UItext; - _groupNameInputField.text = "_MorphMerger"; - groupNameTextField.height = 18; - groupNameTextField.backgroundColor = Color.white; - _groupNameInputField.textComponent.fontSize = 36; - - SetLayoutHeight(_groupNameInputField, 48); - - var regionNameLabel = CreateTextField(new JSONStorableString("regionName", "Region (Category)")); - regionNameLabel.height = 12; - regionNameLabel.UItext.fontSize = 36; - regionNameLabel.backgroundColor = Color.clear; - - SetLayoutHeight(regionNameLabel, 48); - - var regionNameTextField = CreateTextField(new JSONStorableString(name, "_MorphMerger")); - _regionNameInputField = regionNameTextField.gameObject.AddComponent(); - _regionNameInputField.textComponent = regionNameTextField.UItext; - _regionNameInputField.text = "_MorphMerger"; - regionNameTextField.height = 18; - regionNameTextField.backgroundColor = Color.white; - _regionNameInputField.textComponent.fontSize = 36; - - SetLayoutHeight(regionNameTextField, 48); - - _mergeButton = CreateButton("Merge"); - _mergeButton.buttonColor = Color.red; - _mergeButton.height = 100; - _mergeButton.buttonText.fontStyle = FontStyle.Bold; - _mergeButton.buttonText.fontSize = 42; - if (_mergeButton != null) - _mergeButton.button.onClick.AddListener(Merge); - - //Body Spliter - _splitButton = CreateButton("Split Body"); - _splitButton.buttonColor = Color.cyan; - _splitButton.height = 100; - _splitButton.buttonText.fontStyle = FontStyle.Bold; - _splitButton.buttonText.fontSize = 42; - if (_splitButton != null) - _splitButton.button.onClick.AddListener(Split); - - _resultTextField = CreateTextField(new JSONStorableString("result", string.Empty)); - _resultTextField.UItext.fontSize = 24; - - Refresh(); - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - private void SetLayoutHeight(Component component, float height) - { - var layoutElement = component.GetComponent(); - layoutElement.minHeight = 0f; - layoutElement.preferredHeight = height; - } - - private UIDynamic _genitalSpacer; - - private void Refresh() - { - foreach (SelectableMorph selectableMorph in _mainBank) - RemoveToggle(selectableMorph.Storable); - - _mainBank.Clear(); - - foreach (SelectableMorph selectableMorph in _genitalBank) - RemoveToggle(selectableMorph.Storable); - - _genitalBank.Clear(); - - ScanBank(_characterSelector.morphBank1, _mainBank); - - if (_genitalSpacer != null) - RemoveSpacer(_genitalSpacer); - _genitalSpacer = CreateSpacer(rightSide: true); - - ScanBank(_characterSelector.morphBank2, _genitalBank); - ScanBank(_characterSelector.morphBank3, _genitalBank); - } - - private void ScanBank(DAZMorphBank bank, List selectableList) - { - if (bank == null) - return; - - foreach (DAZMorph morph in bank.morphs.OrderByDescending(NormalisedMagnitude)) - { - // ReSharper disable once CompareOfFloatsByEqualityOperator - if (morph.appliedValue != morph.jsonFloat.defaultVal && morph.visible) - { - var jsonStorable = new JSONStorableBool($"{morph.morphName}Bool", false); - - var morphToggle = CreateToggle(jsonStorable, true); - morphToggle.label = morph.displayName; - - var selectable = new SelectableMorph - { - Morph = morph, - Storable = jsonStorable, - }; - - morphToggle.backgroundColor = Color.Lerp(Color.white, Color.green, NormalisedMagnitude(morph)); - morphToggle.toggle.onValueChanged.AddListener(value => - { - selectable.Selected = value; - }); - - selectableList.Add(selectable); - } - } - } - - private void Merge() - { - try - { - var rndId = Guid.NewGuid().ToString("N").Substring(0, 8); - - ClearResultField(); - - var characterSelector = _person.GetComponentInChildren(); - if (characterSelector == null) - throw new InvalidOperationException("Missing DAZCharacterSelector"); - - string morphName = _morphNameInputField.text; - if (string.IsNullOrEmpty(morphName)) - morphName = _person.name; - - // Main - DAZMorph mainMorph = ProcessMorphBank(_mainBank, morphName, morphName); - if (mainMorph != null) - { - string mainMetaPath = characterSelector.morphBank1.autoImportFolder + $"/{morphName}-{rndId}.vmi"; - string mainDeltasPath = characterSelector.morphBank1.autoImportFolder + $"/{morphName}-{rndId}.vmb"; - - var mainMeta = mainMorph.GetMetaJSON(); - if (mainMeta == null) - throw new InvalidOperationException("Failed to generate meta data"); - - SaveJSON(mainMeta, mainMetaPath); - mainMorph.SaveDeltasToBinaryFile(mainDeltasPath); - - WriteToResultField($"Saved VMI: \"{mainMetaPath}\""); - WriteToResultField($"Saved VMB \"{mainDeltasPath}\""); - } - - // Genital - DAZMorph genMorph = ProcessMorphBank(_genitalBank, $"{morphName}-genital", $"{morphName} Genital"); - if (genMorph != null) - { - string genMetaPath = characterSelector.morphBank2.autoImportFolder + $"/{morphName}-{rndId}-Genital.vmi"; - string genDeltasPath = characterSelector.morphBank2.autoImportFolder + $"/{morphName}-{rndId}-Genital.vmb"; - - var genMeta = genMorph.GetMetaJSON(); - if (genMeta == null) - throw new InvalidOperationException("Failed to generate gen meta data"); - - SaveJSON(genMeta, genMetaPath); - genMorph.SaveDeltasToBinaryFile(genDeltasPath); - - WriteToResultField($"Saved Genital VMI: \"{genMetaPath}\""); - WriteToResultField($"Saved Genital VMB: \"{genDeltasPath}\""); - } - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - private void Split() - { - try - { - //use a more usefull date of creation as random instead of guid - var rndId = DateTime.Now.ToString("yyyy-dd-M--HH_mm_ss.fff"); - - ClearResultField(); - - var characterSelector = _person.GetComponentInChildren(); - if (characterSelector == null) - throw new InvalidOperationException("Missing DAZCharacterSelector"); - - string morphName = _morphNameInputField.text; - if (string.IsNullOrEmpty(morphName)) - morphName = _person.name; - - VertexFilter vertexFilter = new VertexFilter() { vertecies = _headVerticies, boneNames = _headBoneNames }; - - // Head - string tempName = morphName + "-Head"; - DAZMorph mainMorph = ProcessMorphBank(_mainBank, tempName, tempName, vertexFilter); - if (mainMorph != null) - { - string mainMetaPath = characterSelector.morphBank1.autoImportFolder + $"/{tempName}-{rndId}.vmi"; - string mainDeltasPath = characterSelector.morphBank1.autoImportFolder + $"/{tempName}-{rndId}.vmb"; - - var mainMeta = mainMorph.GetMetaJSON(); - if (mainMeta == null) - throw new InvalidOperationException("Failed to generate meta data"); - - SaveJSON(mainMeta, mainMetaPath); - mainMorph.SaveDeltasToBinaryFile(mainDeltasPath); - - WriteToResultField($"Saved VMI: \"{mainMetaPath}\""); - WriteToResultField($"Saved VMB \"{mainDeltasPath}\""); - } - //BODY - just inverse head filter - tempName = morphName + "-Body"; - vertexFilter.invert = true; - mainMorph = ProcessMorphBank(_mainBank, tempName, tempName, vertexFilter); - if (mainMorph != null) - { - string mainMetaPath = characterSelector.morphBank1.autoImportFolder + $"/{tempName}-{rndId}.vmi"; - string mainDeltasPath = characterSelector.morphBank1.autoImportFolder + $"/{tempName}-{rndId}.vmb"; - - - var mainMeta = mainMorph.GetMetaJSON(); - if (mainMeta == null) - throw new InvalidOperationException("Failed to generate meta data"); - - SaveJSON(mainMeta, mainMetaPath); - mainMorph.SaveDeltasToBinaryFile(mainDeltasPath); - - WriteToResultField($"Saved VMI: \"{mainMetaPath}\""); - WriteToResultField($"Saved VMB \"{mainDeltasPath}\""); - } - - // Genital - DAZMorph genMorph = ProcessMorphBank(_genitalBank, $"{morphName}-genital", $"{morphName} Genital"); - if (genMorph != null) - { - string genMetaPath = characterSelector.morphBank2.autoImportFolder + $"/{morphName}-{rndId}-Genital.vmi"; - string genDeltasPath = characterSelector.morphBank2.autoImportFolder + $"/{morphName}-{rndId}-Genital.vmb"; - - var genMeta = genMorph.GetMetaJSON(); - if (genMeta == null) - throw new InvalidOperationException("Failed to generate gen meta data"); - - SaveJSON(genMeta, genMetaPath); - genMorph.SaveDeltasToBinaryFile(genDeltasPath); - - WriteToResultField($"Saved Genital VMI: \"{genMetaPath}\""); - WriteToResultField($"Saved Genital VMB: \"{genDeltasPath}\""); - } - - //_person.GetComponentInChildren().morphBank1.RebuildAllLookups(); - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - private void ClearResultField() - { - _resultTextField.text = string.Empty; - } - - private void WriteToResultField(string message) - { - _resultTextField.text += "\n" + message; - } - - private DAZMorph ProcessMorphBank(IEnumerable bank, string name, string displayName, VertexFilter vertexFilter = null) - { - try - { - VertexDeltas vertexDeltas = new VertexDeltas(); - Formulas formulas = new Formulas(); - - foreach (SelectableMorph selectableMorph in bank) - { //vertex filters don't care about user morph category selections - if (!selectableMorph.Selected && vertexFilter == null) - continue; - - if (selectableMorph.Morph.deltas != null) - { - foreach (DAZMorphVertex delta in selectableMorph.Morph.deltas) - { - if(vertexFilter != null) - { - if (vertexFilter.Contains(delta.vertex)) - { - vertexDeltas.Add(delta, selectableMorph); - } - } - else - { - vertexDeltas.Add(delta, selectableMorph); - } - } - } - - foreach (DAZMorphFormula formula in selectableMorph.Morph.formulas) - { - if (formula.targetType == DAZMorphFormulaTargetType.MCM || formula.targetType == DAZMorphFormulaTargetType.MCMMult || formula.targetType == DAZMorphFormulaTargetType.MorphValue) - continue; - - var combinedFormula = new DAZMorphFormula - { - targetType = formula.targetType, - target = formula.target, - multiplier = formula.multiplier * selectableMorph.Morph.morphValue - }; - - if (vertexFilter != null) - { - if (vertexFilter.Contains(formula.target)) - { - formulas.Add(combinedFormula); - } - } - else - { - formulas.Add(combinedFormula); - } - - } - } - - if (vertexDeltas.Count == 0 && formulas.Count == 0) - return null; - - var groupName = _groupNameInputField.text; - if (string.IsNullOrEmpty(groupName)) - groupName = "_MorphMerger"; - - var regionName = _regionNameInputField.text; - if (string.IsNullOrEmpty(regionName)) - regionName = "_MorphMerger"; - - var combinedMorph = new DAZMorph - { - group = groupName, - region = regionName, - morphName = name, - displayName = displayName, - min = 0, - max = 1, - visible = true, - disable = false, - isPoseControl = false, - formulas = formulas.formulas - .SelectMany(x => x.Value.Values) - .ToArray(), - numDeltas = vertexDeltas.Count, - deltas = vertexDeltas.Deltas - .Select(x => new DAZMorphVertex { vertex = x.Key, delta = x.Value }) - .ToArray(), - }; - - return combinedMorph; - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - - return null; - } - - public static float NormalisedMagnitude(DAZMorph morph) - { - return morph.morphValue > morph.jsonFloat.defaultVal ? - Math.Abs(morph.jsonFloat.defaultVal - morph.morphValue) / Math.Abs(morph.jsonFloat.defaultVal - morph.max) : - Math.Abs(morph.jsonFloat.defaultVal - morph.morphValue) / Math.Abs(morph.jsonFloat.defaultVal - morph.min); - } - - public class SelectableMorph - { - public bool Selected { get; set; } - public DAZMorph Morph { get; set; } - public JSONStorableBool Storable { get; set; } - } - - public class SelectableMorphComparer : IComparer - { - public int Compare(SelectableMorph x, SelectableMorph y) - { - if (x == null || y == null) return 0; - return NormalisedMagnitude(x.Morph).CompareTo(MorphMerger.NormalisedMagnitude(y.Morph)); - } - } - - public class VertexDeltas - { - public Dictionary Deltas { get; set; } = new Dictionary(); - public int Count { get { return Deltas.Count; } } - - public void Add(DAZMorphVertex delta, SelectableMorph selectableMorph) - { - if (!Deltas.ContainsKey(delta.vertex)) - Deltas.Add(delta.vertex, delta.delta * selectableMorph.Morph.morphValue); - else - Deltas[delta.vertex] += delta.delta * selectableMorph.Morph.morphValue; - } - } - - public class Formulas - { - public Dictionary> formulas { get; set; } = new Dictionary>(); - public int Count { get { return formulas.Count; } } - public void Add(DAZMorphFormula combinedFormula) - { - if (!formulas.ContainsKey(combinedFormula.target)) - formulas.Add(combinedFormula.target, new Dictionary { { combinedFormula.targetType, combinedFormula } }); - else if (!formulas[combinedFormula.target].ContainsKey(combinedFormula.targetType)) - formulas[combinedFormula.target].Add(combinedFormula.targetType, combinedFormula); - else - formulas[combinedFormula.target][combinedFormula.targetType].multiplier += combinedFormula.multiplier; - } - - } - public class VertexFilter - { - public bool invert { get; set; } = false; - public List vertecies { private get; set; } - public List boneNames { private get; set; } - public bool Contains(string bone) - { - if (invert) - { - return !boneNames.Contains(bone); - } - return boneNames.Contains(bone); - } - public bool Contains(int vertex) - { - if (invert) - { - return !vertecies.Contains(vertex); - } - return vertecies.Contains(vertex); - } - - } - - static private List _headVerticies = new List() { 61, 85, 184, 185, 186, 187, 188, 189, 190, 191, 210, 211, 256, 257, 258, 259, 260, 263, 264, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2090, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2441, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2608, 2609, 2610, 2611, 2612, 2616, 2617, 2618, 2619, 2620, 2621, 2622, 2623, 2624, 2625, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2784, 3055, 3056, 3057, 3058, 3059, 3060, 3061, 3062, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 3130, 3131, 3132, 3133, 3134, 3135, 3137, 3138, 3139, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 3350, 3351, 3352, 3353, 3354, 3355, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4427, 4428, 4429, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 4500, 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 4750, 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, 4798, 4799, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807, 4808, 4809, 4810, 4811, 4812, 4813, 4814, 4815, 4816, 4817, 4818, 4819, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 4840, 4841, 4842, 4843, 4844, 4845, 4846, 4847, 4848, 4849, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 4880, 4881, 4882, 4883, 4884, 4885, 4886, 4887, 4888, 4889, 4890, 4891, 4892, 4893, 4894, 4895, 4896, 4897, 4898, 4899, 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055, 5056, 5057, 5058, 5059, 5060, 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 5090, 5091, 5092, 5093, 5094, 5095, 5096, 5097, 5098, 5099, 5100, 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108, 5109, 5110, 5111, 5112, 5113, 5114, 5115, 5116, 5117, 5118, 5119, 5120, 5121, 5122, 5123, 5124, 5125, 5126, 5127, 5128, 5129, 5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5138, 5139, 5140, 5141, 5142, 5143, 5144, 5145, 5146, 5147, 5148, 5149, 5150, 5151, 5152, 5153, 5154, 5155, 5156, 5157, 5158, 5159, 5160, 5161, 5162, 5163, 5164, 5165, 5166, 5167, 5168, 5169, 5170, 5171, 5172, 5173, 5174, 5175, 5176, 5177, 5178, 5179, 5180, 5181, 5182, 5183, 5184, 5185, 5186, 5187, 5188, 5189, 5190, 5191, 5192, 5193, 5194, 5195, 5196, 5197, 5198, 5199, 5200, 5201, 5202, 5203, 5204, 5205, 5206, 5207, 5208, 5209, 5210, 5211, 5212, 5213, 5214, 5215, 5216, 5217, 5218, 5219, 5220, 5221, 5222, 5223, 5224, 5225, 5226, 5227, 5228, 5229, 5230, 5231, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 5239, 5240, 5241, 5242, 5243, 5244, 5245, 5246, 5247, 5248, 5249, 5250, 5251, 5252, 5253, 5254, 5255, 5256, 5257, 5258, 5259, 5260, 5261, 5262, 5263, 5264, 5265, 5266, 5267, 5268, 5269, 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 5280, 5281, 5282, 5283, 5284, 5285, 5286, 5287, 5288, 5289, 5290, 5291, 5292, 5293, 5294, 5295, 5296, 5297, 5298, 5299, 5300, 5301, 5302, 5303, 5304, 5305, 5306, 5307, 5308, 5309, 5310, 5311, 5312, 5313, 5314, 5315, 5316, 5317, 5318, 5319, 5320, 5321, 5322, 5323, 5324, 5325, 5326, 5327, 5328, 5329, 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 5349, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5357, 5358, 5359, 5360, 5361, 5362, 5363, 5364, 5365, 5366, 5367, 5368, 5369, 5370, 5371, 5372, 5373, 5374, 5375, 5376, 5377, 5378, 5379, 5380, 5381, 5382, 5383, 5384, 5385, 5386, 5387, 5388, 5389, 5390, 5391, 5392, 5393, 5394, 5395, 5396, 5397, 5398, 5399, 5400, 5401, 5402, 5403, 5404, 5405, 5406, 5407, 5408, 5409, 5410, 5411, 5412, 5413, 5414, 5415, 5416, 5417, 5418, 5419, 5420, 5421, 5422, 5423, 5424, 5425, 5426, 5427, 5428, 5429, 5430, 5431, 5432, 5433, 5434, 5435, 5436, 5437, 5438, 5439, 5440, 5441, 5442, 5443, 5444, 5445, 5446, 5447, 5448, 5449, 5450, 5451, 5452, 5453, 5454, 5455, 5456, 5457, 5458, 5459, 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5467, 5468, 5469, 5470, 5471, 5472, 5473, 5474, 5475, 5476, 5477, 5478, 5479, 5480, 5481, 5482, 5483, 5484, 5485, 5486, 5487, 5488, 5489, 5490, 5491, 5492, 5493, 5494, 5495, 5496, 5497, 5498, 5499, 5500, 5501, 5502, 5503, 5504, 5505, 5506, 5507, 5508, 5509, 5510, 5511, 5512, 5513, 5514, 5515, 5516, 5517, 5518, 5519, 5520, 5521, 5522, 5523, 5524, 5525, 5526, 5527, 5528, 5529, 5530, 5531, 5532, 5533, 5534, 5535, 5536, 5537, 5538, 5539, 5540, 5541, 5542, 5543, 5544, 5545, 5546, 5547, 5548, 5549, 5550, 5551, 5552, 5553, 5554, 5555, 5556, 5557, 5558, 5559, 5560, 5561, 5562, 5563, 5564, 5565, 5566, 5567, 5568, 5569, 5570, 5571, 5572, 5573, 5574, 5575, 5576, 5577, 5578, 5579, 5580, 5581, 5582, 5583, 5584, 5585, 5586, 5587, 5588, 5589, 5590, 5591, 5592, 5593, 5594, 5595, 5596, 5597, 5598, 5599, 5600, 5601, 5602, 5603, 5604, 5605, 5606, 5607, 5608, 5609, 5610, 5611, 5612, 5613, 5614, 5615, 5616, 5617, 5618, 5619, 5620, 5621, 5622, 5623, 5624, 5625, 5626, 5627, 5628, 5629, 5630, 5631, 5632, 5633, 5634, 5635, 5636, 5637, 5638, 5639, 5640, 5641, 5642, 5643, 5644, 5645, 5646, 5647, 5648, 5649, 5650, 5651, 5652, 5653, 5654, 5655, 5656, 5657, 5658, 5659, 5660, 5661, 5662, 5663, 5664, 5665, 5666, 5667, 5668, 5669, 5670, 5671, 5672, 5673, 5674, 5675, 5676, 5677, 5678, 5679, 5680, 5681, 5682, 5683, 5684, 5685, 5686, 5687, 5688, 5689, 5690, 5691, 5692, 5693, 5694, 5695, 5696, 5697, 5698, 5699, 5700, 5701, 5702, 5703, 5704, 5705, 5706, 5707, 5708, 5709, 5710, 5711, 5712, 5713, 5714, 5715, 5716, 5717, 5718, 5719, 5720, 5721, 5722, 5723, 5724, 5725, 5726, 5727, 5728, 5729, 5730, 5731, 5732, 5733, 5734, 5735, 5736, 5737, 5738, 5739, 5740, 5741, 5742, 5743, 5744, 5745, 5746, 5747, 5748, 5749, 5750, 5751, 5752, 5753, 5754, 5755, 5756, 5757, 5758, 5759, 5760, 5761, 5762, 5763, 5764, 5765, 5766, 5767, 5768, 5769, 5770, 5771, 5772, 5773, 5774, 5775, 5776, 5777, 5778, 5779, 5780, 5781, 5782, 5783, 5784, 5785, 5786, 5787, 5788, 5789, 5790, 5791, 5792, 5793, 5794, 5795, 5796, 5797, 5798, 5799, 5800, 5801, 5802, 5803, 5804, 5805, 5806, 5807, 5808, 5809, 5810, 5811, 5812, 5813, 5871, 5872, 5873, 5874, 5875, 5876, 5877, 5878, 5879, 5880, 5881, 5882, 5883, 5884, 5885, 5886, 5887, 5888, 5889, 5890, 5891, 5892, 5893, 5894, 5966, 5967, 5968, 5969, 5970, 5971, 5972, 5973, 5974, 5975, 5976, 5977, 5978, 5979, 5980, 5981, 5982, 5983, 5984, 5985, 5986, 5987, 5988, 5989, 5990, 5991, 5992, 5993, 5994, 5995, 5996, 5997, 5998, 5999, 6000, 6001, 6002, 6003, 6004, 6005, 6006, 6007, 6008, 6009, 6010, 6011, 6012, 6013, 6014, 6015, 6016, 6017, 6018, 6019, 6020, 6021, 6022, 6023, 6024, 6025, 6026, 6027, 6028, 6029, 6030, 6031, 6032, 6033, 6034, 6035, 6036, 6037, 6038, 6039, 6040, 6041, 6042, 6043, 6044, 6045, 6046, 6047, 6048, 6049, 6050, 6051, 6052, 6053, 6054, 6055, 6056, 6057, 6058, 6059, 6060, 6061, 6062, 6063, 6064, 6065, 6066, 6067, 6068, 6069, 6070, 6071, 6072, 6073, 6167, 6168, 6169, 6170, 6171, 6172, 6173, 6174, 6175, 6176, 6177, 6178, 6179, 6180, 6181, 6182, 6183, 6184, 6185, 6186, 6187, 6188, 6189, 6190, 6191, 6192, 6193, 6194, 6195, 6196, 6197, 6198, 6199, 6200, 6201, 6202, 6203, 6204, 6205, 6206, 6207, 6208, 6209, 6210, 6211, 6212, 6213, 6214, 6215, 6216, 6217, 6218, 6219, 6220, 6221, 6222, 6223, 6224, 6225, 6226, 6227, 6228, 6229, 6230, 6231, 6232, 6233, 6234, 6235, 6236, 6237, 6238, 6239, 6240, 6241, 6242, 6243, 6244, 6245, 6246, 6247, 6248, 6249, 6250, 6251, 6252, 6253, 6254, 6255, 6256, 6257, 6258, 6259, 6260, 6261, 6262, 6263, 6264, 6265, 6266, 6267, 6268, 6269, 6270, 6271, 6272, 7256, 7257, 7258, 7259, 7260, 7261, 7262, 7263, 7264, 7265, 7266, 7267, 7268, 7269, 7270, 7271, 7272, 7273, 7274, 7275, 7276, 7277, 7278, 7279, 7280, 7281, 7282, 7283, 7284, 7285, 7286, 7287, 7288, 7289, 7290, 7291, 7292, 7293, 7294, 7295, 7296, 7297, 7298, 7299, 7300, 7301, 7302, 7303, 7304, 7305, 7306, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 7323, 7324, 7325, 7326, 7327, 7328, 7329, 7330, 7331, 7332, 7333, 7334, 7335, 7336, 7337, 7338, 7339, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7350, 7351, 7352, 7353, 7354, 7355, 7356, 7357, 7358, 7359, 7360, 7361, 7362, 7363, 7364, 7365, 7366, 7367, 7368, 7369, 7370, 7371, 7372, 7373, 7374, 7375, 7376, 7377, 7378, 7379, 7380, 7381, 7382, 7383, 7384, 7385, 7386, 7387, 7388, 7389, 7390, 7391, 7392, 7393, 7394, 7395, 7396, 7397, 7398, 7399, 7400, 7401, 7402, 7403, 7404, 7405, 7406, 7407, 7408, 7409, 7410, 7411, 7412, 7413, 7414, 7415, 7416, 7417, 7418, 7419, 7420, 7421, 7422, 7423, 7424, 7425, 7426, 7427, 7428, 7429, 7430, 7431, 7432, 7433, 7434, 7435, 7436, 7437, 7438, 7439, 7440, 7441, 7442, 7443, 7444, 7445, 7446, 7447, 7448, 7449, 7450, 7451, 7452, 7453, 7454, 7455, 7456, 7457, 7458, 7459, 7460, 7461, 7462, 7463, 7464, 7465, 7466, 7467, 7468, 7469, 7470, 7471, 7472, 7473, 7474, 7475, 7476, 7477, 7478, 7479, 7480, 7481, 7482, 7483, 7484, 7485, 7486, 7487, 7488, 7489, 7490, 7491, 7492, 7493, 7494, 7495, 7496, 7497, 7498, 7499, 7500, 7501, 7502, 7503, 7504, 7505, 7506, 7507, 7508, 7509, 7510, 7511, 7512, 7513, 7514, 7515, 7516, 7517, 7518, 7519, 7520, 7521, 7522, 7523, 7524, 7525, 7526, 7527, 7528, 7529, 7530, 7531, 7532, 7533, 7534, 7535, 7536, 7537, 7538, 7539, 7540, 7541, 7542, 7543, 7544, 7545, 7546, 7547, 7548, 7549, 7550, 7551, 7552, 7553, 7554, 7555, 7556, 7557, 7558, 7559, 7560, 7561, 7562, 7563, 7564, 7565, 7566, 7567, 7568, 7569, 7570, 7571, 7572, 7573, 7574, 7575, 7576, 7577, 7578, 7579, 7580, 7581, 7582, 7583, 7584, 7585, 7586, 7587, 7588, 7589, 7590, 7591, 7592, 7593, 7594, 7595, 7596, 7597, 7598, 7599, 7600, 7601, 7602, 7603, 7604, 7605, 7606, 7607, 7608, 7609, 7610, 7611, 7612, 7613, 7614, 7615, 7616, 7617, 7618, 7619, 7620, 7621, 7622, 7623, 7624, 7625, 7626, 7627, 7628, 7629, 7630, 7631, 7632, 7633, 7634, 7635, 7636, 7637, 7638, 7639, 7640, 7641, 7642, 7643, 7644, 7645, 7646, 7647, 7648, 7649, 7650, 7651, 7652, 7653, 7654, 7655, 7656, 7657, 7658, 7659, 7660, 7661, 7662, 7663, 7664, 7665, 7666, 7667, 7668, 7669, 7670, 7671, 7672, 7673, 7674, 7675, 7676, 7677, 7678, 7679, 7680, 7681, 7682, 7683, 7684, 7685, 7686, 7687, 7688, 7689, 7690, 7691, 7692, 7693, 7694, 7695, 7696, 7697, 7698, 7699, 7700, 7701, 7702, 7703, 7704, 7705, 7706, 7707, 7708, 7709, 7710, 7711, 7712, 7713, 7714, 7715, 7716, 7717, 7718, 7719, 7720, 7721, 7722, 7723, 7724, 7725, 7726, 7727, 7728, 7729, 7730, 7731, 7732, 7733, 7734, 7735, 7736, 7737, 7738, 7739, 7740, 7741, 7742, 7743, 7744, 7745, 7746, 7747, 7748, 7749, 7750, 7751, 7752, 7753, 7754, 7755, 7756, 7757, 7758, 7759, 7760, 7761, 7762, 7763, 7764, 7765, 7766, 7767, 7768, 7769, 7770, 7771, 7772, 7773, 7774, 8255, 8256, 8257, 8258, 8259, 8260, 8261, 8262, 8263, 8264, 8265, 8266, 8267, 8268, 8269, 8270, 8271, 8272, 8273, 8274, 8275, 8276, 8277, 8278, 8279, 8280, 8281, 8282, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290, 8291, 8292, 8293, 8294, 8295, 8296, 8297, 8298, 8299, 8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310, 8311, 8312, 8313, 8314, 8315, 8316, 8317, 8318, 8319, 8320, 8321, 8322, 8323, 8324, 8325, 8326, 8327, 8328, 8329, 8330, 8331, 8332, 8333, 8334, 8335, 8336, 8337, 8338, 8339, 8340, 8341, 8342, 8343, 8344, 8345, 8346, 8347, 8348, 8349, 8350, 8351, 8352, 8353, 8354, 8355, 8356, 8357, 8358, 8359, 8360, 8361, 8362, 8363, 8364, 8365, 8366, 8367, 8368, 8369, 8370, 8371, 8372, 8373, 8374, 8375, 8376, 8377, 8378, 8379, 8380, 8381, 8382, 8383, 8384, 8385, 8386, 8387, 8388, 8389, 8390, 8391, 8392, 8393, 8394, 8395, 8396, 8397, 8398, 8399, 8400, 8401, 8402, 8403, 8404, 8405, 8406, 8407, 8408, 8409, 8410, 8411, 8412, 8413, 8414, 8415, 8416, 8417, 8418, 8419, 8420, 8421, 8422, 8423, 8424, 8425, 8426, 8427, 8428, 8429, 8430, 8431, 8432, 8433, 8434, 8435, 8436, 8437, 8438, 8439, 8440, 8441, 8442, 8443, 8444, 8445, 8446, 8447, 8448, 8449, 8450, 8451, 8452, 8453, 8454, 8455, 8456, 8457, 8458, 8459, 8460, 8461, 8462, 8463, 8464, 8465, 8858, 8859, 8860, 8887, 8888, 8889, 9006, 9007, 9008, 9009, 9010, 9011, 9012, 9013, 9014, 9015, 9016, 9017, 9018, 9019, 9020, 9021, 9022, 9023, 9024, 9025, 9026, 9027, 9028, 9029, 9030, 9031, 9032, 9033, 9034, 9035, 9036, 9037, 9038, 9039, 9040, 9041, 9042, 9043, 9044, 9045, 9046, 9047, 9048, 9049, 9050, 9051, 9052, 9053, 9054, 9055, 9056, 9057, 9058, 9059, 9060, 9061, 9062, 9063, 9064, 9065, 9066, 9067, 9068, 9069, 9070, 9071, 9072, 9073, 9074, 9075, 9076, 9077, 9078, 9079, 9080, 9081, 9082, 9083, 9084, 9085, 9086, 9087, 9088, 9089, 9090, 9091, 9092, 9093, 9094, 9095, 9096, 9097, 9098, 9099, 9100, 9101, 9102, 9103, 9104, 9105, 9106, 9107, 9108, 9109, 9110, 9111, 9112, 9113, 9114, 9115, 9116, 9117, 9118, 9119, 9120, 9121, 9122, 9123, 9124, 9125, 9126, 9127, 9128, 9129, 9130, 9131, 9132, 9133, 9134, 9135, 9136, 9137, 9138, 9139, 9140, 9141, 9142, 9143, 9144, 9145, 9146, 9147, 9148, 9149, 9150, 9151, 9152, 9153, 9154, 9155, 9156, 9157, 9158, 9159, 9160, 9161, 9162, 9163, 9164, 9165, 9166, 9167, 9168, 9169, 9170, 9171, 9172, 9173, 9174, 9175, 9176, 9177, 9178, 9179, 9180, 9181, 9182, 9183, 9184, 9185, 9186, 9187, 9188, 9189, 9190, 9191, 9192, 9193, 9194, 9195, 9196, 9197, 9198, 9199, 9200, 9201, 9202, 9203, 9204, 9205, 9206, 9207, 9208, 9209, 9210, 9211, 9212, 9213, 9214, 9215, 9216, 9217, 9218, 9219, 9220, 9221, 9222, 9223, 9224, 9225, 9226, 9227, 9228, 9229, 9230, 9231, 9232, 9233, 9234, 9235, 9236, 9237, 9238, 9239, 9240, 9241, 9242, 9243, 9244, 9245, 9246, 9247, 9248, 9249, 9250, 9251, 9252, 9253, 9254, 9255, 9256, 9257, 9258, 9259, 9260, 9261, 9262, 9263, 9264, 9265, 9266, 9267, 9268, 9269, 9270, 9271, 9272, 9273, 9274, 9275, 9276, 9277, 9278, 9279, 9280, 9281, 9282, 9283, 9284, 9285, 9286, 9287, 9288, 9289, 9290, 9291, 9292, 9293, 9294, 9295, 9787, 9788, 9789, 9790, 9791, 9792, 9793, 9794, 9795, 9796, 9797, 9798, 9799, 9800, 9801, 9802, 9803, 9804, 9805, 9806, 9807, 9808, 9809, 9810, 9811, 9812, 9813, 9814, 9815, 9816, 9817, 9818, 9819, 9820, 9821, 9822, 9823, 9824, 9825, 9826, 9827, 9828, 9829, 9830, 9831, 9832, 9833, 9834, 9835, 9836, 9837, 9838, 9839, 9840, 9841, 9842, 9843, 9844, 9845, 9846, 9847, 9848, 9849, 9850, 9851, 9852, 9853, 9854, 9855, 9856, 9857, 9858, 9859, 9860, 9861, 9862, 9863, 9864, 9865, 9866, 9867, 9868, 9869, 9870, 9871, 9872, 9873, 9874, 9875, 9876, 9877, 9878, 9879, 9880, 9881, 9882, 9883, 9884, 9885, 9886, 9887, 9888, 9889, 9890, 9891, 9892, 9893, 9894, 9895, 9896, 9897, 9898, 9899, 9900, 9901, 9902, 9903, 9904, 9905, 9906, 9907, 9908, 9909, 9910, 9911, 9912, 9913, 9914, 9915, 9916, 9917, 9918, 9919, 9920, 9921, 9922, 9923, 9924, 9925, 9926, 9927, 9928, 9929, 9930, 9931, 9932, 9933, 9934, 9935, 9936, 9937, 9938, 9939, 9940, 9941, 9942, 9943, 9944, 9945, 9946, 9947, 9948, 9949, 9950, 9951, 9952, 9953, 9954, 9955, 9956, 9957, 9958, 9959, 9960, 9961, 9962, 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9973, 9974, 9975, 9976, 9977, 9978, 9979, 9980, 9981, 9982, 9983, 9984, 9985, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000, 10001, 10002, 10004, 10005, 10006, 10007, 10008, 10372, 10376, 10381, 10382, 10383, 10384, 10385, 10499, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 10507, 10508, 10509, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10517, 10524, 10530, 10531, 10532, 10533, 10534, 10535, 10536, 10537, 10538, 10790, 10791, 10792, 10793, 10794, 10795, 10796, 10797, 10798, 10799, 10896, 10897, 10898, 10899, 10900, 10901, 10902, 10903, 10904, 10905, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913, 10914, 10915, 10916, 10917, 10918, 10919, 10920, 10921, 10922, 10923, 10924, 10925, 10926, 10927, 10989, 11013, 11112, 11113, 11114, 11115, 11116, 11117, 11118, 11119, 11138, 11139, 11184, 11185, 11186, 11187, 11188, 11191, 11192, 12185, 12186, 12187, 12188, 12189, 12190, 12191, 12192, 12193, 12245, 12246, 12247, 12248, 12249, 12250, 12251, 12252, 12253, 12254, 12255, 12256, 12257, 12258, 12259, 12260, 12261, 12262, 12263, 12264, 12265, 12266, 12267, 12268, 12269, 12270, 12271, 12272, 12273, 12274, 12275, 12276, 12277, 12278, 12279, 12280, 12281, 12282, 12283, 12284, 12285, 12286, 12287, 12288, 12289, 12290, 12291, 12292, 12293, 12294, 12295, 12296, 12297, 12298, 12299, 12300, 12301, 12302, 12303, 12304, 12305, 12306, 12307, 12308, 12309, 12310, 12311, 12312, 12313, 12314, 12315, 12316, 12317, 12318, 12319, 12320, 12321, 12322, 12323, 12324, 12325, 12326, 12327, 12328, 12329, 12330, 12331, 12332, 12333, 12334, 12335, 12336, 12337, 12338, 12339, 12340, 12341, 12342, 12343, 12344, 12345, 12346, 12347, 12348, 12349, 12350, 12351, 12352, 12353, 12354, 12355, 12356, 12357, 12358, 12359, 12360, 12361, 12362, 12363, 12364, 12365, 12366, 12367, 12368, 12369, 12370, 12371, 12372, 12373, 12374, 12375, 12376, 12377, 12378, 12379, 12380, 12381, 12382, 12383, 12384, 12385, 12386, 12387, 12388, 12389, 12390, 12391, 12392, 12393, 12394, 12395, 12396, 12397, 12398, 12399, 12400, 12401, 12402, 12403, 12404, 12405, 12406, 12407, 12408, 12409, 12410, 12411, 12412, 12413, 12414, 12415, 12416, 12417, 12418, 12419, 12420, 12421, 12422, 12423, 12424, 12425, 12426, 12427, 12428, 12429, 12430, 12431, 12432, 12433, 12434, 12435, 12436, 12437, 12438, 12439, 12440, 12441, 12442, 12443, 12444, 12445, 12446, 12447, 12448, 12449, 12450, 12451, 12452, 12453, 12454, 12455, 12456, 12457, 12458, 12459, 12460, 12461, 12462, 12463, 12464, 12465, 12466, 12467, 12468, 12469, 12470, 12471, 12472, 12473, 12474, 12475, 12476, 12477, 12478, 12479, 12480, 12481, 12482, 12483, 12484, 12485, 12486, 12487, 12488, 12489, 12490, 12491, 12492, 12493, 12494, 12495, 12496, 12497, 12498, 12499, 12500, 12501, 12502, 12503, 12504, 12505, 12506, 12507, 12508, 12509, 12510, 12511, 12512, 12513, 12514, 12515, 12516, 12517, 12518, 12519, 12520, 12521, 12522, 12523, 12524, 12525, 12526, 12527, 12528, 12529, 12530, 12531, 12532, 12533, 12534, 12535, 12536, 12537, 12538, 12539, 12540, 12541, 12542, 12543, 12544, 12545, 12546, 12547, 12548, 12549, 12550, 12551, 12552, 12553, 12554, 12555, 12556, 12557, 12558, 12559, 12560, 12561, 12562, 12563, 12564, 12565, 12566, 12567, 12568, 12569, 12570, 12571, 12572, 12573, 12574, 12575, 12576, 12577, 12578, 12579, 12580, 12581, 12582, 12583, 12584, 12585, 12586, 12587, 12588, 12589, 12590, 12591, 12592, 12593, 12594, 12595, 12596, 12597, 12598, 12599, 12600, 12601, 12602, 12603, 12604, 12605, 12606, 12607, 12608, 12609, 12610, 12611, 12612, 12613, 12614, 12615, 12616, 12617, 12618, 12619, 12620, 12621, 12622, 12623, 12624, 12625, 12626, 12627, 12628, 12629, 12630, 12631, 12632, 12633, 12634, 12635, 12636, 12637, 12638, 12639, 12640, 12641, 12642, 12643, 12644, 12645, 12646, 12647, 12648, 12649, 12650, 12651, 12652, 12653, 12654, 12655, 12656, 12657, 12658, 12659, 12660, 12661, 12662, 12663, 12664, 12665, 12666, 12667, 12668, 12669, 12670, 12671, 12672, 12673, 12674, 12675, 12676, 12677, 12678, 12679, 12680, 12681, 12682, 12683, 12684, 12685, 12686, 12687, 12688, 12689, 12690, 12691, 12692, 12693, 12694, 12695, 12696, 12697, 12698, 12699, 12700, 12701, 12702, 12703, 12704, 12705, 12706, 12707, 12708, 12709, 12710, 12711, 12712, 12713, 12714, 12715, 12716, 12717, 12718, 12719, 12720, 12721, 12722, 12723, 12724, 12725, 12726, 12727, 12728, 12729, 12730, 12731, 12732, 12733, 12734, 12735, 12736, 12737, 12738, 12739, 12740, 12741, 12742, 12743, 12744, 12745, 12746, 12747, 12748, 12749, 12750, 12751, 12752, 12753, 12754, 12755, 12756, 12757, 12758, 12759, 12760, 12761, 12762, 12763, 12764, 12765, 12766, 12767, 12768, 12769, 12770, 12771, 12772, 12773, 12774, 12775, 12776, 12777, 12778, 12779, 12780, 12781, 12782, 12783, 12784, 12785, 12786, 12787, 12788, 12789, 12790, 12791, 12792, 12793, 12794, 12795, 12796, 12797, 12798, 12799, 12800, 12801, 12802, 12803, 12804, 12805, 12806, 12807, 12808, 12809, 12810, 12811, 12812, 12813, 12814, 12815, 12816, 12817, 12818, 12819, 12820, 12821, 12822, 12823, 12824, 12825, 12826, 12827, 12828, 12829, 12830, 12831, 12832, 12833, 12834, 12835, 12836, 12837, 12838, 12839, 12840, 12841, 12842, 12843, 12844, 12845, 12846, 12847, 12848, 12849, 12850, 12851, 12852, 12853, 12854, 12855, 12856, 12857, 12858, 12859, 12860, 12861, 12862, 12863, 12864, 12865, 12866, 12867, 12868, 12869, 12870, 12871, 12872, 12873, 12874, 12875, 12876, 12877, 12878, 12879, 12880, 12881, 12882, 12883, 12884, 12885, 12886, 12887, 12888, 12889, 12890, 12891, 12892, 12893, 12894, 12895, 12896, 12897, 12898, 12899, 12900, 12901, 12902, 12903, 12904, 12905, 12906, 12907, 12908, 12909, 12910, 12911, 12912, 12913, 12914, 12915, 12916, 12917, 12918, 12919, 12920, 12921, 12922, 12923, 12924, 12925, 12926, 12927, 12928, 12929, 12930, 12931, 12932, 12933, 12934, 12935, 12936, 12937, 12938, 12939, 12940, 12941, 12942, 12943, 12944, 12945, 12946, 12947, 12948, 12949, 12950, 12951, 12952, 12953, 12954, 12955, 12956, 12957, 12958, 12959, 12960, 12961, 12962, 12963, 12964, 12965, 12966, 12967, 12968, 12969, 12970, 12971, 12972, 12973, 12974, 12975, 12976, 12977, 12978, 12979, 12980, 12981, 12982, 12983, 12984, 12985, 12986, 12987, 12988, 12989, 12990, 12991, 12992, 12993, 12994, 12995, 12996, 12997, 12998, 12999, 13000, 13001, 13002, 13003, 13004, 13005, 13006, 13007, 13008, 13009, 13010, 13011, 13012, 13013, 13014, 13015, 13016, 13017, 13018, 13019, 13020, 13021, 13022, 13023, 13024, 13025, 13026, 13027, 13028, 13029, 13030, 13031, 13032, 13033, 13034, 13035, 13036, 13037, 13038, 13039, 13040, 13041, 13042, 13043, 13044, 13045, 13046, 13047, 13048, 13049, 13050, 13051, 13052, 13053, 13054, 13055, 13056, 13057, 13058, 13059, 13060, 13061, 13062, 13063, 13064, 13065, 13066, 13067, 13068, 13069, 13070, 13071, 13072, 13073, 13074, 13075, 13076, 13077, 13078, 13079, 13080, 13081, 13082, 13083, 13084, 13085, 13086, 13087, 13088, 13089, 13090, 13091, 13092, 13093, 13094, 13095, 13096, 13097, 13098, 13099, 13100, 13101, 13105, 13106, 13107, 13108, 13109, 13110, 13111, 13112, 13113, 13114, 13115, 13116, 13117, 13118, 13119, 13120, 13121, 13122, 13123, 13124, 13125, 13126, 13270, 13298, 13299, 13300, 13301, 13302, 13303, 13304, 13305, 13306, 13307, 13308, 13309, 13310, 13311, 13312, 13313, 13314, 13315, 13316, 13317, 13318, 13319, 13320, 13321, 13322, 13323, 13324, 13325, 13326, 13327, 13328, 13329, 13330, 13331, 13332, 13333, 13334, 13335, 13336, 13337, 13338, 13339, 13340, 13341, 13342, 13343, 13344, 13345, 13346, 13347, 13348, 13349, 13350, 13351, 13352, 13353, 13354, 13355, 13356, 13357, 13358, 13423, 13424, 13425, 13426, 13427, 13431, 13432, 13433, 13434, 13435, 13436, 13437, 13438, 13515, 13516, 13517, 13518, 13519, 13520, 13521, 13522, 13523, 13524, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13534, 13535, 13536, 13537, 13538, 13539, 13540, 13541, 13542, 13543, 13544, 13545, 13546, 13547, 13548, 13549, 13550, 13551, 13552, 13553, 13554, 13555, 13556, 13557, 13848, 13849, 13850, 13851, 13852, 13853, 13858, 13859, 13860, 13861, 13862, 13863, 13864, 13865, 13866, 13867, 13868, 13869, 13870, 13871, 13872, 13873, 13874, 13875, 13876, 13877, 13878, 13879, 13880, 13881, 13882, 13883, 13884, 13885, 13886, 13887, 13888, 13889, 13890, 13891, 13892, 13893, 13894, 13895, 13896, 13897, 13898, 13899, 13900, 13901, 13902, 13903, 13904, 13905, 13906, 13907, 13908, 13909, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919, 13920, 13921, 13922, 13923, 13924, 13925, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13933, 13934, 13935, 13936, 13937, 13938, 13939, 13940, 13941, 13942, 13943, 13944, 13945, 13946, 13947, 13948, 13949, 13950, 13951, 13952, 13953, 13954, 13955, 13956, 13957, 13958, 13959, 13960, 13961, 13962, 13963, 13964, 13965, 13966, 13967, 13968, 13969, 13970, 13971, 13972, 13973, 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982, 13983, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993, 13994, 13995, 13996, 13997, 13998, 13999, 14000, 14001, 14002, 14003, 14004, 14005, 14006, 14007, 14008, 14009, 14010, 14011, 14012, 14013, 14014, 14015, 14016, 14017, 14018, 14019, 14020, 14021, 14022, 14023, 14024, 14025, 14026, 14027, 14028, 14029, 14030, 14031, 14032, 14033, 14034, 14035, 14036, 14037, 14038, 14039, 14040, 14041, 14042, 14043, 14044, 14045, 14046, 14047, 14048, 14049, 14050, 14051, 14052, 14053, 14054, 14055, 14056, 14057, 14058, 14059, 14060, 14061, 14062, 14063, 14064, 14065, 14066, 14067, 14068, 14069, 14070, 14071, 14072, 14073, 14074, 14075, 14076, 14077, 14078, 14079, 14080, 14081, 14082, 14083, 14084, 14085, 14086, 14087, 14088, 14089, 14090, 14091, 14092, 14093, 14094, 14095, 14096, 14097, 14098, 14099, 14100, 14101, 14102, 14103, 14104, 14105, 14106, 14107, 14108, 14109, 14110, 14111, 14112, 14113, 14114, 14115, 14116, 14117, 14118, 14119, 14120, 14121, 14122, 14123, 14124, 14125, 14126, 14127, 14128, 14129, 14130, 14131, 14132, 14987, 14988, 14989, 14990, 14991, 14992, 14993, 14994, 14995, 14996, 14997, 14998, 14999, 15000, 15001, 15002, 15003, 15004, 15005, 15006, 15007, 15008, 15009, 15010, 15011, 15012, 15013, 15014, 15015, 15016, 15017, 15018, 15019, 15020, 15021, 15022, 15023, 15024, 15025, 15026, 15027, 15028, 15029, 15030, 15031, 15032, 15033, 15034, 15035, 15036, 15037, 15038, 15039, 15040, 15041, 15042, 15043, 15044, 15045, 15046, 15047, 15048, 15049, 15050, 15051, 15052, 15053, 15054, 15055, 15056, 15057, 15058, 15059, 15060, 15061, 15062, 15063, 15064, 15065, 15066, 15067, 15068, 15069, 15070, 15071, 15072, 15073, 15074, 15075, 15076, 15077, 15078, 15079, 15080, 15081, 15082, 15083, 15084, 15085, 15086, 15087, 15088, 15089, 15090, 15091, 15092, 15093, 15094, 15095, 15096, 15097, 15098, 15099, 15100, 15101, 15102, 15103, 15104, 15105, 15106, 15107, 15108, 15109, 15110, 15111, 15112, 15113, 15114, 15115, 15116, 15117, 15118, 15119, 15120, 15121, 15122, 15123, 15124, 15125, 15126, 15127, 15128, 15129, 15130, 15131, 15132, 15133, 15134, 15135, 15136, 15137, 15138, 15139, 15140, 15141, 15142, 15143, 15144, 15145, 15146, 15147, 15148, 15149, 15150, 15151, 15152, 15153, 15154, 15155, 15156, 15157, 15158, 15159, 15160, 15161, 15162, 15163, 15164, 15165, 15166, 15167, 15168, 15169, 15170, 15171, 15172, 15173, 15174, 15175, 15176, 15177, 15178, 15179, 15180, 15181, 15182, 15183, 15184, 15185, 15186, 15187, 15188, 15189, 15190, 15191, 15192, 15193, 15194, 15195, 15196, 15197, 15198, 15199, 15200, 15201, 15202, 15203, 15204, 15205, 15206, 15207, 15208, 15209, 15210, 15211, 15212, 15213, 15214, 15215, 15216, 15217, 15218, 15219, 15220, 15221, 15222, 15223, 15224, 15225, 15226, 15227, 15228, 15229, 15230, 15231, 15232, 15233, 15234, 15235, 15236, 15237, 15238, 15239, 15240, 15241, 15242, 15243, 15244, 15245, 15246, 15247, 15248, 15249, 15250, 15251, 15252, 15253, 15254, 15255, 15256, 15257, 15258, 15259, 15260, 15261, 15262, 15263, 15264, 15265, 15266, 15267, 15268, 15269, 15270, 15271, 15272, 15273, 15274, 15275, 15276, 15277, 15278, 15279, 15280, 15281, 15282, 15283, 15284, 15285, 15286, 15287, 15288, 15289, 15290, 15291, 15292, 15293, 15294, 15295, 15296, 15297, 15298, 15299, 15300, 15301, 15302, 15303, 15304, 15305, 15306, 15307, 15308, 15309, 15310, 15311, 15312, 15313, 15314, 15315, 15316, 15317, 15318, 15319, 15320, 15321, 15322, 15323, 15324, 15325, 15326, 15327, 15328, 15329, 15330, 15331, 15332, 15333, 15334, 15335, 15336, 15337, 15338, 15339, 15340, 15341, 15342, 15343, 15344, 15345, 15346, 15347, 15348, 15349, 15350, 15351, 15352, 15353, 15354, 15355, 15356, 15357, 15358, 15359, 15360, 15361, 15362, 15363, 15364, 15365, 15366, 15367, 15368, 15369, 15370, 15371, 15372, 15373, 15374, 15375, 15376, 15377, 15378, 15379, 15380, 15381, 15382, 15383, 15384, 15385, 15386, 15387, 15388, 15389, 15390, 15391, 15392, 15393, 15394, 15395, 15396, 15397, 15398, 15399, 15400, 15401, 15402, 15403, 15404, 15405, 15406, 15407, 15408, 15409, 15410, 15411, 15412, 15413, 15414, 15415, 15416, 15417, 15418, 15419, 15420, 15421, 15422, 15423, 15424, 15425, 15426, 15427, 15428, 15429, 15430, 15431, 15432, 15433, 15434, 15435, 15436, 15437, 15438, 15439, 15440, 15441, 15442, 15443, 15444, 15445, 15446, 15447, 15448, 15449, 15450, 15451, 15452, 15453, 15454, 15455, 15456, 15457, 15458, 15459, 15460, 15461, 15462, 15463, 15464, 15465, 15466, 15467, 15468, 15469, 15470, 15471, 15472, 15473, 15474, 15475, 15476, 15477, 15478, 15479, 15480, 15481, 15482, 15483, 15484, 15485, 15486, 15487, 15488, 15489, 15490, 15491, 15492, 15493, 15494, 15495, 15496, 15497, 15498, 15499, 15500, 15501, 15502, 15503, 15504, 15505, 15506, 15507, 15508, 15509, 15510, 15511, 15512, 15513, 15514, 15515, 15516, 15517, 15518, 15519, 15520, 15521, 15522, 15523, 15524, 15525, 15526, 15527, 15528, 15529, 15530, 15531, 15532, 15533, 15534, 15535, 15536, 15537, 15538, 15539, 15540, 15541, 15542, 15543, 15544, 15545, 15546, 15547, 15548, 15549, 15550, 15551, 15552, 15553, 15554, 15555, 15556, 15557, 15558, 15559, 15560, 15561, 15562, 15563, 15564, 15565, 15566, 15567, 15568, 15569, 15570, 15571, 15572, 15573, 15574, 15575, 15576, 15577, 15578, 15579, 15580, 15581, 15582, 15583, 15584, 15585, 15586, 15587, 15588, 15589, 15590, 15591, 15592, 15593, 15594, 15595, 15596, 15597, 15598, 15599, 15600, 15601, 15602, 15603, 15604, 15605, 15606, 15607, 15608, 15609, 15610, 15611, 15612, 15613, 15614, 15615, 15616, 15617, 15618, 15619, 15620, 15621, 15622, 15623, 15624, 15625, 15626, 15627, 15628, 15629, 15630, 15631, 15632, 15633, 15634, 15635, 15636, 15637, 15638, 15639, 15640, 15641, 15642, 15643, 15644, 15645, 15646, 15647, 15648, 15649, 15650, 15651, 15652, 15653, 15654, 15655, 15656, 15657, 15658, 15659, 15660, 15661, 15662, 15663, 15664, 15665, 15666, 15667, 15668, 15669, 15670, 15671, 15672, 15673, 15674, 15675, 15676, 15677, 15678, 15679, 15680, 15681, 15682, 15683, 15684, 15685, 15686, 15687, 15688, 15689, 15690, 15691, 15692, 15693, 15694, 15695, 15696, 15697, 15698, 15699, 15700, 15701, 15702, 15703, 15704, 15705, 15706, 15707, 15708, 15709, 15710, 15711, 15712, 15713, 15714, 15715, 15716, 15717, 15718, 15719, 15720, 15721, 15722, 15723, 15724, 15725, 15726, 15727, 15728, 15729, 15730, 15731, 15732, 15733, 15734, 15735, 15736, 15737, 15738, 15739, 15740, 15741, 15742, 15743, 15744, 15745, 15746, 15747, 15748, 15749, 15750, 15751, 15752, 15753, 15754, 15755, 15756, 15757, 15758, 15759, 15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768, 15769, 15770, 15771, 15772, 15773, 15774, 15775, 15776, 15777, 15778, 15779, 15780, 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788, 15789, 15790, 15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798, 15799, 15800, 15801, 15802, 15803, 15804, 15805, 15806, 15807, 15808, 15809, 15810, 15811, 15812, 15813, 15814, 15815, 15816, 15817, 15818, 15819, 15820, 15821, 15822, 15823, 15824, 15825, 15826, 15827, 15828, 15829, 15830, 15831, 15832, 15833, 15834, 15835, 15836, 15837, 15838, 15839, 15840, 15841, 15842, 15843, 15844, 15845, 15846, 15847, 15848, 15849, 15850, 15851, 15852, 15853, 15854, 15855, 15856, 15857, 15858, 15859, 15860, 15861, 15862, 15863, 15864, 15865, 15866, 15867, 15868, 15869, 15870, 15871, 15872, 15873, 15874, 15875, 15876, 15877, 15878, 15879, 15880, 15881, 15882, 15883, 15884, 15885, 15886, 15887, 15888, 15889, 15890, 15891, 15892, 15893, 15894, 15895, 15896, 15897, 15898, 15899, 15900, 15901, 15902, 15903, 15904, 15905, 15906, 15907, 15908, 15909, 15910, 15911, 15912, 15913, 15914, 15915, 15916, 15917, 15918, 15919, 15920, 15921, 15922, 15923, 15924, 15925, 15926, 15927, 15928, 15929, 15930, 15931, 15932, 15933, 15934, 15935, 15936, 15937, 15938, 15939, 15940, 15941, 15942, 15943, 15944, 15945, 15946, 15947, 15948, 15949, 15950, 15951, 15952, 15953, 15954, 15955, 15956, 15957, 15958, 15959, 15960, 15961, 15962, 15963, 15964, 15965, 15966, 15967, 15968, 15969, 15970, 15971, 15972, 15973, 15974, 15975, 15976, 15977, 15978, 15979, 15980, 15981, 15982, 15983, 15984, 15985, 15986, 15987, 15988, 15989, 15990, 15991, 15992, 15993, 15994, 15995, 15996, 15997, 15998, 15999, 16000, 16001, 16002, 16003, 16004, 16005, 16006, 16007, 16008, 16009, 16010, 16011, 16012, 16013, 16014, 16015, 16016, 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036, 16037, 16038, 16039, 16040, 16041, 16042, 16043, 16044, 16045, 16046, 16047, 16048, 16049, 16050, 16051, 16052, 16053, 16054, 16055, 16056, 16057, 16058, 16059, 16060, 16061, 16062, 16063, 16064, 16065, 16066, 16067, 16068, 16069, 16070, 16071, 16072, 16073, 16074, 16075, 16076, 16077, 16078, 16079, 16080, 16081, 16082, 16083, 16084, 16085, 16086, 16087, 16088, 16089, 16090, 16091, 16092, 16093, 16094, 16095, 16096, 16097, 16098, 16099, 16100, 16101, 16102, 16103, 16104, 16105, 16106, 16107, 16108, 16109, 16110, 16111, 16112, 16113, 16114, 16115, 16116, 16117, 16118, 16119, 16120, 16121, 16122, 16123, 16124, 16125, 16126, 16127, 16128, 16129, 16130, 16131, 16132, 16133, 16134, 16135, 16136, 16137, 16138, 16139, 16140, 16141, 16142, 16143, 16144, 16145, 16146, 16147, 16148, 16149, 16150, 16151, 16152, 16153, 16154, 16155, 16156, 16157, 16158, 16159, 16160, 16161, 16162, 16163, 16164, 16165, 16166, 16167, 16168, 16169, 16170, 16171, 16172, 16173, 16174, 16175, 16176, 16177, 16178, 16179, 16180, 16181, 16182, 16183, 16184, 16185, 16186, 16187, 16188, 16189, 16190, 16191, 16192, 16193, 16194, 16195, 16196, 16197, 16198, 16199, 16200, 16201, 16202, 16203, 16204, 16205, 16206, 16207, 16208, 16209, 16210, 16211, 16212, 16213, 16214, 16215, 16216, 16217, 16218, 16219, 16220, 16221, 16222, 16223, 16224, 16225, 16226, 16227, 16228, 16229, 16230, 16231, 16232, 16233, 16234, 16235, 16236, 16237, 16238, 16239, 16240, 16241, 16242, 16243, 16244, 16245, 16246, 16247, 16248, 16249, 16250, 16251, 16252, 16253, 16254, 16255, 16256, 16257, 16258, 16259, 16260, 16261, 16262, 16263, 16264, 16265, 16266, 16267, 16268, 16269, 16270, 16271, 16272, 16273, 16274, 16275, 16276, 16277, 16278, 16279, 16280, 16281, 16282, 16283, 16284, 16285, 16286, 16287, 16288, 16289, 16290, 16291, 16292, 16293, 16294, 16295, 16296, 16297, 16298, 16299, 16300, 16301, 16302, 16303, 16304, 16305, 16306, 16307, 16308, 16309, 16310, 16311, 16312, 16313, 16314, 16315, 16316, 16317, 16318, 16319, 16320, 16321, 16322, 16323, 16324, 16325, 16326, 16327, 16328, 16329, 16330, 16331, 16332, 16333, 16334, 16335, 16336, 16337, 16338, 16339, 16340, 16341, 16342, 16343, 16344, 16345, 16346, 16347, 16348, 16349, 16350, 16351, 16352, 16353, 16354, 16355, 16356, 16357, 16358, 16359, 16360, 16361, 16362, 16363, 16364, 16365, 16366, 16367, 16368, 16369, 16370, 16371, 16372, 16373, 16374, 16375, 16376, 16377, 16378, 16379, 16380, 16381, 16382, 16383, 16384, 16385, 16386, 16387, 16388, 16389, 16390, 16391, 16392, 16393, 16394, 16395, 16396, 16397, 16398, 16399, 16400, 16401, 16402, 16403, 16404, 16405, 16406, 16407, 16408, 16409, 16410, 16411, 16412, 16413, 16414, 16415, 16416, 16417, 16418, 16419, 16420, 16421, 16422, 16423, 16424, 16425, 16426, 16427, 16428, 16429, 16430, 16431, 16432, 16433, 16434, 16435, 16436, 16437, 16438, 16439, 16440, 16441, 16442, 16443, 16444, 16445, 16446, 16447, 16448, 16449, 16450, 16451, 16452, 16453, 16454, 16455, 16456, 16457, 16458, 16459, 16460, 16461, 16462, 16463, 16464, 16465, 16466, 16467, 16468, 16469, 16470, 16471, 16472, 16473, 16474, 16475, 16476, 16477, 16478, 16479, 16480, 16481, 16482, 16483, 16484, 16485, 16486, 16487, 16488, 16489, 16490, 16491, 16492, 16493, 16494, 16495, 16496, 16497, 16498, 16499, 16500, 16501, 16502, 16503, 16504, 16505, 16506, 16507, 16508, 16509, 16510, 16511, 16512, 16513, 16514, 16515, 16516, 16517, 16518, 16519, 16520, 16521, 16522, 16523, 16524, 16525, 16526, 16527, 16528, 16529, 16530, 16531, 16532, 16533, 16534, 16535, 16536, 16537, 16538, 16595, 16596, 16597, 16598, 16599, 16600, 16601, 16602, 16603, 16604, 16605, 16606, 16607, 16608, 16609, 16610, 16611, 16612, 16613, 16614, 16615, 16616, 16688, 16689, 16690, 16691, 16692, 16693, 16694, 16695, 16696, 16697, 16698, 16699, 16700, 16701, 16702, 16703, 16704, 16705, 16706, 16707, 16708, 16709, 16710, 16711, 16712, 16713, 16714, 16715, 16716, 16717, 16718, 16719, 16720, 16721, 16722, 16723, 16724, 16725, 16726, 16727, 16728, 16729, 16730, 16731, 16732, 16733, 16734, 16735, 16736, 16737, 16738, 16739, 16740, 16741, 16742, 16743, 16744, 16745, 16746, 16747, 16748, 16749, 16750, 16751, 16752, 16753, 16754, 16755, 16756, 16757, 16758, 16759, 16760, 16761, 16762, 16763, 16764, 16765, 16766, 16767, 16768, 16769, 16770, 16771, 16772, 16773, 16774, 16775, 16776, 16777, 16778, 16779, 16780, 16781, 16782, 16783, 16784, 16785, 16786, 16787, 16788, 16789, 16790, 16791, 16792, 16793, 16794, 16795, 16887, 16888, 16889, 16890, 16891, 16892, 16893, 16894, 16895, 16896, 16897, 16898, 16899, 16900, 16901, 16902, 16903, 16904, 16905, 16906, 16907, 16908, 16909, 16910, 16911, 16912, 16913, 16914, 16915, 16916, 16917, 16918, 16919, 16920, 16921, 16922, 16923, 16924, 16925, 16926, 16927, 16928, 16929, 16930, 16931, 16932, 16933, 16934, 16935, 16936, 16937, 16938, 16939, 16940, 16941, 16942, 16943, 16944, 16945, 16946, 16947, 16948, 16949, 16950, 16951, 16952, 16953, 16954, 16955, 16956, 16957, 16958, 16959, 16960, 16961, 16962, 16963, 16964, 16965, 16966, 16967, 16968, 16969, 16970, 16971, 16972, 16973, 16974, 16975, 16976, 16977, 16978, 16979, 16980, 16981, 16982, 17961, 17962, 17963, 17964, 17965, 17966, 17967, 17968, 17969, 17970, 17971, 17972, 17973, 17974, 17975, 17976, 17977, 17978, 17979, 17980, 17981, 17982, 17983, 17984, 17985, 17986, 17987, 17988, 17989, 17990, 17991, 17992, 17993, 17994, 17995, 17996, 17997, 17998, 17999, 18000, 18001, 18002, 18003, 18004, 18005, 18006, 18007, 18008, 18009, 18010, 18011, 18012, 18013, 18014, 18015, 18016, 18017, 18018, 18019, 18020, 18021, 18022, 18023, 18024, 18025, 18026, 18027, 18028, 18029, 18030, 18031, 18032, 18033, 18034, 18035, 18036, 18037, 18038, 18039, 18040, 18041, 18042, 18043, 18044, 18045, 18046, 18047, 18048, 18049, 18050, 18051, 18052, 18053, 18054, 18055, 18056, 18057, 18058, 18059, 18060, 18061, 18062, 18063, 18064, 18065, 18066, 18067, 18068, 18069, 18070, 18071, 18072, 18073, 18074, 18075, 18076, 18077, 18078, 18079, 18080, 18081, 18082, 18083, 18084, 18085, 18086, 18087, 18088, 18089, 18090, 18091, 18092, 18093, 18094, 18095, 18096, 18097, 18098, 18099, 18100, 18101, 18102, 18103, 18104, 18105, 18106, 18107, 18108, 18109, 18110, 18111, 18112, 18113, 18114, 18115, 18116, 18117, 18118, 18119, 18120, 18121, 18122, 18123, 18124, 18125, 18126, 18127, 18128, 18129, 18130, 18131, 18132, 18133, 18134, 18135, 18136, 18137, 18138, 18139, 18140, 18141, 18142, 18143, 18144, 18145, 18146, 18147, 18148, 18149, 18150, 18151, 18152, 18153, 18154, 18155, 18156, 18157, 18158, 18159, 18160, 18161, 18162, 18163, 18164, 18165, 18166, 18167, 18168, 18169, 18170, 18171, 18172, 18173, 18174, 18175, 18176, 18177, 18178, 18179, 18180, 18181, 18182, 18183, 18184, 18185, 18186, 18187, 18188, 18189, 18190, 18191, 18192, 18193, 18194, 18195, 18196, 18197, 18198, 18199, 18200, 18201, 18202, 18203, 18204, 18205, 18206, 18207, 18208, 18209, 18210, 18211, 18212, 18213, 18214, 18215, 18216, 18217, 18218, 18219, 18220, 18221, 18222, 18223, 18224, 18225, 18226, 18227, 18228, 18229, 18230, 18231, 18232, 18233, 18234, 18235, 18236, 18237, 18238, 18239, 18240, 18241, 18242, 18243, 18244, 18245, 18246, 18247, 18248, 18249, 18250, 18251, 18252, 18253, 18254, 18255, 18256, 18257, 18258, 18259, 18260, 18261, 18262, 18263, 18264, 18265, 18266, 18267, 18268, 18269, 18270, 18271, 18272, 18273, 18274, 18275, 18276, 18277, 18278, 18279, 18280, 18281, 18282, 18283, 18284, 18285, 18286, 18287, 18288, 18289, 18290, 18291, 18292, 18293, 18294, 18295, 18296, 18297, 18298, 18299, 18300, 18301, 18302, 18303, 18304, 18305, 18306, 18307, 18308, 18309, 18310, 18311, 18312, 18313, 18314, 18315, 18316, 18317, 18318, 18319, 18320, 18321, 18322, 18323, 18324, 18325, 18326, 18327, 18328, 18329, 18330, 18331, 18332, 18333, 18334, 18335, 18336, 18337, 18338, 18339, 18340, 18341, 18342, 18343, 18344, 18345, 18346, 18347, 18348, 18349, 18350, 18351, 18352, 18353, 18354, 18355, 18356, 18357, 18358, 18359, 18360, 18361, 18362, 18363, 18364, 18365, 18366, 18367, 18368, 18369, 18370, 18371, 18372, 18373, 18374, 18375, 18376, 18377, 18378, 18379, 18380, 18381, 18382, 18383, 18384, 18385, 18386, 18387, 18388, 18389, 18390, 18391, 18392, 18393, 18394, 18395, 18396, 18397, 18398, 18399, 18400, 18401, 18402, 18403, 18404, 18405, 18406, 18407, 18408, 18409, 18410, 18411, 18412, 18413, 18414, 18415, 18416, 18417, 18418, 18419, 18420, 18421, 18422, 18423, 18424, 18425, 18426, 18427, 18428, 18429, 18430, 18431, 18432, 18433, 18434, 18435, 18436, 18437, 18438, 18439, 18440, 18441, 18442, 18443, 18444, 18445, 18446, 18447, 18448, 18449, 18450, 18451, 18452, 18453, 18454, 18926, 18927, 18928, 18929, 18930, 18931, 18932, 18933, 18934, 18935, 18936, 18937, 18938, 18939, 18940, 18941, 18942, 18943, 18944, 18945, 18946, 18947, 18948, 18949, 18950, 18951, 18952, 18953, 18954, 18955, 18956, 18957, 18958, 18959, 18960, 18961, 18962, 18963, 18964, 18965, 18966, 18967, 18968, 18969, 18970, 18971, 18972, 18973, 18974, 18975, 18976, 18977, 18978, 18979, 18980, 18981, 18982, 18983, 18984, 18985, 18986, 18987, 18988, 18989, 18990, 18991, 18992, 18993, 18994, 18995, 18996, 18997, 18998, 18999, 19000, 19001, 19002, 19003, 19004, 19005, 19006, 19007, 19008, 19009, 19010, 19011, 19012, 19013, 19014, 19015, 19016, 19017, 19018, 19019, 19020, 19021, 19022, 19023, 19024, 19025, 19026, 19027, 19028, 19029, 19030, 19031, 19032, 19033, 19034, 19035, 19036, 19037, 19038, 19039, 19040, 19041, 19042, 19043, 19044, 19045, 19046, 19047, 19048, 19049, 19050, 19051, 19052, 19053, 19054, 19055, 19056, 19057, 19058, 19059, 19060, 19061, 19062, 19063, 19064, 19065, 19066, 19067, 19068, 19069, 19070, 19071, 19072, 19073, 19074, 19075, 19076, 19077, 19078, 19079, 19080, 19081, 19082, 19083, 19084, 19085, 19086, 19087, 19088, 19089, 19090, 19091, 19092, 19093, 19094, 19095, 19096, 19097, 19098, 19099, 19100, 19101, 19102, 19103, 19104, 19105, 19106, 19107, 19108, 19109, 19110, 19111, 19112, 19113, 19114, 19115, 19116, 19117, 19118, 19119, 19120, 19121, 19122, 19123, 19124, 19125, 19126, 19127, 19128, 19129, 19130, 19131, 19132, 19133, 19134, 19135, 19136, 19529, 19530, 19531, 19555, 19556, 19672, 19673, 19674, 19675, 19676, 19677, 19678, 19679, 19680, 19681, 19682, 19683, 19684, 19685, 19686, 19687, 19688, 19689, 19690, 19691, 19692, 19693, 19694, 19695, 19696, 19697, 19698, 19699, 19700, 19701, 19702, 19703, 19704, 19705, 19706, 19707, 19708, 19709, 19710, 19711, 19712, 19713, 19714, 19715, 19716, 19717, 19718, 19719, 19720, 19721, 19722, 19723, 19724, 19725, 19726, 19727, 19728, 19729, 19730, 19731, 19732, 19733, 19734, 19735, 19736, 19737, 19738, 19739, 19740, 19741, 19742, 19743, 19744, 19745, 19746, 19747, 19748, 19749, 19750, 19751, 19752, 19753, 19754, 19755, 19756, 19757, 19758, 19759, 19760, 19761, 19762, 19763, 19764, 19765, 19766, 19767, 19768, 19769, 19770, 19771, 19772, 19773, 19774, 19775, 19776, 19777, 19778, 19779, 19780, 19781, 19782, 19783, 19784, 19785, 19786, 19787, 19788, 19789, 19790, 19791, 19792, 19793, 19794, 19795, 19796, 19797, 19798, 19799, 19800, 19801, 19802, 19803, 19804, 19805, 19806, 19807, 19808, 19809, 19810, 19811, 19812, 19813, 19814, 19815, 19816, 19817, 19818, 19819, 19820, 19821, 19822, 19823, 19824, 19825, 19826, 19827, 19828, 19829, 19830, 19831, 19832, 19833, 19834, 19835, 19836, 19837, 19838, 19839, 19840, 19841, 19842, 19843, 19844, 19845, 19846, 19847, 19848, 19849, 19850, 19851, 19852, 19853, 19854, 19855, 19856, 19857, 19858, 19859, 19860, 19861, 19862, 19863, 19864, 19865, 19866, 19867, 19868, 19869, 19870, 19871, 19872, 19873, 19874, 19875, 19876, 19877, 19878, 19879, 19880, 19881, 19882, 19883, 19884, 19885, 19886, 19887, 19888, 19889, 19890, 19891, 19892, 19893, 19894, 19895, 19896, 19897, 19898, 19899, 19900, 19901, 19902, 19903, 19904, 19905, 19906, 19907, 19908, 19909, 19910, 19911, 19912, 19913, 19914, 19915, 19916, 19917, 19918, 19919, 19920, 19921, 19922, 19923, 19924, 19925, 19926, 19927, 19928, 19929, 19930, 19931, 19932, 19933, 19934, 19935, 19936, 19937, 19938, 19939, 19940, 19941, 19942, 19943, 19944, 19945, 19946, 19947, 19948, 19949, 19950, 19951, 19952, 19953, 19954, 19955, 19956, 19957, 19958, 19959, 19960, 19961, 20453, 20454, 20455, 20456, 20457, 20458, 20459, 20460, 20461, 20462, 20463, 20464, 20465, 20466, 20467, 20468, 20469, 20470, 20471, 20472, 20473, 20474, 20475, 20476, 20477, 20478, 20479, 20480, 20481, 20482, 20483, 20484, 20485, 20486, 20487, 20488, 20489, 20490, 20491, 20492, 20493, 20494, 20495, 20496, 20497, 20498, 20499, 20500, 20501, 20502, 20503, 20504, 20505, 20506, 20507, 20508, 20509, 20510, 20511, 20512, 20513, 20514, 20515, 20516, 20517, 20518, 20519, 20520, 20521, 20522, 20523, 20524, 20525, 20526, 20527, 20528, 20529, 20530, 20531, 20532, 20533, 20534, 20535, 20536, 20537, 20538, 20539, 20540, 20541, 20542, 20543, 20544, 20545, 20546, 20547, 20548, 20549, 20550, 20551, 20552, 20553, 20554, 20555, 20556, 20557, 20558, 20559, 20560, 20561, 20562, 20563, 20564, 20565, 20566, 20567, 20568, 20569, 20570, 20571, 20572, 20573, 20574, 20575, 20576, 20577, 20578, 20579, 20580, 20581, 20582, 20583, 20584, 20585, 20586, 20587, 20588, 20589, 20590, 20591, 20592, 20593, 20594, 20595, 20596, 20597, 20598, 20599, 20600, 20601, 20602, 20603, 20604, 20605, 20606, 20607, 20608, 20609, 20610, 20611, 20612, 20613, 20614, 20615, 20616, 20617, 20618, 20619, 20620, 20621, 20622, 20623, 20624, 20625, 20626, 20627, 20628, 20629, 20630, 20631, 20632, 20633, 20634, 20635, 20636, 20637, 20638, 20639, 20640, 20641, 20642, 20643, 20644, 20645, 20646, 20647, 20648, 20649, 20650, 20651, 20652, 20653, 20654, 20655, 20656, 20657, 20658, 20659, 20660, 20661, 20663, 20664, 20665, 20666, 20667, 21031, 21034, 21039, 21040, 21041, 21042, 21043, 21154, 21155, 21156, 21157, 21158, 21159, 21160, 21161, 21162, 21163, 21164, 21165, 21166, 21167, 21168, 21169, 21170, 21171, 21172, 21179, 21185, 21186, 21187, 21188, 21189, 21190, 21191, 21192, 21193, 21441, 21442, 21443, 21444, 21445, 21446, 21447, 21448, 21449, 21450, 21531, 21532, 21533, 21534, 21535, 21536, 21537, 21538, 21539, 21540, 21541, 21542, 21543, 21544, 21545, 21546, 21547, 21548, 21549, 21550, 21551, 21552, 21553, 21554, 21555 }; - static private List _headBoneNames = new List(){ "neck", "head", "rEye", "lEye", "upperJaw", "lowerJaw", "tongueBase", "tongue01", "tongue02", "tongue03", "tongue04", "tongue05", "tongueTip" }; - - } -} diff --git a/_archived/varManager/Custom/Scripts/loadscene.cs b/_archived/varManager/Custom/Scripts/loadscene.cs deleted file mode 100644 index b9f506c..0000000 --- a/_archived/varManager/Custom/Scripts/loadscene.cs +++ /dev/null @@ -1,726 +0,0 @@ -锘縰sing System; -using UnityEngine; -using System.Collections; -using System.Collections.Generic; -using SimpleJSON; -using System.Threading; -using MeshVR; -using MVR.FileManagementSecure; -using UnityEngine.SceneManagement; -using MVR.FileManagement; -using System.Text.RegularExpressions; - -namespace MVRPlugin -{ - public class loadscene : MVRScript - { - - // IMPORTANT - DO NOT make custom enums. The dynamic C# complier crashes Unity when it encounters these for - // some reason - - // IMPORTANT - DO NOT OVERRIDE Awake() as it is used internally by MVRScript - instead use Init() function which - // is called right after creation - - private DateTime dtspan; - private Atom coreControl; - public override void Init() - { - try - { - // put init code in here - SuperController.LogMessage("loadscene Loaded"); - coreControl = SuperController.singleton.GetAtomByUid("CoreControl"); - dtspan = DateTime.Now; - - // create custom JSON storable params here if you want them to be stored with scene JSON - // types are JSONStorableFloat, JSONStorableBool, JSONStorableString, JSONStorableStringChooser - // JSONStorableColor - - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - // Start is called once before Update or FixedUpdate is called and after Init() - void Start() - { - try - { - - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - // Update is called with each rendered frame by Unity - void Update() - { - try - { - if ((DateTime.Now - dtspan).Seconds >= 2) - { - dtspan = DateTime.Now; - if (SuperController.singleton.isLoading) return; - - - string loadscenetxt = "Custom\\PluginData\\feelfar\\loadscene.json"; - if (FileManagerSecure.FileExists(loadscenetxt)) - { - SuperController.LogMessage("find loadscene.json"); - - JSONClass atomforload = (JSONClass)JSON.Parse(FileManagerSecure.ReadAllText(loadscenetxt)); - //SuperController.LogMessage(atomforload.ToString()); - Thread.Sleep(1000); - FileManagerSecure.DeleteFile(loadscenetxt); - bool rescan = false; - if (atomforload.HasKey("rescan")) - { - rescan = atomforload["rescan"].AsBool; - } - if (rescan) - { - SuperController.LogMessage("Rescan Packages..."); - SuperController.singleton.RescanPackages(); - //Thread.Sleep(10000); - } - bool merge = false; - if (atomforload.HasKey("merge")) - { - SuperController.LogMessage("merge load enabled..."); - merge = atomforload["merge"].AsBool; - } - string characterGender = "female"; - if (atomforload.HasKey("characterGender")) - { - characterGender = atomforload["characterGender"].Value; - SuperController.LogMessage("Character gender is " + characterGender.ToString()); - } - bool ignoreGender = false; - if (atomforload.HasKey("ignoreGender")) - { - ignoreGender = atomforload["ignoreGender"].AsBool; - SuperController.LogMessage("Ignore Gender is " + ignoreGender.ToString()); - } - bool forMale = (characterGender == "male" || characterGender == "futa"); - int personOrder = 1; - if (atomforload.HasKey("personOrder")) - { - personOrder = atomforload["personOrder"].AsInt; - } - JSONArray resources = atomforload["resources"].AsArray; - List atompresets = new List(); - List atoms = new List(); - List atomSubscene = new List(); - foreach (JSONClass resource in resources) - { - while (SuperController.singleton.isLoading) - { - Thread.Sleep(1000); - } - string scenetype = ""; - if (resource.HasKey("type")) - { - scenetype = resource["type"]; - } - string scenefile = ""; - if (resource.HasKey("saveName")) - { - scenefile = resource["saveName"]; - } - if (string.IsNullOrEmpty(scenetype) || string.IsNullOrEmpty(scenefile)) - continue; - - if (FileManagerSecure.FileExists(scenefile)) - { - switch (scenetype) - { - case "scenes": - SuperController.LogMessage("load " + scenetype + ": " + scenefile); - if (merge) - SuperController.singleton.LoadMerge(scenefile); - else - SuperController.singleton.Load(scenefile); - break; - case "atom": - atoms.Add((JSONClass)JSONNode.LoadFromFile(scenefile)); - break; - - case "atomSubscene": - atomSubscene.Add((JSONClass)JSONNode.LoadFromFile(scenefile)); - break; - - default: - atompresets.Add(resource); - break; - } - } - else - { - SuperController.LogError("no found " + scenefile); - } - } - if (atoms.Count > 0) - { - base.StartCoroutine(this.AddAtoms(atoms)); - } - if (atomSubscene.Count > 0) - { - base.StartCoroutine(this.AddAtoms(atomSubscene, true)); - } - if (atompresets.Count > 0) - { - bool findatom = false; - foreach (var atom in SuperController.singleton.GetAtoms()) - { - if (atom.type == "Person" && atom.on) - { - if (IsMale(atom) == forMale || ignoreGender) - { - personOrder--; - if (personOrder > 0) - continue; - findatom = true; - SuperController.LogMessage("Find Person " + atom.name); - atom.SetOn(false); - //atom.hidden = true; - foreach (JSONClass resource in atompresets) - { - while (SuperController.singleton.isLoading) - { - Thread.Sleep(1000); - } - //Thread.Sleep(2000); - string scenetype = ""; - if (resource.HasKey("type")) - { - scenetype = resource["type"]; - } - string scenefile = ""; - if (resource.HasKey("saveName")) - { - scenefile = resource["saveName"]; - } - if (string.IsNullOrEmpty(scenetype) || string.IsNullOrEmpty(scenefile)) - continue; - - if (FileManagerSecure.FileExists(scenefile)) - { - if (scenetype == ("hairstyle")) - { - LoadPreset(atom, "HairPresets", merge, scenefile); - } - if (scenetype == ("morphs")) - { - LoadPreset(atom, "MorphPresets", merge, scenefile); - } - if (scenetype == ("skin")) - { - LoadPreset(atom, "SkinPresets", merge, scenefile); - } - if (scenetype == ("clothing")) - { - LoadPreset(atom, "ClothingPresets", merge, scenefile); - } - if (scenetype == ("plugin")) - { - LoadPreset(atom, "PluginPresets", merge, scenefile); - } - if (scenetype == ("breast")) - { - LoadPreset(atom, "FemaleBreastPhysicsPresets", merge, scenefile); - } - if (scenetype == ("glute")) - { - LoadPreset(atom, "FemaleGlutePhysicsPresets", merge, scenefile); - } - if (scenetype == ("pose")) - { - SuperController.singleton.motionAnimationMaster.StopPlayback(); - SuperController.singleton.motionAnimationMaster.ResetAnimation(); - atom.ResetPhysical(); - if (scenefile.EndsWith(".json")) - LoadLegacyl(atom, "pose", scenefile); - else - LoadPreset(atom, "PosePresets", merge, scenefile); - } - if (scenetype == ("looks")) - { - if (scenefile.EndsWith(".json")) - { - if (scenefile.IndexOf("/Person/full/") >= 0) - LoadLegacyl(atom, "full", scenefile); - else - LoadLegacyl(atom, "appearance", scenefile); - } - else - { - LoadPreset(atom, "AppearancePresets", merge, scenefile); - } - } - if (scenetype == ("animation")) - { - SuperController.singleton.motionAnimationMaster.StopPlayback(); - SuperController.singleton.motionAnimationMaster.SeekToBeginning(); - SuperController.LogMessage("loaded Storable " + FileManagerSecure.GetFullPath(scenefile)); JSONClass atomitem = (JSONClass)JSONNode.LoadFromFile(FileManagerSecure.GetFullPath(scenefile)); - List storids = atom.GetStorableIDs(); - JSONClass jcempty = new JSONClass(); - foreach (string storid in storids) - { - if (storid.EndsWith("Animation")) - { - JSONStorable storable = atom.GetStorableByID(storid); - storable.RestoreFromJSON(jcempty); - } - } - LoadStorableFile(atom, atomitem["storables"].AsArray); - SuperController.singleton.motionAnimationMaster.RestoreFromJSON((JSONClass)atomitem["motionAnimationMaster"]); - SuperController.singleton.motionAnimationMaster.StartPlayback(); - } - } - } - atom.SetOn(true); - //atom.hidden = false; - break; - } - } - } - if (!findatom) - SuperController.LogError("Error load Preset,Unable to match the right atom"); - } - } - } - - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - protected IEnumerator AddAtoms(List jatoms, bool setSubScene = false) - { - IEnumerator enumerator7 = jatoms.GetEnumerator(); - try - { - while (enumerator7.MoveNext()) - { - object obj = enumerator7.Current; - JSONClass jsonclass = (JSONClass)obj; - string uid = jsonclass["id"]; - Atom atomByUid = SuperController.singleton.GetAtomByUid(uid); - if (atomByUid != null) - { - atomByUid.PreRestore(); - } - } - } - finally - { - IDisposable disposable; - if ((disposable = (enumerator7 as IDisposable)) != null) - { - disposable.Dispose(); - } - } - - Physics.autoSimulation = false; - IEnumerator enumerator8 = jatoms.GetEnumerator(); - try - { - while (enumerator8.MoveNext()) - { - object obj2 = enumerator8.Current; - JSONClass jatom = (JSONClass)obj2; - string auid = jatom["id"]; - string type = jatom["type"]; - - Atom a = SuperController.singleton.GetAtomByUid(auid); - if (a == null) - { - yield return base.StartCoroutine(SuperController.singleton.AddAtomByType(type, auid, false, false, false)); - a = SuperController.singleton.GetAtomByUid(auid); - } - else if (a.type != type) - { - SuperController.LogError(string.Concat(new string[] - { - "Atom ", - a.name, - " already exists, but uses different type ", - a.type, - " compared to requested ", - type - }), true, true); - } - if (a != null) - { - a.SetOn(true); - } - } - } - finally - { - IDisposable disposable2; - if ((disposable2 = (enumerator8 as IDisposable)) != null) - { - disposable2.Dispose(); - } - } - yield return null; - Physics.Simulate(0.01f); - yield return null; - IEnumerator enumerator9 = jatoms.GetEnumerator(); - try - { - while (enumerator9.MoveNext()) - { - object obj3 = enumerator9.Current; - JSONClass jsonclass2 = (JSONClass)obj3; - string text = jsonclass2["id"]; - string str = jsonclass2["type"]; - Atom atomByUid2 = SuperController.singleton.GetAtomByUid(text); - if (atomByUid2 != null) - { - atomByUid2.RestoreTransform(jsonclass2, true); - } - else - { - SuperController.LogError("Failed to find atom " + text + " of type " + str, true, true); - } - } - } - finally - { - IDisposable disposable3; - if ((disposable3 = (enumerator9 as IDisposable)) != null) - { - disposable3.Dispose(); - } - } - IEnumerator enumerator10 = jatoms.GetEnumerator(); - try - { - while (enumerator10.MoveNext()) - { - object obj4 = enumerator10.Current; - JSONClass jsonclass3 = (JSONClass)obj4; - string uid2 = jsonclass3["id"]; - Atom atomByUid3 = SuperController.singleton.GetAtomByUid(uid2); - if (atomByUid3 != null) - { - atomByUid3.RestoreParentAtom(jsonclass3); - } - } - } - finally - { - IDisposable disposable4; - if ((disposable4 = (enumerator10 as IDisposable)) != null) - { - disposable4.Dispose(); - } - } - IEnumerator enumerator11 = jatoms.GetEnumerator(); - try - { - while (enumerator11.MoveNext()) - { - object obj5 = enumerator11.Current; - JSONClass jsonclass4 = (JSONClass)obj5; - string text2 = jsonclass4["id"]; - Atom atomByUid4 = SuperController.singleton.GetAtomByUid(text2); - if (atomByUid4 != null) - { - atomByUid4.Restore(jsonclass4, true, true, true, null, false, false, true, false); - } - else - { - SuperController.LogError("Could not find atom by uid " + text2, true, true); - } - } - } - finally - { - IDisposable disposable5; - if ((disposable5 = (enumerator11 as IDisposable)) != null) - { - disposable5.Dispose(); - } - } - IEnumerator enumerator12 = jatoms.GetEnumerator(); - try - { - while (enumerator12.MoveNext()) - { - object obj6 = enumerator12.Current; - JSONClass jsonclass5 = (JSONClass)obj6; - string text3 = jsonclass5["id"]; - Atom atomByUid5 = SuperController.singleton.GetAtomByUid(text3); - if (atomByUid5 != null) - { - atomByUid5.LateRestore(jsonclass5, true, true, true, false, true, false); - } - else - { - SuperController.LogError("Could not find atom by uid " + text3, true, true); - } - } - } - finally - { - IDisposable disposable6; - if ((disposable6 = (enumerator12 as IDisposable)) != null) - { - disposable6.Dispose(); - } - } - if (setSubScene) - { - yield return base.StartCoroutine(SuperController.singleton.AddAtomByType("SubScene", "SubSceneVarManager", false, false, false)); - - IEnumerator enumerator13 = jatoms.GetEnumerator(); - try - { - while (enumerator13.MoveNext()) - { - object obj6 = enumerator13.Current; - JSONClass jsonclass5 = (JSONClass)obj6; - string text3 = jsonclass5["id"]; - Atom atomByUid5 = SuperController.singleton.GetAtomByUid(text3); - if (atomByUid5 != null) - { - atomByUid5.SetParentAtom("SubSceneVarManager"); - } - else - { - SuperController.LogError("Could not find atom by uid " + text3, true, true); - } - } - } - finally - { - IDisposable disposable6; - if ((disposable6 = (enumerator13 as IDisposable)) != null) - { - disposable6.Dispose(); - } - } - } - - foreach (Atom atom8 in SuperController.singleton.GetAtoms()) - { - atom8.PostRestore(); - } - - - Physics.autoSimulation = true; - - yield return null; - } - private void LoadPreset(Atom atom, string presetType, bool merge, string presetFile) - { - JSONStorable js = atom.GetStorableByID(presetType); - - JSONStorableBool loadOnSelectJSON = js.GetBoolJSONParam("loadPresetOnSelect"); - bool preState = loadOnSelectJSON.val; - loadOnSelectJSON.val = false; - - JSONStorableUrl presetPathJSON = js.GetUrlJSONParam("presetBrowsePath"); - string pathPreState = presetPathJSON.val; - presetPathJSON.val = SuperController.singleton.NormalizePath(presetFile); - - if (merge) js.CallAction("MergeLoadPreset"); - else js.CallAction("LoadPreset"); - - //presetPathJSON.val = pathPreState; - //loadOnSelectJSON.val = preState; - SuperController.LogMessage("loaded " + presetType + ": " + presetFile); - } - private void SetAnimationStorableIds() - { - List animationStorableIds = new List(); - foreach (string id in containingAtom.GetStorableIDs()) - { - if (id.EndsWith("Animation")) - { - animationStorableIds.Add(id); - } - } - } - private void LoadStorableFile(Atom atom, JSONArray storablesArray) - { - foreach (JSONClass storablesitem in storablesArray) - { - if (storablesitem.HasKey("id")) - { - JSONStorable storable = atom.GetStorableByID(storablesitem["id"].Value); - storable.RestoreFromJSON(storablesitem); - } - } - - } - private void LoadLegacyl(Atom atom, string presetType, string presetFile) - { - if (presetType == "pose") - atom.LoadPhysicalPreset(presetFile); - if (presetType == "full") - atom.LoadPreset(presetFile); - if (presetType == "appearance") - atom.LoadAppearancePreset(presetFile); - SuperController.LogMessage("loaded " + presetType + ": " + presetFile); - } - - private void LoadPreset(string presetType, bool merge, string presetFile, bool formale = false, bool futaasfemale = false, int personOrder = 1) - { - SuperController.LogMessage((merge ? " Merge LoadPreset " : "LoadPreset ") + presetType + ":" + presetFile); - - //bool formale = ForMale(presetFile, futaasfemale); - bool findatom = false; - foreach (var atom in SuperController.singleton.GetAtoms()) - { - if (atom.type == "Person" && atom.on) - { - SuperController.LogMessage("Find Person " + (IsMale(atom, futaasfemale) ? "Male :" : "Female :") + atom.name); - if (IsMale(atom, futaasfemale) == formale) - { - personOrder--; - if (personOrder > 0) - continue; - atom.SetOn(false); - JSONStorable js = atom.GetStorableByID(presetType); - - JSONStorableBool loadOnSelectJSON = js.GetBoolJSONParam("loadPresetOnSelect"); - bool preState = loadOnSelectJSON.val; - loadOnSelectJSON.val = false; - - JSONStorableUrl presetPathJSON = js.GetUrlJSONParam("presetBrowsePath"); - string pathPreState = presetPathJSON.val; - presetPathJSON.val = SuperController.singleton.NormalizePath(presetFile); - - if (merge) js.CallAction("MergeLoadPreset"); - else js.CallAction("LoadPreset"); - - presetPathJSON.val = pathPreState; - loadOnSelectJSON.val = preState; - atom.SetOn(true); - findatom = true; - SuperController.LogMessage("loaded Preset: " + presetFile); - break; - } - } - } - if (!findatom) - SuperController.LogError("Error load Preset " + presetFile + ",Unable to match the right atom"); - - } - - private void LoadLegacyl(string presetType, string presetFile, bool formale = false, bool futaasfemale = false, int personOrder = 1) - { - SuperController.LogMessage("LoadLegacyl " + presetType + ":" + presetFile); - - //bool formale = ForMale(presetFile, futaasfemale); - bool findatom = false; - foreach (var atom in SuperController.singleton.GetAtoms()) - { - if (atom.type == "Person" && atom.on) - { - SuperController.LogMessage("Find Person " + (IsMale(atom, futaasfemale) ? "Male :" : "Female :") + atom.name); - if (IsMale(atom, futaasfemale) == formale) - { - personOrder--; - if (personOrder > 0) - continue; - atom.SetOn(false); - if (presetType == "pose") - atom.LoadPhysicalPreset(presetFile); - if (presetType == "full") - atom.LoadPreset(presetFile); - if (presetType == "appearance") - atom.LoadAppearancePreset(presetFile); - findatom = true; - atom.SetOn(true); - SuperController.LogMessage("loaded Preset: " + presetFile); - break; - } - } - } - if (!findatom) - SuperController.LogError("Error load Preset " + presetFile + ",Unable to match the right atom"); - - } - - private static bool ForMale(string presetFile, bool futaAsFemale = false) - { - bool formale = false; - string presetstr = SuperController.singleton.ReadFileIntoString(presetFile); - int indexcharacter = presetstr.IndexOf("\"character\"", StringComparison.OrdinalIgnoreCase); - if (indexcharacter >= 0) - { - presetstr = presetstr.Substring(indexcharacter); - int indexcharacter2 = presetstr.IndexOf(",", StringComparison.OrdinalIgnoreCase); - presetstr = presetstr.Substring(0, indexcharacter2); - string resultString = ""; - try - { - resultString = Regex.Match(presetstr, @"\x3A\s*\x22(?.*?)\x22", RegexOptions.Multiline).Groups["character"].Value; - } - catch (ArgumentException ex) - { - // Syntax error in the regular expression - } - if (!string.IsNullOrEmpty(resultString)) - { - resultString = resultString.Trim().ToLower(); - formale = resultString.StartsWith("male") || - resultString.StartsWith("lee") || - resultString.StartsWith("jarlee") || - resultString.StartsWith("julian") || - resultString.StartsWith("jarjulian"); - if (!futaAsFemale) - formale = formale || resultString.StartsWith("futa"); - - } - } - - return formale; - } - - public bool IsMale(Atom atom, bool futaAsFemale = false) - { - bool isMale = false; - string atomCharacter = atom.GetComponentInChildren().name.ToLower(); - // If the peson atom is not "On", then we cant determine their gender it seems as GetComponentInChildren just returns null - isMale = atomCharacter.StartsWith("male") || - atomCharacter.StartsWith("lee") || - atomCharacter.StartsWith("jarlee") || - atomCharacter.StartsWith("julian") || - atomCharacter.StartsWith("jarjulian"); - if (!futaAsFemale) - isMale = isMale || atomCharacter.StartsWith("futa"); - return (isMale); - } - - // FixedUpdate is called with each physics simulation frame by Unity - void FixedUpdate() - { - try - { - // put code in here - } - catch (Exception e) - { - SuperController.LogError("Exception caught: " + e); - } - } - - // OnDestroy is where you should put any cleanup - // if you registered objects to supercontroller or atom, you should unregister them here - void OnDestroy() - { - } - - } -} \ No newline at end of file diff --git a/_archived/varManager/Data/VarManagerContext.cs b/_archived/varManager/Data/VarManagerContext.cs deleted file mode 100644 index cdcdbb2..0000000 --- a/_archived/varManager/Data/VarManagerContext.cs +++ /dev/null @@ -1,225 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using varManager.Models; -using varManager.Properties; - -namespace varManager.Data -{ - public class VarManagerContext : DbContext - { - public const string ProviderName = "Microsoft.Data.Sqlite"; - private static readonly object s_initLock = new object(); - private static bool s_initialized; - - public static string GetDatabasePath() - { - var baseDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) - ?? System.AppDomain.CurrentDomain.BaseDirectory; - return Path.Combine(baseDirectory, "varManager.db"); - } - - public static (string DbPath, string Provider) GetDatabaseInfo() - { - return (GetDatabasePath(), ProviderName); - } - - public static void EnsureCreatedOnce() - { - if (s_initialized) - { - return; - } - - lock (s_initLock) - { - if (s_initialized) - { - return; - } - - using var context = new VarManagerContext(); - context.Database.EnsureCreated(); - s_initialized = true; - } - } - - public DbSet Dependencies { get; set; } - public DbSet InstallStatuses { get; set; } - public DbSet Vars { get; set; } - public DbSet Scenes { get; set; } - public DbSet SavedDependencies { get; set; } - public DbSet HideFavs { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - if (!optionsBuilder.IsConfigured) - { - // Use project directory for database location to match original behavior - var dbPath = GetDatabasePath(); - optionsBuilder.UseSqlite($"Data Source={dbPath}"); - } - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - // Configure table names to match existing database - modelBuilder.Entity().ToTable("dependencies"); - modelBuilder.Entity().ToTable("installStatus"); - modelBuilder.Entity().ToTable("vars"); - modelBuilder.Entity().ToTable("scenes"); - modelBuilder.Entity().ToTable("savedepens"); - modelBuilder.Entity().ToTable("HideFav"); - - // Configure property mappings for different naming conventions - modelBuilder.Entity(entity => - { - entity.Property(e => e.DependencyName).HasColumnName("dependency"); - entity.Property(e => e.VarName).HasColumnName("varName"); - }); - - modelBuilder.Entity(entity => - { - entity.Property(e => e.DependencyName).HasColumnName("dependency"); - entity.Property(e => e.VarName).HasColumnName("varName"); - }); - - // Configure InstallStatus key - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.VarName); - entity.Property(e => e.VarName).HasColumnName("varName"); - entity.Property(e => e.Installed).HasColumnName("installed"); - entity.Property(e => e.Disabled).HasColumnName("disabled"); - }); - - // Configure Scene entity - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.ID); - entity.Property(e => e.VarName).HasColumnName("varName"); - entity.Property(e => e.AtomType).HasColumnName("atomType"); - entity.Property(e => e.PreviewPic).HasColumnName("previewPic"); - entity.Property(e => e.ScenePath).HasColumnName("scenePath"); - entity.Property(e => e.IsPreset).HasColumnName("isPreset"); - entity.Property(e => e.IsLoadable).HasColumnName("isLoadable"); - }); - - // Configure HideFav entity - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.VarName); - entity.Property(e => e.VarName).HasColumnName("varName"); - entity.Property(e => e.Hide).HasColumnName("hide"); - entity.Property(e => e.Fav).HasColumnName("fav"); - }); - - // Configure Var entity with proper column mappings - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.VarName); - entity.Property(e => e.VarName).HasColumnName("varName"); - entity.Property(e => e.CreatorName).HasColumnName("creatorName"); - entity.Property(e => e.PackageName).HasColumnName("packageName"); - entity.Property(e => e.MetaDate).HasColumnName("metaDate"); - entity.Property(e => e.VarDate).HasColumnName("varDate"); - entity.Property(e => e.Version).HasColumnName("version"); - entity.Property(e => e.Description).HasColumnName("description"); - entity.Property(e => e.Morph).HasColumnName("morph"); - entity.Property(e => e.Cloth).HasColumnName("cloth"); - entity.Property(e => e.Hair).HasColumnName("hair"); - entity.Property(e => e.Skin).HasColumnName("skin"); - entity.Property(e => e.Pose).HasColumnName("pose"); - entity.Property(e => e.Scene).HasColumnName("scene"); - entity.Property(e => e.Script).HasColumnName("script"); - entity.Property(e => e.Plugin).HasColumnName("plugin"); - entity.Property(e => e.Asset).HasColumnName("asset"); - entity.Property(e => e.Texture).HasColumnName("texture"); - entity.Property(e => e.Look).HasColumnName("look"); - entity.Property(e => e.SubScene).HasColumnName("subScene"); - entity.Property(e => e.Appearance).HasColumnName("appearance"); - entity.Property(e => e.DependencyCnt).HasColumnName("dependencyCnt"); - entity.Property(e => e.Fsize).HasColumnName("fsize"); - }); - - base.OnModelCreating(modelBuilder); - } - - // Create views as queryable properties - public IQueryable VarsView => - from v in Vars - join i in InstallStatuses on v.VarName equals i.VarName into installJoin - from install in installJoin.DefaultIfEmpty() - select new VarsView - { - VarName = v.VarName, - CreatorName = v.CreatorName, - PackageName = v.PackageName, - MetaDate = v.MetaDate, - VarDate = v.VarDate, - Version = v.Version, - Description = v.Description, - VarPath = "", // No varPath in existing schema - Fsize = v.Fsize ?? 0.0, - Scenes = v.Scene ?? 0, - Looks = v.Look ?? 0, - Clothing = v.Cloth ?? 0, - Hairstyle = v.Hair ?? 0, - Plugins = v.Plugin ?? 0, - Assets = v.Asset ?? 0, - Morphs = v.Morph ?? 0, - Pose = v.Pose ?? 0, - Skin = v.Skin ?? 0, - Installed = install != null && install.Installed, - Disabled = install != null && install.Disabled - }; - - public IQueryable ScenesView => - from s in Scenes - join v in Vars on s.VarName equals v.VarName into varJoin - from var in varJoin.DefaultIfEmpty() - join i in InstallStatuses on s.VarName equals i.VarName into installJoin - from install in installJoin.DefaultIfEmpty() - join h in HideFavs on s.VarName equals h.VarName into hideFavJoin - from hideFav in hideFavJoin.DefaultIfEmpty() - select new ScenesView - { - VarName = s.VarName, - AtomType = s.AtomType, - IsPreset = s.IsPreset, - ScenePath = s.ScenePath, - PreviewPic = s.PreviewPic, - CreatorName = var != null ? var.CreatorName : null, - PackageName = var != null ? var.PackageName : null, - MetaDate = var != null ? var.MetaDate : null, - Version = var != null ? var.Version : null, - Installed = install != null && install.Installed, - Disabled = install != null && install.Disabled, - Hide = hideFav != null && hideFav.Hide, - Fav = hideFav != null && hideFav.Fav - }; - } - - // View model for VarsView - public class VarsView - { - public string VarName { get; set; } = string.Empty; - public string? CreatorName { get; set; } - public string? PackageName { get; set; } - public DateTime? MetaDate { get; set; } - public DateTime? VarDate { get; set; } - public string? Version { get; set; } - public string? Description { get; set; } - public string? VarPath { get; set; } - public double Fsize { get; set; } - public int Scenes { get; set; } - public int Looks { get; set; } - public int Clothing { get; set; } - public int Hairstyle { get; set; } - public int Plugins { get; set; } - public int Assets { get; set; } - public int Morphs { get; set; } - public int Pose { get; set; } - public int Skin { get; set; } - public bool Installed { get; set; } - public bool Disabled { get; set; } - } -} diff --git a/_archived/varManager/Form1.Designer.cs b/_archived/varManager/Form1.Designer.cs deleted file mode 100644 index b1dcee0..0000000 --- a/_archived/varManager/Form1.Designer.cs +++ /dev/null @@ -1,1660 +0,0 @@ -锘 -namespace varManager -{ - partial class Form1 - { - /// - /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 娓呯悊鎵鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆 - /// - /// 濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓 true锛涘惁鍒欎负 false銆 - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - foreach (var context in _dbContext.Values) - { - context?.Dispose(); - } - _dbContext.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 - - /// - /// 璁捐鍣ㄦ敮鎸佹墍闇鐨勬柟娉 - 涓嶈淇敼 - /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广 - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - DataGridViewCellStyle dataGridViewCellStyle1 = new DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - buttonSetting = new Button(); - tableLayoutPanel1 = new TableLayoutPanel(); - listBoxLog = new ListBox(); - panel1 = new Panel(); - buttonFixPreview = new Button(); - groupBoxSwitch = new GroupBox(); - comboBoxPacksSwitch = new ComboBox(); - buttonPacksDelete = new Button(); - buttonPacksRename = new Button(); - buttonPacksAdd = new Button(); - buttonFixRebuildLink = new Button(); - groupBox1 = new GroupBox(); - buttonMissingDepends = new Button(); - buttonFilteredMissingDepends = new Button(); - buttonAllMissingDepends = new Button(); - buttonFixSavesDepend = new Button(); - contextMenuStripPrepareSave = new ContextMenuStrip(components); - prepareFormSavesToolStripMenuItem = new ToolStripMenuItem(); - buttonScenesManager = new Button(); - buttonStaleVars = new Button(); - buttonUpdDB = new Button(); - buttonStartVam = new Button(); - tableLayoutPanel2 = new TableLayoutPanel(); - progressBar1 = new ProgressBar(); - labelProgress = new Label(); - splitContainer1 = new SplitContainer(); - varsViewDataGridView = new DataGridView(); - varNamedataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - installedDataGridViewCheckBoxColumn = new DataGridViewCheckBoxColumn(); - ColumnDetail = new DataGridViewButtonColumn(); - fsize = new DataGridViewTextBoxColumn(); - varPathDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - creatorNameDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - packageNameDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - versionDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - metaDateDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - varDateDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - scenesDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - looksDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - clothingDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - hairstyleDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - pluginsDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - assetsDataGridViewTextBoxColumn = new DataGridViewTextBoxColumn(); - morphs = new DataGridViewTextBoxColumn(); - pose = new DataGridViewTextBoxColumn(); - skin = new DataGridViewTextBoxColumn(); - disabledDataGridViewCheckBoxColumn = new DataGridViewCheckBoxColumn(); - varsViewBindingSource = new BindingSource(components); - flowLayoutPanel2 = new FlowLayoutPanel(); - buttonInstall = new Button(); - buttonUninstallSels = new Button(); - buttonDelete = new Button(); - buttonMove = new Button(); - buttonExpInsted = new Button(); - buttonInstFormTxt = new Button(); - buttonHub = new Button(); - buttonClearLog = new Button(); - flowLayoutPanel1 = new FlowLayoutPanel(); - varsBindingNavigator = new BindingNavigator(components); - bindingNavigatorCountItem = new ToolStripLabel(); - bindingNavigatorMoveFirstItem = new ToolStripButton(); - bindingNavigatorMovePreviousItem = new ToolStripButton(); - bindingNavigatorSeparator = new ToolStripSeparator(); - bindingNavigatorPositionItem = new ToolStripTextBox(); - bindingNavigatorSeparator1 = new ToolStripSeparator(); - bindingNavigatorMoveNextItem = new ToolStripButton(); - bindingNavigatorMoveLastItem = new ToolStripButton(); - bindingNavigatorSeparator2 = new ToolStripSeparator(); - label1 = new Label(); - comboBoxCreater = new ComboBox(); - label2 = new Label(); - textBoxFilter = new TextBox(); - checkBoxInstalled = new CheckBox(); - buttonResetFilter = new Button(); - tableLayoutPanelPreview = new TableLayoutPanel(); - pictureBoxPreview = new PictureBox(); - labelPreviewVarName = new Label(); - buttonLocate = new Button(); - panel3 = new Panel(); - buttonLoad = new Button(); - checkBoxForMale = new CheckBox(); - checkBoxIgnoreGender = new CheckBox(); - groupBoxPersonOrder = new GroupBox(); - radioButtonPersonOrder6 = new RadioButton(); - radioButtonPersonOrder8 = new RadioButton(); - radioButtonPersonOrder7 = new RadioButton(); - radioButtonPersonOrder5 = new RadioButton(); - radioButtonPersonOrder4 = new RadioButton(); - radioButtonPersonOrder3 = new RadioButton(); - radioButtonPersonOrder2 = new RadioButton(); - radioButtonPersonOrder1 = new RadioButton(); - checkBoxMerge = new CheckBox(); - buttonClearCache = new Button(); - buttonAnalysis = new Button(); - buttonpreviewinstall = new Button(); - listViewPreviewPics = new ListView(); - imageListPreviewPics = new ImageList(components); - flowLayoutPanel3 = new FlowLayoutPanel(); - toolStripPreview = new ToolStrip(); - toolStripButtonPreviewFirst = new ToolStripButton(); - toolStripButtonPreviewPrev = new ToolStripButton(); - toolStripLabelPreviewItemIndex = new ToolStripLabel(); - toolStripLabelPreviewCountItem = new ToolStripLabel(); - toolStripButtonPreviewNext = new ToolStripButton(); - toolStripButtonPreviewLast = new ToolStripButton(); - label4 = new Label(); - comboBoxPreviewType = new ComboBox(); - checkBoxPreviewTypeLoadable = new CheckBox(); - backgroundWorkerInstall = new System.ComponentModel.BackgroundWorker(); - toolTip1 = new ToolTip(components); - backgroundWorkerPreview = new System.ComponentModel.BackgroundWorker(); - folderBrowserDialogMove = new FolderBrowserDialog(); - openFileDialogInstByTXT = new OpenFileDialog(); - saveFileDialogExportInstalled = new SaveFileDialog(); - varsBindingSource = new BindingSource(components); - dependenciesBindingSource = new BindingSource(components); - installStatusBindingSource = new BindingSource(components); - scenesBindingSource = new BindingSource(components); - tableLayoutPanel1.SuspendLayout(); - panel1.SuspendLayout(); - groupBoxSwitch.SuspendLayout(); - groupBox1.SuspendLayout(); - contextMenuStripPrepareSave.SuspendLayout(); - tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)splitContainer1).BeginInit(); - splitContainer1.Panel1.SuspendLayout(); - splitContainer1.Panel2.SuspendLayout(); - splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)varsViewDataGridView).BeginInit(); - ((System.ComponentModel.ISupportInitialize)varsViewBindingSource).BeginInit(); - flowLayoutPanel2.SuspendLayout(); - flowLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)varsBindingNavigator).BeginInit(); - varsBindingNavigator.SuspendLayout(); - tableLayoutPanelPreview.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)pictureBoxPreview).BeginInit(); - panel3.SuspendLayout(); - groupBoxPersonOrder.SuspendLayout(); - flowLayoutPanel3.SuspendLayout(); - toolStripPreview.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)varsBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)dependenciesBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)installStatusBindingSource).BeginInit(); - ((System.ComponentModel.ISupportInitialize)scenesBindingSource).BeginInit(); - SuspendLayout(); - // - // buttonSetting - // - buttonSetting.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - buttonSetting.Location = new Point(33, 749); - buttonSetting.Name = "buttonSetting"; - buttonSetting.Size = new Size(89, 48); - buttonSetting.TabIndex = 0; - buttonSetting.Text = "Settings"; - buttonSetting.UseVisualStyleBackColor = true; - buttonSetting.Click += buttonSetting_Click; - // - // tableLayoutPanel1 - // - tableLayoutPanel1.ColumnCount = 2; - tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); - tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 159F)); - tableLayoutPanel1.Controls.Add(listBoxLog, 0, 1); - tableLayoutPanel1.Controls.Add(panel1, 1, 0); - tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 2); - tableLayoutPanel1.Controls.Add(splitContainer1, 0, 0); - tableLayoutPanel1.Dock = DockStyle.Fill; - tableLayoutPanel1.Location = new Point(0, 0); - tableLayoutPanel1.Name = "tableLayoutPanel1"; - tableLayoutPanel1.RowCount = 3; - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 245F)); - tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26F)); - tableLayoutPanel1.Size = new Size(1540, 829); - tableLayoutPanel1.TabIndex = 2; - // - // listBoxLog - // - listBoxLog.Dock = DockStyle.Fill; - listBoxLog.FormattingEnabled = true; - listBoxLog.ItemHeight = 21; - listBoxLog.Location = new Point(3, 561); - listBoxLog.Name = "listBoxLog"; - listBoxLog.Size = new Size(1375, 239); - listBoxLog.TabIndex = 2; - toolTip1.SetToolTip(listBoxLog, "Log"); - // - // panel1 - // - panel1.AutoScroll = true; - panel1.Controls.Add(buttonFixPreview); - panel1.Controls.Add(groupBoxSwitch); - panel1.Controls.Add(buttonFixRebuildLink); - panel1.Controls.Add(groupBox1); - panel1.Controls.Add(buttonScenesManager); - panel1.Controls.Add(buttonStaleVars); - panel1.Controls.Add(buttonUpdDB); - panel1.Controls.Add(buttonStartVam); - panel1.Controls.Add(buttonSetting); - panel1.Dock = DockStyle.Fill; - panel1.Location = new Point(1384, 3); - panel1.Name = "panel1"; - tableLayoutPanel1.SetRowSpan(panel1, 3); - panel1.Size = new Size(153, 823); - panel1.TabIndex = 5; - // - // buttonFixPreview - // - buttonFixPreview.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonFixPreview.Location = new Point(17, 568); - buttonFixPreview.Name = "buttonFixPreview"; - buttonFixPreview.Size = new Size(118, 29); - buttonFixPreview.TabIndex = 1; - buttonFixPreview.Text = "Fix Preview"; - toolTip1.SetToolTip(buttonFixPreview, "Re-extract the lost preview images"); - buttonFixPreview.UseVisualStyleBackColor = true; - buttonFixPreview.Click += buttonFixPreview_Click; - // - // groupBoxSwitch - // - groupBoxSwitch.Anchor = AnchorStyles.Top | AnchorStyles.Right; - groupBoxSwitch.Controls.Add(comboBoxPacksSwitch); - groupBoxSwitch.Controls.Add(buttonPacksDelete); - groupBoxSwitch.Controls.Add(buttonPacksRename); - groupBoxSwitch.Controls.Add(buttonPacksAdd); - groupBoxSwitch.Location = new Point(9, 10); - groupBoxSwitch.Name = "groupBoxSwitch"; - groupBoxSwitch.Size = new Size(235, 149); - groupBoxSwitch.TabIndex = 6; - groupBoxSwitch.TabStop = false; - groupBoxSwitch.Text = "AddonPacks Switch"; - // - // comboBoxPacksSwitch - // - comboBoxPacksSwitch.Anchor = AnchorStyles.Top | AnchorStyles.Right; - comboBoxPacksSwitch.DropDownStyle = ComboBoxStyle.DropDownList; - comboBoxPacksSwitch.FormattingEnabled = true; - comboBoxPacksSwitch.Location = new Point(8, 34); - comboBoxPacksSwitch.Name = "comboBoxPacksSwitch"; - comboBoxPacksSwitch.Size = new Size(118, 29); - comboBoxPacksSwitch.TabIndex = 0; - toolTip1.SetToolTip(comboBoxPacksSwitch, "Switching AddonPackagess"); - comboBoxPacksSwitch.SelectedIndexChanged += comboBoxPacksSwitch_SelectedIndexChanged; - comboBoxPacksSwitch.Enter += SwitchControl_Enter; - // - // buttonPacksDelete - // - buttonPacksDelete.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonPacksDelete.ForeColor = Color.OrangeRed; - buttonPacksDelete.Location = new Point(72, 65); - buttonPacksDelete.Name = "buttonPacksDelete"; - buttonPacksDelete.Size = new Size(54, 35); - buttonPacksDelete.TabIndex = 2; - buttonPacksDelete.Text = "Del"; - toolTip1.SetToolTip(buttonPacksDelete, "Delete current AddonPackages"); - buttonPacksDelete.UseVisualStyleBackColor = true; - buttonPacksDelete.Click += buttonPacksDelete_Click; - buttonPacksDelete.Enter += SwitchControl_Enter; - // - // buttonPacksRename - // - buttonPacksRename.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonPacksRename.ForeColor = Color.Maroon; - buttonPacksRename.Location = new Point(29, 106); - buttonPacksRename.Name = "buttonPacksRename"; - buttonPacksRename.Size = new Size(84, 35); - buttonPacksRename.TabIndex = 3; - buttonPacksRename.Text = "Rename"; - toolTip1.SetToolTip(buttonPacksRename, "Rename current AddonPackages"); - buttonPacksRename.UseVisualStyleBackColor = true; - buttonPacksRename.Click += buttonPacksRename_Click; - buttonPacksRename.Enter += SwitchControl_Enter; - // - // buttonPacksAdd - // - buttonPacksAdd.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonPacksAdd.ForeColor = SystemColors.HotTrack; - buttonPacksAdd.Location = new Point(8, 65); - buttonPacksAdd.Name = "buttonPacksAdd"; - buttonPacksAdd.Size = new Size(54, 35); - buttonPacksAdd.TabIndex = 1; - buttonPacksAdd.Text = "Add"; - toolTip1.SetToolTip(buttonPacksAdd, "Add AddonPackages"); - buttonPacksAdd.UseVisualStyleBackColor = true; - buttonPacksAdd.Click += buttonPacksAdd_Click; - buttonPacksAdd.Enter += SwitchControl_Enter; - // - // buttonFixRebuildLink - // - buttonFixRebuildLink.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonFixRebuildLink.Location = new Point(17, 534); - buttonFixRebuildLink.Name = "buttonFixRebuildLink"; - buttonFixRebuildLink.Size = new Size(118, 28); - buttonFixRebuildLink.TabIndex = 1; - buttonFixRebuildLink.Text = "Rebuild symlink"; - toolTip1.SetToolTip(buttonFixRebuildLink, "When your Vars source directory changes, you need to rebuild symlinks"); - buttonFixRebuildLink.UseVisualStyleBackColor = true; - buttonFixRebuildLink.Click += buttonFixRebuildLink_Click; - // - // groupBox1 - // - groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right; - groupBox1.Controls.Add(buttonMissingDepends); - groupBox1.Controls.Add(buttonFilteredMissingDepends); - groupBox1.Controls.Add(buttonAllMissingDepends); - groupBox1.Controls.Add(buttonFixSavesDepend); - groupBox1.ForeColor = Color.SaddleBrown; - groupBox1.Location = new Point(9, 264); - groupBox1.Name = "groupBox1"; - groupBox1.Size = new Size(235, 233); - groupBox1.TabIndex = 5; - groupBox1.TabStop = false; - groupBox1.Text = "Depends Analysis"; - // - // buttonMissingDepends - // - buttonMissingDepends.Location = new Point(24, 24); - buttonMissingDepends.Name = "buttonMissingDepends"; - buttonMissingDepends.Size = new Size(89, 28); - buttonMissingDepends.TabIndex = 0; - buttonMissingDepends.Text = "Installed Packages"; - toolTip1.SetToolTip(buttonMissingDepends, "Analyzing dependencies from Installed Vars"); - buttonMissingDepends.UseVisualStyleBackColor = true; - buttonMissingDepends.Click += buttonMissingDepends_Click; - // - // buttonFilteredMissingDepends - // - buttonFilteredMissingDepends.Location = new Point(24, 179); - buttonFilteredMissingDepends.Name = "buttonFilteredMissingDepends"; - buttonFilteredMissingDepends.Size = new Size(89, 28); - buttonFilteredMissingDepends.TabIndex = 1; - buttonFilteredMissingDepends.Text = "Filtered Packages"; - toolTip1.SetToolTip(buttonFilteredMissingDepends, "Analyzing dependencies from filtered list on the leftside of form"); - buttonFilteredMissingDepends.UseVisualStyleBackColor = true; - buttonFilteredMissingDepends.Click += buttonFilteredMissingDepends_Click; - // - // buttonAllMissingDepends - // - buttonAllMissingDepends.Location = new Point(24, 126); - buttonAllMissingDepends.Name = "buttonAllMissingDepends"; - buttonAllMissingDepends.Size = new Size(89, 28); - buttonAllMissingDepends.TabIndex = 1; - buttonAllMissingDepends.Text = "All Packages"; - toolTip1.SetToolTip(buttonAllMissingDepends, "Analyzing dependencies from All Vars"); - buttonAllMissingDepends.UseVisualStyleBackColor = true; - buttonAllMissingDepends.Click += buttonAllMissingDepends_Click; - // - // buttonFixSavesDepend - // - buttonFixSavesDepend.ContextMenuStrip = contextMenuStripPrepareSave; - buttonFixSavesDepend.Location = new Point(24, 75); - buttonFixSavesDepend.Name = "buttonFixSavesDepend"; - buttonFixSavesDepend.Size = new Size(89, 28); - buttonFixSavesDepend.TabIndex = 1; - buttonFixSavesDepend.Text = "\"Saves\" JsonFile"; - toolTip1.SetToolTip(buttonFixSavesDepend, "Analyzing dependencies from json files in \"Saves\" folder and vap files in \"Custom\" folder\r\n"); - buttonFixSavesDepend.UseVisualStyleBackColor = true; - buttonFixSavesDepend.Click += buttonFixSavesDepend_Click; - // - // contextMenuStripPrepareSave - // - contextMenuStripPrepareSave.ImageScalingSize = new Size(20, 20); - contextMenuStripPrepareSave.Items.AddRange(new ToolStripItem[] { prepareFormSavesToolStripMenuItem }); - contextMenuStripPrepareSave.Name = "contextMenuStripPrepareSave"; - contextMenuStripPrepareSave.Size = new Size(250, 34); - // - // prepareFormSavesToolStripMenuItem - // - prepareFormSavesToolStripMenuItem.Name = "prepareFormSavesToolStripMenuItem"; - prepareFormSavesToolStripMenuItem.Size = new Size(249, 30); - prepareFormSavesToolStripMenuItem.Text = "Prepare Form Saves"; - prepareFormSavesToolStripMenuItem.Click += prepareFormSavesToolStripMenuItem_Click; - // - // buttonScenesManager - // - buttonScenesManager.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonScenesManager.Font = new Font("Cambria", 9F, FontStyle.Bold, GraphicsUnit.Point); - buttonScenesManager.ForeColor = Color.RoyalBlue; - buttonScenesManager.Location = new Point(17, 637); - buttonScenesManager.Name = "buttonScenesManager"; - buttonScenesManager.Size = new Size(118, 28); - buttonScenesManager.TabIndex = 3; - buttonScenesManager.Text = "Hide| |Fav"; - toolTip1.SetToolTip(buttonScenesManager, "Batch hide or favorite Scenes and Presets,"); - buttonScenesManager.UseVisualStyleBackColor = true; - buttonScenesManager.Click += buttonScenesManager_Click; - // - // buttonStaleVars - // - buttonStaleVars.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonStaleVars.Location = new Point(17, 603); - buttonStaleVars.Name = "buttonStaleVars"; - buttonStaleVars.Size = new Size(118, 28); - buttonStaleVars.TabIndex = 2; - buttonStaleVars.Text = "Stale Vars"; - toolTip1.SetToolTip(buttonStaleVars, "Move old version packages are not dependent on other packages to ___VarTidied___ dirtory"); - buttonStaleVars.UseVisualStyleBackColor = true; - buttonStaleVars.Click += buttonStaleVars_Click; - // - // buttonUpdDB - // - buttonUpdDB.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonUpdDB.Font = new Font("Cambria", 9F, FontStyle.Bold, GraphicsUnit.Point); - buttonUpdDB.ForeColor = Color.RoyalBlue; - buttonUpdDB.Location = new Point(17, 164); - buttonUpdDB.Name = "buttonUpdDB"; - buttonUpdDB.Size = new Size(118, 29); - buttonUpdDB.TabIndex = 0; - buttonUpdDB.Text = "UPD_DB"; - toolTip1.SetToolTip(buttonUpdDB, "Organize vars, extract preview images,update DB."); - buttonUpdDB.UseVisualStyleBackColor = true; - buttonUpdDB.Click += buttonUpdDB_Click; - // - // buttonStartVam - // - buttonStartVam.Anchor = AnchorStyles.Top | AnchorStyles.Right; - buttonStartVam.Font = new Font("Cambria", 9F, FontStyle.Bold, GraphicsUnit.Point); - buttonStartVam.ForeColor = Color.RoyalBlue; - buttonStartVam.Location = new Point(17, 199); - buttonStartVam.Name = "buttonStartVam"; - buttonStartVam.Size = new Size(118, 32); - buttonStartVam.TabIndex = 7; - buttonStartVam.Text = "Start VAM"; - toolTip1.SetToolTip(buttonStartVam, "Start VAM application"); - buttonStartVam.UseVisualStyleBackColor = true; - buttonStartVam.Click += buttonStartVam_Click; - // - // tableLayoutPanel2 - // - tableLayoutPanel2.ColumnCount = 2; - tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 160F)); - tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); - tableLayoutPanel2.Controls.Add(progressBar1, 1, 0); - tableLayoutPanel2.Controls.Add(labelProgress, 0, 0); - tableLayoutPanel2.Dock = DockStyle.Fill; - tableLayoutPanel2.Location = new Point(3, 806); - tableLayoutPanel2.Name = "tableLayoutPanel2"; - tableLayoutPanel2.RowCount = 1; - tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); - tableLayoutPanel2.Size = new Size(1375, 20); - tableLayoutPanel2.TabIndex = 7; - // - // progressBar1 - // - progressBar1.Dock = DockStyle.Fill; - progressBar1.Location = new Point(163, 3); - progressBar1.Name = "progressBar1"; - progressBar1.Size = new Size(1209, 14); - progressBar1.TabIndex = 4; - // - // labelProgress - // - labelProgress.Anchor = AnchorStyles.None; - labelProgress.AutoSize = true; - labelProgress.Location = new Point(60, 0); - labelProgress.Name = "labelProgress"; - labelProgress.Size = new Size(39, 20); - labelProgress.TabIndex = 5; - labelProgress.Text = "0/0"; - // - // splitContainer1 - // - splitContainer1.Dock = DockStyle.Fill; - splitContainer1.Location = new Point(3, 3); - splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - splitContainer1.Panel1.AutoScroll = true; - splitContainer1.Panel1.Controls.Add(varsViewDataGridView); - splitContainer1.Panel1.Controls.Add(flowLayoutPanel2); - splitContainer1.Panel1.Controls.Add(flowLayoutPanel1); - // - // splitContainer1.Panel2 - // - splitContainer1.Panel2.Controls.Add(tableLayoutPanelPreview); - splitContainer1.Panel2.Controls.Add(listViewPreviewPics); - splitContainer1.Panel2.Controls.Add(flowLayoutPanel3); - splitContainer1.Size = new Size(1375, 552); - splitContainer1.SplitterDistance = 836; - splitContainer1.TabIndex = 8; - // - // varsViewDataGridView - // - varsViewDataGridView.AllowUserToAddRows = false; - varsViewDataGridView.AllowUserToDeleteRows = false; - varsViewDataGridView.AutoGenerateColumns = false; - varsViewDataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - varsViewDataGridView.Columns.AddRange(new DataGridViewColumn[] { varNamedataGridViewTextBoxColumn, installedDataGridViewCheckBoxColumn, ColumnDetail, fsize, varPathDataGridViewTextBoxColumn, creatorNameDataGridViewTextBoxColumn, packageNameDataGridViewTextBoxColumn, versionDataGridViewTextBoxColumn, metaDateDataGridViewTextBoxColumn, varDateDataGridViewTextBoxColumn, scenesDataGridViewTextBoxColumn, looksDataGridViewTextBoxColumn, clothingDataGridViewTextBoxColumn, hairstyleDataGridViewTextBoxColumn, pluginsDataGridViewTextBoxColumn, assetsDataGridViewTextBoxColumn, morphs, pose, skin, disabledDataGridViewCheckBoxColumn }); - varsViewDataGridView.DataSource = varsViewBindingSource; - varsViewDataGridView.Dock = DockStyle.Fill; - varsViewDataGridView.Location = new Point(0, 70); - varsViewDataGridView.Name = "varsViewDataGridView"; - varsViewDataGridView.ReadOnly = true; - varsViewDataGridView.RowHeadersWidth = 20; - varsViewDataGridView.RowTemplate.Height = 27; - varsViewDataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; - varsViewDataGridView.ShowCellToolTips = false; - varsViewDataGridView.Size = new Size(836, 434); - varsViewDataGridView.TabIndex = 6; - toolTip1.SetToolTip(varsViewDataGridView, "Multiple selectable,Right click column header for advanced filter"); - varsViewDataGridView.CellContentClick += varsViewDataGridView_CellContentClick; - varsViewDataGridView.DataError += varsViewDataGridView_DataError; - // - // varNamedataGridViewTextBoxColumn - // - varNamedataGridViewTextBoxColumn.DataPropertyName = "varName"; - varNamedataGridViewTextBoxColumn.HeaderText = "varName"; - varNamedataGridViewTextBoxColumn.MinimumWidth = 6; - varNamedataGridViewTextBoxColumn.Name = "varNamedataGridViewTextBoxColumn"; - varNamedataGridViewTextBoxColumn.ReadOnly = true; - varNamedataGridViewTextBoxColumn.Width = 180; - // - // installedDataGridViewCheckBoxColumn - // - installedDataGridViewCheckBoxColumn.DataPropertyName = "Installed"; - installedDataGridViewCheckBoxColumn.HeaderText = "Installed"; - installedDataGridViewCheckBoxColumn.MinimumWidth = 6; - installedDataGridViewCheckBoxColumn.Name = "installedDataGridViewCheckBoxColumn"; - installedDataGridViewCheckBoxColumn.ReadOnly = true; - installedDataGridViewCheckBoxColumn.Width = 68; - // - // ColumnDetail - // - ColumnDetail.HeaderText = "Detail"; - ColumnDetail.MinimumWidth = 6; - ColumnDetail.Name = "ColumnDetail"; - ColumnDetail.ReadOnly = true; - ColumnDetail.Text = "Detail"; - ColumnDetail.UseColumnTextForButtonValue = true; - ColumnDetail.Width = 60; - // - // fsize - // - fsize.DataPropertyName = "Fsize"; - dataGridViewCellStyle1.Format = "N2"; - dataGridViewCellStyle1.NullValue = null; - fsize.DefaultCellStyle = dataGridViewCellStyle1; - fsize.HeaderText = "fsize(MB)"; - fsize.MinimumWidth = 6; - fsize.Name = "fsize"; - fsize.ReadOnly = true; - fsize.Width = 70; - // - // varPathDataGridViewTextBoxColumn - // - varPathDataGridViewTextBoxColumn.DataPropertyName = "varPath"; - varPathDataGridViewTextBoxColumn.HeaderText = "varPath"; - varPathDataGridViewTextBoxColumn.MinimumWidth = 6; - varPathDataGridViewTextBoxColumn.Name = "varPathDataGridViewTextBoxColumn"; - varPathDataGridViewTextBoxColumn.ReadOnly = true; - varPathDataGridViewTextBoxColumn.Visible = false; - varPathDataGridViewTextBoxColumn.Width = 125; - // - // creatorNameDataGridViewTextBoxColumn - // - creatorNameDataGridViewTextBoxColumn.DataPropertyName = "creatorName"; - creatorNameDataGridViewTextBoxColumn.HeaderText = "creatorName"; - creatorNameDataGridViewTextBoxColumn.MinimumWidth = 6; - creatorNameDataGridViewTextBoxColumn.Name = "creatorNameDataGridViewTextBoxColumn"; - creatorNameDataGridViewTextBoxColumn.ReadOnly = true; - creatorNameDataGridViewTextBoxColumn.Visible = false; - creatorNameDataGridViewTextBoxColumn.Width = 125; - // - // packageNameDataGridViewTextBoxColumn - // - packageNameDataGridViewTextBoxColumn.DataPropertyName = "packageName"; - packageNameDataGridViewTextBoxColumn.HeaderText = "packageName"; - packageNameDataGridViewTextBoxColumn.MinimumWidth = 6; - packageNameDataGridViewTextBoxColumn.Name = "packageNameDataGridViewTextBoxColumn"; - packageNameDataGridViewTextBoxColumn.ReadOnly = true; - packageNameDataGridViewTextBoxColumn.Visible = false; - packageNameDataGridViewTextBoxColumn.Width = 125; - // - // versionDataGridViewTextBoxColumn - // - versionDataGridViewTextBoxColumn.DataPropertyName = "version"; - versionDataGridViewTextBoxColumn.HeaderText = "version"; - versionDataGridViewTextBoxColumn.MinimumWidth = 6; - versionDataGridViewTextBoxColumn.Name = "versionDataGridViewTextBoxColumn"; - versionDataGridViewTextBoxColumn.ReadOnly = true; - versionDataGridViewTextBoxColumn.Visible = false; - versionDataGridViewTextBoxColumn.Width = 125; - // - // metaDateDataGridViewTextBoxColumn - // - metaDateDataGridViewTextBoxColumn.DataPropertyName = "metaDate"; - metaDateDataGridViewTextBoxColumn.HeaderText = "Date"; - metaDateDataGridViewTextBoxColumn.MinimumWidth = 6; - metaDateDataGridViewTextBoxColumn.Name = "metaDateDataGridViewTextBoxColumn"; - metaDateDataGridViewTextBoxColumn.ReadOnly = true; - metaDateDataGridViewTextBoxColumn.Width = 105; - // - // varDateDataGridViewTextBoxColumn - // - varDateDataGridViewTextBoxColumn.DataPropertyName = "varDate"; - varDateDataGridViewTextBoxColumn.HeaderText = "VarDate"; - varDateDataGridViewTextBoxColumn.MinimumWidth = 6; - varDateDataGridViewTextBoxColumn.Name = "varDateDataGridViewTextBoxColumn"; - varDateDataGridViewTextBoxColumn.ReadOnly = true; - varDateDataGridViewTextBoxColumn.Width = 105; - // - // scenesDataGridViewTextBoxColumn - // - scenesDataGridViewTextBoxColumn.DataPropertyName = "scenes"; - scenesDataGridViewTextBoxColumn.HeaderText = "scenes"; - scenesDataGridViewTextBoxColumn.MinimumWidth = 6; - scenesDataGridViewTextBoxColumn.Name = "scenesDataGridViewTextBoxColumn"; - scenesDataGridViewTextBoxColumn.ReadOnly = true; - scenesDataGridViewTextBoxColumn.Width = 45; - // - // looksDataGridViewTextBoxColumn - // - looksDataGridViewTextBoxColumn.DataPropertyName = "looks"; - looksDataGridViewTextBoxColumn.HeaderText = "looks"; - looksDataGridViewTextBoxColumn.MinimumWidth = 6; - looksDataGridViewTextBoxColumn.Name = "looksDataGridViewTextBoxColumn"; - looksDataGridViewTextBoxColumn.ReadOnly = true; - looksDataGridViewTextBoxColumn.Width = 45; - // - // clothingDataGridViewTextBoxColumn - // - clothingDataGridViewTextBoxColumn.DataPropertyName = "clothing"; - clothingDataGridViewTextBoxColumn.HeaderText = "clothes"; - clothingDataGridViewTextBoxColumn.MinimumWidth = 6; - clothingDataGridViewTextBoxColumn.Name = "clothingDataGridViewTextBoxColumn"; - clothingDataGridViewTextBoxColumn.ReadOnly = true; - clothingDataGridViewTextBoxColumn.Width = 45; - // - // hairstyleDataGridViewTextBoxColumn - // - hairstyleDataGridViewTextBoxColumn.DataPropertyName = "hairstyle"; - hairstyleDataGridViewTextBoxColumn.HeaderText = "hairs"; - hairstyleDataGridViewTextBoxColumn.MinimumWidth = 6; - hairstyleDataGridViewTextBoxColumn.Name = "hairstyleDataGridViewTextBoxColumn"; - hairstyleDataGridViewTextBoxColumn.ReadOnly = true; - hairstyleDataGridViewTextBoxColumn.Width = 45; - // - // pluginsDataGridViewTextBoxColumn - // - pluginsDataGridViewTextBoxColumn.DataPropertyName = "plugins"; - pluginsDataGridViewTextBoxColumn.HeaderText = "plugins"; - pluginsDataGridViewTextBoxColumn.MinimumWidth = 6; - pluginsDataGridViewTextBoxColumn.Name = "pluginsDataGridViewTextBoxColumn"; - pluginsDataGridViewTextBoxColumn.ReadOnly = true; - pluginsDataGridViewTextBoxColumn.Width = 45; - // - // assetsDataGridViewTextBoxColumn - // - assetsDataGridViewTextBoxColumn.DataPropertyName = "assets"; - assetsDataGridViewTextBoxColumn.HeaderText = "assets"; - assetsDataGridViewTextBoxColumn.MinimumWidth = 6; - assetsDataGridViewTextBoxColumn.Name = "assetsDataGridViewTextBoxColumn"; - assetsDataGridViewTextBoxColumn.ReadOnly = true; - assetsDataGridViewTextBoxColumn.Width = 45; - // - // morphs - // - morphs.DataPropertyName = "morphs"; - morphs.HeaderText = "morphs"; - morphs.MinimumWidth = 6; - morphs.Name = "morphs"; - morphs.ReadOnly = true; - morphs.Width = 45; - // - // pose - // - pose.DataPropertyName = "pose"; - pose.HeaderText = "pose"; - pose.MinimumWidth = 6; - pose.Name = "pose"; - pose.ReadOnly = true; - pose.Width = 45; - // - // skin - // - skin.DataPropertyName = "skin"; - skin.HeaderText = "skin"; - skin.MinimumWidth = 6; - skin.Name = "skin"; - skin.ReadOnly = true; - skin.Width = 45; - // - // disabledDataGridViewCheckBoxColumn - // - disabledDataGridViewCheckBoxColumn.DataPropertyName = "Disabled"; - disabledDataGridViewCheckBoxColumn.HeaderText = "Disabled"; - disabledDataGridViewCheckBoxColumn.MinimumWidth = 6; - disabledDataGridViewCheckBoxColumn.Name = "disabledDataGridViewCheckBoxColumn"; - disabledDataGridViewCheckBoxColumn.ReadOnly = true; - disabledDataGridViewCheckBoxColumn.Visible = false; - disabledDataGridViewCheckBoxColumn.Width = 68; - // - // varsViewBindingSource - // - varsViewBindingSource.DataMember = "varsView"; - // DataSource will be set in code using EF Core - // varsViewBindingSource.Sort = "metaDate Desc"; // Moved to Form1_Load to avoid .NET 9 initialization issues - // - // flowLayoutPanel2 - // - flowLayoutPanel2.AutoScroll = true; - flowLayoutPanel2.AutoSize = true; - flowLayoutPanel2.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flowLayoutPanel2.Controls.Add(buttonInstall); - flowLayoutPanel2.Controls.Add(buttonUninstallSels); - flowLayoutPanel2.Controls.Add(buttonDelete); - flowLayoutPanel2.Controls.Add(buttonMove); - flowLayoutPanel2.Controls.Add(buttonExpInsted); - flowLayoutPanel2.Controls.Add(buttonInstFormTxt); - flowLayoutPanel2.Controls.Add(buttonHub); - flowLayoutPanel2.Controls.Add(buttonClearLog); - flowLayoutPanel2.Dock = DockStyle.Bottom; - flowLayoutPanel2.ForeColor = SystemColors.ActiveCaptionText; - flowLayoutPanel2.Location = new Point(0, 504); - flowLayoutPanel2.Name = "flowLayoutPanel2"; - flowLayoutPanel2.Size = new Size(836, 48); - flowLayoutPanel2.TabIndex = 9; - // - // buttonInstall - // - buttonInstall.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonInstall.ForeColor = SystemColors.Highlight; - buttonInstall.Location = new Point(3, 3); - buttonInstall.Name = "buttonInstall"; - buttonInstall.Size = new Size(70, 42); - buttonInstall.TabIndex = 0; - buttonInstall.Text = "Install Selected"; - toolTip1.SetToolTip(buttonInstall, "Install Selected vars and Dependencies "); - buttonInstall.UseVisualStyleBackColor = true; - buttonInstall.Click += buttonInstall_Click; - // - // buttonUninstallSels - // - buttonUninstallSels.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonUninstallSels.ForeColor = Color.IndianRed; - buttonUninstallSels.Location = new Point(79, 3); - buttonUninstallSels.Name = "buttonUninstallSels"; - buttonUninstallSels.Size = new Size(70, 42); - buttonUninstallSels.TabIndex = 1; - buttonUninstallSels.Text = "UnInst Selected"; - toolTip1.SetToolTip(buttonUninstallSels, "Uninstall Selected vars and Dependent impact items"); - buttonUninstallSels.UseVisualStyleBackColor = true; - buttonUninstallSels.Click += buttonUninstallSels_Click; - // - // buttonDelete - // - buttonDelete.BackColor = Color.Red; - buttonDelete.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonDelete.ForeColor = Color.Yellow; - buttonDelete.Location = new Point(155, 3); - buttonDelete.Name = "buttonDelete"; - buttonDelete.Size = new Size(70, 42); - buttonDelete.TabIndex = 2; - buttonDelete.Text = "Delete Selected"; - toolTip1.SetToolTip(buttonDelete, "Delete Selected vars and Dependent impact items"); - buttonDelete.UseVisualStyleBackColor = false; - buttonDelete.Click += buttonDelete_Click; - // - // buttonMove - // - buttonMove.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonMove.Location = new Point(231, 3); - buttonMove.Name = "buttonMove"; - buttonMove.Size = new Size(70, 42); - buttonMove.TabIndex = 3; - buttonMove.Text = "Move SeleLinks To SubDir"; - buttonMove.UseVisualStyleBackColor = false; - buttonMove.Click += buttonMove_Click; - // - // buttonExpInsted - // - buttonExpInsted.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonExpInsted.Location = new Point(307, 3); - buttonExpInsted.Name = "buttonExpInsted"; - buttonExpInsted.Size = new Size(70, 42); - buttonExpInsted.TabIndex = 4; - buttonExpInsted.Text = "Export Insted"; - toolTip1.SetToolTip(buttonExpInsted, "Export Installed vars to text file."); - buttonExpInsted.UseVisualStyleBackColor = false; - buttonExpInsted.Click += buttonExpInsted_Click; - // - // buttonInstFormTxt - // - buttonInstFormTxt.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonInstFormTxt.Location = new Point(383, 3); - buttonInstFormTxt.Name = "buttonInstFormTxt"; - buttonInstFormTxt.Size = new Size(70, 42); - buttonInstFormTxt.TabIndex = 5; - buttonInstFormTxt.Text = "Install By TXT"; - toolTip1.SetToolTip(buttonInstFormTxt, "install vars from txt file."); - buttonInstFormTxt.UseVisualStyleBackColor = true; - buttonInstFormTxt.Click += buttonInstFormTxt_Click; - // - // buttonHub - // - buttonHub.BackColor = Color.DarkSlateGray; - buttonHub.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonHub.ForeColor = SystemColors.HighlightText; - buttonHub.Image = Properties.Resources.vam_logo_hub; - buttonHub.Location = new Point(459, 3); - buttonHub.Name = "buttonHub"; - buttonHub.Size = new Size(118, 42); - buttonHub.TabIndex = 5; - buttonHub.Text = "Brow"; - buttonHub.TextAlign = ContentAlignment.MiddleRight; - buttonHub.TextImageRelation = TextImageRelation.ImageBeforeText; - toolTip1.SetToolTip(buttonHub, "Hub browsing, combined with analysis of all the var files you have."); - buttonHub.UseVisualStyleBackColor = false; - buttonHub.Click += buttonHub_Click; - // - // buttonClearLog - // - buttonClearLog.Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - buttonClearLog.Location = new Point(583, 3); - buttonClearLog.Name = "buttonClearLog"; - buttonClearLog.Size = new Size(90, 42); - buttonClearLog.TabIndex = 6; - buttonClearLog.Text = "ClearLog"; - toolTip1.SetToolTip(buttonClearLog, "Clear the log list."); - buttonClearLog.UseVisualStyleBackColor = true; - buttonClearLog.Click += buttonClearLog_Click; - // - // flowLayoutPanel1 - // - flowLayoutPanel1.AutoScroll = true; - flowLayoutPanel1.AutoSize = true; - flowLayoutPanel1.Controls.Add(varsBindingNavigator); - flowLayoutPanel1.Controls.Add(label1); - flowLayoutPanel1.Controls.Add(comboBoxCreater); - flowLayoutPanel1.Controls.Add(label2); - flowLayoutPanel1.Controls.Add(textBoxFilter); - flowLayoutPanel1.Controls.Add(checkBoxInstalled); - flowLayoutPanel1.Controls.Add(buttonResetFilter); - flowLayoutPanel1.Dock = DockStyle.Top; - flowLayoutPanel1.Location = new Point(0, 0); - flowLayoutPanel1.Name = "flowLayoutPanel1"; - flowLayoutPanel1.Size = new Size(836, 70); - flowLayoutPanel1.TabIndex = 6; - // - // varsBindingNavigator - // - varsBindingNavigator.AddNewItem = null; - varsBindingNavigator.Anchor = AnchorStyles.Left; - varsBindingNavigator.BindingSource = varsViewBindingSource; - varsBindingNavigator.CountItem = bindingNavigatorCountItem; - varsBindingNavigator.DeleteItem = null; - varsBindingNavigator.Dock = DockStyle.None; - varsBindingNavigator.ImageScalingSize = new Size(20, 20); - varsBindingNavigator.Items.AddRange(new ToolStripItem[] { bindingNavigatorMoveFirstItem, bindingNavigatorMovePreviousItem, bindingNavigatorSeparator, bindingNavigatorPositionItem, bindingNavigatorCountItem, bindingNavigatorSeparator1, bindingNavigatorMoveNextItem, bindingNavigatorMoveLastItem, bindingNavigatorSeparator2 }); - varsBindingNavigator.Location = new Point(0, 3); - varsBindingNavigator.MoveFirstItem = bindingNavigatorMoveFirstItem; - varsBindingNavigator.MoveLastItem = bindingNavigatorMoveLastItem; - varsBindingNavigator.MoveNextItem = bindingNavigatorMoveNextItem; - varsBindingNavigator.MovePreviousItem = bindingNavigatorMovePreviousItem; - varsBindingNavigator.Name = "varsBindingNavigator"; - varsBindingNavigator.PositionItem = bindingNavigatorPositionItem; - varsBindingNavigator.Size = new Size(281, 29); - varsBindingNavigator.TabIndex = 0; - varsBindingNavigator.Text = "bindingNavigator1"; - // - // bindingNavigatorCountItem - // - bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; - bindingNavigatorCountItem.Size = new Size(55, 24); - bindingNavigatorCountItem.Text = "of {0}"; - bindingNavigatorCountItem.ToolTipText = "Total number"; - // - // bindingNavigatorMoveFirstItem - // - bindingNavigatorMoveFirstItem.DisplayStyle = ToolStripItemDisplayStyle.Image; - bindingNavigatorMoveFirstItem.Image = (Image)resources.GetObject("bindingNavigatorMoveFirstItem.Image"); - bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem"; - bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true; - bindingNavigatorMoveFirstItem.Size = new Size(34, 24); - bindingNavigatorMoveFirstItem.Text = "First"; - // - // bindingNavigatorMovePreviousItem - // - bindingNavigatorMovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image; - bindingNavigatorMovePreviousItem.Image = (Image)resources.GetObject("bindingNavigatorMovePreviousItem.Image"); - bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem"; - bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true; - bindingNavigatorMovePreviousItem.Size = new Size(34, 24); - bindingNavigatorMovePreviousItem.Text = "Previous"; - // - // bindingNavigatorSeparator - // - bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; - bindingNavigatorSeparator.Size = new Size(6, 29); - // - // bindingNavigatorPositionItem - // - bindingNavigatorPositionItem.AccessibleName = "浣嶇疆"; - bindingNavigatorPositionItem.AutoSize = false; - bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; - bindingNavigatorPositionItem.Size = new Size(50, 27); - bindingNavigatorPositionItem.Text = "0"; - bindingNavigatorPositionItem.ToolTipText = "Current"; - // - // bindingNavigatorSeparator1 - // - bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; - bindingNavigatorSeparator1.Size = new Size(6, 29); - // - // bindingNavigatorMoveNextItem - // - bindingNavigatorMoveNextItem.DisplayStyle = ToolStripItemDisplayStyle.Image; - bindingNavigatorMoveNextItem.Image = (Image)resources.GetObject("bindingNavigatorMoveNextItem.Image"); - bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem"; - bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true; - bindingNavigatorMoveNextItem.Size = new Size(34, 24); - bindingNavigatorMoveNextItem.Text = "Next"; - // - // bindingNavigatorMoveLastItem - // - bindingNavigatorMoveLastItem.DisplayStyle = ToolStripItemDisplayStyle.Image; - bindingNavigatorMoveLastItem.Image = (Image)resources.GetObject("bindingNavigatorMoveLastItem.Image"); - bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem"; - bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true; - bindingNavigatorMoveLastItem.Size = new Size(34, 24); - bindingNavigatorMoveLastItem.Text = "Last"; - // - // bindingNavigatorSeparator2 - // - bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; - bindingNavigatorSeparator2.Size = new Size(6, 29); - // - // label1 - // - label1.Anchor = AnchorStyles.Left; - label1.AutoSize = true; - label1.Location = new Point(284, 7); - label1.Name = "label1"; - label1.Size = new Size(73, 21); - label1.TabIndex = 1; - label1.Text = "Creator:"; - // - // comboBoxCreater - // - comboBoxCreater.AllowDrop = true; - comboBoxCreater.Anchor = AnchorStyles.Left; - comboBoxCreater.DropDownStyle = ComboBoxStyle.DropDownList; - comboBoxCreater.FormattingEnabled = true; - comboBoxCreater.Location = new Point(363, 3); - comboBoxCreater.Name = "comboBoxCreater"; - comboBoxCreater.Size = new Size(179, 29); - comboBoxCreater.Sorted = true; - comboBoxCreater.TabIndex = 2; - toolTip1.SetToolTip(comboBoxCreater, "Filter by creator"); - comboBoxCreater.SelectedIndexChanged += comboBoxCreater_SelectedIndexChanged; - // - // label2 - // - label2.Anchor = AnchorStyles.Left; - label2.AutoSize = true; - label2.Location = new Point(548, 7); - label2.Name = "label2"; - label2.Size = new Size(123, 21); - label2.TabIndex = 3; - label2.Text = "packageName:"; - // - // textBoxFilter - // - textBoxFilter.Anchor = AnchorStyles.Left; - textBoxFilter.Location = new Point(677, 3); - textBoxFilter.Name = "textBoxFilter"; - textBoxFilter.Size = new Size(75, 29); - textBoxFilter.TabIndex = 4; - toolTip1.SetToolTip(textBoxFilter, "Filter by packageName"); - textBoxFilter.TextChanged += textBoxFilter_TextChanged; - // - // checkBoxInstalled - // - checkBoxInstalled.Anchor = AnchorStyles.Left; - checkBoxInstalled.AutoSize = true; - checkBoxInstalled.Checked = true; - checkBoxInstalled.CheckState = CheckState.Indeterminate; - checkBoxInstalled.Location = new Point(3, 40); - checkBoxInstalled.Name = "checkBoxInstalled"; - checkBoxInstalled.Size = new Size(104, 25); - checkBoxInstalled.TabIndex = 5; - checkBoxInstalled.Text = "Installed"; - checkBoxInstalled.ThreeState = true; - toolTip1.SetToolTip(checkBoxInstalled, "Filter by installation status"); - checkBoxInstalled.UseVisualStyleBackColor = true; - checkBoxInstalled.CheckStateChanged += checkBoxInstalled_CheckStateChanged; - // - // buttonResetFilter - // - buttonResetFilter.Location = new Point(113, 38); - buttonResetFilter.Name = "buttonResetFilter"; - buttonResetFilter.Size = new Size(94, 29); - buttonResetFilter.TabIndex = 6; - buttonResetFilter.Text = "Reset"; - buttonResetFilter.UseVisualStyleBackColor = true; - buttonResetFilter.Click += buttonResetFilter_Click; - // - // tableLayoutPanelPreview - // - tableLayoutPanelPreview.Anchor = AnchorStyles.Left; - tableLayoutPanelPreview.CellBorderStyle = TableLayoutPanelCellBorderStyle.Inset; - tableLayoutPanelPreview.ColumnCount = 3; - tableLayoutPanelPreview.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 80F)); - tableLayoutPanelPreview.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); - tableLayoutPanelPreview.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 130F)); - tableLayoutPanelPreview.Controls.Add(pictureBoxPreview, 0, 0); - tableLayoutPanelPreview.Controls.Add(labelPreviewVarName, 1, 1); - tableLayoutPanelPreview.Controls.Add(buttonLocate, 0, 1); - tableLayoutPanelPreview.Controls.Add(panel3, 0, 2); - tableLayoutPanelPreview.Controls.Add(buttonpreviewinstall, 2, 1); - tableLayoutPanelPreview.Location = new Point(6, 62); - tableLayoutPanelPreview.Name = "tableLayoutPanelPreview"; - tableLayoutPanelPreview.RowCount = 3; - tableLayoutPanelPreview.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); - tableLayoutPanelPreview.RowStyles.Add(new RowStyle(SizeType.Absolute, 37F)); - tableLayoutPanelPreview.RowStyles.Add(new RowStyle(SizeType.Absolute, 85F)); - tableLayoutPanelPreview.Size = new Size(540, 238); - tableLayoutPanelPreview.TabIndex = 1; - tableLayoutPanelPreview.Visible = false; - // - // pictureBoxPreview - // - pictureBoxPreview.BackgroundImageLayout = ImageLayout.Stretch; - tableLayoutPanelPreview.SetColumnSpan(pictureBoxPreview, 3); - pictureBoxPreview.Dock = DockStyle.Fill; - pictureBoxPreview.Location = new Point(5, 5); - pictureBoxPreview.Name = "pictureBoxPreview"; - pictureBoxPreview.Size = new Size(530, 102); - pictureBoxPreview.SizeMode = PictureBoxSizeMode.Zoom; - pictureBoxPreview.TabIndex = 1; - pictureBoxPreview.TabStop = false; - pictureBoxPreview.Click += pictureBoxPreview_Click; - // - // labelPreviewVarName - // - labelPreviewVarName.Dock = DockStyle.Fill; - labelPreviewVarName.Font = new Font("Cambria", 10.5F, FontStyle.Regular, GraphicsUnit.Point); - labelPreviewVarName.ForeColor = SystemColors.ControlText; - labelPreviewVarName.Location = new Point(87, 112); - labelPreviewVarName.Name = "labelPreviewVarName"; - labelPreviewVarName.Size = new Size(316, 37); - labelPreviewVarName.TabIndex = 2; - labelPreviewVarName.Text = "a.a.1"; - labelPreviewVarName.TextAlign = ContentAlignment.MiddleCenter; - // - // buttonLocate - // - buttonLocate.Dock = DockStyle.Fill; - buttonLocate.ForeColor = SystemColors.ControlText; - buttonLocate.Location = new Point(5, 115); - buttonLocate.Name = "buttonLocate"; - buttonLocate.Size = new Size(74, 31); - buttonLocate.TabIndex = 0; - buttonLocate.Text = "Locate"; - toolTip1.SetToolTip(buttonLocate, "Locate the current var file in Explorer"); - buttonLocate.UseVisualStyleBackColor = true; - buttonLocate.Click += buttonLocate_Click; - // - // panel3 - // - tableLayoutPanelPreview.SetColumnSpan(panel3, 3); - panel3.Controls.Add(buttonLoad); - panel3.Controls.Add(checkBoxForMale); - panel3.Controls.Add(checkBoxIgnoreGender); - panel3.Controls.Add(groupBoxPersonOrder); - panel3.Controls.Add(checkBoxMerge); - panel3.Controls.Add(buttonClearCache); - panel3.Controls.Add(buttonAnalysis); - panel3.Dock = DockStyle.Fill; - panel3.ForeColor = SystemColors.ActiveCaption; - panel3.Location = new Point(5, 154); - panel3.Name = "panel3"; - panel3.Size = new Size(530, 79); - panel3.TabIndex = 0; - // - // buttonLoad - // - buttonLoad.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - buttonLoad.ForeColor = Color.SeaGreen; - buttonLoad.Location = new Point(438, 34); - buttonLoad.Name = "buttonLoad"; - buttonLoad.Size = new Size(83, 40); - buttonLoad.TabIndex = 0; - buttonLoad.Text = "Load"; - toolTip1.SetToolTip(buttonLoad, "Load to VAM,Add loadscene.cs as session plugin in VAM first."); - buttonLoad.UseVisualStyleBackColor = true; - buttonLoad.Click += buttonLoad_Click; - // - // checkBoxForMale - // - checkBoxForMale.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - checkBoxForMale.ForeColor = Color.SeaGreen; - checkBoxForMale.Location = new Point(358, 31); - checkBoxForMale.Name = "checkBoxForMale"; - checkBoxForMale.Size = new Size(118, 21); - checkBoxForMale.TabIndex = 15; - checkBoxForMale.Text = "For Male"; - toolTip1.SetToolTip(checkBoxForMale, "Load to male atom."); - checkBoxForMale.UseVisualStyleBackColor = true; - // - // checkBoxIgnoreGender - // - checkBoxIgnoreGender.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - checkBoxIgnoreGender.ForeColor = Color.SeaGreen; - checkBoxIgnoreGender.Location = new Point(358, 7); - checkBoxIgnoreGender.Name = "checkBoxIgnoreGender"; - checkBoxIgnoreGender.Size = new Size(118, 21); - checkBoxIgnoreGender.TabIndex = 14; - checkBoxIgnoreGender.Text = "Ignore gender"; - toolTip1.SetToolTip(checkBoxIgnoreGender, "futa are seen as female in this preset and VAM."); - checkBoxIgnoreGender.UseVisualStyleBackColor = true; - // - // groupBoxPersonOrder - // - groupBoxPersonOrder.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder6); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder8); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder7); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder5); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder4); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder3); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder2); - groupBoxPersonOrder.Controls.Add(radioButtonPersonOrder1); - groupBoxPersonOrder.ForeColor = Color.SeaGreen; - groupBoxPersonOrder.Location = new Point(200, 3); - groupBoxPersonOrder.Name = "groupBoxPersonOrder"; - groupBoxPersonOrder.Size = new Size(153, 72); - groupBoxPersonOrder.TabIndex = 13; - groupBoxPersonOrder.TabStop = false; - groupBoxPersonOrder.Text = "Person Order"; - toolTip1.SetToolTip(groupBoxPersonOrder, "Person atom order in VAM"); - // - // radioButtonPersonOrder6 - // - radioButtonPersonOrder6.AutoSize = true; - radioButtonPersonOrder6.Location = new Point(44, 45); - radioButtonPersonOrder6.Name = "radioButtonPersonOrder6"; - radioButtonPersonOrder6.Size = new Size(45, 25); - radioButtonPersonOrder6.TabIndex = 13; - radioButtonPersonOrder6.Text = "6"; - radioButtonPersonOrder6.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder8 - // - radioButtonPersonOrder8.AutoSize = true; - radioButtonPersonOrder8.Location = new Point(117, 45); - radioButtonPersonOrder8.Name = "radioButtonPersonOrder8"; - radioButtonPersonOrder8.Size = new Size(45, 25); - radioButtonPersonOrder8.TabIndex = 13; - radioButtonPersonOrder8.Text = "8"; - radioButtonPersonOrder8.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder7 - // - radioButtonPersonOrder7.AutoSize = true; - radioButtonPersonOrder7.Location = new Point(82, 45); - radioButtonPersonOrder7.Name = "radioButtonPersonOrder7"; - radioButtonPersonOrder7.Size = new Size(45, 25); - radioButtonPersonOrder7.TabIndex = 13; - radioButtonPersonOrder7.Text = "7"; - radioButtonPersonOrder7.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder5 - // - radioButtonPersonOrder5.AutoSize = true; - radioButtonPersonOrder5.Location = new Point(6, 45); - radioButtonPersonOrder5.Name = "radioButtonPersonOrder5"; - radioButtonPersonOrder5.Size = new Size(45, 25); - radioButtonPersonOrder5.TabIndex = 13; - radioButtonPersonOrder5.Text = "5"; - radioButtonPersonOrder5.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder4 - // - radioButtonPersonOrder4.AutoSize = true; - radioButtonPersonOrder4.Location = new Point(117, 20); - radioButtonPersonOrder4.Name = "radioButtonPersonOrder4"; - radioButtonPersonOrder4.Size = new Size(45, 25); - radioButtonPersonOrder4.TabIndex = 13; - radioButtonPersonOrder4.Text = "4"; - radioButtonPersonOrder4.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder3 - // - radioButtonPersonOrder3.AutoSize = true; - radioButtonPersonOrder3.Location = new Point(82, 20); - radioButtonPersonOrder3.Name = "radioButtonPersonOrder3"; - radioButtonPersonOrder3.Size = new Size(45, 25); - radioButtonPersonOrder3.TabIndex = 13; - radioButtonPersonOrder3.Text = "3"; - radioButtonPersonOrder3.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder2 - // - radioButtonPersonOrder2.AutoSize = true; - radioButtonPersonOrder2.Location = new Point(44, 20); - radioButtonPersonOrder2.Name = "radioButtonPersonOrder2"; - radioButtonPersonOrder2.Size = new Size(45, 25); - radioButtonPersonOrder2.TabIndex = 13; - radioButtonPersonOrder2.Text = "2"; - radioButtonPersonOrder2.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder1 - // - radioButtonPersonOrder1.AutoSize = true; - radioButtonPersonOrder1.Checked = true; - radioButtonPersonOrder1.Location = new Point(6, 20); - radioButtonPersonOrder1.Name = "radioButtonPersonOrder1"; - radioButtonPersonOrder1.Size = new Size(45, 25); - radioButtonPersonOrder1.TabIndex = 13; - radioButtonPersonOrder1.TabStop = true; - radioButtonPersonOrder1.Text = "1"; - radioButtonPersonOrder1.UseVisualStyleBackColor = true; - // - // checkBoxMerge - // - checkBoxMerge.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; - checkBoxMerge.ForeColor = Color.SeaGreen; - checkBoxMerge.Location = new Point(358, 55); - checkBoxMerge.Name = "checkBoxMerge"; - checkBoxMerge.Size = new Size(118, 21); - checkBoxMerge.TabIndex = 3; - checkBoxMerge.Text = "Merge"; - toolTip1.SetToolTip(checkBoxMerge, "Merge Load"); - checkBoxMerge.UseVisualStyleBackColor = true; - // - // buttonClearCache - // - buttonClearCache.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonClearCache.ForeColor = Color.Red; - buttonClearCache.Location = new Point(92, 34); - buttonClearCache.Name = "buttonClearCache"; - buttonClearCache.Size = new Size(102, 40); - buttonClearCache.TabIndex = 0; - buttonClearCache.Text = "Clear Cache"; - buttonClearCache.UseVisualStyleBackColor = true; - buttonClearCache.Click += buttonClearCache_Click; - // - // buttonAnalysis - // - buttonAnalysis.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; - buttonAnalysis.ForeColor = SystemColors.HotTrack; - buttonAnalysis.Location = new Point(3, 34); - buttonAnalysis.Name = "buttonAnalysis"; - buttonAnalysis.Size = new Size(83, 40); - buttonAnalysis.TabIndex = 0; - buttonAnalysis.Text = "Analysis"; - toolTip1.SetToolTip(buttonAnalysis, "Analyze the atoms in the scene and load to running VAM,Add loadscene.cs as session plugin in VAM first."); - buttonAnalysis.UseVisualStyleBackColor = true; - buttonAnalysis.Click += buttonAnalysis_Click; - // - // buttonpreviewinstall - // - buttonpreviewinstall.Dock = DockStyle.Fill; - buttonpreviewinstall.ForeColor = SystemColors.ControlText; - buttonpreviewinstall.Location = new Point(411, 115); - buttonpreviewinstall.Name = "buttonpreviewinstall"; - buttonpreviewinstall.Size = new Size(124, 31); - buttonpreviewinstall.TabIndex = 0; - buttonpreviewinstall.Text = "Install"; - toolTip1.SetToolTip(buttonpreviewinstall, "Install var and Dependencies "); - buttonpreviewinstall.UseVisualStyleBackColor = true; - buttonpreviewinstall.Click += buttonpreviewinstall_Click; - // - // listViewPreviewPics - // - listViewPreviewPics.Dock = DockStyle.Fill; - listViewPreviewPics.LargeImageList = imageListPreviewPics; - listViewPreviewPics.Location = new Point(0, 35); - listViewPreviewPics.MultiSelect = false; - listViewPreviewPics.Name = "listViewPreviewPics"; - listViewPreviewPics.Size = new Size(535, 517); - listViewPreviewPics.TabIndex = 0; - toolTip1.SetToolTip(listViewPreviewPics, "Preview of selected vars,click to display a larger image"); - listViewPreviewPics.UseCompatibleStateImageBehavior = false; - listViewPreviewPics.VirtualMode = true; - listViewPreviewPics.RetrieveVirtualItem += listViewPreviewPics_RetrieveVirtualItem; - listViewPreviewPics.Click += listViewPreviewPics_Click; - // - // imageListPreviewPics - // - imageListPreviewPics.ColorDepth = ColorDepth.Depth32Bit; - imageListPreviewPics.ImageSize = new Size(128, 128); - imageListPreviewPics.TransparentColor = Color.Transparent; - // - // flowLayoutPanel3 - // - flowLayoutPanel3.AutoScroll = true; - flowLayoutPanel3.AutoSize = true; - flowLayoutPanel3.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flowLayoutPanel3.Controls.Add(toolStripPreview); - flowLayoutPanel3.Controls.Add(label4); - flowLayoutPanel3.Controls.Add(comboBoxPreviewType); - flowLayoutPanel3.Controls.Add(checkBoxPreviewTypeLoadable); - flowLayoutPanel3.Dock = DockStyle.Top; - flowLayoutPanel3.Location = new Point(0, 0); - flowLayoutPanel3.Name = "flowLayoutPanel3"; - flowLayoutPanel3.Size = new Size(535, 35); - flowLayoutPanel3.TabIndex = 10; - // - // toolStripPreview - // - toolStripPreview.Dock = DockStyle.None; - toolStripPreview.ImageScalingSize = new Size(20, 20); - toolStripPreview.Items.AddRange(new ToolStripItem[] { toolStripButtonPreviewFirst, toolStripButtonPreviewPrev, toolStripLabelPreviewItemIndex, toolStripLabelPreviewCountItem, toolStripButtonPreviewNext, toolStripButtonPreviewLast }); - toolStripPreview.Location = new Point(0, 0); - toolStripPreview.Name = "toolStripPreview"; - toolStripPreview.Size = new Size(228, 29); - toolStripPreview.TabIndex = 0; - toolStripPreview.Text = "toolStrip1"; - // - // toolStripButtonPreviewFirst - // - toolStripButtonPreviewFirst.DisplayStyle = ToolStripItemDisplayStyle.Image; - toolStripButtonPreviewFirst.Image = (Image)resources.GetObject("toolStripButtonPreviewFirst.Image"); - toolStripButtonPreviewFirst.Name = "toolStripButtonPreviewFirst"; - toolStripButtonPreviewFirst.RightToLeftAutoMirrorImage = true; - toolStripButtonPreviewFirst.Size = new Size(34, 24); - toolStripButtonPreviewFirst.Text = "First"; - toolStripButtonPreviewFirst.Click += toolStripButtonPreviewFirst_Click; - // - // toolStripButtonPreviewPrev - // - toolStripButtonPreviewPrev.DisplayStyle = ToolStripItemDisplayStyle.Image; - toolStripButtonPreviewPrev.Image = (Image)resources.GetObject("toolStripButtonPreviewPrev.Image"); - toolStripButtonPreviewPrev.Name = "toolStripButtonPreviewPrev"; - toolStripButtonPreviewPrev.RightToLeftAutoMirrorImage = true; - toolStripButtonPreviewPrev.Size = new Size(34, 24); - toolStripButtonPreviewPrev.Text = "Move to previous"; - toolStripButtonPreviewPrev.Click += toolStripButtonPreviewPrev_Click; - // - // toolStripLabelPreviewItemIndex - // - toolStripLabelPreviewItemIndex.Name = "toolStripLabelPreviewItemIndex"; - toolStripLabelPreviewItemIndex.Size = new Size(33, 24); - toolStripLabelPreviewItemIndex.Text = "{0}"; - // - // toolStripLabelPreviewCountItem - // - toolStripLabelPreviewCountItem.Name = "toolStripLabelPreviewCountItem"; - toolStripLabelPreviewCountItem.Size = new Size(41, 24); - toolStripLabelPreviewCountItem.Text = "/{0}"; - // - // toolStripButtonPreviewNext - // - toolStripButtonPreviewNext.DisplayStyle = ToolStripItemDisplayStyle.Image; - toolStripButtonPreviewNext.Image = (Image)resources.GetObject("toolStripButtonPreviewNext.Image"); - toolStripButtonPreviewNext.Name = "toolStripButtonPreviewNext"; - toolStripButtonPreviewNext.RightToLeftAutoMirrorImage = true; - toolStripButtonPreviewNext.Size = new Size(34, 24); - toolStripButtonPreviewNext.Text = "Next"; - toolStripButtonPreviewNext.Click += toolStripButtonPreviewNext_Click; - // - // toolStripButtonPreviewLast - // - toolStripButtonPreviewLast.DisplayStyle = ToolStripItemDisplayStyle.Image; - toolStripButtonPreviewLast.Image = (Image)resources.GetObject("toolStripButtonPreviewLast.Image"); - toolStripButtonPreviewLast.Name = "toolStripButtonPreviewLast"; - toolStripButtonPreviewLast.RightToLeftAutoMirrorImage = true; - toolStripButtonPreviewLast.Size = new Size(34, 24); - toolStripButtonPreviewLast.Text = "Last"; - toolStripButtonPreviewLast.Click += toolStripButtonPreviewLast_Click; - // - // label4 - // - label4.Anchor = AnchorStyles.Left; - label4.AutoSize = true; - label4.Location = new Point(231, 7); - label4.Name = "label4"; - label4.Size = new Size(117, 21); - label4.TabIndex = 1; - label4.Text = "PreviewType:"; - label4.TextAlign = ContentAlignment.MiddleCenter; - // - // comboBoxPreviewType - // - comboBoxPreviewType.Anchor = AnchorStyles.Left; - comboBoxPreviewType.DropDownStyle = ComboBoxStyle.DropDownList; - comboBoxPreviewType.FormattingEnabled = true; - comboBoxPreviewType.Items.AddRange(new object[] { "_All", "scenes", "looks", "clothing", "hairstyle", "assets", "morphs", "pose", "skin" }); - comboBoxPreviewType.Location = new Point(354, 3); - comboBoxPreviewType.Name = "comboBoxPreviewType"; - comboBoxPreviewType.Size = new Size(59, 29); - comboBoxPreviewType.TabIndex = 2; - comboBoxPreviewType.SelectedIndexChanged += toolStripComboBoxPreviewType_SelectedIndexChanged; - // - // checkBoxPreviewTypeLoadable - // - checkBoxPreviewTypeLoadable.Anchor = AnchorStyles.Left; - checkBoxPreviewTypeLoadable.AutoSize = true; - checkBoxPreviewTypeLoadable.Checked = true; - checkBoxPreviewTypeLoadable.CheckState = CheckState.Checked; - checkBoxPreviewTypeLoadable.Location = new Point(419, 5); - checkBoxPreviewTypeLoadable.Name = "checkBoxPreviewTypeLoadable"; - checkBoxPreviewTypeLoadable.Size = new Size(108, 25); - checkBoxPreviewTypeLoadable.TabIndex = 3; - checkBoxPreviewTypeLoadable.Text = "Loadable"; - toolTip1.SetToolTip(checkBoxPreviewTypeLoadable, "Filter Loadabled Scene,Looks etc"); - checkBoxPreviewTypeLoadable.UseVisualStyleBackColor = true; - checkBoxPreviewTypeLoadable.CheckedChanged += checkBoxPreviewTypeLoadable_CheckedChanged; - // - // backgroundWorkerInstall - // - backgroundWorkerInstall.WorkerReportsProgress = true; - backgroundWorkerInstall.DoWork += backgroundWorkerInstall_DoWork; - backgroundWorkerInstall.RunWorkerCompleted += backgroundWorkerInstall_RunWorkerCompleted; - // - // backgroundWorkerPreview - // - backgroundWorkerPreview.WorkerReportsProgress = true; - backgroundWorkerPreview.WorkerSupportsCancellation = true; - // - // openFileDialogInstByTXT - // - openFileDialogInstByTXT.DefaultExt = "txt"; - openFileDialogInstByTXT.FileName = "installedvars"; - openFileDialogInstByTXT.Filter = "text file|*.txt"; - // - // saveFileDialogExportInstalled - // - saveFileDialogExportInstalled.DefaultExt = "txt"; - saveFileDialogExportInstalled.FileName = "installedvars"; - saveFileDialogExportInstalled.Filter = "text file|*.txt"; - // - // varsBindingSource - // - varsBindingSource.DataMember = "vars"; - // DataSource will be set in code using EF Core - // - // dependenciesBindingSource - // - dependenciesBindingSource.DataMember = "dependencies"; - // DataSource will be set in code using EF Core - // - // installStatusBindingSource - // - installStatusBindingSource.DataMember = "installStatus"; - // DataSource will be set in code using EF Core - // - // scenesBindingSource - // - scenesBindingSource.DataMember = "scenes"; - // DataSource will be set in code using EF Core - // - // Form1 - // - AutoScaleDimensions = new SizeF(10F, 21F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(1540, 829); - Controls.Add(tableLayoutPanel1); - Font = new Font("Cambria", 9F, FontStyle.Regular, GraphicsUnit.Point); - Icon = (Icon)resources.GetObject("$this.Icon"); - Name = "Form1"; - Text = "Var Manager"; - WindowState = FormWindowState.Maximized; - Load += Form1_Load; - tableLayoutPanel1.ResumeLayout(false); - panel1.ResumeLayout(false); - groupBoxSwitch.ResumeLayout(false); - groupBox1.ResumeLayout(false); - contextMenuStripPrepareSave.ResumeLayout(false); - tableLayoutPanel2.ResumeLayout(false); - tableLayoutPanel2.PerformLayout(); - splitContainer1.Panel1.ResumeLayout(false); - splitContainer1.Panel1.PerformLayout(); - splitContainer1.Panel2.ResumeLayout(false); - splitContainer1.Panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)splitContainer1).EndInit(); - splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)varsViewDataGridView).EndInit(); - ((System.ComponentModel.ISupportInitialize)varsViewBindingSource).EndInit(); - flowLayoutPanel2.ResumeLayout(false); - flowLayoutPanel1.ResumeLayout(false); - flowLayoutPanel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)varsBindingNavigator).EndInit(); - varsBindingNavigator.ResumeLayout(false); - varsBindingNavigator.PerformLayout(); - tableLayoutPanelPreview.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)pictureBoxPreview).EndInit(); - panel3.ResumeLayout(false); - groupBoxPersonOrder.ResumeLayout(false); - groupBoxPersonOrder.PerformLayout(); - flowLayoutPanel3.ResumeLayout(false); - flowLayoutPanel3.PerformLayout(); - toolStripPreview.ResumeLayout(false); - toolStripPreview.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)varsBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)dependenciesBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)installStatusBindingSource).EndInit(); - ((System.ComponentModel.ISupportInitialize)scenesBindingSource).EndInit(); - ResumeLayout(false); - } - - #endregion - - private System.Windows.Forms.Button buttonSetting; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.ListBox listBoxLog; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button buttonUpdDB; - private System.Windows.Forms.Button buttonStartVam; - private System.Windows.Forms.Button buttonFixRebuildLink; - private System.ComponentModel.BackgroundWorker backgroundWorkerInstall; - private System.Windows.Forms.ComboBox comboBoxCreater; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.ListView listViewPreviewPics; - private System.Windows.Forms.ImageList imageListPreviewPics; - private System.Windows.Forms.Button buttonStaleVars; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.BindingNavigator varsBindingNavigator; - private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; - private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator; - private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem; - private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; - private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox textBoxFilter; - private System.Windows.Forms.BindingSource dependenciesBindingSource; - - private System.Windows.Forms.CheckBox checkBoxInstalled; - private System.Windows.Forms.Button buttonInstall; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanelPreview; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Button buttonpreviewinstall; - private System.Windows.Forms.PictureBox pictureBoxPreview; - private System.Windows.Forms.ToolStrip toolStripPreview; - private System.Windows.Forms.Button buttonScenesManager; - private System.Windows.Forms.BindingSource scenesBindingSource; - private System.Windows.Forms.ToolStripLabel toolStripLabelPreviewCountItem; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.ToolTip toolTip1; - private System.Windows.Forms.Button buttonFixSavesDepend; - private System.Windows.Forms.Button buttonUninstallSels; - private System.ComponentModel.BackgroundWorker backgroundWorkerPreview; - private System.Windows.Forms.Button buttonDelete; - private System.Windows.Forms.Button buttonMissingDepends; - private System.Windows.Forms.DataGridView varsViewDataGridView; - private System.Windows.Forms.BindingSource varsViewBindingSource; - private System.Windows.Forms.Button buttonMove; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogMove; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; - private System.Windows.Forms.Button buttonExpInsted; - private System.Windows.Forms.Button buttonInstFormTxt; - private System.Windows.Forms.OpenFileDialog openFileDialogInstByTXT; - private System.Windows.Forms.SaveFileDialog saveFileDialogExportInstalled; - private System.Windows.Forms.GroupBox groupBoxSwitch; - private System.Windows.Forms.ComboBox comboBoxPacksSwitch; - private System.Windows.Forms.Button buttonPacksDelete; - private System.Windows.Forms.Button buttonPacksAdd; - private System.Windows.Forms.Button buttonPacksRename; - private System.Windows.Forms.Button buttonLoad; - private System.Windows.Forms.CheckBox checkBoxMerge; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewFirst; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.ComboBox comboBoxPreviewType; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewPrev; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewNext; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewLast; - private System.Windows.Forms.CheckBox checkBoxPreviewTypeLoadable; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private System.Windows.Forms.ProgressBar progressBar1; - private System.Windows.Forms.Label labelProgress; - private System.Windows.Forms.Button buttonLocate; - private System.Windows.Forms.ToolStripLabel toolStripLabelPreviewItemIndex; - private System.Windows.Forms.Button buttonAnalysis; - private System.Windows.Forms.Button buttonResetFilter; - private System.Windows.Forms.Button buttonFixPreview; - private System.Windows.Forms.Button buttonAllMissingDepends; - private System.Windows.Forms.Button buttonHub; - private System.Windows.Forms.Button buttonClearLog; - private System.Windows.Forms.DataGridViewButtonColumn ColumnDetail; - private System.Windows.Forms.DataGridViewTextBoxColumn fsize; - private System.Windows.Forms.DataGridViewTextBoxColumn morphs; - private System.Windows.Forms.DataGridViewTextBoxColumn pose; - private System.Windows.Forms.DataGridViewTextBoxColumn skin; - private System.Windows.Forms.CheckBox checkBoxIgnoreGender; - private System.Windows.Forms.GroupBox groupBoxPersonOrder; - private System.Windows.Forms.RadioButton radioButtonPersonOrder6; - private System.Windows.Forms.RadioButton radioButtonPersonOrder8; - private System.Windows.Forms.RadioButton radioButtonPersonOrder7; - private System.Windows.Forms.RadioButton radioButtonPersonOrder5; - private System.Windows.Forms.RadioButton radioButtonPersonOrder4; - private System.Windows.Forms.RadioButton radioButtonPersonOrder3; - private System.Windows.Forms.RadioButton radioButtonPersonOrder2; - private System.Windows.Forms.RadioButton radioButtonPersonOrder1; - private System.Windows.Forms.Label labelPreviewVarName; - private System.Windows.Forms.CheckBox checkBoxForMale; - private System.Windows.Forms.ContextMenuStrip contextMenuStripPrepareSave; - private System.Windows.Forms.ToolStripMenuItem prepareFormSavesToolStripMenuItem; - private System.Windows.Forms.Button buttonFilteredMissingDepends; - private System.Windows.Forms.DataGridViewTextBoxColumn varNamedataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewCheckBoxColumn installedDataGridViewCheckBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn varPathDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn creatorNameDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn packageNameDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn versionDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn metaDateDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn varDateDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn scenesDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn looksDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn clothingDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn hairstyleDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn pluginsDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn assetsDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewCheckBoxColumn disabledDataGridViewCheckBoxColumn; - private System.Windows.Forms.Button buttonClearCache; - private System.Windows.Forms.BindingSource varsBindingSource; - private System.Windows.Forms.BindingSource installStatusBindingSource; - } -} - diff --git a/_archived/varManager/Form1.cs b/_archived/varManager/Form1.cs deleted file mode 100644 index 8afe77e..0000000 --- a/_archived/varManager/Form1.cs +++ /dev/null @@ -1,4008 +0,0 @@ -锘縰sing DgvFilterPopup; -using ICSharpCode.SharpZipLib.Zip; -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.IO; -//using System.IO.Compression; -using System.Linq; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using varManager.Backend; -using varManager.Data; -using varManager.Models; -using varManager.Properties; -using SimpleJSON; -using static SimpleLogger; - -namespace varManager -{ - public partial class Form1 : Form - { - private record PreviewUninstallResult(List var_list, List requested, List implicated); - - private static readonly byte[] s_creatorNameUtf8 = Encoding.UTF8.GetBytes("creatorName"); - //private static ReadOnlySpan Utf8Bom => new byte[] { 0xEF, 0xBB, 0xBF }; - private static SimpleLogger simpLog = new SimpleLogger(); - private static string tidiedDirName = "___VarTidied___"; - private static string redundantDirName = "___VarRedundant___"; - private static string notComplyRuleDirName = "___VarnotComplyRule___"; - private static string previewpicsDirName = "___PreviewPics___"; - private static string staleVarsDirName = "___StaleVars___"; - private static string oldVersionVarsDirName = "___OldVersionVars___"; - private static string deleVarsDirName = "___DeletedVars___"; - - private static string addonPacksSwitch = "___AddonPacksSwitch ___"; - - private static string installLinkDirName = "___VarsLink___"; - private static string missingVarLinkDirName = "___MissingVarLink___"; - private static string tempVarLinkDirName = "___TempVarLink___"; - private InvokeAddLoglist addlog; - private readonly CancellationTokenSource backendCts = new CancellationTokenSource(); - private readonly ThreadLocal _dbContext = - new ThreadLocal(() => new VarManagerContext(), true); - private VarManagerContext dbContext => _dbContext.Value!; - public Form1() - { - InitializeComponent(); - addlog = new InvokeAddLoglist(UpdateAddLoglist); - } - - private void buttonSetting_Click(object sender, EventArgs e) - { - OpenSetting(); - } - - private static void OpenSetting() - { - using FormSettings formSettings = new FormSettings(); - formSettings.ShowDialog(); - } - - public static bool ComplyVarFile(string varfile) - { - string varfilename = Path.GetFileNameWithoutExtension(varfile); - return ComplyVarName(varfilename); - } - - public static bool ComplyVarName(string varname) - { - string[] varnamepart = varname.Split('.'); - - if (varnamepart.Length == 3) - { - //int version = 0; - if (Regex.IsMatch(varnamepart[2], "^[0-9]+$")) - //if (int.TryParse(varnamepart[2], out version)) - { - return true; - } - } - return false; - } - - private List varsForInstall = new List(); - private void TidyVars() - { - List vars = GetVarspathVars(); - List varsUsed = GetAddonpackagesVars(); - varsForInstall.Clear(); - if (File.Exists("varsForInstall.txt")) - varsForInstall.AddRange(File.ReadAllLines("varsForInstall.txt")); - foreach (var varins in varsUsed) - { - if (ComplyVarFile(varins)) - varsForInstall.Add(Path.GetFileNameWithoutExtension(varins)); - } - File.Delete("varsForInstall.txt"); - varsForInstall = varsForInstall.Distinct().ToList(); - File.WriteAllLines("varsForInstall.txt", varsForInstall); - - vars.AddRange(varsUsed); - - TidyVars(vars); - // System.Diagnostics.Process.Start(tidypath); - } - - - private void TidyVars(List vars) - { - string tidypath = Path.Combine(Settings.Default.varspath, tidiedDirName); - if (!Directory.Exists(tidypath)) - Directory.CreateDirectory(tidypath); - string redundantpath = Path.Combine(Settings.Default.varspath, redundantDirName); - if (!Directory.Exists(redundantpath)) - Directory.CreateDirectory(redundantpath); - string notComplRulepath = Path.Combine(Settings.Default.varspath, notComplyRuleDirName); - if (!Directory.Exists(notComplRulepath)) - Directory.CreateDirectory(notComplRulepath); - InvokeProgress mi = new InvokeProgress(UpdateProgress); - this.BeginInvoke(addlog, new Object[] { "Tidy Vars...", LogLevel.INFO }); - int curVarfile = 0; - foreach (string varfile in vars) - { - if (!File.Exists(varfile)) - { - this.BeginInvoke(mi, new Object[] { curVarfile, vars.Count() }); - curVarfile++; - continue; - } - if (ComplyVarFile(varfile)) - { - FileInfo pathInfo = new FileInfo(varfile); - string varfilename = Path.GetFileNameWithoutExtension(varfile); - //if (pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - //{ - //string errlog = $"{varfile} is a symlink,Please check and process it appropriately"; - //this.BeginInvoke(addlog, new Object[] { errlog,LogLevel.ERROR }); - //varsForInstall.Remove(varfilename); - //continue; - //} - - string[] varnamepart = varfilename.Split('.'); - string createrpath = Path.Combine(tidypath, varnamepart[0]); - if (!Directory.Exists(createrpath)) - Directory.CreateDirectory(createrpath); - string destvarfilename = Path.Combine(createrpath, Path.GetFileName(varfile)); - if (File.Exists(destvarfilename)) - { - string errlog = $"{varfile} has same filename in tidy directory,moved into the {redundantDirName} directory"; - this.BeginInvoke(addlog, new Object[] { errlog ,LogLevel.WARNING}); - string redundantfilename = Path.Combine(redundantpath, Path.GetFileName(varfile)); - - int count = 1; - - string fileNameOnly = Path.GetFileNameWithoutExtension(redundantfilename); - string extension = Path.GetExtension(redundantfilename); - string path = Path.GetDirectoryName(redundantfilename); - - while (File.Exists(redundantfilename)) - { - string tempFileName = string.Format("{0}({1})", fileNameOnly, count++); - redundantfilename = Path.Combine(path, tempFileName + extension); - } - - try - { - File.Move(varfile, redundantfilename); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"move {varfile} failed, {ex.Message}", LogLevel.ERROR }); - } - } - else - { - try - { - File.Move(varfile, destvarfilename); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"move {varfile} failed, {ex.Message}" ,LogLevel.ERROR }); - } - //OpenAsZip(destvarfilename); - } - } - else - { - string errlog = $"{varfile} not comply Var filename rule, move into {notComplyRuleDirName} directory"; - this.BeginInvoke(addlog, new Object[] { errlog, LogLevel.ERROR }); - string notComplRulefilename = Path.Combine(notComplRulepath, Path.GetFileName(varfile)); - - int count = 1; - - string fileNameOnly = Path.GetFileNameWithoutExtension(notComplRulefilename); - string extension = Path.GetExtension(notComplRulefilename); - string path = Path.GetDirectoryName(notComplRulefilename); - - while (File.Exists(notComplRulefilename)) - { - string tempFileName = string.Format("{0}({1})", fileNameOnly, count++); - notComplRulefilename = Path.Combine(path, tempFileName + extension); - } - try - { - File.Move(varfile, notComplRulefilename); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"move {varfile} failed, {ex.Message}", LogLevel.ERROR }); - } - } - this.BeginInvoke(mi, new Object[] { curVarfile, vars.Count() }); - curVarfile++; - } - } - - private static List GetVarspathVars() - { - List varspathVars = new List(); - foreach (var varins in Directory.GetFiles(Settings.Default.varspath, "*.var", SearchOption.AllDirectories) - .Where(q => q.IndexOf(tidiedDirName) == -1 - && q.IndexOf(redundantDirName) == -1 - && q.IndexOf(notComplyRuleDirName) == -1 - && q.IndexOf(staleVarsDirName) == -1 - && q.IndexOf(oldVersionVarsDirName) == -1 - && q.IndexOf(deleVarsDirName) == -1)) - { - FileInfo pathInfo = new FileInfo(varins); - if (!pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - varspathVars.Add(varins); - } - } - return varspathVars; - } - - private static bool ExistAddonpackagesVar() - { - string installlinkdir = Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName); - - bool exist = false; - foreach (var varins in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages"), "*.var", SearchOption.AllDirectories) - .Where(q => q.IndexOf(installlinkdir) == -1 && q.IndexOf(missingVarLinkDirName) == -1 && q.IndexOf(tempVarLinkDirName) == -1)) - { - FileInfo pathInfo = new FileInfo(varins); - if (!pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - exist = true; - break; - } - } - return exist; - } - - private static List GetAddonpackagesVars() - { - string installlinkdir = Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName); - - List varsUsed = new List(); - foreach (var varins in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages"), "*.var", SearchOption.AllDirectories) - .Where(q => q.IndexOf(installlinkdir) == -1 && q.IndexOf(missingVarLinkDirName) == -1 && q.IndexOf(tempVarLinkDirName) == -1)) - { - FileInfo pathInfo = new FileInfo(varins); - if (!pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - varsUsed.Add(varins); - } - } - return varsUsed; - } - - private List Getdependencies(string jsonstring) - { - string dependencies = ""; - List dependenciesList = new List(); - try - { - //JsonDocument jsondoc = JsonDocument.Parse(jsonstring); - // dependencies = jsondoc.RootElement.GetProperty("dependencies").GetRawText().ToString(); - dependencies = jsonstring; - Regex regexObj = new Regex(@"\x22(([^\r\n\x22\x3A\x2E]{1,60})\x2E([^\r\n\x22\x3A\x2E]{1,80})\x2E(\d+|latest))(\x22?\s*)\x3A", RegexOptions.IgnoreCase | RegexOptions.Singleline); - Match matchResults = regexObj.Match(dependencies); - while (matchResults.Success) - { - Group groupObj = matchResults.Groups[1]; - if (groupObj.Success) - { - string depstr = groupObj.Value; - if (depstr.IndexOf('/') > 0) - depstr = depstr.Substring(depstr.IndexOf('/') + 1); - dependenciesList.Add(depstr); - // match start: groupObj.Index - // match length: groupObj.Length - } - - matchResults = matchResults.NextMatch(); - } - dependenciesList = dependenciesList.Distinct().ToList(); - } - catch - { - throw; - } - return dependenciesList; - } - - private bool Varislatest(string varname) - { - var parts = varname.Split('.'); - if (parts.Length != 3) return true; - if (!int.TryParse(parts[2], out var version)) return true; - - var versions = dbContext.Vars - .Where(q => q.CreatorName == parts[0] && q.PackageName == parts[1]) - .Select(q => q.Version) - .ToList() - .Where(v => int.TryParse(v, out _)) - .Select(v => int.Parse(v)); - - if (!versions.Any()) return true; - - return version >= versions.Max(); - } - private int VarCountVersion(string varname) - { - int countversion = 0; - string[] varnamepart = varname.Split('.'); - if (varnamepart.Length == 3) - { - countversion = dbContext.Vars.Where(q => q.CreatorName == varnamepart[0] && q.PackageName == varnamepart[1]).Count(); - - } - return countversion; - } - - private List ImplicatedVar(string varname) - { - List varnames = new List(); - if (VarCountVersion(varname) <= 1) - { - if (Varislatest(varname)) - { - string latest = varname.Substring(0, varname.LastIndexOf('.')) + ".latest"; - foreach (var row in dbContext.Dependencies.Where(q => q.DependencyName == varname || q.DependencyName == latest)) - { - varnames.Add(row.VarName!); - } - } - else - { - foreach (var row in dbContext.Dependencies.Where(q => q.DependencyName == varname)) - { - varnames.Add(row.VarName!); - } - } - } - return varnames; - } - - private List DependentVars(string varname) - { - List varnames = new List(); - - if (Varislatest(varname)) - { - string latest = varname.Substring(0, varname.LastIndexOf('.')) + ".latest"; - foreach (var row in dbContext.Dependencies.Where(q => q.DependencyName == varname || q.DependencyName == latest)) - { - varnames.Add(row.VarName!); - } - } - else - { - foreach (var row in dbContext.Dependencies.Where(q => q.DependencyName == varname)) - { - varnames.Add(row.VarName!); - } - } - - return varnames; - } - private List DependentSaved(string varname) - { - List saveds = new List(); - - if (Varislatest(varname)) - { - string latest = varname.Substring(0, varname.LastIndexOf('.')) + ".latest"; - var savedDepsLatest = dbContext.SavedDependencies - .Where(q => q.DependencyName == latest) - .ToList(); - foreach (var row in savedDepsLatest) - { - saveds.Add(row.VarName!); - } - } - - var savedDeps = dbContext.SavedDependencies - .Where(q => q.DependencyName == varname) - .ToList(); - foreach (var row in savedDeps) - { - saveds.Add(row.VarName!); - } - saveds = saveds.Distinct().ToList(); - return saveds; - } - private List ImplicatedVars(List varnames) - { - List varnameexist = new List(); - List varsProccessed = new List(); - List varimplics = new List(); - foreach (string varname in varnames) - { - if (varname[varname.Length - 1] == '^') - varsProccessed.Add(varname.Substring(0, varname.Length - 1)); - else - varnameexist.Add(varname); - } - - foreach (string varname in varnameexist) - { - varimplics.AddRange(ImplicatedVar(varname)); - } - varsProccessed.AddRange(varnameexist); - varimplics = varimplics.Distinct().Except(varsProccessed).ToList(); - if (varimplics.Count() > 0) - { - foreach (string varname in varsProccessed) - { - varimplics.Add(varname + "^"); - } - return ImplicatedVars(varimplics); - } - else - { - varsProccessed = varsProccessed.Select(q => q.Trim('^')).Distinct().ToList(); - return varsProccessed; - } - } - - private void DelePreviewPics(string varname) - { - string[] typenames = { "scenes", "looks", "hairstyle", "clothing", "assets","morphs","skin","pose"}; - foreach (string typename in typenames) - { - string typepath = Path.Combine(Settings.Default.varspath, previewpicsDirName, typename, varname); - if (Directory.Exists(typepath)) - { - try - { - Directory.Delete(typepath, true); - } - catch - { - throw; - } - } - } - } - - private void UnintallVars(List varnames) - { - //FillInstalledDependencies(); - List varimplics = ImplicatedVars(varnames); - - FormUninstallVars formUninstallVars = new FormUninstallVars(); - formUninstallVars.previewpicsDirName = previewpicsDirName; - foreach (string varname in varimplics) - { - foreach (var row in dbContext.VarsView.Where(q => q.VarName == varname && q.Installed)) - { - // Convert to appropriate format for the uninstall form - // This will need to be adapted based on FormUninstallVars requirements - } - } - if (formUninstallVars.ShowDialog() == DialogResult.OK) - { - var installedvars = GetInstalledVars(); - foreach (string varname in varimplics) - { - string linkvar; - if (installedvars.TryGetValue(varname, out linkvar)) - if (File.Exists(linkvar)) - { - File.Delete(linkvar); - this.BeginInvoke(addlog, new Object[] { $"{varname} is uninstalled.", LogLevel.INFO }); - - } - } - } - } - public string getVarFilePath(string varname) - { - string varfilepath = ""; - var varRow = dbContext.Vars.FirstOrDefault(v => v.VarName == varname); - if (varRow != null) - { - varfilepath = Path.Combine(Settings.Default.varspath, varRow.VarPath!, varRow.VarName + ".var"); - } - return varfilepath; - } - - private void DeleteVars(List varnames) - { - // FillInstalledDependencies(); - List varimplics = ImplicatedVars(varnames); - - FormUninstallVars formUninstallVars = new FormUninstallVars(); - formUninstallVars.operationType = "delete"; - formUninstallVars.deleVarsDirName = deleVarsDirName; - formUninstallVars.previewpicsDirName = previewpicsDirName; - foreach (string varname in varimplics) - { - foreach (var row in dbContext.VarsView.Where(q => q.VarName == varname)) - { - // Convert to appropriate format for the uninstall form - // This will need to be adapted based on FormUninstallVars requirements - } - } - if (formUninstallVars.ShowDialog() == DialogResult.OK) - { - string delevarspath = Path.Combine(Settings.Default.varspath, deleVarsDirName); - if (!Directory.Exists(delevarspath)) - Directory.CreateDirectory(delevarspath); - - var installedvars = GetInstalledVars(); - foreach (string varname in varimplics) - { - string linkvar; - if (installedvars.TryGetValue(varname, out linkvar)) - if (File.Exists(linkvar)) - File.Delete(linkvar); - - var row = dbContext.Vars.FirstOrDefault(v => v.VarName == varname); - if (row == null) - { - this.BeginInvoke(addlog, new Object[] { $"{varname} record not found, skip delete.", LogLevel.WARNING }); - continue; - } - string operav = Path.Combine(Settings.Default.varspath, row.VarPath!, varname + ".var"); - string deletedv = Path.Combine(delevarspath, varname + ".var"); - try - { - File.Move(operav, deletedv); - CleanVar(varname); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"{operav} move failed,{ex.Message}", LogLevel.ERROR }); - } - } - } - - } - private DataTable CreateVarsViewDataTable() - { - var dataTable = new DataTable("varsView"); - - // Add columns matching the VarsView entity properties - dataTable.Columns.Add("varName", typeof(string)); - dataTable.Columns.Add("Installed", typeof(bool)); - dataTable.Columns.Add("Fsize", typeof(double)); - dataTable.Columns.Add("varPath", typeof(string)); - dataTable.Columns.Add("creatorName", typeof(string)); - dataTable.Columns.Add("packageName", typeof(string)); - dataTable.Columns.Add("version", typeof(string)); - dataTable.Columns.Add("metaDate", typeof(DateTime)); - dataTable.Columns.Add("varDate", typeof(DateTime)); - dataTable.Columns.Add("scenes", typeof(int)); - dataTable.Columns.Add("looks", typeof(int)); - dataTable.Columns.Add("clothing", typeof(int)); - dataTable.Columns.Add("hairstyle", typeof(int)); - dataTable.Columns.Add("plugins", typeof(int)); - dataTable.Columns.Add("assets", typeof(int)); - dataTable.Columns.Add("morphs", typeof(int)); - dataTable.Columns.Add("pose", typeof(int)); - dataTable.Columns.Add("skin", typeof(int)); - dataTable.Columns.Add("Disabled", typeof(bool)); - - // Fill with data from EF Core - var varsViewData = dbContext.VarsView.ToList(); - foreach (var item in varsViewData) - { - dataTable.Rows.Add( - item.VarName, - item.Installed, - item.Fsize, - item.VarPath, - item.CreatorName, - item.PackageName, - item.Version, - item.MetaDate, - item.VarDate, - item.Scenes, - item.Looks, - item.Clothing, - item.Hairstyle, - item.Plugins, - item.Assets, - item.Morphs, - item.Pose, - item.Skin, - item.Disabled - ); - } - - return dataTable; - } - - private DataSet CreateVarsDataSet() - { - var dataSet = new DataSet(); - dataSet.Tables.Add(CreateVarsViewDataTable()); - return dataSet; - } - private DgvFilterManager dgvFilterManager; - private Dictionary GetInstalledVars() - { - Dictionary installedVars = new Dictionary(); - DirectoryInfo dilink = Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName)); - foreach (string varfile in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName), "*.var", SearchOption.AllDirectories)) - { - FileInfo fileInfo = new FileInfo(varfile); - if (fileInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - installedVars[Path.GetFileNameWithoutExtension(varfile)] = varfile; - } - } - foreach (string varfile in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages"), "*.var", SearchOption.TopDirectoryOnly)) - { - FileInfo fileInfo = new FileInfo(varfile); - if (fileInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - installedVars[Path.GetFileNameWithoutExtension(varfile)] = varfile; - } - } - return installedVars; - } - private void UpdateVarsInstalled() - { - bool mutexAcquired = false; - try - { - // Ensure DbContext is properly initialized - if (dbContext.Database.CanConnect()) - { - // Clear existing install status data using EF Core - dbContext.InstallStatuses.RemoveRange(dbContext.InstallStatuses); - - mutex.WaitOne(); - mutexAcquired = true; - - foreach (string varfile in GetInstalledVars().Values) - { - string varName = Path.GetFileNameWithoutExtension(varfile); - if (dbContext.Vars.Any(v => v.VarName == varName)) - { - bool isdisable = File.Exists(varfile + ".disabled"); - dbContext.InstallStatuses.Add(new InstallStatus - { - VarName = varName, - Installed = true, - Disabled = isdisable - }); - } - } - - dbContext.SaveChanges(); - - InvokeUpdateVarsViewDataGridView invokeUpdateVarsViewDataGridView = new InvokeUpdateVarsViewDataGridView(UpdateVarsViewDataGridView); - this.BeginInvoke(invokeUpdateVarsViewDataGridView); - //varsViewDataGridView.Update(); - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"Error updating vars installed: {ex.Message}", LogLevel.ERROR }); - } - finally - { - if (mutexAcquired) - { - mutex.ReleaseMutex(); - } - } - } - - private Mutex mutex; - private System.Threading.Mutex mut = new Mutex(); - - - private async void Form1_Load(object sender, EventArgs e) - { - this.Text = "VarManager v" + Assembly.GetEntryAssembly().GetName().Version.ToString(); - UseWaitCursor = true; - Enabled = false; - if (!await EnsureBackendReadyAsync().ConfigureAwait(true)) - { - Close(); - return; - } - UseWaitCursor = false; - Enabled = true; - - if (string.IsNullOrWhiteSpace(Settings.Default.vampath) || - string.IsNullOrWhiteSpace(Settings.Default.varspath)) - { - MessageBox.Show("鍚庣閰嶇疆缂哄皯 varspath 鎴 vampath锛岃缂栬緫 config.json 鍚庨噸鍚"); - OpenSetting(); - Close(); - return; - } - - if (!File.Exists(Path.Combine(Settings.Default.vampath, "VaM.exe"))) - { - MessageBox.Show("vampath 鏃犳晥锛岃缂栬緫 config.json 鍚庨噸鍚"); - OpenSetting(); - Close(); - return; - } - mutex = new System.Threading.Mutex(); - - var (dbPath, provider) = VarManagerContext.GetDatabaseInfo(); - this.BeginInvoke(addlog, new Object[] { $"DB config: {dbPath} | Provider: {provider}", LogLevel.INFO }); - this.BeginInvoke(addlog, new Object[] { $"Backend config: varspath={Settings.Default.varspath}, vampath={Settings.Default.vampath}", LogLevel.INFO }); - - // Set the sort after data source initialization to avoid .NET 9 issues - try - { - if (varsViewBindingSource.DataSource != null) - { - varsViewBindingSource.Sort = "metaDate Desc"; - } - } - catch { /* Ignore sorting errors during initialization */ } - - backgroundWorkerInstall.RunWorkerAsync("FillDataTables"); - // - string varspath = new DirectoryInfo(Settings.Default.varspath).FullName.ToLower(); - string packpath = new DirectoryInfo(Path.Combine(Settings.Default.vampath, "AddonPackages")).FullName; - - string packsSwitchpath = new DirectoryInfo(Path.Combine(Settings.Default.vampath, addonPacksSwitch)).FullName.ToLower(); - if (varspath == packpath) - { - MessageBox.Show("Vars Path can't be {VamInstallDir}\\AddonPackages"); - OpenSetting(); - } - comboBoxPreviewType.SelectedIndex = 0; - - - - DirectoryInfo dipacksswitch = Directory.CreateDirectory(packsSwitchpath); - DirectoryInfo[] packswitchdirs = dipacksswitch.GetDirectories("*", SearchOption.TopDirectoryOnly); - List packnames = new List(); - foreach (DirectoryInfo dipack in packswitchdirs) - { - packnames.Add(dipack.Name); - } - if (packnames.IndexOf("default") == -1) - { - Directory.CreateDirectory(Path.Combine(packsSwitchpath, "default")); - packnames.Add("default"); - } - comboBoxPacksSwitch.Items.Add("default"); - foreach (string packname in packnames) - { - if (packname != "default") - comboBoxPacksSwitch.Items.Add(packname); - } - - string currentSwitch = "default"; - try - { - DirectoryInfo diswitch = new DirectoryInfo(Comm.ReparsePoint(packpath)); - if (diswitch.Exists) - { - currentSwitch = diswitch.Name; - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"Warning: {ex.Message}", LogLevel.INFO }); - } - - if (comboBoxPacksSwitch.Items.IndexOf(currentSwitch) >= 0) - { - comboBoxPacksSwitch.SelectedItem = currentSwitch; - } - else - { - comboBoxPacksSwitch.SelectedItem = "default"; - } - - try - { - RunBackendJob("refresh_install_status", null); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"鍒锋柊瀹夎鐘舵佸け璐: {ex.Message}", LogLevel.ERROR }); - } - comboBoxCreater.Items.Add("____ALL"); - var creators = dbContext.Vars - .GroupBy(v => v.CreatorName) - .Select(g => g.Key) - .OrderBy(c => c) - .ToList(); - foreach (var creator in creators) - { - comboBoxCreater.Items.Add(creator); - } - comboBoxCreater.SelectedIndex = 0; - // FillDataTables(); - //TimeSpan ts6 = DateTime.Now - dtstart; - //dtstart = DateTime.Now; - //MessageBox.Show($"{ts1.TotalSeconds},{ts2.TotalSeconds},{ts3.TotalSeconds},{ts4.TotalSeconds},{ts5.TotalSeconds},{ts6.TotalSeconds}"); - - // Initialize DataSource with DataSet for DgvFilterManager compatibility - var dataSet = CreateVarsDataSet(); - varsViewBindingSource.DataSource = dataSet; - varsViewBindingSource.DataMember = "varsView"; - dgvFilterManager = new DgvFilterManager(varsViewDataGridView); - RefreshVarsViewUi(); - if (ExistAddonpackagesVar()) - { - MessageBox.Show("There are unorganized var files in the current switch, please run UPD_DB first"); - buttonUpdDB.Focus(); - } - } - - private void FillDataTables() - { - this.BeginInvoke(addlog, new Object[] { $"load vars...", LogLevel.INFO }); - // EF Core automatically loads data when needed - no explicit Fill required - - this.BeginInvoke(addlog, new Object[] { $"load scenes...", LogLevel.INFO }); - // EF Core automatically loads data when needed - no explicit Fill required - - this.BeginInvoke(addlog, new Object[] { $"load dependencies...", LogLevel.INFO }); - // EF Core automatically loads data when needed - no explicit Fill required - - // Pre-load some critical data for performance - _ = dbContext.Vars.Count(); // This will initialize the connection - _ = dbContext.Scenes.Count(); - _ = dbContext.Dependencies.Count(); - } - - public delegate void InvokeUpdateVarsViewDataGridView(); - - public void UpdateVarsViewDataGridView() - { - List selectedRowList = new List(); - foreach (DataGridViewRow item in varsViewDataGridView.SelectedRows) - { - selectedRowList.Add(item.Cells[0].Value.ToString()); - } - varsViewDataGridView.SelectionChanged -= new System.EventHandler(this.varsDataGridView_SelectionChanged); - - // Refresh the data by recreating the DataSet for DgvFilterManager compatibility - var dataSet = CreateVarsDataSet(); - varsViewBindingSource.DataSource = dataSet; - varsViewBindingSource.DataMember = "varsView"; - varsViewDataGridView.Update(); - - int firstindex = int.MaxValue; - varsViewDataGridView.ClearSelection(); - foreach (DataGridViewRow row in varsViewDataGridView.Rows) - { - string varname = row.Cells["varNamedataGridViewTextBoxColumn"].Value.ToString(); - if (selectedRowList.Contains(varname)) - { - row.Selected = true; - if (row.Index < firstindex) firstindex = row.Index; - } - } - if (firstindex == int.MaxValue) firstindex = 0; - if (varsViewDataGridView.SelectedRows.Count > 0) - { - varsViewDataGridView.FirstDisplayedScrollingRowIndex = firstindex; - } - varsViewDataGridView.SelectionChanged += new System.EventHandler(this.varsDataGridView_SelectionChanged); - - mutex.WaitOne(); - UpdatePreviewPics(); - mutex.ReleaseMutex(); - tableLayoutPanelPreview.Visible = false; - } - public delegate void InvokeAddLoglist(string message, LogLevel logLevel); - - public void UpdateAddLoglist(string message, LogLevel logLevel) - { - string msg = simpLog.WriteFormattedLog(logLevel, message); - listBoxLog.Items.Add(msg); - listBoxLog.TopIndex = listBoxLog.Items.Count - 1; - } - - private async Task EnsureBackendReadyAsync() - { - try - { - await BackendSession.EnsureStartedAsync(LogBackendLine, backendCts.Token).ConfigureAwait(true); - return true; - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍚庣鍚姩澶辫触: {ex.Message}", LogLevel.ERROR }); - MessageBox.Show($"鍚庣鍚姩澶辫触: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return false; - } - } - - private void LogBackendLine(string line) - { - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - BeginInvoke(addlog, new Object[] { line, level }); - } - - private BackendJobResult RunBackendJob(string kind, object? args) - { - return BackendSession.RunJob(kind, args, LogBackendLine, backendCts.Token); - } - - private Task RunBackendJobAsync(string kind, object? args) - { - return BackendSession.RunJobAsync(kind, args, LogBackendLine, backendCts.Token); - } - - private T? DeserializeResult(BackendJobResult result) - { - if (!result.Result.HasValue) - { - return default; - } - return JsonSerializer.Deserialize(result.Result.Value.GetRawText()); - } - - private void ResetDbContext() - { - if (_dbContext.IsValueCreated) - { - _dbContext.Value?.Dispose(); - } - _dbContext.Value = new VarManagerContext(); - } - - private void RefreshVarsViewUi() - { - ResetDbContext(); - UpdateVarsViewDataGridView(); - } - - private sealed class MissingDepsResult - { - [JsonPropertyName("scope")] - public string Scope { get; set; } = string.Empty; - - [JsonPropertyName("missing")] - public List Missing { get; set; } = new List(); - - [JsonPropertyName("installed")] - public List Installed { get; set; } = new List(); - - [JsonPropertyName("install_failed")] - public List InstallFailed { get; set; } = new List(); - - [JsonPropertyName("dependency_count")] - public int DependencyCount { get; set; } - } - - private sealed class DepsJobResult - { - [JsonPropertyName("missing")] - public List Missing { get; set; } = new List(); - - [JsonPropertyName("installed")] - public List Installed { get; set; } = new List(); - - [JsonPropertyName("dependency_count")] - public int DependencyCount { get; set; } - } - - private sealed class SceneAnalyzeResult - { - [JsonPropertyName("var_name")] - public string VarName { get; set; } = string.Empty; - - [JsonPropertyName("entry_name")] - public string EntryName { get; set; } = string.Empty; - - [JsonPropertyName("cache_dir")] - public string CacheDir { get; set; } = string.Empty; - - [JsonPropertyName("character_gender")] - public string CharacterGender { get; set; } = string.Empty; - } - - private void buttonClearLog_Click(object sender, EventArgs e) - { - listBoxLog.Items.Clear(); - } - - public delegate void InvokeProgress(int cur, int total); - - public void UpdateProgress(int cur, int total) - { - labelProgress.Text = string.Format("{0}/{1}", cur, total); - if (total != 0) - { - int progressvalue = (int)((float)cur * 100 / (float)total); - if (progressvalue < 0) progressvalue = 0; - if (progressvalue >100) progressvalue = 100; - - progressBar1.Value = progressvalue; - } - - } - - public delegate void InvokeShowformMissingVars(List missingvars); - - public void ShowformMissingVars(List missingvars) - { - if (missingvars.Count > 0) - { - FormMissingVars formMissingVars = new FormMissingVars(); - formMissingVars.form1 = this; - formMissingVars.MissingVars = missingvars; - formMissingVars.Show(); - } - } - private void buttonUpdDB_Click(object sender, EventArgs e) - { - string message = "Will organize vars, extract preview images,update DB. It will take some time, please be patient."; - - const string caption = "UpdateDB"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - backgroundWorkerInstall.RunWorkerAsync("UpdDB"); - } - - private void buttonStartVam_Click(object sender, EventArgs e) - { - string message = "Will start the VAM application. Do you want to continue?"; - const string caption = "Start VAM"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - - if (result == DialogResult.Yes) - { - try - { - RunBackendJob("vam_start", null); - } - catch (Exception ex) - { - MessageBox.Show($"Failed to start application. Error: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - - private void UpdDB(string destvarfilename) - { - try - { - string basename = Path.GetFileNameWithoutExtension(destvarfilename); - string curpath = Path.GetDirectoryName(destvarfilename); - curpath = Comm.MakeRelativePath(Settings.Default.varspath, curpath); - - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == basename); - if (varsrow == null) - { - using (ZipFile varzipfile = new ZipFile(destvarfilename)) - { - // Create new Var entity - varsrow = new Var - { - VarName = basename - }; - - string[] varnamepart = basename.Split('.'); - if (varnamepart.Length == 3) - { - FileInfo finfo = new FileInfo(destvarfilename); - varsrow.Filesize = finfo.Length; - varsrow.CreatorName = varnamepart[0]; - varsrow.PackageName = varnamepart[1]; - varsrow.VarDate = finfo.LastWriteTime; - int version; - if (!int.TryParse(varnamepart[2], out version)) - version = 1; - varsrow.Version = version.ToString(); - varsrow.VarPath = curpath; - //ZipFile zipFile = new ZipFile(destvarfilename); - - - var metajson = varzipfile.GetEntry("meta.json"); - - if (metajson == null) - { - string notComplRulefilename = Path.Combine(Settings.Default.varspath, notComplyRuleDirName, Path.GetFileName(destvarfilename)); - string errlog = $"{basename}, Invalid var package structure, move into {notComplyRuleDirName} directory"; - //string errorMessage = destvarfilename + " is invalid,please check"; - this.BeginInvoke(addlog, new Object[] { errlog, LogLevel.WARNING }); - File.Move(destvarfilename, notComplRulefilename); - return; - } - varsrow.MetaDate = metajson.DateTime; - int countscene = 0, countlook = 0, countclothing = 0, counthair = 0, countplugincs = 0, countplugincslist = 0, countasset = 0, countmorphs = 0, countpose = 0, countskin = 0; - var newScenes = new List(); - //foreach (var zfile in varzipfile.Entries) - //varzipfile - foreach (ZipEntry zfile in varzipfile) - { - string typename = ""; - bool isPreset = false; - try - { - if (Regex.IsMatch(zfile.Name, @"saves/scene/.*?\x2e(?:json)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "scenes"; - countscene++; - } - if (Regex.IsMatch(zfile.Name, @"saves/person/appearance/.*?\x2e(?:json|vac)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "looks"; - isPreset = zfile.Name.EndsWith(".json"); - countlook++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/(?:general|appearance)/.*?\x2e(?:json|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "looks"; - isPreset = true; - countlook++; - } - if (Regex.IsMatch(zfile.Name, @"custom/clothing/.*?\x2e(?:vam|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "clothing"; - isPreset = false; - countclothing++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/clothing/.*?\x2e(?:vam|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "clothing"; - isPreset = zfile.Name.EndsWith(".vap"); - countclothing++; - } - if (Regex.IsMatch(zfile.Name, @"custom/hair/.*?\x2e(?:vam|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "hairstyle"; - isPreset = false; - counthair++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/hair/.*?\x2e(?:vam|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "hairstyle"; - isPreset = zfile.Name.EndsWith(".vap"); - counthair++; - } - if (Regex.IsMatch(zfile.Name, @"custom/scripts/.*?\x2e(?:cs)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - countplugincs++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/scripts/.*?\x2e(?:cs)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - countplugincs++; - } - if (Regex.IsMatch(zfile.Name, @"custom/scripts/.*?\x2e(?:cslist)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - countplugincslist++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/scripts/.*?\x2e(?:cslist)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - countplugincslist++; - } - if (Regex.IsMatch(zfile.Name, @"custom/assets/.*?\x2e(?:assetbundle)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "assets"; - countasset++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/morphs/.*?\x2e(?:vmi|vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "morphs"; - isPreset = zfile.Name.EndsWith(".vap"); - countmorphs++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/pose/.*?\x2e(?:vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "pose"; - isPreset = true; - countpose++; - } - if (Regex.IsMatch(zfile.Name, @"saves/person/pose/.*?\x2e(?:json|vac)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "pose"; - isPreset = zfile.Name.EndsWith(".json"); - countpose++; - } - if (Regex.IsMatch(zfile.Name, @"custom/atom/person/skin/.*?\x2e(?:vap)", RegexOptions.IgnoreCase | RegexOptions.Singleline)) - { - typename = "skin"; - isPreset = true; - countskin++; - } - if (typename != "") - { - int jpgcount = 0; - switch (typename) - { - case "scenes": jpgcount = countscene; break; - case "looks": jpgcount = countlook; break; - case "clothing": jpgcount = countclothing; break; - case "hairstyle": jpgcount = counthair; break; - case "assets": jpgcount = countasset; break; - case "morphs": jpgcount = countmorphs; break; - case "pose": jpgcount = countpose; break; - case "skin": jpgcount = countskin; break; - } - string jpgfile = zfile.Name.Substring(0, zfile.Name.LastIndexOf('.')) + ".jpg"; - var jpg = varzipfile.GetEntry(jpgfile); - string jpgname = ""; - if (jpg != null) - { - string namejpg = Path.GetFileNameWithoutExtension(jpg.Name).ToLower(); - - string typepath = Path.Combine(Settings.Default.varspath, previewpicsDirName, typename, Path.GetFileNameWithoutExtension(destvarfilename)); - if (!Directory.Exists(typepath)) - Directory.CreateDirectory(typepath); - jpgname = typename + jpgcount.ToString("000") + "_" + namejpg + ".jpg"; - string jpgextratname = Path.Combine(typepath, typename + jpgcount.ToString("000") + "_" + namejpg + ".jpg"); - if (!File.Exists(jpgextratname)) - { - using (var sr = varzipfile.GetInputStream(jpg)) - using (var streamWriter = File.Create(jpgextratname)) - { - sr.CopyTo(streamWriter); - } - } - } - // string ext = zfile.FullName.Substring(zfile.FullName.LastIndexOf('.')).ToLower(); - // if (ext == ".vap" || ext == ".json") - if (typename == "scenes" || typename == "looks" || typename == "clothing" || typename == "hairstyle" || typename == "morphs" || typename == "pose" || typename == "skin") - { - // Collect scenes for a single bulk insert - newScenes.Add(new Scene - { - VarName = basename, - AtomType = typename, - IsPreset = isPreset, - ScenePath = zfile.Name, - PreviewPic = jpgname - }); - } - } - - } - catch (ArgumentException ex) - { - this.BeginInvoke(addlog, new Object[] { zfile.Name + " " + ex.Message, LogLevel.ERROR }); - } - } - if (newScenes.Count > 0) - { - dbContext.Scenes.AddRange(newScenes); - } - - varsrow.Scenes = countscene; - varsrow.Looks = countlook; - varsrow.Clothing = countclothing; - varsrow.Hairstyle = counthair; - varsrow.Morphs = countmorphs; - varsrow.Pose = countpose; - varsrow.Skin = countskin; - if (countplugincslist > 0) - varsrow.Plugins = countplugincslist; - else - varsrow.Plugins = countplugincs; - varsrow.Assets = countasset; - - // Add var to context - dbContext.Vars.Add(varsrow); - - - List dependencies = new List(); - - string jsonstring; - using (var metajsonsteam = new StreamReader(varzipfile.GetInputStream(metajson))) - { - jsonstring = metajsonsteam.ReadToEnd(); - } - try - { - dependencies = Getdependencies(jsonstring); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { destvarfilename + " get dependencies failed " + ex.Message, LogLevel.ERROR }); - } - // Remove existing dependencies for this var - var existingDeps = dbContext.Dependencies.Where(d => d.VarName == basename).ToList(); - if (existingDeps.Count > 0) - { - dbContext.Dependencies.RemoveRange(existingDeps); - } - - // Add new dependencies - if (dependencies.Count > 0) - { - var newDeps = new List(dependencies.Count); - foreach (string dependencie in dependencies) - { - newDeps.Add(new Dependency - { - VarName = basename, - DependencyName = dependencie - }); - } - dbContext.Dependencies.AddRange(newDeps); - } - dbContext.SaveChanges(); - dbContext.ChangeTracker.Clear(); - } - } - } - else - { - if (varsrow.VarPath != curpath) - { - varsrow.VarPath = curpath; - dbContext.SaveChanges(); - dbContext.ChangeTracker.Clear(); - } - } - - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { destvarfilename + " " + ex.Message, LogLevel.ERROR }); - } - } - private bool UpdDB() - { - InvokeProgress mi = new InvokeProgress(UpdateProgress); - this.BeginInvoke(addlog, new Object[] { "Analyze Var files, extract preview images, save info to DB", LogLevel.INFO }); - string[] vars = Directory.GetFiles(Path.Combine(Settings.Default.varspath, tidiedDirName), "*.var", SearchOption.AllDirectories); - if (vars.Length <= 0) - { - MessageBox.Show("No VAR file found, please check if the path setting is wrong!"); - return false; - } - List existVars = new List(); - int curVarfile = 0; - foreach (string varfile in vars) - { - existVars.Add(Path.GetFileNameWithoutExtension(varfile)); - UpdDB(varfile); - curVarfile++; - this.BeginInvoke(mi, new Object[] { curVarfile, vars.Length }); - } - - List deletevars = new List(); - - - foreach (var row in dbContext.Vars) - { - if (!existVars.Contains(row.VarName)) - { - this.BeginInvoke(addlog, new Object[] { $"{row.VarName} The target VAR file is not found and the record will be deleted", LogLevel.WARNING }); - deletevars.Add(row.VarName); - } - } - deletevars = deletevars.Distinct().ToList(); - if (deletevars.Count > 0) - CleanVars(deletevars); - - return true; - } - private bool CleanVars(List deletevars) - { - try - { - this.BeginInvoke(addlog, new Object[] { $"Cleanup dependencies table...", LogLevel.INFO }); - var dependencierows = dbContext.Dependencies.Where(q => deletevars.Contains(q.VarName)).ToList(); - dbContext.Dependencies.RemoveRange(dependencierows); - dbContext.SaveChanges(); - this.BeginInvoke(addlog, new Object[] { $"Cleanup dependencies table completed.", LogLevel.INFO }); - - this.BeginInvoke(addlog, new Object[] { $"Cleanup scenes table...", LogLevel.INFO }); - var scenes = dbContext.Scenes.Where(q => deletevars.Contains(q.VarName)).ToList(); - dbContext.Scenes.RemoveRange(scenes); - dbContext.SaveChanges(); - this.BeginInvoke(addlog, new Object[] { $"Cleanup scenes table completed.", LogLevel.INFO }); - - this.BeginInvoke(addlog, new Object[] { $"Cleanup vars table...", LogLevel.INFO }); - var varrows = dbContext.Vars.Where(q => deletevars.Contains(q.VarName)).ToList(); - dbContext.Vars.RemoveRange(varrows); - dbContext.SaveChanges(); - this.BeginInvoke(addlog, new Object[] { $"Cleanup vars table completed.", LogLevel.INFO }); - - this.BeginInvoke(addlog, new Object[] { $"Cleanup PreviewPics...", LogLevel.INFO }); - foreach (string deletevar in deletevars) - DelePreviewPics(deletevar); - FixPreview(); - this.BeginInvoke(addlog, new Object[] { $"Cleanup PreviewPics completed.", LogLevel.INFO }); - - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { "delete record or preview error, " + ex.Message, LogLevel.ERROR }); - return false; - } - return true; - } - private bool CleanVar(string deletevar) - { - try - { - var dependencierows = dbContext.Dependencies.Where(q => q.VarName == deletevar).ToList(); - dbContext.Dependencies.RemoveRange(dependencierows); - dbContext.SaveChanges(); - - var scenes = dbContext.Scenes.Where(q => q.VarName == deletevar).ToList(); - dbContext.Scenes.RemoveRange(scenes); - dbContext.SaveChanges(); - - var row = dbContext.Vars.FirstOrDefault(v => v.VarName == deletevar); - if (row != null) - { - dbContext.Vars.Remove(row); - dbContext.SaveChanges(); - } - - DelePreviewPics(deletevar); - - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { deletevar + ",delete record or preview error, " + ex.Message, LogLevel.ERROR }); - } - return true; - } - - /// - /// varInstall - /// - /// - /// - /// - /// 0:faile,1:success锛2锛歩nstalled - private int VarInstall(string varName, bool bTemp = false, int operate = 1) - { - int success = 0; - if (operate >= 1) - { - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == varName); - if (varsrow != null) - { - //string[] varexist = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages"), varName + ".var"); - string linkvar = Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName, varName + ".var"); - if (bTemp) linkvar = Path.Combine(Settings.Default.vampath, "AddonPackages", tempVarLinkDirName, varName + ".var"); - if (File.Exists(linkvar + ".disabled") && operate == 1) - File.Delete(linkvar + ".disabled"); - if (File.Exists(linkvar)) - return 2; - - string destvarfile = Path.Combine(Settings.Default.varspath, varsrow.VarPath, varsrow.VarName + ".var"); - - if (!Comm.CreateSymbolicLink(linkvar, destvarfile, Comm.SYMBOLIC_LINK_FLAG.File)) - { - MessageBox.Show("Error: Unable to create symbolic link. " + - "(Error Code: " + Marshal.GetLastWin32Error() + ")"); - return 0; - } - if (operate == 2) - { - using (File.Create(linkvar + ".disabled")) { } - } - Comm.SetSymboLinkFileTime(linkvar, File.GetCreationTime(destvarfile), File.GetLastWriteTime(destvarfile)); - this.BeginInvoke(addlog, new Object[] { $"{varName} Installed", LogLevel.INFO }); - success = 1; - } - } - return success; - } - - private void backgroundWorkerInstall_DoWork(object sender, DoWorkEventArgs e) - { - mutex.WaitOne(); - try - { - string arg = (string)e.Argument; - if (arg == "FillDataTables") - { - FillDataTables(); - return; - } - if (arg == "UpdDB") - { - RunBackendJob("update_db", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "rebuildLink") - { - RunBackendJob("rebuild_links", new { include_missing = true }); - return; - } - if (arg == "fixPreview") - { - RunBackendJob("fix_previews", null); - BeginInvoke(new Action(() => MessageBox.Show("Fix preview finish"))); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "savesDepend") - { - var result = RunBackendJob("saves_deps", null); - var payload = DeserializeResult(result); - if (payload != null && payload.Missing.Count > 0) - { - BeginInvoke(new InvokeShowformMissingVars(ShowformMissingVars), payload.Missing); - } - RunBackendJob("rescan_packages", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "LogAnalysis") - { - var result = RunBackendJob("log_deps", null); - var payload = DeserializeResult(result); - if (payload != null && payload.Missing.Count > 0) - { - BeginInvoke(new InvokeShowformMissingVars(ShowformMissingVars), payload.Missing); - } - RunBackendJob("rescan_packages", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "MissingDepends") - { - var result = RunBackendJob("missing_deps", new { scope = "installed" }); - var payload = DeserializeResult(result); - if (payload != null && payload.Missing.Count > 0) - { - BeginInvoke(new InvokeShowformMissingVars(ShowformMissingVars), payload.Missing); - } - else - { - BeginInvoke(new Action(() => - MessageBox.Show("No missing dependencies found", "INFO", - MessageBoxButtons.OK, MessageBoxIcon.Information))); - } - RunBackendJob("rescan_packages", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "AllMissingDepends") - { - var result = RunBackendJob("missing_deps", new { scope = "all" }); - var payload = DeserializeResult(result); - if (payload != null && payload.Missing.Count > 0) - { - BeginInvoke(new InvokeShowformMissingVars(ShowformMissingVars), payload.Missing); - } - return; - } - if (arg == "FilteredMissingDepends") - { - var varNames = new List(); - System.Collections.IList listDatarow = varsViewBindingSource.List; - foreach (DataRowView varrowview in listDatarow) - { - varNames.Add(varrowview.Row.Field("varName")); - } - var result = RunBackendJob("missing_deps", new { scope = "filtered", var_names = varNames }); - var payload = DeserializeResult(result); - if (payload != null && payload.Missing.Count > 0) - { - BeginInvoke(new InvokeShowformMissingVars(ShowformMissingVars), payload.Missing); - } - return; - } - if (arg == "StaleVars") - { - RunBackendJob("stale_vars", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - if (arg == "OldVersionVars") - { - RunBackendJob("old_version_vars", null); - BeginInvoke(new Action(RefreshVarsViewUi)); - return; - } - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍚庣浣滀笟澶辫触: {ex.Message}", LogLevel.ERROR }); - } - finally - { - mutex.ReleaseMutex(); - } - } - - private void backgroundWorkerInstall_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - - } - - private void buttonMissingDepends_Click(object sender, EventArgs e) - { - string message = "Analyzing dependencies from Installed Vars, if it is found in the repository it will be installed, otherwise a processing window will be opened."; - - const string caption = "MissingDepends"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - backgroundWorkerInstall.RunWorkerAsync("MissingDepends"); - } - } - - private void MissingDepends() - { - this.BeginInvoke(addlog, new Object[] { "Search for dependencies...", LogLevel.INFO }); - List dependencies = new List(); - foreach (var varrow in dbContext.VarsView.Where(q => q.Installed == true)) - { - var varDependencies = dbContext.Dependencies.Where(q => q.VarName == varrow.VarName).Select(q => q.DependencyName); - foreach (var dep in varDependencies) - { - if (!string.IsNullOrEmpty(dep)) - dependencies.Add(dep); - } - } - dependencies = dependencies.Distinct().ToList(); - List missingvars = new List(); - foreach (string varname in dependencies) - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - missingvars.Add(varname+"$"); - this.BeginInvoke(addlog, new Object[] { varname + " missing version", LogLevel.INFO }); - } - if (varexistname != "missing") - { - VarInstall(varexistname); - //this.BeginInvoke(addlog, new Object[] { varexistname + " installed" ,LogLevel.ERROR}); - } - else - { - missingvars.Add(varname); - this.BeginInvoke(addlog, new Object[] { varname + " missing", LogLevel.INFO }); - } - } - if (missingvars.Count > 0) - { - InvokeShowformMissingVars showformMissingVars = new InvokeShowformMissingVars(ShowformMissingVars); - this.BeginInvoke(showformMissingVars, missingvars); - } - else - { - MessageBox.Show("No missing dependencies found", "INFO", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - } - - private void FilteredMissingDepends() - { - this.BeginInvoke(addlog, new Object[] { "Search for dependencies...", LogLevel.INFO }); - List dependencies = new List(); - System.Collections.IList listDatarow = varsViewBindingSource.List; - - foreach (DataRowView varrowview in listDatarow) - { - dependencies.AddRange(dbContext.Dependencies.Where(q => q.VarName == varrowview.Row.Field("varName")).Select(q => q.DependencyName)); - } - - dependencies = dependencies.Distinct().ToList(); - List missingvars = new List(); - foreach (string varname in dependencies) - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - missingvars.Add(varname+"$"); - this.BeginInvoke(addlog, new Object[] { varname + " missing version", LogLevel.INFO }); - } - if (varexistname != "missing") - { - //VarInstall(varexistname); - //this.BeginInvoke(addlog, new Object[] { varexistname + " installed" ,LogLevel.ERROR}); - } - else - { - missingvars.Add(varname); - this.BeginInvoke(addlog, new Object[] { varname + " missing", LogLevel.INFO }); - } - } - if (missingvars.Count > 0) - { - InvokeShowformMissingVars showformMissingVars = new InvokeShowformMissingVars(ShowformMissingVars); - this.BeginInvoke(showformMissingVars, missingvars); - } - - } - - private void buttonAllMissingDepends_Click(object sender, EventArgs e) - { - string message = "Analyzing dependencies from All organized vars, a processing window will be opened."; - - const string caption = "AllMissingDepends"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - backgroundWorkerInstall.RunWorkerAsync("AllMissingDepends"); - } - } - public void AllMissingDepends() - { - this.BeginInvoke(addlog, new Object[] { "Search for dependencies...", LogLevel.INFO }); - - List missingvars = MissingDependencies(); - if (missingvars.Count > 0) - { - this.BeginInvoke(addlog, new Object[] { $"Total { missingvars.Count } dependencies missing", LogLevel.INFO }); - InvokeShowformMissingVars showformMissingVars = new InvokeShowformMissingVars(ShowformMissingVars); - this.BeginInvoke(showformMissingVars, missingvars); - } - } - - public List MissingDependencies() - { - List dependencies = new List(); - - dependencies.AddRange(dbContext.Dependencies.Select(q => q.DependencyName)); - - dependencies = dependencies.Distinct().ToList(); - List missingvars = new List(); - foreach (string varname in dependencies) - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - missingvars.Add(varname + "$"); - //this.BeginInvoke(addlog, new Object[] { varname + " missing version" ,LogLevel.ERROR}); - } - if (varexistname != "missing") - { - //VarInstall(varexistname); - //this.BeginInvoke(addlog, new Object[] { varexistname + " installed" ,LogLevel.ERROR}); - } - else - { - missingvars.Add(varname); - - } - } - - return missingvars; - } - - private void FixRebuildLink() - { - this.BeginInvoke(addlog, new Object[] { "Check Installed symlink", LogLevel.INFO }); - //List varfiles = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName), "*.var", SearchOption.AllDirectories).ToList(); - List varfiles = GetInstalledVars().Values.ToList(); - if (Directory.Exists(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName))) - varfiles.AddRange(Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName), "*.var", SearchOption.AllDirectories)); - - foreach (string linkvar in varfiles) - { - try - { - FileInfo pathInfo = new FileInfo(linkvar); - if (pathInfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - string destfilename = Comm.ReparsePoint(linkvar); - this.BeginInvoke(addlog, new Object[] { $"symlink {linkvar} rebuilding ...", LogLevel.INFO }); - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == Path.GetFileNameWithoutExtension(destfilename)); - File.Delete(linkvar); - if (varsrow != null) - { - string destvarfile = Path.Combine(Settings.Default.varspath, varsrow.VarPath, varsrow.VarName + ".var"); - Comm.CreateSymbolicLink(linkvar, destvarfile, Comm.SYMBOLIC_LINK_FLAG.File); - Comm.SetSymboLinkFileTime(linkvar, File.GetCreationTime(destvarfile), File.GetLastWriteTime(destvarfile)); - } - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { linkvar + " rebuild symlink failed. " + ex.Message, LogLevel.ERROR }); - } - } - - MessageBox.Show("fix finish"); - } - - private bool ReExtractedPreview(Scene scenerow) - { - bool success = false; - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == scenerow.VarName); - if (varsrow != null) - { - string destvarfile = Path.Combine(Settings.Default.varspath, varsrow.VarPath!, varsrow.VarName + ".var"); - if (File.Exists(destvarfile)) - { - //using (ZipArchive varzipfile = ZipFile.OpenRead(destvarfile)) - using (ZipFile varzipfile = new ZipFile(destvarfile)) - { - string jpgfile = scenerow.ScenePath!.Substring(0, scenerow.ScenePath.LastIndexOf('.')) + ".jpg"; - var jpg = varzipfile.GetEntry(jpgfile); - if (jpg != null) - { - string picpath = Path.Combine(Settings.Default.varspath, previewpicsDirName, scenerow.AtomType!, scenerow.VarName, scenerow.PreviewPic!); - - string jpgdirectory = Path.GetDirectoryName(picpath); - if(!Directory.Exists(jpgdirectory)) - Directory.CreateDirectory(jpgdirectory); - if (!File.Exists(picpath)) - { - using (var sr = varzipfile.GetInputStream(jpg)) - using (var streamWriter = File.Create(picpath)) - { - sr.CopyTo(streamWriter); - } - } - success = true; - } - } - } - } - return success; - } - private void FixPreview() - { - foreach (var scenerow in dbContext.Scenes.Where(q => !string.IsNullOrEmpty(q.PreviewPic))) - { - string picpath = Path.Combine(Settings.Default.varspath, previewpicsDirName, scenerow.AtomType!, scenerow.VarName, scenerow.PreviewPic!); - if (!File.Exists(picpath)) - { - if (ReExtractedPreview(scenerow)) - { - this.BeginInvoke(addlog, new Object[] { $"missing {picpath} is fixed.", LogLevel.INFO }); - } - else - { - this.BeginInvoke(addlog, new Object[] { $"{picpath} is missing and the repair failed", LogLevel.WARNING }); - } - } - } - - } - private void FixSavseDependencies() - { - List dependencies = new List(); - this.BeginInvoke(addlog, new Object[] { "Analyze the *.json files in the 'Save' directory and the *.vap files in the 'Custom' directory ", LogLevel.INFO }); - // Clear and reload saved dependencies - dbContext.SavedDependencies.RemoveRange(dbContext.SavedDependencies); - dbContext.SaveChanges(); - List savefiles = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "Saves"), "*.json", SearchOption.AllDirectories).ToList(); - savefiles.AddRange(Directory.GetFiles(Path.Combine(Settings.Default.vampath, "Custom"), "*.vap", SearchOption.AllDirectories)); - foreach (string jsonfile in savefiles) - { - FileInfo fi = new FileInfo(jsonfile); - string savepath = jsonfile.Substring(Settings.Default.vampath.Length); - if (savepath.Length > 255) savepath = savepath.Substring(savepath.Length - 255); - - this.BeginInvoke(addlog, new Object[] { $"Analyze { Path.GetFileName(jsonfile)} ...", LogLevel.INFO }); - - var rows = dbContext.SavedDependencies.Where(q => q.SavePath == savepath && q.ModiDate.HasValue && Math.Abs((q.ModiDate.Value - fi.LastWriteTime).TotalSeconds) <= 2).ToList(); - - if (rows.Any()) - { - // Dependencies already exist for this file, no need to reprocess - } - else - { - try - { - string jsonstring; - using (var metajsonsteam = new StreamReader(jsonfile)) - { - jsonstring = metajsonsteam.ReadToEnd(); - } - foreach (string dependency in Getdependencies(jsonstring)) - { - dbContext.SavedDependencies.Add(new SavedDependency - { - SavePath = savepath, - ModiDate = fi.LastWriteTime, - DependencyName = dependency - }); - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { jsonfile + " Get dependencies failed " + ex.Message, LogLevel.ERROR }); - } - } - } - // Save all changes - dbContext.SaveChanges(); - dependencies = dbContext.SavedDependencies.Select(q => q.DependencyName).Distinct().ToList(); - //dependencies = dependencies.Distinct().ToList(); - var dependencies2 = VarsDependencies(dependencies); - dependencies = dependencies.Concat(dependencies2).Distinct().OrderBy(q => q).ToList(); - - //List varinstalled = new List(); - //foreach (string varfile in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName), "*.var", SearchOption.AllDirectories)) - //{ - // varinstalled.Add(Path.GetFileNameWithoutExtension(varfile)); - //} - //foreach (string varfile in Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName), "*.var", SearchOption.AllDirectories)) - //{ - // varinstalled.Add(Path.GetFileNameWithoutExtension(varfile)); - //} - List varinstalled = GetInstalledVars().Keys.ToList(); - dependencies = dependencies.Except(varinstalled).ToList(); - this.BeginInvoke(addlog, new Object[] { $"{dependencies.Count()} var files will be installed", LogLevel.INFO }); - List missingvars = new List(); - foreach (string varname in dependencies) - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - missingvars.Add(varname + "$"); - } - if (varexistname != "missing") - { - VarInstall(varexistname); - this.BeginInvoke(addlog, new Object[] { varexistname + " installed", LogLevel.INFO }); - } - else - { - missingvars.Add(varname); - } - } - missingvars = missingvars.Distinct().ToList(); - if (missingvars.Count > 0) - { - InvokeShowformMissingVars showformMissingVars = new InvokeShowformMissingVars(ShowformMissingVars); - this.BeginInvoke(showformMissingVars, missingvars); - } - else - MessageBox.Show("fix finish"); - } - - private void buttonFixRebuildLink_Click(object sender, EventArgs e) - { - string message = "will analyze and repair symlinks in the AddonPackages folder, if your var file repository changes location"; - - const string caption = "RebuildLink"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - backgroundWorkerInstall.RunWorkerAsync("rebuildLink"); - } - - private void buttonFixSavesDepend_Click(object sender, EventArgs e) - { - string message = "Analyzing dependencies from json files in \"Saves\" folder"; - - const string caption = "SavesDependencies"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - backgroundWorkerInstall.RunWorkerAsync("savesDepend"); - } - - private void comboBoxCreater_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(); - } - - private void FilterVars() - { - string strFilter = "1=1"; - if (comboBoxCreater.SelectedItem != null) - if (comboBoxCreater.SelectedItem.ToString() != "____ALL") - strFilter += " AND creatorName = '" + comboBoxCreater.SelectedItem.ToString() + "'"; - if (textBoxFilter.Text.Trim() != "") - { - strFilter += " AND varName Like '%" + textBoxFilter.Text.Trim().Replace("'", "''") + "%'"; - } - if (checkBoxInstalled.CheckState == CheckState.Checked) - { - strFilter += " AND installed"; - } - if (checkBoxInstalled.CheckState == CheckState.Unchecked) - { - strFilter += " AND (NOT installed OR installed Is Null )"; - } - - this.comboBoxCreater.SelectedIndexChanged -= new System.EventHandler(this.comboBoxCreater_SelectedIndexChanged); - var creators = dbContext.Vars - .Where(v => string.IsNullOrEmpty(textBoxFilter.Text.Trim()) || v.VarName!.ToLower().Contains(textBoxFilter.Text.Trim().ToLower())) - .GroupBy(v => v.CreatorName) - .Select(g => g.Key) - .OrderBy(c => c) - .ToList(); - string curcreator = comboBoxCreater.Text; - comboBoxCreater.Items.Clear(); - comboBoxCreater.Items.Add("____ALL"); - foreach (var creator in creators) - { - comboBoxCreater.Items.Add(creator); - } - if (comboBoxCreater.Items.Contains(curcreator)) - comboBoxCreater.SelectedItem = curcreator; - else - comboBoxCreater.SelectedIndex = 0; - this.comboBoxCreater.SelectedIndexChanged += new System.EventHandler(this.comboBoxCreater_SelectedIndexChanged); - - varsViewBindingSource.Filter = strFilter; - varsViewDataGridView.Update(); - } - public string VarExistName(string varname) - { - string varrealver = "missing"; - string[] varnamepart = varname.Split('.'); - if (varnamepart.Length == 3) - { - if (varnamepart[2].ToLower() == "latest") - { - var packs = dbContext.Vars.Where(q => q.CreatorName == varnamepart[0] && q.PackageName == varnamepart[1]); - if (packs.Any()) - { - var packsList = packs.ToList(); // Execute query first - var latestPack = packsList - .Where(p => int.TryParse(p.Version, out _)) // Filter valid versions - .OrderByDescending(p => int.TryParse(p.Version, out int ver) ? ver : 0) - .FirstOrDefault(); - varrealver = latestPack?.VarName ?? "missing"; - } - } - else - { - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == varname); - if (varsrow != null) - varrealver = varname; - else - { - if (int.TryParse(varnamepart[2], out int requestedVersion)) - { - string closestver = GetClosestMatchingPackageVersion(varnamepart[0], varnamepart[1], requestedVersion); - if (closestver != "missing") - varrealver = closestver + "$"; - } - } - } - } - return varrealver; - } - public string GetClosestMatchingPackageVersion(string creatorName,string packageName,int requestVersion) - { - var packs = dbContext.Vars.Where(q => q.CreatorName == creatorName && q.PackageName == packageName) - .ToList() // Execute query first - .Where(q => int.TryParse(q.Version, out _)) // Filter only valid integer versions - .OrderBy(q => int.TryParse(q.Version, out int ver) ? ver : 0); - if (packs.Any()) - { - foreach (var pack in packs) - { - if (int.TryParse(pack.Version, out int packVersion) && packVersion >= requestVersion) - { - return pack.VarName!; - } - } - return packs.Last().VarName!; - } - return "missing"; - } - private List VarsDependencies(string varname) - { - List depens = new List(); - foreach (var depenrow in dbContext.Dependencies.Where(q => q.VarName == varname)) - depens.Add(depenrow.DependencyName!); - return depens; - - } - - private List VarsDependencies(List varnames) - { - List varnameexist = new List(); - List varsProccessed = new List(); - List vardeps = new List(); - foreach (string varname in varnames) - { - if (varname[varname.Length - 1] == '^') - varsProccessed.Add(varname.Substring(0, varname.Length - 1)); - else - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - } - if (varexistname != "missing") - varnameexist.Add(varexistname); - } - } - - varnameexist = varnameexist.Distinct().Except(varsProccessed).ToList(); - foreach (string varname in varnameexist) - { - vardeps.AddRange(VarsDependencies(varname)); - } - varsProccessed.AddRange(varnameexist); - varsProccessed = varsProccessed.Distinct().ToList(); - - vardeps = vardeps.Distinct().Except(varsProccessed).ToList(); - if (vardeps.Count() > 0) - { - foreach (string varname in varsProccessed) - { - vardeps.Add(varname + "^"); - } - return VarsDependencies(vardeps); - } - else - { - varsProccessed = varsProccessed.Select(q => q.Trim('^')).Distinct().ToList(); - return varsProccessed; - } - } - - private void varsDataGridView_SelectionChanged(object sender, EventArgs e) - { - UpdatePreviewPics(); - tableLayoutPanelPreview.Visible = false; - } - - public struct Previewpic - { - public Previewpic(string varname, string atomtype, string picpath, bool installed, string scenePath, bool ispreset) - { - Varname = varname; - Atomtype = atomtype; - Picpath = picpath; - Installed = installed; - ScenePath = scenePath; - IsPreset = ispreset; - - } - public string Varname { get; } - public string Atomtype { get; } - public string Picpath { get; } - public bool Installed { get; } - public string ScenePath { get; } - public bool IsPreset { get; } - } - - private List previewpics = new List(); - - private List previewpicsfilter = new List(); - - private void UpdatePreviewPics() - { - if (IsDisposed) return; - - previewpics.Clear(); - foreach (DataGridViewRow row in varsViewDataGridView.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - var installedCell = row.Cells["installedDataGridViewCheckBoxColumn"]; - bool installed = false; - - if (true.Equals(installedCell.Value)) - { - installed = true; - } - foreach (var scenerow in dbContext.Scenes.Where(q => q.VarName == varName)) - { - previewpics.Add(new Previewpic(varName, scenerow.AtomType!, scenerow.PreviewPic!, installed, scenerow.ScenePath!, scenerow.IsPreset)); - } - } - PreviewInitType(); - } - - private void PreviewInitType() - { - if (IsDisposed || mut == null) return; - - try - { - mut.WaitOne(); - previewpicsfilter = previewpics; - if (checkBoxPreviewTypeLoadable.CheckState == CheckState.Checked) - previewpicsfilter = previewpicsfilter.Where(q => q.IsPreset || q.Atomtype == "scenes").ToList(); - string previewtype = "all"; - if (new string[8] { "scenes", "looks", "clothing", "hairstyle", "assets", "morphs", "pose", "skin" }.Contains(comboBoxPreviewType.Text)) - previewtype = comboBoxPreviewType.Text; - if (previewtype != "all") - previewpicsfilter = previewpicsfilter.Where(q => q.Atomtype == previewtype).ToList(); - mut.ReleaseMutex(); - - if (!IsDisposed) - { - listViewPreviewPics.VirtualListSize = previewpicsfilter.Count; - listViewPreviewPics.Invalidate(); - toolStripLabelPreviewCountItem.Text = "/" + previewpicsfilter.Count.ToString(); - } - } - catch (ObjectDisposedException) - { - return; - } - catch (Exception) - { - try { mut.ReleaseMutex(); } catch { } - throw; - } - /* - toolStripComboBoxPreviewPage.SelectedIndexChanged -= new System.EventHandler(this.toolStripComboBoxPreviewPage_SelectedIndexChanged); toolStripComboBoxPreviewPage.Items.Clear(); - previewPages = (previewpicsfilter.Count + maxpicxPerpage - 1) / maxpicxPerpage; - toolStripLabelPreviewCountItem.Text = "/" + previewpicsfilter.Count.ToString(); - toolStripComboBoxPreviewPage.Items.Clear(); - if (previewPages >= 1) - { - for (int page = 0; page < previewPages; page++) - { - int min = page * maxpicxPerpage + 1; - int max = (page + 1) * maxpicxPerpage; - if (max > previewpicsfilter.Count) max = previewpicsfilter.Count; - - string strpage = min.ToString("000") + " - " + max.ToString("000"); - toolStripComboBoxPreviewPage.Items.Add(strpage); - } - toolStripComboBoxPreviewPage.SelectedIndex = 0; - //PreviewPage(); - } - else - { - imageListPreviewPics.Images.Clear(); - listViewPreviewPics.Items.Clear(); - } - toolStripComboBoxPreviewPage.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxPreviewPage_SelectedIndexChanged); - if (previewPages >= 1) - PreviewPage(); - */ - } - - - public delegate void InvokePreviewPics(string varname, - string picpath, - bool installed, - string typename, - string scenepath, - bool ispreset); - public void PreviewPics(string varname, - string picpath, - bool installed, - string typename, - string scenepath, - bool ispreset) - { - if (varname == "clear") - { - imageListPreviewPics.Images.Clear(); - listViewPreviewPics.Items.Clear(); - } - else - { - if (string.IsNullOrWhiteSpace(picpath)) - { - imageListPreviewPics.Images.Add(Image.FromFile("vam.png")); - } - else - { - picpath = Path.Combine(Settings.Default.varspath, previewpicsDirName, typename, varname, picpath); - if (File.Exists(picpath)) - { - imageListPreviewPics.Images.Add(Image.FromFile(picpath)); - } - else - { - imageListPreviewPics.Images.Add(Image.FromFile("vam.png")); - } - } - var item = listViewPreviewPics.Items.Add(Path.GetFileNameWithoutExtension(picpath), imageListPreviewPics.Images.Count - 1); - item.SubItems.Add(varname); - item.SubItems.Add(picpath); - item.SubItems.Add(installed.ToString()); - item.SubItems.Add(typename); - item.SubItems.Add(scenepath); - item.SubItems.Add(ispreset.ToString()); - } - } - - private void listViewPreviewPics_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) - { - var curpriviewpic = previewpicsfilter[e.ItemIndex]; - string key = "vam.png"; - if (!string.IsNullOrWhiteSpace(curpriviewpic.Picpath)) - { - string picpath= Path.Combine(Settings.Default.varspath, previewpicsDirName, curpriviewpic.Atomtype, curpriviewpic.Varname, curpriviewpic.Picpath); - if (File.Exists(picpath)) - key = picpath; - else - { - this.BeginInvoke(addlog, new Object[] { $"{picpath} is missing,Please run 'fix preview'", LogLevel.WARNING }); - buttonFixPreview.Focus(); - } - - } - if (!imageListPreviewPics.Images.ContainsKey(key)) - { - imageListPreviewPics.Images.Add(key, Image.FromFile(key)); - if (imageListPreviewPics.Images.Count > 20) imageListPreviewPics.Images.RemoveAt(0); - } - string itemname = Path.GetFileNameWithoutExtension(curpriviewpic.Picpath); - if(string.IsNullOrEmpty(itemname)) - { - itemname = curpriviewpic.Atomtype + "_" + Path.GetFileNameWithoutExtension(curpriviewpic.ScenePath); - } - e.Item = new ListViewItem(itemname, imageListPreviewPics.Images.IndexOfKey(key)); - e.Item.SubItems.Add(curpriviewpic.Varname); - e.Item.SubItems.Add(key); - e.Item.SubItems.Add(curpriviewpic.Installed.ToString()); - e.Item.SubItems.Add(curpriviewpic.Atomtype); - e.Item.SubItems.Add(curpriviewpic.ScenePath); - e.Item.SubItems.Add(curpriviewpic.IsPreset.ToString()); - - } - /* - private void backgroundWorkerPreview_DoWork(object sender, DoWorkEventArgs e) - { - InvokePreviewPics previewpics = new InvokePreviewPics(PreviewPics); - int startpic = maxpicxPerpage * previewCurPage; - listViewPreviewPics.BeginInvoke(previewpics, "clear", "", true, "", "", true); - for (int i = 0; i < maxpicxPerpage; i++) - { - Thread.Sleep(5); - if (backgroundWorkerPreview.CancellationPending) - { - //Tell the Backgroundworker you are canceling and exit the for-loop - e.Cancel = true; - return; - } - mutex.Wait(); - if (previewpicsfilter.Count > startpic + i) - { - this.BeginInvoke(previewpics, - previewpicsfilter[startpic + i].Varname, - previewpicsfilter[startpic + i].Picpath, - previewpicsfilter[startpic + i].Installed, - previewpicsfilter[startpic + i].Atomtype, - previewpicsfilter[startpic + i].ScenePath, - previewpicsfilter[startpic + i].IsPreset - ); - - } - mutex.Release(); - } - } - */ - - private void toolStripComboBoxPreviewType_SelectedIndexChanged(object sender, EventArgs e) - { - PreviewInitType(); - } - /* - private void toolStripComboBoxPreviewPage_SelectedIndexChanged(object sender, EventArgs e) - { - PreviewPage(); - } - - private void PreviewPage() - { - previewCurPage = toolStripComboBoxPreviewPage.SelectedIndex; - while (backgroundWorkerPreview.IsBusy) - { - backgroundWorkerPreview.CancelAsync(); - // Keep UI messages moving, so the form remains - // responsive during the asynchronous operation. - Application.DoEvents(); - } - backgroundWorkerPreview.RunWorkerAsync(); - } - */ - private void toolStripButtonPreviewFirst_Click(object sender, EventArgs e) - { - int selectindex = 0; - listViewPreviewPics.Items[selectindex].Selected = true; - listViewPreviewPics.EnsureVisible(selectindex); - // if (toolStripComboBoxPreviewPage.SelectedIndex > 0) toolStripComboBoxPreviewPage.SelectedIndex = 0; - } - - private void toolStripButtonPreviewPrev_Click(object sender, EventArgs e) - { - int selectindex = 0; - if (listViewPreviewPics.SelectedIndices.Count >= 1) - { - int index = listViewPreviewPics.SelectedIndices[0]; - if (index > 0) selectindex = index - 1; - } - - listViewPreviewPics.Items[selectindex].Selected = true; - listViewPreviewPics.EnsureVisible(selectindex); - // if (toolStripComboBoxPreviewPage.SelectedIndex > 0) toolStripComboBoxPreviewPage.SelectedIndex--; - } - - private void toolStripButtonPreviewNext_Click(object sender, EventArgs e) - { - int selectindex = listViewPreviewPics.Items.Count-1; - if (listViewPreviewPics.SelectedIndices.Count >= 1) - { - int index = listViewPreviewPics.SelectedIndices[0]; - if (index < listViewPreviewPics.Items.Count - 1) selectindex = index + 1; - } - - listViewPreviewPics.Items[selectindex].Selected = true; - listViewPreviewPics.EnsureVisible(selectindex); - // if (toolStripComboBoxPreviewPage.SelectedIndex < toolStripComboBoxPreviewPage.Items.Count - 1) toolStripComboBoxPreviewPage.SelectedIndex++; - } - - private void toolStripButtonPreviewLast_Click(object sender, EventArgs e) - { - int selectindex = listViewPreviewPics.Items.Count - 1; - listViewPreviewPics.Items[selectindex].Selected = true; - listViewPreviewPics.EnsureVisible(selectindex); - // if (toolStripComboBoxPreviewPage.SelectedIndex < toolStripComboBoxPreviewPage.Items.Count - 1) toolStripComboBoxPreviewPage.SelectedIndex = toolStripComboBoxPreviewPage.Items.Count - 1; - - } - - private void buttonStaleVars_Click(object sender, EventArgs e) - { - /* - string message = $"Stale var means:\r\n1,The version is not the latest.\r\n2,Not depended by other var.\r\nThey will be moved to the {staleVarsDirName} directory"; - - const string caption = "StaleVars"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - */ - FormStaleVars formStaleVars = new FormStaleVars(); - if (formStaleVars.ShowDialog() == DialogResult.OK) - { - if (formStaleVars.removeOldVersion) - backgroundWorkerInstall.RunWorkerAsync("OldVersionVars"); - else - backgroundWorkerInstall.RunWorkerAsync("StaleVars"); - } - } - - void StaleVars() - { - var varsData = dbContext.Vars.ToList(); // Execute query first - var query = varsData.GroupBy(g => g.CreatorName + "." + g.PackageName) - .Select(group => new - { - Key = group.Key, - Count = group.Count(), - MaxVersion = group.Where(v => int.TryParse(v.Version, out _)) - .Select(v => int.TryParse(v.Version, out int ver) ? ver : 0) - .DefaultIfEmpty(0) - .Max(), - Vars = group.ToList() - }); - List listOldvar = new List(); - foreach (var result in query) - { - if (result.Count > 1) - { - foreach (var oldvar in result.Vars.Where(v => (int.TryParse(v.Version, out int ver) ? ver : 0) != result.MaxVersion)) - { - listOldvar.Add(oldvar.VarName!); - } - } - } - string stalepath = Path.Combine(Settings.Default.varspath, staleVarsDirName); - if (!Directory.Exists(stalepath)) - Directory.CreateDirectory(stalepath); - var installedvars = GetInstalledVars(); - foreach (var oldvar in listOldvar) - { - if (dbContext.Dependencies.Count(q => q.DependencyName == oldvar) == 0) - { - if (installedvars.ContainsKey(oldvar)) - { - File.Delete(installedvars[oldvar]); - } - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == oldvar); - if (varsrow != null) - { - string oldv = Path.Combine(Settings.Default.varspath, varsrow.VarPath!, oldvar + ".var"); - string stalev = Path.Combine(stalepath, oldvar + ".var"); - try - { - this.BeginInvoke(addlog, new Object[] { $"move {oldv} to {stalepath}.", LogLevel.INFO }); - File.Move(oldv, stalev); - CleanVar(oldvar); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"{oldv} move failed,{ex.Message}", LogLevel.ERROR }); - } - } - } - } - System.Diagnostics.Process.Start(stalepath); - } - - void OldVersionVars() - { - var varsData = dbContext.Vars.Where(q => q.Plugins <= 0 || q.Scenes > 0 || q.Looks > 0).ToList(); - var versionLastest = varsData.GroupBy(g => g.CreatorName + "." + g.PackageName) - .Select(group => new - { - Key = group.Key, - Count = group.Count(), - MaxVersion = group.Where(v => int.TryParse(v.Version, out _)) - .Select(v => int.TryParse(v.Version, out int ver) ? ver : 0) - .DefaultIfEmpty(0) - .Max(), - Vars = group.ToList() - }); - List listOldvar = new List(); - foreach (var result in versionLastest) - { - if (result.Count > 1) - { - foreach (var oldvar in result.Vars.Where(v => (int.TryParse(v.Version, out int ver) ? ver : 0) != result.MaxVersion)) - { - listOldvar.Add(oldvar.VarName!); - } - } - } - string oldversionpath = Path.Combine(Settings.Default.varspath, oldVersionVarsDirName); - if (!Directory.Exists(oldversionpath)) - Directory.CreateDirectory(oldversionpath); - var installedvars = GetInstalledVars(); - foreach (var oldvar in listOldvar) - { - if (installedvars.ContainsKey(oldvar)) - { - string basename = oldvar.Substring(0, oldvar.LastIndexOf(".")); - string varlastest = basename + "." + versionLastest.Where(q => q.Key == basename).First().MaxVersion.ToString(); - File.Delete(installedvars[oldvar]); - VarInstall(varlastest); - } - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == oldvar); - if (varsrow != null) - { - string oldv = Path.Combine(Settings.Default.varspath, varsrow.VarPath!, oldvar + ".var"); - string oldversionv = Path.Combine(oldversionpath, oldvar + ".var"); - try - { - this.BeginInvoke(addlog, new Object[] { $"move {oldv} to {oldversionpath}.", LogLevel.INFO }); - File.Move(oldv, oldversionv); - CleanVar(oldvar); - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"{oldv} move failed,{ex.Message}", LogLevel.ERROR }); - } - } - } - System.Diagnostics.Process.Start(oldversionpath); - } - - private void textBoxFilter_TextChanged(object sender, EventArgs e) - { - FilterVars(); - } - - private void checkBoxInstalled_CheckStateChanged(object sender, EventArgs e) - { - FilterVars(); - } - - private void varsViewDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (varsViewDataGridView.Columns[e.ColumnIndex].Name == "installedDataGridViewCheckBoxColumn" && e.RowIndex >= 0) - { - string varName = varsViewDataGridView.Rows[e.RowIndex].Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - bool installed = false; - var row = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varName); - if (row != null) - { - installed = row.Installed; - } - if (installed) - { - UninstallVarWithPreview(varName); - } - else - { - string message = varName + " will be installed, are you sure?"; - string caption = "Install Var"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result == DialogResult.Yes) - { - try - { - RunBackendJob("vars_toggle_install", new { var_name = varName, include_dependencies = true, include_implicated = true }); - RefreshVarsViewUi(); - RunBackendJob("rescan_packages", null); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"瀹夎澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - } - } - if (varsViewDataGridView.Columns[e.ColumnIndex].Name == "ColumnDetail" && e.RowIndex >= 0) - { - string varName = varsViewDataGridView.Rows[e.RowIndex].Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - VarDetail(varName); - } - } - - public bool IsVarInstalled(string varName) - { - var installstatusrow = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varName); - if (installstatusrow != null) - return installstatusrow.Installed; - else - return false; - } - private void VarDetail(string varName) - { - FormVarDetail formVarDetail = new FormVarDetail(); - formVarDetail.form1 = this; - formVarDetail.strVarName = varName; - - formVarDetail.dependencies = new Dictionary(); - foreach(var dependrow in dbContext.Dependencies.Where(q => q.VarName == varName)) - { - string existName = VarExistName(dependrow.DependencyName!); - if (existName.EndsWith("$")) - { - existName = existName.Substring(0, existName.Length - 1); - } - formVarDetail.dependencies[dependrow.DependencyName!] = existName; - } - formVarDetail.DependentVarList = DependentVars(varName); - formVarDetail.DependentJsonList = DependentSaved(varName); - if (formVarDetail.ShowDialog() == DialogResult.OK) - { - if (formVarDetail.strAction == "filter") - { - string creator = varName.Substring(0, varName.IndexOf(".")); - comboBoxCreater.Text = creator; - } - } - } - - private void buttonInstall_Click(object sender, EventArgs e) - { - List varNames = new List(); - foreach (DataGridViewRow row in varsViewDataGridView.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - bool install = false; - var varsrow = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varName); - if (varsrow != null) - { - if (varsrow.Installed) - { - install = true; ; - } - } - if (!install) - { - varNames.Add(varName); - } - } - if (varNames.Count <= 0) return; - int max = 500; - if (varNames.Count > max) - { - MessageBox.Show($"Please do not install more than {max} files at once"); - return; - } - string message = $"There are {varNames.Count} vars and their dependencies will be installed, are you sure?"; - string caption = "Install Var"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result == DialogResult.Yes) - { - try - { - RunBackendJob("install_vars", new { var_names = varNames, include_dependencies = true }); - RefreshVarsViewUi(); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"瀹夎澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - } - public List GetDependents(string dependName) - { - List result = new List(); - foreach (var dependrow in dbContext.Dependencies.Where(q => q.DependencyName == dependName)) - { - result.Add(dependrow.VarName!); - } - foreach (var dependrow in dbContext.SavedDependencies.Where(q => q.DependencyName == dependName)) - { - result.Add(dependrow.SavePath!); - } - return result; - - } - - private void buttonpreviewback_Click(object sender, EventArgs e) - { - tableLayoutPanelPreview.Visible = false; - } - - private void buttonScenesManager_Click(object sender, EventArgs e) - { - FormScenes formScenes = new FormScenes(); - formScenes.form1 = this; - formScenes.Show(); - } - - private void pictureBoxPreview_Click(object sender, EventArgs e) - { - tableLayoutPanelPreview.Visible = false; - } - private string curVarName = "",curEntryName=""; - private JSONClass jsonLoadScene; - private void listViewPreviewPics_Click(object sender, EventArgs e) - { - if (listViewPreviewPics.SelectedIndices.Count >= 1) - { - tableLayoutPanelPreview.Dock = DockStyle.Fill; - tableLayoutPanelPreview.Visible = true; - int index = listViewPreviewPics.SelectedIndices[0]; - toolStripLabelPreviewItemIndex.Text = index.ToString(); - var item = listViewPreviewPics.Items[index]; - if (item != null) - { - curVarName = item.SubItems[1].Text; - curEntryName = item.SubItems[5].Text; - labelPreviewVarName.Text = curVarName; - if (string.IsNullOrEmpty(item.SubItems[2].Text)) - pictureBoxPreview.Image = pictureBoxPreview.Image = Image.FromFile("vam.png"); - else - pictureBoxPreview.Image = Image.FromFile(item.SubItems[2].Text); - - if (item.SubItems[3].Text.ToLower() == "true") - { - buttonpreviewinstall.Text = "Uninstall"; - buttonpreviewinstall.ForeColor = Color.Red; - } - - else - { - buttonpreviewinstall.Text = "Install"; - buttonpreviewinstall.ForeColor = Color.DarkBlue; - } - - if (item.SubItems[4].Text.ToLower() == "scenes" || item.SubItems[6].Text.ToLower() == "true") - { - buttonLoad.Visible = true; - checkBoxMerge.Visible = true; - checkBoxMerge.Checked = false; - buttonLoad.Text = "Load " + item.SubItems[4].Text; - string rescan = "false"; - if (item.SubItems[3].Text.ToLower() == "false") - rescan = "true"; - - jsonLoadScene = new JSONClass(); - jsonLoadScene.Add("rescan", rescan); - - jsonLoadScene.Add("resources", new JSONArray()); - JSONArray resources = jsonLoadScene["resources"].AsArray; - resources.Add(new JSONClass()); - JSONClass resource = (JSONClass)resources[resources.Count - 1]; - resource.Add("type", item.SubItems[4].Text.ToLower()); - resource.Add("saveName", curVarName + ":/" + curEntryName.Replace('\\', '/')); - UpdateButtonClearCache(); - - if (item.SubItems[4].Text.ToLower() == "scenes" || item.SubItems[4].Text.ToLower() == "looks") - { - buttonAnalysis.Visible = true; - } - else - { - buttonAnalysis.Visible = false; - } - if (item.SubItems[4].Text.ToLower() == "looks" || item.SubItems[4].Text.ToLower() == "clothing" || - item.SubItems[4].Text.ToLower() == "morphs" || item.SubItems[4].Text.ToLower() == "hairstyle" || - item.SubItems[4].Text.ToLower() == "skin" || item.SubItems[4].Text.ToLower() == "pose") - { - groupBoxPersonOrder.Visible = true; - checkBoxIgnoreGender.Visible = true; - } - else - { - groupBoxPersonOrder.Visible = false; - checkBoxIgnoreGender.Visible = false; - } - if (item.SubItems[4].Text.ToLower() == "morphs" || - item.SubItems[4].Text.ToLower() == "skin" || - item.SubItems[4].Text.ToLower() == "pose") - { - checkBoxForMale.Visible = true; - } - else - { - checkBoxForMale.Visible = false; - } - } - else - { - buttonLoad.Visible = false; - checkBoxMerge.Visible = false; - buttonAnalysis.Visible = false; - } - } - } - } - - private void UpdateButtonClearCache() - { - string sceneCacheFolderName = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(curVarName), Comm.ValidFileName(curEntryName.Replace('\\', '_').Replace('/', '_'))); - if (Directory.Exists(sceneCacheFolderName)) - { - buttonClearCache.Visible = true; - } - else - { - buttonClearCache.Visible = false; - } - } - - private static string GetKnownFolderPath(Guid knownFolderId) - { - IntPtr pszPath = IntPtr.Zero; - try - { - int hr = SHGetKnownFolderPath(knownFolderId, 0, IntPtr.Zero, out pszPath); - if (hr >= 0) - return Marshal.PtrToStringAuto(pszPath); - throw Marshal.GetExceptionForHR(hr); - } - finally - { - if (pszPath != IntPtr.Zero) - Marshal.FreeCoTaskMem(pszPath); - } - } - - [DllImport("shell32.dll")] - static extern int SHGetKnownFolderPath([MarshalAs(UnmanagedType.LPStruct)] Guid rfid, uint dwFlags, IntPtr hToken, out IntPtr pszPath); - - private void buttonLogAnalysis_Click(object sender, EventArgs e) - { - string message = "Analyzing dependencies from log file, otherwise a processing window will be opened.\r\nThis feature requires the game to be closed"; - - const string caption = "LogAnalysis"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - backgroundWorkerInstall.RunWorkerAsync("LogAnalysis"); - } - } - - private void LogAnalysis() - { - Guid localLowId = new Guid("A520A1A4-1780-4FF6-BD18-167343C5AF16"); - string appdataPath = GetKnownFolderPath(localLowId); - string logfile = Path.Combine(appdataPath, "MeshedVR\\VaM\\output_log.txt"); - if (File.Exists(logfile)) - { - string logstring; - using (var metajsonsteam = new StreamReader(logfile)) - { - logstring = metajsonsteam.ReadToEnd(); - } - System.Diagnostics.Process.Start(logfile); - List dependencies = new List(); - try - { - Regex regexObj = new Regex(@"Missing\s+addon\s+package\s+(?[^\x3A\x2E]{1,60}\x2E[^\x3A\x2E]{1,80}\x2E(?:\d+|latest))\s+that\s+package(?[^\x3A\x2E]{1,60}\x2E[^\x3A\x2E]{1,80}\x2E\d+)", RegexOptions.IgnoreCase | RegexOptions.Singleline); - Match matchResult = regexObj.Match(logstring); - while (matchResult.Success) - { - dependencies.Add(matchResult.Groups["depens"].Value); - matchResult = matchResult.NextMatch(); - } - } - catch (ArgumentException ex) - { - this.BeginInvoke(addlog, new Object[] { "LogAnalysis failed" + ex.Message, LogLevel.ERROR }); - } - dependencies = dependencies.Distinct().ToList(); - List missingvars = new List(); - foreach (string varname in dependencies) - { - string varexistname = VarExistName(varname); - if (varexistname.EndsWith("$")) - { - varexistname = varexistname.Substring(0, varexistname.Length - 1); - missingvars.Add(varname + "$"); - } - if (varexistname != "missing") - { - VarInstall(varexistname); - this.BeginInvoke(addlog, new Object[] { varexistname + " installed", LogLevel.INFO }); - } - else - { - missingvars.Add(varname); - } - } - if (missingvars.Count > 0) - { - InvokeShowformMissingVars showformMissingVars = new InvokeShowformMissingVars(ShowformMissingVars); - this.BeginInvoke(showformMissingVars, missingvars); - } - } - } - - private void varsViewDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e) - { - this.BeginInvoke(addlog, new Object[] { $"varsViewDataGridView_DataError, {e.Exception.Message}", LogLevel.ERROR }); - } - - private void buttonUninstallSels_Click(object sender, EventArgs e) - { - List varNames = new List(); - foreach (DataGridViewRow row in varsViewDataGridView.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - var varsrow = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varName); - if (varsrow != null) - { - if (varsrow.Installed) - { - varNames.Add(varName); - } - } - } - if (varNames.Count <= 0) - { - return; - } - int max = 500; - if (varNames.Count > max) - { - MessageBox.Show($"Please do not uninstall more than {max} files at once"); - return; - } - - // Step 1: Call preview_uninstall API to get the full list - BackendJobResult previewResult; - try - { - previewResult = RunBackendJob("preview_uninstall", new { var_names = varNames, include_implicated = true }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"棰勮鍗歌浇鍒楄〃澶辫触: {ex.Message}", LogLevel.ERROR }); - return; - } - - if (!previewResult.Succeeded) - { - BeginInvoke(addlog, new Object[] { "棰勮鍗歌浇鍒楄〃澶辫触", LogLevel.ERROR }); - return; - } - - var preview = DeserializeResult(previewResult); - if (preview == null || preview.var_list == null) - { - BeginInvoke(addlog, new Object[] { "鏃犳硶瑙f瀽棰勮缁撴灉", LogLevel.ERROR }); - return; - } - - // Step 2: Show preview window if there are implicated vars - if (preview.implicated.Count > 0) - { - FormUninstallVars formUninstallVars = new FormUninstallVars(); - formUninstallVars.previewpicsDirName = previewpicsDirName; - formUninstallVars.Text = "Uninstall Vars Preview"; - formUninstallVars.VarsToUninstall = preview.var_list; - - if (formUninstallVars.ShowDialog() != DialogResult.OK) - { - return; - } - } - else - { - // No implicated vars, show simple confirmation dialog - string message = $"There are {varNames.Count} vars will be uninstalled, are you sure?"; - string caption = "Uninstall Vars"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result != DialogResult.Yes) - { - return; - } - } - - // Step 3: Execute uninstall - try - { - RunBackendJob("uninstall_vars", new { var_names = varNames, include_implicated = true }); - RefreshVarsViewUi(); - RunBackendJob("rescan_packages", null); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍗歌浇澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - - private bool UninstallVarWithPreview(string varName) - { - // Call preview_uninstall API to get the full list - BackendJobResult previewResult; - try - { - previewResult = RunBackendJob("preview_uninstall", new { var_names = new[] { varName }, include_implicated = true }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"棰勮鍗歌浇鍒楄〃澶辫触: {ex.Message}", LogLevel.ERROR }); - return false; - } - - if (!previewResult.Succeeded) - { - BeginInvoke(addlog, new Object[] { "棰勮鍗歌浇鍒楄〃澶辫触", LogLevel.ERROR }); - return false; - } - - var preview = DeserializeResult(previewResult); - if (preview == null || preview.var_list == null) - { - BeginInvoke(addlog, new Object[] { "鏃犳硶瑙f瀽棰勮缁撴灉", LogLevel.ERROR }); - return false; - } - - // Show preview window if there are implicated vars - if (preview.implicated.Count > 0) - { - FormUninstallVars formUninstallVars = new FormUninstallVars(); - formUninstallVars.previewpicsDirName = previewpicsDirName; - formUninstallVars.Text = "Uninstall Vars Preview"; - formUninstallVars.VarsToUninstall = preview.var_list; - - if (formUninstallVars.ShowDialog() != DialogResult.OK) - { - return false; - } - } - else - { - // No implicated vars, show simple confirmation dialog - string message = varName + " will be removed, are you sure?"; - string caption = "Remove Var"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result != DialogResult.Yes) - { - return false; - } - } - - // Execute uninstall - try - { - RunBackendJob("vars_toggle_install", new { var_name = varName, include_dependencies = true, include_implicated = true }); - RefreshVarsViewUi(); - RunBackendJob("rescan_packages", null); - return true; - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍗歌浇澶辫触: {ex.Message}", LogLevel.ERROR }); - return false; - } - } - - private void buttonDelete_Click(object sender, EventArgs e) - { - List varNames = new List(); - foreach (DataGridViewRow row in varsViewDataGridView.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - - varNames.Add(varName); - } - if (varNames.Count <= 0) return; - int max = 50; - if (varNames.Count > max) - { - MessageBox.Show($"Please do not delete more than {max} files at once"); - return; - } - string message = $"There are {varNames.Count} vars and their dependencies will be delete, are you sure?"; - string caption = "Delete Vars"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result == DialogResult.Yes) - { - try - { - RunBackendJob("delete_vars", new { var_names = varNames, include_implicated = true }); - RefreshVarsViewUi(); - RunBackendJob("rescan_packages", null); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍒犻櫎澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - } - - private void buttonMove_Click(object sender, EventArgs e) - { - List varNames = new List(); - foreach (DataGridViewRow row in varsViewDataGridView.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - var varsrow = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varName); - if (varsrow != null) - { - if (varsrow.Installed) - { - varNames.Add(varName); - } - } - } - if (varNames.Count <= 0) return; - FormVarsMove fvm = new FormVarsMove(); - fvm.VarlinkDirName = installLinkDirName; - fvm.VarsToMove = varNames; - if (fvm.ShowDialog() == DialogResult.OK) - { - try - { - RunBackendJob("links_move", new { var_names = varNames, target_dir = fvm.MovetoDirName }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"绉诲姩澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - - } - - private void buttonExpInsted_Click(object sender, EventArgs e) - { - if (saveFileDialogExportInstalled.ShowDialog() == DialogResult.OK) - { - try - { - RunBackendJob("vars_export_installed", new { path = saveFileDialogExportInstalled.FileName }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"瀵煎嚭澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - } - - private void buttonInstFormTxt_Click(object sender, EventArgs e) - { - if (openFileDialogInstByTXT.ShowDialog() == DialogResult.OK) - { - try - { - RunBackendJob("vars_install_batch", new { path = openFileDialogInstByTXT.FileName }); - RunBackendJob("rescan_packages", null); - RefreshVarsViewUi(); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鎵归噺瀹夎澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - } - - private void comboBoxPacksSwitch_SelectedIndexChanged(object sender, EventArgs e) - { - - string sw = (string)comboBoxPacksSwitch.SelectedItem; - if (!string.IsNullOrEmpty(sw)) - { - buttonPacksDelete.Enabled = (sw != "default"); - varpacksSwitch(sw); - - } - else - { - buttonPacksDelete.Enabled = false; - } - } - - private void varpacksSwitch(string sw) - { - this.BeginInvoke(addlog, new Object[] { $"Point the Addonpackages symbo-link to '{sw}'", LogLevel.INFO }); - try - { - RunBackendJob("packswitch_set", new { name = sw }); - RefreshVarsViewUi(); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍒囨崲澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - - private static void RescanPackages() - { - var vamproc = Process.GetProcessesByName("vam"); - if (vamproc.Length > 0) - { - string loadscenefile = Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar\\loadscene.json"); - if (File.Exists(loadscenefile)) File.Delete(loadscenefile); - Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar")); - JSONClass jc = new JSONClass(); - jc["rescan"] = "true"; - using (StreamWriter swLoad = new StreamWriter(loadscenefile)) - { - swLoad.Write(jc.ToString()); - } - } - } - - private void buttonPacksAdd_Click(object sender, EventArgs e) - { - FormSwitchAdd formSwitchAdd = new FormSwitchAdd(); - if (formSwitchAdd.ShowDialog() == DialogResult.OK) - { - try - { - RunBackendJob("packswitch_add", new { name = formSwitchAdd.SwitchName }); - if (comboBoxPacksSwitch.Items.IndexOf(formSwitchAdd.SwitchName) < 0) - { - comboBoxPacksSwitch.Items.Add(formSwitchAdd.SwitchName); - } - comboBoxPacksSwitch.SelectedItem = formSwitchAdd.SwitchName; - } - catch (Exception ex) - { - MessageBox.Show($"Switch create failed: {ex.Message}"); - } - } - } - - private void buttonPacksDelete_Click(object sender, EventArgs e) - { - string curswitch = (string)comboBoxPacksSwitch.SelectedItem; - if (!string.IsNullOrEmpty(curswitch) && curswitch != "default") - { - if (MessageBox.Show($"Will delete {curswitch} AddonPackagesSwitch, sure?", "delete switch", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - try - { - RunBackendJob("packswitch_delete", new { name = curswitch }); - comboBoxPacksSwitch.Items.Remove(curswitch); - comboBoxPacksSwitch.SelectedItem = "default"; - } - catch (Exception ex) - { - MessageBox.Show($"Switch delete failed: {ex.Message}"); - } - } - } - - } - - private void buttonPacksRename_Click(object sender, EventArgs e) - { - string curswitch = (string)comboBoxPacksSwitch.SelectedItem; - if (!string.IsNullOrEmpty(curswitch) && curswitch != "default") - { - FormSwitchRename formSwitchRename = new FormSwitchRename(); - formSwitchRename.OldName = curswitch; - if (formSwitchRename.ShowDialog() == DialogResult.OK) - { - string newName = formSwitchRename.NewName; - try - { - RunBackendJob("packswitch_rename", new { old_name = curswitch, new_name = newName }); - comboBoxPacksSwitch.Items[comboBoxPacksSwitch.SelectedIndex] = newName; - comboBoxPacksSwitch.SelectedItem = newName; - } - catch (Exception ex) - { - MessageBox.Show($"Switch rename failed: {ex.Message}"); - } - } - } - } - private (string,string) SaveNameSplit(string saveName) - { - string varname = "save", entryname = saveName; - if (saveName.IndexOf(":/") > 1) - { - string[] savenamesplit = saveName.Split(new string[] { ":/" }, StringSplitOptions.RemoveEmptyEntries); - if (savenamesplit.Length >= 2) - { - varname = savenamesplit[0]; - entryname = savenamesplit[1]; - } - } - return (varname, entryname); - } - private void buttonLoad_Click(object sender, EventArgs e) - { - bool merge = false; - if (checkBoxMerge.Checked) merge = true; - bool ignoreGender = false; - if (checkBoxIgnoreGender.Checked) ignoreGender = true; - string characterGender = "unknown"; - if (checkBoxForMale.Visible) - { - if (checkBoxForMale.Checked) characterGender = "male"; - else characterGender = "female"; - } - int personOrder = 1; - foreach (RadioButton rbperson in groupBoxPersonOrder.Controls) - { - if (rbperson.Checked) - { - personOrder = int.Parse(rbperson.Text); - break; - } - } - tableLayoutPanelPreview.Visible = false; - Cursor = Cursors.WaitCursor; - try - { - LoadScene(jsonLoadScene, merge, ignoreGender, characterGender, personOrder); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"Load scene failed: {ex.Message}", LogLevel.ERROR }); - } - Cursor = Cursors.Arrow; - UpdateButtonClearCache(); - } - - public void LoadScene(JSONClass jc,bool merge, bool ignoreGender, string characterGender, int personOrder) - { - var jsonElement = JsonSerializer.Deserialize(jc.ToString()); - RunBackendJob("scene_load", new - { - json = jsonElement, - merge = merge, - ignore_gender = ignoreGender, - character_gender = characterGender, - person_order = personOrder - }); - } - - public bool FindByvarName(string varName) - { - bool inRepository = false; - if (varName.EndsWith(".var")) - varName = varName.Substring(0, varName.Length - 4); - if (dbContext.Vars.Any(v => v.VarName == varName)) - { - inRepository = true; - } - return inRepository; - } - public void GenLoadscenetxt(JSONClass jsonLS,bool merge, List dependVars,string characterGender="female", bool ignoreGender = false,int personOrder=1 ) - { - JSONClass jsonls = (JSONClass)JSONNode.Parse(jsonLS.ToString()); - List deletetempfiles = new List(); - JSONArray resources = jsonls["resources"].AsArray; - foreach (JSONClass resource in resources) - { - if (!resource.HasKey("merge")) - resource["merge"] = merge.ToString().ToLower(); - if (!resource.HasKey("characterGender")) - resource["characterGender"] = characterGender; - if (!resource.HasKey("ignoreGender")) - resource["ignoreGender"] = ignoreGender.ToString().ToLower(); - if (!resource.HasKey("personOrder")) - resource["personOrder"] = personOrder.ToString(); - if (resource.HasKey("type")) - { - if (resource["type"].Value == "scenes") - { - deletetempfiles = AddDeleteTemp(); - break; - } - } - } - - // if (jsonls["rescan"].AsBool) - //{ - //List varnames = new List(); - if (dependVars == null) - { - dependVars = new List(); - foreach (JSONClass resource in resources) - { - string saveName = resource["saveName"].Value; - dependVars.Add(saveName.Substring(0, saveName.IndexOf(":/"))); - } - } - bool rescan = false; - var installtemplist = InstallTemp(dependVars.ToArray(), ref rescan); - jsonls["rescan"] = rescan.ToString(); - foreach (var installtemp in installtemplist) - deletetempfiles.Remove(installtemp.ToLower() + ".var"); - // } - string loadscenefile = Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar\\loadscene.json"); - if (File.Exists(loadscenefile)) File.Delete(loadscenefile); - Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar")); - //StreamWriter sw = new StreamWriter(loadscenefile); - - - string strLS = jsonls.ToString("\t"); - using (FileStream fileStream = File.OpenWrite(loadscenefile)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strLS); - sw.Close(); - } - // jsonLS.SaveToFile(loadscenefile); - //sw.Write(jsonLS); - //sw.Close(); - if (deletetempfiles.Count > 0) - { - Thread thread = new Thread(DeleteTempThread); - thread.Start(deletetempfiles); - } - } - - public static List AddDeleteTemp() - { - DirectoryInfo templinkdirinfo = Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "AddonPackages", tempVarLinkDirName)); - - List tempfiles = new List(); - foreach (FileInfo tempfinfo in templinkdirinfo.GetFiles()) - { - if (tempfinfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - tempfiles.Add(tempfinfo.Name.ToLower()); - //tempfinfo.Delete(); - } - return tempfiles; - } - - public static void DeleteTempThread(object data) - { - List tempfiles = data as List; - string loadscenefile = Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar\\loadscene.json"); - - while (true) - { - Thread.Sleep(2000); - if (File.Exists(loadscenefile)) - { - continue; - } - else - { - Thread.Sleep(20000); - foreach (string tempf in tempfiles) - { - try - { - if (File.Exists(Path.Combine(Settings.Default.vampath, "AddonPackages", tempVarLinkDirName, tempf))) - File.Delete(Path.Combine(Settings.Default.vampath, "AddonPackages", tempVarLinkDirName, tempf)); - } - catch { } - } - break; - } - } - } - - public List InstallTemp(string[] varNames,ref bool rescan) - { - rescan = false; - List varnames = new List(); - varnames.AddRange(varNames); - varnames = VarsDependencies(varnames); - varnames = varnames.Except(GetInstalledVars().Keys).ToList(); - DirectoryInfo templinkdirinfo = Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "AddonPackages", tempVarLinkDirName)); - - foreach (string varname in varnames) - { - var rows = dbContext.VarsView.Where(q => q.VarName == varname); - if (rows.Any()) - { - if (!rows.First().Installed) - if (VarInstall(varname, true) == 1) - rescan = true; - } - else - { - this.BeginInvoke(addlog, new Object[] { string.Format("missing var:{0},install failed", varname), LogLevel.INFO }); - } - } - return varnames; - } - - private void checkBoxPreviewTypeLoadable_CheckedChanged(object sender, EventArgs e) - { - PreviewInitType(); - } - - private void buttonLocate_Click(object sender, EventArgs e) - { - string varName = labelPreviewVarName.Text; - LocateVar(varName); - } - - public void LocateVar(string varName) - { - try - { - RunBackendJob("vars_locate", new { var_name = varName }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"瀹氫綅澶辫触: {ex.Message}", LogLevel.ERROR }); - } - } - - private void buttonpreviewinstall_Click(object sender, EventArgs e) - { - string varName = labelPreviewVarName.Text; - bool isInstalled = dbContext.InstallStatuses.Any(q => q.VarName == varName && q.Installed); - if (isInstalled) - { - UninstallVarWithPreview(varName); - } - else - { - string message = varName + " will install, are you sure?"; - string caption = "Install Var"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button2); - if (result == DialogResult.Yes) - { - try - { - RunBackendJob("vars_toggle_install", new { var_name = varName, include_dependencies = true, include_implicated = true }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"瀹夎澶辫触: {ex.Message}", LogLevel.ERROR }); - return; - } - } - } - RefreshVarsViewUi(); - try - { - RunBackendJob("rescan_packages", null); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"Rescan failed: {ex.Message}", LogLevel.ERROR }); - } - } - - private void buttonAnalysis_Click(object sender, EventArgs e) - { - string characterGender = "female"; - if (checkBoxForMale.Visible) - { - characterGender = checkBoxForMale.Checked ? "male" : "female"; - } - Analysisscene(jsonLoadScene, characterGender); - UpdateButtonClearCache(); - } - - public void Analysisscene(JSONClass jsonLS, string characterGender = "female") - { - JSONClass jsonls = (JSONClass)JSONNode.Parse(jsonLS.ToString()); - JSONArray resources = jsonls["resources"].AsArray; - string saveName = ""; - if (resources.Count > 0) - { - JSONClass resource = (JSONClass)resources[0]; - saveName = resource["saveName"].Value; - } - if (string.IsNullOrEmpty(saveName)) - { - return; - } - - BackendJobResult result; - try - { - result = RunBackendJob("scene_analyze", new - { - save_name = saveName, - character_gender = characterGender - }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"鍒嗘瀽澶辫触: {ex.Message}", LogLevel.ERROR }); - return; - } - var payload = DeserializeResult(result); - if (payload == null) - { - return; - } - - FormAnalysis formAnalysis = new FormAnalysis(); - formAnalysis.form1 = this; - formAnalysis.VarName = payload.VarName; - formAnalysis.EntryName = payload.EntryName; - formAnalysis.CharacterGender = payload.CharacterGender; - formAnalysis.ShowDialog(); - } - public static string GetCharacterGender(string character) - { - string isMale = "Female"; - character = character.ToLower(); - // If the peson atom is not "On", then we cant determine their gender it seems as GetComponentInChildren just returns null - if (character.StartsWith("male") || - character.StartsWith("lee") || - character.StartsWith("jarlee") || - character.StartsWith("julian") || - character.StartsWith("jarjulian")) - { - isMale = "Male"; - } - if (character.StartsWith("futa")) - { - isMale = "Futa"; - } - return (isMale); - } - - private static string GetAtomID(JSONNode atomitem,bool isPerson=false) - { - if (isPerson) - { - string charGender = "unknown"; - JSONArray storablesArray = atomitem["storables"].AsArray; - foreach (JSONNode storablesitem in storablesArray) - { - if (storablesitem["id"].Value == "geometry") - { - charGender = GetCharacterGender(storablesitem["character"].Value); - break; - } - } - return string.Format("({1}){0}", atomitem["id"], charGender); - } - else - return atomitem["id"].Value; - } - - public bool ReadSaveName(string saveName,string characterGender,bool analysis=false) - { - UseWaitCursor = true; - string jsonscene = ""; - List depends = new List(); - (string varName, string entryName) = SaveNameSplit(saveName); - if (varName!="save") - { - depends.Add(varName); - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == varName); - string destvarfile = Path.Combine(Settings.Default.varspath, varsrow!.VarPath!, varsrow.VarName + ".var"); - using (ZipFile varzipfile = new ZipFile(destvarfile)) - { - var entry = varzipfile.GetEntry(entryName); - var entryStream = new StreamReader(varzipfile.GetInputStream(entry)); - jsonscene = entryStream.ReadToEnd(); - } - } - else - { - string jsonfile = Path.Combine(Settings.Default.vampath, saveName); - if (File.Exists(jsonfile)) - { - using (StreamReader sr = new StreamReader(jsonfile)) - { - jsonscene = sr.ReadToEnd(); - } - } - } - - if (characterGender == "unknown") - { - characterGender = "male"; - - if (jsonscene.IndexOf("/Female/") > 0|| saveName.IndexOf("/Female/") > 0) - { - characterGender = "female"; - } - } - - depends.AddRange(Getdependencies(jsonscene)); - string sceneFolder = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(varName), Comm.ValidFileName(entryName.Replace('\\', '_').Replace('/', '_'))); - Directory.CreateDirectory(sceneFolder); - string dependFilename = Path.Combine(sceneFolder, "depend.txt"); - using (StreamWriter swdepend = new StreamWriter(dependFilename)) - depends.ForEach(x => swdepend.WriteLine(x)); - - string genderFilename = Path.Combine(sceneFolder, "gender.txt"); - using (StreamWriter swgender = new StreamWriter(genderFilename)) - swgender.WriteLine(characterGender); - - if (analysis) - { - jsonscene = jsonscene.Replace("\"SELF:/", "\"" + varName + ":/"); - AnalysisAtoms(jsonscene, sceneFolder,true); - } - UseWaitCursor = false; - return true; - } - private static string[] sceneBaseAtoms = { "CoreControl", "PlayerNavigationPanel", "VRController", "WindowCamera" }; - - private static void AnalysisAtoms(string jsonscene, string sceneFolder,bool isperson) - { - JSONClass jsonnode =(JSONClass) JSON.Parse(jsonscene); - if (!jsonnode.HasKey("atoms")) - { - if (isperson) - { - string atomID = GetAtomID(jsonnode, true); - string atomtypefolder = Path.Combine(sceneFolder, "atoms", "Person"); - Directory.CreateDirectory(atomtypefolder); - string atomfilename = Path.Combine(sceneFolder, "atoms", "Person", Comm.ValidFileName(atomID + ".bin")); - jsonnode.SaveToFile(atomfilename); - /*using (StreamWriter sw = new StreamWriter(atomfilename)) - { - jsonnode.SaveToStream(sw.BaseStream); - //sw.Write(jsonnode.ToString()); - }*/ - } - else - { - string atomID = GetAtomID(jsonnode, false); - string atomfilename = Path.Combine(sceneFolder, Comm.ValidFileName(atomID + ".bin")); - jsonnode.SaveToFile(atomfilename); - /* using (StreamWriter sw = new StreamWriter(atomfilename)) - { - jsonnode.SaveToStream(sw.BaseStream); - //sw.Write(jsonnode.ToString()); - }*/ - } - return; - } - JSONClass posinfo = new JSONClass(); - foreach (KeyValuePair keyvaluejson in jsonnode as JSONClass) - { - if (keyvaluejson.Key != "atoms") - { - posinfo.Add(keyvaluejson.Key, keyvaluejson.Value); - } - } - - string posinfoFilename = Path.Combine(sceneFolder, "posinfo.bin"); - posinfo.SaveToFile(posinfoFilename); - /*using (StreamWriter sw = new StreamWriter(posinfoFilename)) - { - sw.Write(posinfo.ToString()); - }*/ - - List ListAtomtype = new List(); - JSONArray atomArray = jsonnode["atoms"].AsArray; - - Dictionary> parentAtoms=new Dictionary>(); - if (atomArray.Count > 0) - { - foreach (JSONClass atomitem in atomArray) - { - string atomtype = atomitem["type"]; - if (sceneBaseAtoms.Contains(atomtype)) - { - atomtype = "(base)" + atomtype; - } - if (atomtype != "") - { - if (!ListAtomtype.Contains(atomtype)) - { - ListAtomtype.Add(atomtype); - string atomtypefolder = Path.Combine(sceneFolder, "atoms", atomtype); - Directory.CreateDirectory(atomtypefolder); - } - if (atomtype == "SubScene") - { - string subscenefolder = Path.Combine(sceneFolder, "atoms", atomtype); - AnalysisAtoms(atomitem.ToString(), subscenefolder, false); - } - else - { - string atomID = GetAtomID(atomitem, atomtype == "Person"); - if (atomitem.HasKey("parentAtom")) - { - if (!string.IsNullOrEmpty(atomitem["parentAtom"])) - { - string parentAtom = Comm.ValidFileName(atomitem["parentAtom"]); - if (parentAtoms.ContainsKey(parentAtom)) - { - parentAtoms[parentAtom].Add(Comm.ValidFileName(atomID)); - } - else - { - parentAtoms.Add(parentAtom, new List { Comm.ValidFileName(atomID) }); - } - } - } - string atomfilename = Path.Combine(sceneFolder, "atoms", atomtype, Comm.ValidFileName(atomID + ".bin")); - atomitem.SaveToFile(atomfilename); - /*using (StreamWriter sw = new StreamWriter(atomfilename)) - { - sw.Write(atomitem.ToString()); - }*/ - } - } - } - if(parentAtoms.Count > 0) - { - string parentAtomFilename = Path.Combine(sceneFolder, "parentAtom.txt"); - using(StreamWriter sw= new StreamWriter(parentAtomFilename)) - { - foreach(var pa in parentAtoms) - { - sw.WriteLine(pa.Key + "\t" + string.Join(",", pa.Value)); - } - - } - } - - } - } - - private void buttonResetFilter_Click(object sender, EventArgs e) - { - ResetFilter(); - } - - private void ResetFilter() - { - comboBoxCreater.SelectedItem = "____ALL"; - textBoxFilter.Text = ""; - dgvFilterManager.ActivateAllFilters(false); - } - - private void SwitchControl_Enter(object sender, EventArgs e) - { - if (ExistAddonpackagesVar()) - { - if (MessageBox.Show("There are unorganized var files in the current switch, please run UPD_DB first", "warning", MessageBoxButtons.OKCancel) == DialogResult.OK) - buttonUpdDB.Focus(); - } - } - - private void buttonFixPreview_Click(object sender, EventArgs e) - { - string message = "Missing preview images will be detected and re-extracted."; - - const string caption = "RebuildLink"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - backgroundWorkerInstall.RunWorkerAsync("fixPreview"); - } - - private void buttonHub_Click(object sender, EventArgs e) - { - FormHub formhub = new FormHub(); - formhub.form1 = this; - formhub.Show(); - } - public void SelectVarInList(string varname) - { - ResetFilter(); - - int firstindex = int.MaxValue; - varsViewDataGridView.ClearSelection(); - foreach (DataGridViewRow row in varsViewDataGridView.Rows) - { - string varnameinrow = row.Cells["varNamedataGridViewTextBoxColumn"].Value.ToString(); - if (varname== varnameinrow) - { - row.Selected = true; - if (row.Index < firstindex) firstindex = row.Index; - } - } - if (firstindex == int.MaxValue) firstindex = 0; - if (varsViewDataGridView.SelectedRows.Count > 0) - { - varsViewDataGridView.FirstDisplayedScrollingRowIndex = firstindex; - } - this.WindowState = FormWindowState.Normal; - //this.Activate(); - } - - private void prepareFormSavesToolStripMenuItem_Click(object sender, EventArgs e) - { - PrepareSaves prepareSaves = new PrepareSaves(); - prepareSaves.form1 = this; - prepareSaves.ShowDialog(); - } - - private void buttonFilteredMissingDepends_Click(object sender, EventArgs e) - { - int varscount= varsViewDataGridView.Rows.Count; - string message =String.Format( "Analyzing dependencies from {0} vars on the leftside of form, a processing window will be opened.",varscount); - - const string caption = "FilteredMissingDepends"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - backgroundWorkerInstall.RunWorkerAsync("FilteredMissingDepends"); - } - } - - private void buttonClearCache_Click(object sender, EventArgs e) - { - if (MessageBox.Show("The cache can improve the speed of secondary analysis, normally you don't need to clear it, unless you modify the scene file. This operation only clears the cache of the current scene, if you need to clear all the cache, please delete the cache directory manually.", "Clear Cache", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - try - { - RunBackendJob("cache_clear", new { var_name = curVarName, entry_name = curEntryName }); - } - catch (Exception ex) - { - BeginInvoke(addlog, new Object[] { $"娓呯悊缂撳瓨澶辫触: {ex.Message}", LogLevel.ERROR }); - } - UpdateButtonClearCache(); - } - } - - protected override void OnFormClosing(FormClosingEventArgs e) - { - backendCts.Cancel(); - try - { - BackendSession.ShutdownAsync(LogBackendLine, CancellationToken.None).GetAwaiter().GetResult(); - } - catch - { - } - base.OnFormClosing(e); - } - } -} diff --git a/_archived/varManager/Form1.resx b/_archived/varManager/Form1.resx deleted file mode 100644 index eea3147..0000000 --- a/_archived/varManager/Form1.resx +++ /dev/null @@ -1,424 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 530, 185 - - - 17, 59 - - - True - - - True - - - True - - - True - - - True - - - 665, 143 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 - wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 - v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg - UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA - Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu - lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w - 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f - Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ - 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 - n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI - N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f - oAc0QjgAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// - h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B - twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA - kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG - WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 - 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== - - - - 17, 101 - - - 17, 143 - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 - wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 - v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg - UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA - Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu - lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w - 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f - Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ - 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 - n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI - N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f - oAc0QjgAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// - h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B - twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA - kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG - WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 - 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== - - - - 230, 101 - - - 408, 143 - - - 894, 143 - - - 17, 185 - - - 257, 185 - - - 474, 101 - - - 668, 101 - - - 935, 101 - - - 195, 143 - - - - AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5KPETtRTd+7UU3fe1FN33tRTd87kk7MgAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiSTsN7EY4a+5EN33tRTd97UU3fe1F - N23sSDkPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKhQ - QS6lSTh8pUg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D/AADgP+A4AP8AAOA/8BgB/wAAwH/wHAH/AADAf/gMA/8AAMD/+A4D/wAA4f/+P4// - AAA= - - - \ No newline at end of file diff --git a/_archived/varManager/Form2.Designer.cs b/_archived/varManager/Form2.Designer.cs deleted file mode 100644 index 54f1792..0000000 --- a/_archived/varManager/Form2.Designer.cs +++ /dev/null @@ -1,40 +0,0 @@ -锘 -namespace varManager -{ - partial class Form2 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); - this.Text = "Form2"; - } - - #endregion - } -} \ No newline at end of file diff --git a/_archived/varManager/Form2.cs b/_archived/varManager/Form2.cs deleted file mode 100644 index 7a8deb8..0000000 --- a/_archived/varManager/Form2.cs +++ /dev/null @@ -1,20 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace varManager -{ - public partial class Form2 : Form - { - public Form2() - { - InitializeComponent(); - } - } -} diff --git a/_archived/varManager/FormAnalysis.Designer.cs b/_archived/varManager/FormAnalysis.Designer.cs deleted file mode 100644 index eb0a96d..0000000 --- a/_archived/varManager/FormAnalysis.Designer.cs +++ /dev/null @@ -1,449 +0,0 @@ -锘縩amespace varManager -{ - partial class FormAnalysis - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormAnalysis)); - this.listBoxAtom = new System.Windows.Forms.ListBox(); - this.buttonLoadLook = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.labelSceneName = new System.Windows.Forms.Label(); - this.buttonExit = new System.Windows.Forms.Button(); - this.listBoxPerson = new System.Windows.Forms.ListBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.checkBoxIgnoreGender = new System.Windows.Forms.CheckBox(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.checkBoxMorphs = new System.Windows.Forms.CheckBox(); - this.buttonLoadPose = new System.Windows.Forms.Button(); - this.buttonLoadAnimation = new System.Windows.Forms.Button(); - this.buttonLoadPlugin = new System.Windows.Forms.Button(); - this.checkBoxHair = new System.Windows.Forms.CheckBox(); - this.checkBoxClothing = new System.Windows.Forms.CheckBox(); - this.checkBoxGlute = new System.Windows.Forms.CheckBox(); - this.checkBoxSkin = new System.Windows.Forms.CheckBox(); - this.checkBoxBreast = new System.Windows.Forms.CheckBox(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.buttonAddAsSubscene = new System.Windows.Forms.Button(); - this.buttonAddToScene = new System.Windows.Forms.Button(); - this.buttonLoadScene = new System.Windows.Forms.Button(); - this.triStateTreeViewAtoms = new nsThreeStateTreeview.TriStateTreeView(); - this.labelMessage = new System.Windows.Forms.Label(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.timer1 = new System.Windows.Forms.Timer(this.components); - this.groupBox1.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.SuspendLayout(); - // - // listBoxAtom - // - this.listBoxAtom.FormattingEnabled = true; - this.listBoxAtom.ItemHeight = 17; - this.listBoxAtom.Location = new System.Drawing.Point(6, 6); - this.listBoxAtom.Name = "listBoxAtom"; - this.listBoxAtom.Size = new System.Drawing.Size(226, 361); - this.listBoxAtom.TabIndex = 0; - this.toolTip1.SetToolTip(this.listBoxAtom, "List of Persons in current scene"); - this.listBoxAtom.SelectedIndexChanged += new System.EventHandler(this.listBoxAtom_SelectedIndexChanged); - // - // buttonLoadLook - // - this.buttonLoadLook.Enabled = false; - this.buttonLoadLook.Location = new System.Drawing.Point(371, 204); - this.buttonLoadLook.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonLoadLook.Name = "buttonLoadLook"; - this.buttonLoadLook.Size = new System.Drawing.Size(118, 35); - this.buttonLoadLook.TabIndex = 4; - this.buttonLoadLook.Text = "Load Look"; - this.toolTip1.SetToolTip(this.buttonLoadLook, "Load presets for person in running scene "); - this.buttonLoadLook.UseVisualStyleBackColor = true; - this.buttonLoadLook.Click += new System.EventHandler(this.buttonLoadLook_Click); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 15); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(83, 17); - this.label1.TabIndex = 6; - this.label1.Text = "sceneName:"; - // - // labelSceneName - // - this.labelSceneName.Location = new System.Drawing.Point(102, 15); - this.labelSceneName.Name = "labelSceneName"; - this.labelSceneName.Size = new System.Drawing.Size(421, 52); - this.labelSceneName.TabIndex = 7; - this.labelSceneName.Text = "label2"; - // - // buttonExit - // - this.buttonExit.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonExit.Location = new System.Drawing.Point(386, 489); - this.buttonExit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonExit.Name = "buttonExit"; - this.buttonExit.Size = new System.Drawing.Size(118, 35); - this.buttonExit.TabIndex = 4; - this.buttonExit.Text = "Cancel"; - this.buttonExit.UseVisualStyleBackColor = true; - // - // listBoxPerson - // - this.listBoxPerson.Font = new System.Drawing.Font("Cambria", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.listBoxPerson.FormattingEnabled = true; - this.listBoxPerson.ItemHeight = 23; - this.listBoxPerson.Items.AddRange(new object[] { - "1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9"}); - this.listBoxPerson.Location = new System.Drawing.Point(6, 24); - this.listBoxPerson.Name = "listBoxPerson"; - this.listBoxPerson.Size = new System.Drawing.Size(112, 165); - this.listBoxPerson.TabIndex = 9; - this.toolTip1.SetToolTip(this.listBoxPerson, "Person order in running scene"); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.listBoxPerson); - this.groupBox1.Location = new System.Drawing.Point(240, 164); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(124, 203); - this.groupBox1.TabIndex = 10; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Person Order"; - // - // checkBoxIgnoreGender - // - this.checkBoxIgnoreGender.AutoSize = true; - this.checkBoxIgnoreGender.Location = new System.Drawing.Point(371, 176); - this.checkBoxIgnoreGender.Name = "checkBoxIgnoreGender"; - this.checkBoxIgnoreGender.Size = new System.Drawing.Size(117, 21); - this.checkBoxIgnoreGender.TabIndex = 8; - this.checkBoxIgnoreGender.Text = "Ignore gender"; - this.checkBoxIgnoreGender.UseVisualStyleBackColor = true; - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Location = new System.Drawing.Point(12, 70); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(515, 412); - this.tabControl1.TabIndex = 11; - this.toolTip1.SetToolTip(this.tabControl1, "List of Atoms in current scene"); - // - // tabPage1 - // - this.tabPage1.Controls.Add(this.listBoxAtom); - this.tabPage1.Controls.Add(this.groupBox1); - this.tabPage1.Controls.Add(this.checkBoxMorphs); - this.tabPage1.Controls.Add(this.buttonLoadPose); - this.tabPage1.Controls.Add(this.buttonLoadAnimation); - this.tabPage1.Controls.Add(this.buttonLoadPlugin); - this.tabPage1.Controls.Add(this.buttonLoadLook); - this.tabPage1.Controls.Add(this.checkBoxHair); - this.tabPage1.Controls.Add(this.checkBoxIgnoreGender); - this.tabPage1.Controls.Add(this.checkBoxClothing); - this.tabPage1.Controls.Add(this.checkBoxGlute); - this.tabPage1.Controls.Add(this.checkBoxSkin); - this.tabPage1.Controls.Add(this.checkBoxBreast); - this.tabPage1.Location = new System.Drawing.Point(4, 26); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(507, 382); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "Person List"; - this.tabPage1.UseVisualStyleBackColor = true; - // - // checkBoxMorphs - // - this.checkBoxMorphs.AutoSize = true; - this.checkBoxMorphs.Checked = global::varManager.Properties.Settings.Default.presetMorphs; - this.checkBoxMorphs.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxMorphs.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetMorphs", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxMorphs.Location = new System.Drawing.Point(254, 10); - this.checkBoxMorphs.Name = "checkBoxMorphs"; - this.checkBoxMorphs.Size = new System.Drawing.Size(78, 21); - this.checkBoxMorphs.TabIndex = 8; - this.checkBoxMorphs.Text = "Morphs"; - this.toolTip1.SetToolTip(this.checkBoxMorphs, "Morph Preset"); - this.checkBoxMorphs.UseVisualStyleBackColor = true; - // - // buttonLoadPose - // - this.buttonLoadPose.Location = new System.Drawing.Point(371, 247); - this.buttonLoadPose.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonLoadPose.Name = "buttonLoadPose"; - this.buttonLoadPose.Size = new System.Drawing.Size(118, 35); - this.buttonLoadPose.TabIndex = 4; - this.buttonLoadPose.Text = "Load Pose"; - this.toolTip1.SetToolTip(this.buttonLoadPose, "Load pose for person in running scene "); - this.buttonLoadPose.UseVisualStyleBackColor = true; - this.buttonLoadPose.Click += new System.EventHandler(this.buttonLoadPose_Click); - // - // buttonLoadAnimation - // - this.buttonLoadAnimation.Enabled = false; - this.buttonLoadAnimation.Location = new System.Drawing.Point(371, 290); - this.buttonLoadAnimation.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonLoadAnimation.Name = "buttonLoadAnimation"; - this.buttonLoadAnimation.Size = new System.Drawing.Size(118, 35); - this.buttonLoadAnimation.TabIndex = 4; - this.buttonLoadAnimation.Text = "Load Animation"; - this.toolTip1.SetToolTip(this.buttonLoadAnimation, "Load animtion for person in running scene "); - this.buttonLoadAnimation.UseVisualStyleBackColor = true; - this.buttonLoadAnimation.Click += new System.EventHandler(this.buttonLoadAnimation_Click); - // - // buttonLoadPlugin - // - this.buttonLoadPlugin.Enabled = false; - this.buttonLoadPlugin.Location = new System.Drawing.Point(370, 332); - this.buttonLoadPlugin.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonLoadPlugin.Name = "buttonLoadPlugin"; - this.buttonLoadPlugin.Size = new System.Drawing.Size(118, 35); - this.buttonLoadPlugin.TabIndex = 4; - this.buttonLoadPlugin.Text = "Load Plugin"; - this.toolTip1.SetToolTip(this.buttonLoadPlugin, "Load plugin preset for person in running scene "); - this.buttonLoadPlugin.UseVisualStyleBackColor = true; - this.buttonLoadPlugin.Click += new System.EventHandler(this.buttonLoadPlugin_Click); - // - // checkBoxHair - // - this.checkBoxHair.AutoSize = true; - this.checkBoxHair.Checked = global::varManager.Properties.Settings.Default.presetHair; - this.checkBoxHair.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxHair.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetHair", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxHair.Location = new System.Drawing.Point(254, 52); - this.checkBoxHair.Name = "checkBoxHair"; - this.checkBoxHair.Size = new System.Drawing.Size(57, 21); - this.checkBoxHair.TabIndex = 8; - this.checkBoxHair.Text = "Hair"; - this.toolTip1.SetToolTip(this.checkBoxHair, "HairStyle Preset"); - this.checkBoxHair.UseVisualStyleBackColor = true; - // - // checkBoxClothing - // - this.checkBoxClothing.AutoSize = true; - this.checkBoxClothing.Checked = global::varManager.Properties.Settings.Default.presetClothing; - this.checkBoxClothing.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetClothing", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxClothing.Location = new System.Drawing.Point(254, 94); - this.checkBoxClothing.Name = "checkBoxClothing"; - this.checkBoxClothing.Size = new System.Drawing.Size(82, 21); - this.checkBoxClothing.TabIndex = 8; - this.checkBoxClothing.Text = "Clothing"; - this.toolTip1.SetToolTip(this.checkBoxClothing, "Clothing Preset"); - this.checkBoxClothing.UseVisualStyleBackColor = true; - // - // checkBoxGlute - // - this.checkBoxGlute.AutoSize = true; - this.checkBoxGlute.Checked = global::varManager.Properties.Settings.Default.presetGlute; - this.checkBoxGlute.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxGlute.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetGlute", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxGlute.Location = new System.Drawing.Point(361, 94); - this.checkBoxGlute.Name = "checkBoxGlute"; - this.checkBoxGlute.Size = new System.Drawing.Size(111, 21); - this.checkBoxGlute.TabIndex = 8; - this.checkBoxGlute.Text = "GlutePhysics"; - this.toolTip1.SetToolTip(this.checkBoxGlute, "Glute Physics Preset"); - this.checkBoxGlute.UseVisualStyleBackColor = true; - // - // checkBoxSkin - // - this.checkBoxSkin.AutoSize = true; - this.checkBoxSkin.Checked = global::varManager.Properties.Settings.Default.presetSkin; - this.checkBoxSkin.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxSkin.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetSkin", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxSkin.Location = new System.Drawing.Point(362, 10); - this.checkBoxSkin.Name = "checkBoxSkin"; - this.checkBoxSkin.Size = new System.Drawing.Size(57, 21); - this.checkBoxSkin.TabIndex = 8; - this.checkBoxSkin.Text = "Skin"; - this.toolTip1.SetToolTip(this.checkBoxSkin, "Skin Preset"); - this.checkBoxSkin.UseVisualStyleBackColor = true; - // - // checkBoxBreast - // - this.checkBoxBreast.AutoSize = true; - this.checkBoxBreast.Checked = global::varManager.Properties.Settings.Default.presetBreast; - this.checkBoxBreast.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBoxBreast.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::varManager.Properties.Settings.Default, "presetBreast", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.checkBoxBreast.Location = new System.Drawing.Point(362, 52); - this.checkBoxBreast.Name = "checkBoxBreast"; - this.checkBoxBreast.Size = new System.Drawing.Size(118, 21); - this.checkBoxBreast.TabIndex = 8; - this.checkBoxBreast.Text = "BreastPhysics"; - this.toolTip1.SetToolTip(this.checkBoxBreast, "Breast Physics Preset"); - this.checkBoxBreast.UseVisualStyleBackColor = true; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.buttonAddAsSubscene); - this.tabPage2.Controls.Add(this.buttonAddToScene); - this.tabPage2.Controls.Add(this.buttonLoadScene); - this.tabPage2.Controls.Add(this.triStateTreeViewAtoms); - this.tabPage2.Location = new System.Drawing.Point(4, 26); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(507, 382); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "Atom List"; - this.tabPage2.UseVisualStyleBackColor = true; - // - // buttonAddAsSubscene - // - this.buttonAddAsSubscene.Location = new System.Drawing.Point(340, 264); - this.buttonAddAsSubscene.Name = "buttonAddAsSubscene"; - this.buttonAddAsSubscene.Size = new System.Drawing.Size(118, 50); - this.buttonAddAsSubscene.TabIndex = 1; - this.buttonAddAsSubscene.Text = "Add as SubScene"; - this.toolTip1.SetToolTip(this.buttonAddAsSubscene, "Selected atoms aggregate into subscene and add to running scene"); - this.buttonAddAsSubscene.UseVisualStyleBackColor = true; - this.buttonAddAsSubscene.Click += new System.EventHandler(this.buttonAddAsSubscene_Click); - // - // buttonAddToScene - // - this.buttonAddToScene.Location = new System.Drawing.Point(340, 182); - this.buttonAddToScene.Name = "buttonAddToScene"; - this.buttonAddToScene.Size = new System.Drawing.Size(118, 50); - this.buttonAddToScene.TabIndex = 1; - this.buttonAddToScene.Text = "Add to Scene"; - this.toolTip1.SetToolTip(this.buttonAddToScene, "Selected atoms add to running scene"); - this.buttonAddToScene.UseVisualStyleBackColor = true; - this.buttonAddToScene.Click += new System.EventHandler(this.buttonAddToScene_Click); - // - // buttonLoadScene - // - this.buttonLoadScene.Location = new System.Drawing.Point(340, 100); - this.buttonLoadScene.Name = "buttonLoadScene"; - this.buttonLoadScene.Size = new System.Drawing.Size(118, 50); - this.buttonLoadScene.TabIndex = 1; - this.buttonLoadScene.Text = "Load Scene"; - this.toolTip1.SetToolTip(this.buttonLoadScene, "Selected atoms loaded as a new scene"); - this.buttonLoadScene.UseVisualStyleBackColor = true; - this.buttonLoadScene.Click += new System.EventHandler(this.buttonLoadScene_Click); - // - // triStateTreeViewAtoms - // - this.triStateTreeViewAtoms.Location = new System.Drawing.Point(6, 6); - this.triStateTreeViewAtoms.Name = "triStateTreeViewAtoms"; - this.triStateTreeViewAtoms.Size = new System.Drawing.Size(293, 370); - this.triStateTreeViewAtoms.TabIndex = 0; - this.triStateTreeViewAtoms.TriStateStyleProperty = nsThreeStateTreeview.TriStateTreeView.TriStateStyles.Standard; - this.triStateTreeViewAtoms.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.triStateTreeViewAtoms_AfterCheck); - // - // labelMessage - // - this.labelMessage.BackColor = System.Drawing.Color.Transparent; - this.labelMessage.ForeColor = System.Drawing.Color.OrangeRed; - this.labelMessage.Location = new System.Drawing.Point(16, 481); - this.labelMessage.Name = "labelMessage"; - this.labelMessage.Size = new System.Drawing.Size(364, 55); - this.labelMessage.TabIndex = 2; - this.labelMessage.Text = "labelMessage"; - this.labelMessage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.labelMessage.Visible = false; - // - // timer1 - // - this.timer1.Interval = 2000; - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // - // FormAnalysis - // - this.AcceptButton = this.buttonLoadLook; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonExit; - this.ClientSize = new System.Drawing.Size(541, 534); - this.ControlBox = false; - this.Controls.Add(this.labelMessage); - this.Controls.Add(this.tabControl1); - this.Controls.Add(this.labelSceneName); - this.Controls.Add(this.label1); - this.Controls.Add(this.buttonExit); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.Name = "FormAnalysis"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Analysis"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FormAnalysis_FormClosed); - this.Load += new System.EventHandler(this.FormAnalysis_Load); - this.groupBox1.ResumeLayout(false); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.tabPage1.PerformLayout(); - this.tabPage2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.ListBox listBoxAtom; - private System.Windows.Forms.Button buttonLoadLook; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label labelSceneName; - private System.Windows.Forms.CheckBox checkBoxMorphs; - private System.Windows.Forms.CheckBox checkBoxHair; - private System.Windows.Forms.CheckBox checkBoxClothing; - private System.Windows.Forms.CheckBox checkBoxSkin; - private System.Windows.Forms.CheckBox checkBoxBreast; - private System.Windows.Forms.CheckBox checkBoxGlute; - private System.Windows.Forms.Button buttonExit; - private System.Windows.Forms.ListBox listBoxPerson; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.CheckBox checkBoxIgnoreGender; - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; - private nsThreeStateTreeview.TriStateTreeView triStateTreeViewAtoms; - private System.Windows.Forms.Button buttonLoadScene; - private System.Windows.Forms.Button buttonLoadPlugin; - private System.Windows.Forms.Button buttonLoadAnimation; - private System.Windows.Forms.Button buttonLoadPose; - private System.Windows.Forms.Button buttonAddToScene; - private System.Windows.Forms.Button buttonAddAsSubscene; - private System.Windows.Forms.ToolTip toolTip1; - private System.Windows.Forms.Label labelMessage; - private System.Windows.Forms.Timer timer1; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormAnalysis.cs b/_archived/varManager/FormAnalysis.cs deleted file mode 100644 index c79288d..0000000 --- a/_archived/varManager/FormAnalysis.cs +++ /dev/null @@ -1,1242 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using SimpleJSON; -using System.Text.Json; -using System.Text.Json.Serialization; -using varManager.Backend; -using varManager.Properties; -using static SimpleLogger; - -namespace varManager -{ - public partial class FormAnalysis : Form - { - private string varName; - private string entryName; - private List listJsonPerson; - JSONClass jsonCoreControl; - - private int personOrder = 0; - private bool ignoreGender = false; - private string characterGender; - public Form1 form1; - public string VarName { get => varName; set => varName = value; } - public string EntryName { get => entryName; set => entryName = value; } - public bool IgnoreGender { get => ignoreGender; set => ignoreGender = value; } - public int PersonOrder { get => personOrder; set => personOrder = value; } - public string CharacterGender { get => characterGender; set => characterGender = value; } - - public List saveNames; - private List atomnodes; - private string[] poseControlIDs = { "hipControl", "pelvisControl", "chestControl", "headControl", "rHandControl", "lHandControl", "rFootControl", "lFootControl", "neckControl", "eyeTargetControl", "rNippleControl", "lNippleControl", "rElbowControl", "lElbowControl", "rKneeControl", "lKneeControl", "rToeControl", "lToeControl", "abdomenControl", "abdomen2Control", "rThighControl", "lThighControl", "rArmControl", "lArmControl", "rShoulderControl", "lShoulderControl" }; - private string[] poseObjectIDs = { "hip", "pelvis", "rThigh", "rShin", "rFoot", "rToe", "lThigh", "lShin", "lFoot", "lToe", "LGlute", "RGlute", "abdomen", "abdomen2", "chest", "lPectoral", "rPectoral", "rCollar", "rShldr", "rForeArm", "rHand", "lCollar", "lShldr", "lForeArm", "lHand", "neck", "head"}; - private Dictionary> parentAtoms; - private readonly string[] sceneBaseAtoms = { "CoreControl", "PlayerNavigationPanel", "VRController", "WindowCamera" }; - public FormAnalysis() - { - InitializeComponent(); - listJsonPerson = new List(); - parentAtoms = new Dictionary>(); - } - - private void LogBackendLine(string line) - { - if (form1 == null) - { - return; - } - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - form1.BeginInvoke(new Form1.InvokeAddLoglist(form1.UpdateAddLoglist), new object[] { line, level }); - } - - private BackendJobResult RunBackendJob(string kind, object? args) - { - return BackendSession.RunJob(kind, args, LogBackendLine, CancellationToken.None); - } - public static string GetCharacterGender(string character) - { - string isMale = "Female"; - character= character.ToLower(); - // If the peson atom is not "On", then we cant determine their gender it seems as GetComponentInChildren just returns null - if (character.StartsWith("male") || - character.StartsWith("lee") || - character.StartsWith("jarlee") || - character.StartsWith("julian") || - character.StartsWith("jarjulian")) - { - isMale = "Male"; - } - if (character.StartsWith("futa")) - { - isMale = "Futa"; - } - return (isMale); - } - - private void FormAnalysis_Load(object sender, EventArgs e) - { - labelSceneName.Text = varName + ":/" + entryName; - AnalsisJson(); - if (listBoxAtom.Items.Count > 0) - { - listBoxAtom.SelectedIndex = 0; - } - PersonOrder = 0; - listBoxPerson.SelectedIndex = 0; - triStateTreeViewAtoms.ExpandAll(); - //foreach (TreeNode tn in triStateTreeViewAtoms.Nodes) - //{ - // tn.Expand(); - //} - } - /*private void DisplayTreeView(JSONClass root, string rootName) - { - treeView1.BeginUpdate(); - try - { - treeView1.Nodes.Clear(); - var tNode = treeView1.Nodes[treeView1.Nodes.Add(new TreeNode(rootName))]; - tNode.Tag = root; - - AddNode(root, tNode); - - treeView1.ExpandAll(); - } - finally - { - treeView1.EndUpdate(); - } - } - - private void AddNode(JSONClass token, TreeNode inTreeNode) - { - if (token == null) - return; - if (token is jso) - { - var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(token.ToString()))]; - childNode.Tag = token; - } - else if (token is JObject) - { - var obj = (JObject)token; - foreach (var property in obj.Properties()) - { - var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(property.Name))]; - childNode.Tag = property; - AddNode(property.Value, childNode); - } - } - else if (token is JArray) - { - var array = (JArray)token; - for (int i = 0; i < array.Count; i++) - { - var childNode = inTreeNode.Nodes[inTreeNode.Nodes.Add(new TreeNode(i.ToString()))]; - childNode.Tag = array[i]; - AddNode(array[i], childNode); - } - } - else - { - Debug.WriteLine(string.Format("{0} not implemented", token.Type)); // JConstructor, JRaw - } - }*/ - private void AnalsisJson() - { - triStateTreeViewAtoms.Nodes.Clear(); - TreeNode treenodeCur = triStateTreeViewAtoms.Nodes.Add(varName + ":/" + entryName); - string sceneFoldername = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(varName), Comm.ValidFileName(entryName.Replace('\\', '_').Replace('/', '_'))); - jsonCoreControl = new JSONClass(); - atomnodes = new List(); - GetAtoms(sceneFoldername, treenodeCur); - string parentAtomFilename = Path.Combine(sceneFoldername, "parentAtom.txt"); - if (File.Exists(parentAtomFilename)) - { - using (StreamReader sr = new StreamReader(parentAtomFilename)) - { - while (!sr.EndOfStream) { - string strParent= sr.ReadLine(); - string[] splitParent= strParent.Split('\t'); - if(splitParent.Length == 2) - { - List childs= splitParent[1].Split(',').ToList(); - childs = childs.Select(child => child += ".bin").ToList(); - parentAtoms.Add(splitParent[0]+".bin",childs); - } - } - - } - } - if (!entryName.ToLower().Contains("/scene/")) - { - tabControl1.TabPages.RemoveAt(tabControl1.TabPages.Count - 1); - } - - } - private void GetAtoms(string sceneFoldername,TreeNode treenodeCur ) - { - if (Directory.Exists(Path.Combine(sceneFoldername, "atoms"))) - { - foreach (string atomfolder in Directory.GetDirectories(Path.Combine(sceneFoldername, "atoms"), "*", SearchOption.TopDirectoryOnly).OrderBy(x=>Path.GetFileName(x))) - { - string atomtype = atomfolder.Substring(atomfolder.LastIndexOf("\\") + 1); - TreeNode subtreenode = treenodeCur.Nodes.Add(atomtype); - if (atomtype == "SubScene") - { - GetAtoms(atomfolder, subtreenode); - } - - foreach (string atomjson in Directory.GetFiles(atomfolder, "*.bin", SearchOption.TopDirectoryOnly)) - { - - atomnodes.Add(subtreenode.Nodes.Add(Path.GetFileName(atomjson))); - if (atomtype == "(base)CoreControl") - { - jsonCoreControl=(JSONClass)JSONNode.LoadFromFile(atomjson); - } - if (atomtype == "Person") - { - JSONClass atomitem = (JSONClass)JSONNode.LoadFromFile(atomjson); - listJsonPerson.Add(atomitem); - listBoxAtom.Items.Add(Path.GetFileNameWithoutExtension(atomjson)); - } - } - } - } - } - - private static string GetAtomID(JSONNode atomitem) - { - string charGender = "unknown"; - JSONArray storablesArray = atomitem["storables"].AsArray; - foreach (JSONNode storablesitem in storablesArray) - { - if (storablesitem["id"].Value == "geometry") - { - charGender = GetCharacterGender(storablesitem["character"].Value); - break; - } - } - return string.Format("{0}({1})", atomitem["id"], charGender); - - } - - private void listBoxAtom_SelectedIndexChanged(object sender, EventArgs e) - { - if (listBoxAtom.SelectedItem != null) - { - buttonLoadLook.Enabled = true; - if (listBoxAtom.SelectedItem.ToString().Contains("(Female)")) - { - checkBoxGlute.Visible = true; - checkBoxBreast.Visible = true; - checkBoxIgnoreGender.Enabled = true; - } - else - { - checkBoxGlute.Visible = false; - checkBoxBreast.Visible = false; - //if (listBoxAtom.SelectedItem.ToString().Contains("(Futa)")) - checkBoxIgnoreGender.Enabled = true; - //else - // checkBoxIgnoreGender.Enabled = false; - } - JSONArray storablesArray = listJsonPerson[listBoxAtom.SelectedIndex]["storables"].AsArray; - buttonLoadPose.Enabled = false; - if ( entryName.EndsWith(".json")) - buttonLoadPose.Enabled = true ; - buttonLoadPlugin.Enabled = false; - buttonLoadAnimation.Enabled = false; - - bool foundAnime=false,foundPlugin=false; - foreach (JSONClass storablesitem in storablesArray) - { - if (foundAnime && foundPlugin) break; - if (storablesitem["id"].Value.EndsWith ( "Animation") ) - { - buttonLoadAnimation.Enabled = true; - foundAnime = true; - } - if (storablesitem["id"].Value== "PluginManager") - { - foundPlugin=true; - if (storablesitem.HasKey("plugins")) - { - if (((JSONClass)storablesitem["plugins"]).Count > 0) - { - buttonLoadPlugin.Enabled = true; - } - } - } - } - } - else - { - buttonLoadLook.Enabled= false; - } - } - - private void buttonLoadLook_Click(object sender, EventArgs e) - { - if (listBoxAtom.SelectedIndex >= 0 && listBoxAtom.SelectedIndex < listJsonPerson.Count) - { - if (checkBoxMorphs.Checked || checkBoxHair.Checked || - checkBoxClothing.Checked || checkBoxSkin.Checked || - checkBoxBreast.Checked || checkBoxGlute.Checked) - - { - GetPersonOrder(); - string atomName = listBoxAtom.SelectedItem.ToString(); - try - { - RunBackendJob("scene_preset_look", new - { - var_name = varName, - entry_name = entryName, - atom_name = atomName, - morphs = checkBoxMorphs.Checked, - hair = checkBoxHair.Checked, - clothing = checkBoxClothing.Checked, - skin = checkBoxSkin.Checked, - breast = checkBoxBreast.Checked, - glute = checkBoxGlute.Checked, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - } - catch (Exception ex) - { - MessageBox.Show($"Load Look failed: {ex.Message}"); - return; - } - labelMessage.Text = "Load Look Preset completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - else - { - MessageBox.Show("Please select at least one preset"); - checkBoxMorphs.Select(); - return; - } - } - else - { - MessageBox.Show("Please select a character"); - listBoxAtom.Select(); - return; - } - } - - private void GetPersonOrder() - { - PersonOrder = 0; - if (listBoxPerson.SelectedIndex > 0) - PersonOrder = listBoxPerson.SelectedIndex; - ignoreGender = false; - if (checkBoxIgnoreGender.Enabled && checkBoxIgnoreGender.Checked) - ignoreGender = true; - } - - private void SavePluginPreset(JSONClass atomitem) - { - JSONClass jsonPlugin = new JSONClass(); - jsonPlugin.Add("setUnlistedParamsToDefault", "true"); - jsonPlugin.Add("storables", new JSONArray()); - List pluginid = new List(); - JSONArray storablesArray = atomitem["storables"].AsArray; - foreach (JSONClass storablesitem in storablesArray) - { - if (storablesitem["id"].Value == "PluginManager") - { - JSONArray jsonPluginStorablesArray = jsonPlugin["storables"].AsArray; - jsonPluginStorablesArray.Add(storablesitem); - if (storablesitem.HasKey("plugins")) - { - pluginid.AddRange(((JSONClass)storablesitem["plugins"]).Keys); - } - } - } - foreach (JSONClass storablesitem in storablesArray) - { - foreach (string tempid in pluginid) - { - if (storablesitem["id"].Value.StartsWith(tempid)) - { - jsonPlugin["storables"].Add(storablesitem); - } - } - } - SavePluginPresetFile(jsonPlugin); - } - private void SavePosePreset(JSONClass atomitem) - { - JSONClass jsonPose = new JSONClass(); - jsonPose.Add("setUnlistedParamsToDefault", "true"); - jsonPose.Add("storables", new JSONArray()); - JSONArray storablesArray = atomitem["storables"].AsArray; - - foreach (JSONClass storablesitem in storablesArray) - { - if (storablesitem["id"].Value == "geometry") - { - JSONClass jsonMorphsGeometry= new JSONClass(); - jsonMorphsGeometry.Add("id", "geometry"); - jsonMorphsGeometry.Add("morphs", storablesitem["morphs"]); - jsonPose["storables"].Add(jsonMorphsGeometry); - - } - if (poseControlIDs.Contains( storablesitem["id"].Value) || poseObjectIDs.Contains(storablesitem["id"].Value)) - { - jsonPose["storables"].Add(storablesitem); - } - } - - SavePosePresetFile(jsonPose); - } - private string animationStorableIdToControlId(string id) - { - switch (id) - { - case "eyeTargetControlAnimation": - case "lNippleControlAnimation": - case "rNippleControlAnimation": - return id.Replace("Animation", ""); - - default: - return id.Replace("Animation", "Control"); - } - } - private JSONClass FindMotionAnimationMasterData() - { - foreach (JSONNode storable in jsonCoreControl["storables"].AsArray) - { - if (string.Equals(storable["id"], "MotionAnimationMaster")) - { - return storable.AsObject; - } - } - throw new Exception("Selected mocap file does not contain MotionAnimationMaster data!"); - } - - private void SaveAnimationPreset(JSONClass atomitem) - { - JSONClass jsonAnimation = new JSONClass(); - jsonAnimation.Add("setUnlistedParamsToDefault", "true"); - jsonAnimation.Add("storables", new JSONArray()); - JSONArray storablesArray = atomitem["storables"].AsArray; - List animationControlIds = new List(); - foreach (JSONClass storablesitem in storablesArray) - { - if (storablesitem["id"].Value.EndsWith("Animation") ) - { - jsonAnimation["storables"].Add(storablesitem); - animationControlIds.Add(animationStorableIdToControlId(storablesitem["id"].Value)); - } - } - foreach (JSONClass storablesitem in storablesArray) - { - if (animationControlIds.Contains(storablesitem["id"].Value)) - { - jsonAnimation["storables"].Add(storablesitem); - } - } - jsonAnimation.Add("motionAnimationMaster", FindMotionAnimationMasterData()); - SaveAnimationPresetFile(jsonAnimation); - } - private void SavePreset(JSONClass atomitem, - bool morphs = false,bool hair = false, - bool clothing = false, bool skin = false, - bool breast = false, bool glute = false) - { - JSONClass jsonPreset = new JSONClass(); - JSONClass jsonMorphs = new JSONClass(); - JSONClass jsonBreast = new JSONClass(); - JSONClass jsonGlute = new JSONClass(); - JSONClass jsonSkin = new JSONClass(); - JSONClass jsonHair = new JSONClass(); - JSONClass jsonClothing = new JSONClass(); - - - jsonPreset.Add("setUnlistedParamsToDefault", "false"); - jsonMorphs.Add("setUnlistedParamsToDefault", "true"); - jsonBreast.Add("setUnlistedParamsToDefault", "true"); - jsonGlute.Add("setUnlistedParamsToDefault", "true"); - jsonSkin.Add("setUnlistedParamsToDefault", "true"); - jsonHair.Add("setUnlistedParamsToDefault", "true"); - jsonClothing.Add("setUnlistedParamsToDefault", "true"); - - - jsonPreset.Add("storables", new JSONArray()); - jsonMorphs.Add("storables", new JSONArray()); - jsonBreast.Add("storables", new JSONArray()); - jsonGlute.Add("storables", new JSONArray()); - jsonSkin.Add("storables", new JSONArray()); - jsonHair.Add("storables", new JSONArray()); - jsonClothing.Add("storables", new JSONArray()); - - - JSONArray storablesArray = atomitem["storables"].AsArray; - string[] skinid = { "skin", "textures", "teeth", "tongue", "mouth", "FemaleEyelashes", "MaleEyelashes", "lacrimals" , "sclera" , "irises" }; - string[] breastid = { "BreastControl", "BreastPhysicsMesh" }; - string[] gluteid = { "GluteControl", "LowerPhysicsMesh" }; - List hairid=new List(); - List clothingid=new List(); - - - foreach (JSONClass storablesitem in storablesArray) - { - if (storablesitem["id"].Value == "geometry") - { - JSONArray jsonPresetStorablesArray = jsonPreset["storables"].AsArray; - JSONArray jsonMorphsStorablesArray = jsonMorphs["storables"].AsArray; - JSONArray jsonBreastStorablesArray = jsonBreast["storables"].AsArray; - JSONArray jsonGluteStorablesArray = jsonGlute["storables"].AsArray; - JSONArray jsonSkinStorablesArray = jsonSkin["storables"].AsArray; - JSONArray jsonHairStorablesArray = jsonHair["storables"].AsArray; - JSONArray jsonClothingStorablesArray = jsonClothing["storables"].AsArray; - - //jnsstorablesArray.Add(storablesitem); - jsonPresetStorablesArray.Add(new JSONClass()); - jsonMorphsStorablesArray.Add(new JSONClass()); - jsonBreastStorablesArray.Add(new JSONClass()); - jsonGluteStorablesArray.Add(new JSONClass()); - jsonSkinStorablesArray.Add(new JSONClass()); - jsonHairStorablesArray.Add(new JSONClass()); - jsonClothingStorablesArray.Add(new JSONClass()); - - JSONClass jsonPresetGeometry = (JSONClass)jsonPresetStorablesArray[jsonPresetStorablesArray.Count - 1]; - JSONClass jsonMorphsGeometry = (JSONClass)jsonMorphsStorablesArray[jsonMorphsStorablesArray.Count - 1]; - JSONClass jsonBreastGeometry = (JSONClass)jsonBreastStorablesArray[jsonBreastStorablesArray.Count - 1]; - JSONClass jsonGluteGeometry = (JSONClass)jsonGluteStorablesArray[jsonGluteStorablesArray.Count - 1]; - JSONClass jsonSkinGeometry = (JSONClass)jsonSkinStorablesArray[jsonSkinStorablesArray.Count - 1]; - JSONClass jsonHairGeometry = (JSONClass)jsonHairStorablesArray[jsonHairStorablesArray.Count - 1]; - JSONClass jsonClothingGeometry = (JSONClass)jsonClothingStorablesArray[jsonClothingStorablesArray.Count - 1]; - - jsonPresetGeometry.Add("id", "geometry"); - jsonMorphsGeometry.Add("id", "geometry"); - jsonBreastGeometry.Add("id", "geometry"); - jsonSkinGeometry.Add("id", "geometry"); - jsonHairGeometry.Add("id", "geometry"); - jsonClothingGeometry.Add("id", "geometry"); - - if (storablesitem.HasKey("useFemaleMorphsOnMale")) - jsonMorphsGeometry.Add("useFemaleMorphsOnMale", storablesitem["useFemaleMorphsOnMale"].Value); - if (skin) jsonPresetGeometry.Add("character", storablesitem["character"].Value); - CharacterGender = GetCharacterGender(storablesitem["character"].Value); - jsonSkinGeometry.Add("character", storablesitem["character"]); - - jsonMorphsGeometry.Add("morphs",storablesitem["morphs"]); - if (clothing) - { - jsonPresetGeometry.Add("clothing", storablesitem["clothing"]); - jsonClothingGeometry.Add("clothing", storablesitem["clothing"]); - } - if (hair) - { - jsonPresetGeometry.Add("hair", storablesitem["hair"]); - jsonHairGeometry.Add("hair", storablesitem["hair"]); - } - if (storablesitem.HasKey("useAuxBreastColliders")) - jsonBreastGeometry.Add("useAuxBreastColliders", storablesitem["useAuxBreastColliders"]); - - - if (jsonPresetGeometry.HasKey("clothing")) - { - JSONArray temparray = jsonPresetGeometry["clothing"].AsArray; - foreach (JSONClass tempid in temparray) - { - clothingid.Add(tempid["internalId"].Value); - } - } - if (jsonPresetGeometry.HasKey("hair")) - { - JSONArray temparray = jsonPresetGeometry["hair"].AsArray; - foreach(JSONClass tempid in temparray) - { - hairid.Add(tempid["internalId"].Value); - } - } - - if (jsonClothingGeometry.HasKey("clothing")) - { - JSONArray temparray = jsonClothingGeometry["clothing"].AsArray; - foreach (JSONClass tempid in temparray) - { - clothingid.Add(tempid["internalId"].Value); - } - } - if (jsonHairGeometry.HasKey("hair")) - { - JSONArray temparray = jsonHairGeometry["hair"].AsArray; - foreach (JSONClass tempid in temparray) - { - hairid.Add(tempid["internalId"].Value); - } - } - break; - } - } - - foreach (JSONClass storablesitem in storablesArray) - { - //if(storablesitem["id"].Value == "AutoExpressions") - //{ - // jns["storables"].Add(storablesitem); - //} - if (clothing) - { - foreach (string tempid in clothingid) - { - if (storablesitem["id"].Value.StartsWith(tempid)) - { - jsonPreset["storables"].Add(storablesitem); - } - } - } - - foreach (string tempid in clothingid) - { - if (storablesitem["id"].Value.StartsWith(tempid)) - { - jsonClothing["storables"].Add(storablesitem); - } - } - - if (hair) - { - foreach (string tempid in hairid) - { - if (storablesitem["id"].Value.StartsWith(tempid)) - { - jsonPreset["storables"].Add(storablesitem); - } - } - } - - foreach (string tempid in hairid) - { - if (storablesitem["id"].Value.StartsWith(tempid)) - { - jsonHair["storables"].Add(storablesitem); - } - } - - if (skin) - { - if (skinid.Contains(storablesitem["id"].Value)) - { - jsonPreset["storables"].Add(storablesitem); - } - } - - if (skinid.Contains(storablesitem["id"].Value)) - { - jsonSkin["storables"].Add(storablesitem); - } - - //if (breast) - //{ - if (breastid.Contains(storablesitem["id"].Value)) - { - // jsonPreset["storables"].Add(storablesitem); - jsonBreast["storables"].Add(storablesitem); - } - //} - // if (glute) - // { - if (gluteid.Contains(storablesitem["id"].Value)) - { - // jsonPreset["storables"].Add(storablesitem); - jsonGlute["storables"].Add(storablesitem); - } - // } - - } - - if (skin) SaveDefaultEyeColorFile(); - if (clothing) SaveClothNakedFile(); - if (hair) SaveHairBaldFile(); - if (morphs) SaveMorphPresetFile(jsonMorphs); - if (breast) SaveBreastPresetFile(jsonBreast); - if (glute) SaveGlutePresetFile(jsonGlute); - //if (clothing) SaveClothingPresetFile(jsonClothing); - //if (hair) SaveHairPresetFile(jsonHair); - //if (skin) SaveSkinPresetFile(jsonSkin); - - if (clothing|| hair|| skin) SaveAppearancePresetFile(jsonPreset); - - - } - private void SaveDefaultEyeColorFile() - { - string eyecolorDefault = "{ \"setUnlistedParamsToDefault\": \"false\", \"storables\": [{ \"id\": \"irises\", \"hideMaterial\": \"false\", \"renderQueue\": \"1999\", \"Specular Texture Offset\": \"0\", \"Specular Intensity\": \"1\", \"Gloss\": \"2\", \"Specular Fresnel\": \"0\", \"Gloss Texture Offset\": \"0\", \"Global Illumination Filter\": \"0\", \"Diffuse Texture Offset\": \"0\", \"Diffuse Bumpiness\": \"1\", \"Specular Bumpiness\": \"1\", \"customTexture1TileX\": \"1\", \"customTexture1TileY\": \"1\", \"customTexture1OffsetX\": \"0\", \"customTexture1OffsetY\": \"0\", \"customTexture2TileX\": \"1\", \"customTexture2TileY\": \"1\", \"customTexture2OffsetX\": \"0\", \"customTexture2OffsetY\": \"0\", \"customTexture3TileX\": \"1\", \"customTexture3TileY\": \"1\", \"customTexture3OffsetX\": \"0\", \"customTexture3OffsetY\": \"0\", \"customTexture4TileX\": \"1\", \"customTexture4TileY\": \"1\", \"customTexture4OffsetX\": \"0\", \"customTexture4OffsetY\": \"0\", \"Irises\": \"Color 1\", \"customTexture_MainTex\": \"\", \"customTexture_SpecTex\": \"\", \"customTexture_GlossTex\": \"\", \"customTexture_BumpMap\": \"\", \"Diffuse Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" }, \"Specular Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" }, \"Subsurface Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" } }, { \"id\": \"sclera\", \"hideMaterial\": \"false\", \"renderQueue\": \"1999\", \"Specular Texture Offset\": \"0\", \"Specular Intensity\": \"0.5\", \"Gloss\": \"5\", \"Specular Fresnel\": \"0\", \"Gloss Texture Offset\": \"0.2\", \"Global Illumination Filter\": \"0\", \"Diffuse Texture Offset\": \"0\", \"Diffuse Bumpiness\": \"0.3\", \"Specular Bumpiness\": \"0.05\", \"customTexture1TileX\": \"1\", \"customTexture1TileY\": \"1\", \"customTexture1OffsetX\": \"0\", \"customTexture1OffsetY\": \"0\", \"customTexture2TileX\": \"1\", \"customTexture2TileY\": \"1\", \"customTexture2OffsetX\": \"0\", \"customTexture2OffsetY\": \"0\", \"customTexture3TileX\": \"1\", \"customTexture3TileY\": \"1\", \"customTexture3OffsetX\": \"0\", \"customTexture3OffsetY\": \"0\", \"customTexture4TileX\": \"1\", \"customTexture4TileY\": \"1\", \"customTexture4OffsetX\": \"0\", \"customTexture4OffsetY\": \"0\", \"Sclera\": \"Sclera 1\", \"customTexture_MainTex\": \"\", \"customTexture_SpecTex\": \"\", \"customTexture_GlossTex\": \"\", \"customTexture_BumpMap\": \"\", \"Diffuse Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" }, \"Specular Color\": { \"h\": \"0.5584416\", \"s\": \"0.3019608\", \"v\": \"1\" }, \"Subsurface Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" } }, { \"id\": \"lacrimals\", \"hideMaterial\": \"false\", \"renderQueue\": \"1999\", \"Specular Texture Offset\": \"0\", \"Specular Intensity\": \"1\", \"Gloss\": \"6.5\", \"Specular Fresnel\": \"0.5\", \"Global Illumination Filter\": \"0\", \"Diffuse Texture Offset\": \"0\", \"customTexture1TileX\": \"1\", \"customTexture1TileY\": \"1\", \"customTexture1OffsetX\": \"0\", \"customTexture1OffsetY\": \"0\", \"customTexture2TileX\": \"1\", \"customTexture2TileY\": \"1\", \"customTexture2OffsetX\": \"0\", \"customTexture2OffsetY\": \"0\", \"customTexture_MainTex\": \"\", \"customTexture_SpecTex\": \"\", \"Diffuse Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" }, \"Specular Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" }, \"Subsurface Color\": { \"h\": \"0\", \"s\": \"0\", \"v\": \"1\" } } ] } "; - string saveName = "Custom\\Atom\\Person\\Appearance\\Preset_eyeDefault.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(eyecolorDefault); - sw.Close(); - } - string type = "looks"; - AddPresetResouce(type, saveName); - } - - private void AddPresetResouce(string type,string saveName ) - { - JSONClass jc = new JSONClass(); - jc["type"] = type; - jc["saveName"] = saveName.Replace('\\', '/'); - if (string.IsNullOrEmpty(CharacterGender)) - CharacterGender = "unknown"; - jc["characterGender"] = CharacterGender.ToLower(); - jc["ignoreGender"] = IgnoreGender.ToString().ToLower(); - jc["personOrder"] = (PersonOrder + 1).ToString(); - saveNames.Add(jc); - } - - private void SaveClothNakedFile() - { - string colthNakedDefault = "{ \"setUnlistedParamsToDefault\" : \"true\", \"storables\" : [ { \"id\" : \"geometry\", \"clothing\" : [ ] } ] }"; - string saveName = "Custom\\Atom\\Person\\Clothing\\Preset_ClothNaked.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(colthNakedDefault); - sw.Close(); - } - AddPresetResouce("clothing", saveName.Replace('\\', '/')); - } - private void SaveHairBaldFile() - { - string hairBaldDefault = "{ \"setUnlistedParamsToDefault\" : \"true\", \"storables\" : [ { \"id\" : \"geometry\", \"hair\" : [ ] } ] }"; - string saveName = "Custom\\Atom\\Person\\Hair\\Preset_HairBald.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(hairBaldDefault); - sw.Close(); - } - AddPresetResouce("hairstyle", saveName.Replace('\\', '/')); - } - private void SaveAppearancePresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Appearance\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("looks", saveName.Replace('\\', '/')); - } - private void SaveMorphPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Morphs\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("morphs", saveName.Replace('\\', '/')); - } - private void SaveClothingPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Clothing\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("clothing", saveName.Replace('\\', '/')); - } - private void SaveHairPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Hair\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("hairstyle", saveName.Replace('\\', '/')); - } - private void SaveSkinPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Skin\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("skin", saveName.Replace('\\', '/')); - } - - private void SaveBreastPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\BreastPhysics\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("breast", saveName.Replace('\\', '/')); - } - - private void SaveGlutePresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\GlutePhysics\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - - AddPresetResouce("glute", saveName.Replace('\\', '/')); - } - private void SavePluginPresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Plugins\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - - AddPresetResouce("plugin", saveName.Replace('\\', '/')); - } - private void SavePosePresetFile(JSONClass jsonPreset) - { - string strJns = jsonPreset.ToString(); - strJns = strJns.Replace("\"SELF:/", "\"" + varName + ":/"); - string saveName = "Custom\\Atom\\Person\\Pose\\Preset_temp.vap"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - fileStream.SetLength(0); - StreamWriter sw = new StreamWriter(fileStream); - sw.Write(strJns); - sw.Close(); - } - AddPresetResouce("pose", saveName.Replace('\\', '/')); - } - private void SaveAnimationPresetFile(JSONClass jsonPreset) - { - string saveName = "Custom\\Atom\\Person\\AnimationPresets\\Preset_temp.bin"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - jsonPreset.SaveToFile(aFileName); - AddPresetResouce("animation", saveName.Replace('\\', '/')); - } - private void FormAnalysis_FormClosed(object sender, FormClosedEventArgs e) - { - Settings.Default.Save(); - } - - private void buttonLoadScene_Click(object sender, EventArgs e) - { - /* - string sceneFoldername = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(varName), Comm.ValidFileName(entryName.Replace('\\', '_').Replace('/', '_'))); - - JSONClass jsonScene = (JSONClass)JSONNode.LoadFromFile(Path.Combine(sceneFoldername, "posinfo.bin")); - JSONArray jsonAtoms=new JSONArray(); - - foreach (TreeNode tn in atomnodes) - { - string atomtype = tn.Parent.Text; - if (atomtype.StartsWith("(base)")) atomtype = atomtype.Substring(6); - if (sceneBaseAtoms.Contains(atomtype)) - { - if (tn.Nodes.Count == 0) - { - string path = tn.FullPath; - path = path.Substring(path.IndexOf('\\') + 1); - path = Path.Combine(sceneFoldername, "atoms", path); - jsonAtoms.Add(JSONNode.LoadFromFile(path)); - } - - tn.Checked = true; - } - - } - //CheckedTreeViewNodes(triStateTreeViewAtoms.Nodes, jsonAtoms, sceneFoldername); - - jsonScene.Add("atoms", jsonAtoms); - string saveName = "Saves\\scene\\loadscene_temp.json"; - string aFileName = Path.Combine(Settings.Default.vampath, saveName); - //jsonScene.SaveToFile(aFileName); - using(StreamWriter sw = new StreamWriter(aFileName, false)) - { - sw.Write(jsonScene.ToString("\t")); - } - */ - foreach (TreeNode tn in atomnodes) - { - string atomtype = tn.Parent.Text; - if (atomtype.StartsWith("(base)")) atomtype = atomtype.Substring(6); - if (sceneBaseAtoms.Contains(atomtype)) - { - tn.Checked = true; - } - } - GetPersonOrder(); - List atomPaths = CollectCheckedAtomPaths(); - try - { - RunBackendJob("scene_preset_scene", new - { - var_name = varName, - entry_name = entryName, - atom_paths = atomPaths, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - } - catch (Exception ex) - { - MessageBox.Show($"Load Scene failed: {ex.Message}"); - return; - } - labelMessage.Text = "Load Scene completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - - public void GenLoadscenetxt() - { - string sceneFoldername = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(varName), Comm.ValidFileName(entryName.Replace('\\', '_').Replace('/', '_'))); - string dependfFilename = Path.Combine(sceneFoldername, "depend.txt"); - List depends = new List(); - using (StreamReader sr = new StreamReader(dependfFilename)) - { - string depend; - while ((depend = sr.ReadLine()) != null) - { - depends.Add(depend); - } - } - - JSONClass jsonls =new JSONClass(); - jsonls["resources"] = new JSONArray(); - foreach (JSONClass jc in saveNames) - { - jsonls["resources"].Add(jc); - } - - form1.GenLoadscenetxt(jsonls, false, depends); - } - - public void CheckedTreeViewNodes(TreeNodeCollection node, JSONArray jsonAtoms,string sceneFoldername) - { - foreach (TreeNode n in node) - { - if (n.Checked) - { - if (n.Nodes.Count==0) - { - string path = n.FullPath; - path=path.Substring(path.IndexOf('\\') + 1); - path=Path.Combine(sceneFoldername,"atoms", path); - jsonAtoms.Add(JSONNode.LoadFromFile(path)); - } - } - CheckedTreeViewNodes(n.Nodes,jsonAtoms, sceneFoldername); - } - } - public void CheckedTreeViewNodes(TreeNodeCollection node, string sceneFoldername,bool atomSubscene=false) - { - string pathPlugindata = Path.Combine(Settings.Default.vampath, "Custom\\PluginData\\feelfar"); - - Directory.CreateDirectory(pathPlugindata); - foreach (TreeNode n in node) - { - if (n.Checked) - { - if (n.Nodes.Count == 0) - { - string path = n.FullPath; - path = path.Substring(path.IndexOf('\\') + 1); - path = Path.Combine(sceneFoldername, "atoms", path); - - string pathPlugindataAtom = Path.Combine(pathPlugindata, n.Text); - File.Copy(path, pathPlugindataAtom, true); - string type = atomSubscene ? "atomSubscene" : "atom"; - string saveName = pathPlugindataAtom.Replace('\\', '/'); - AddPresetResouce(type, saveName); - } - } - CheckedTreeViewNodes(n.Nodes, sceneFoldername, atomSubscene); - } - } - - private List CollectCheckedAtomPaths() - { - string sceneFoldername = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(varName), Comm.ValidFileName(entryName.Replace('\\', '_').Replace('/', '_'))); - List paths = new List(); - CollectCheckedAtomPaths(triStateTreeViewAtoms.Nodes, sceneFoldername, paths); - return paths.Distinct().ToList(); - } - - private void CollectCheckedAtomPaths(TreeNodeCollection nodes, string sceneFoldername, List paths) - { - foreach (TreeNode n in nodes) - { - if (n.Checked && n.Nodes.Count == 0) - { - string path = n.FullPath; - int splitIndex = path.IndexOf('\\'); - if (splitIndex >= 0) - { - path = path.Substring(splitIndex + 1); - } - string fullPath = Path.Combine(sceneFoldername, "atoms", path); - paths.Add(fullPath); - } - CollectCheckedAtomPaths(n.Nodes, sceneFoldername, paths); - } - } - private void buttonClearCache_Click(object sender, EventArgs e) - { - } - - private void buttonLoadPlugin_Click(object sender, EventArgs e) - { - if (listBoxAtom.SelectedIndex >= 0 && listBoxAtom.SelectedIndex < listJsonPerson.Count) - { - GetPersonOrder(); - string atomName = listBoxAtom.SelectedItem.ToString(); - try - { - RunBackendJob("scene_preset_plugin", new - { - var_name = varName, - entry_name = entryName, - atom_name = atomName, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - labelMessage.Text = "Load Plugin completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - catch (Exception ex) - { - MessageBox.Show($"Load Plugin failed: {ex.Message}"); - } - } - else - { - MessageBox.Show("Please select a character"); - listBoxAtom.Select(); - return; - } - } - private void buttonLoadPose_Click(object sender, EventArgs e) - { - if (listBoxAtom.SelectedIndex >= 0 && listBoxAtom.SelectedIndex < listJsonPerson.Count) - { - GetPersonOrder(); - string atomName = listBoxAtom.SelectedItem.ToString(); - try - { - RunBackendJob("scene_preset_pose", new - { - var_name = varName, - entry_name = entryName, - atom_name = atomName, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - labelMessage.Text = "Load Pose completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - catch (Exception ex) - { - MessageBox.Show($"Load Pose failed: {ex.Message}"); - } - } - else - { - MessageBox.Show("Please select a character"); - listBoxAtom.Select(); - return; - } - } - private void buttonLoadAnimation_Click(object sender, EventArgs e) - { - if (listBoxAtom.SelectedIndex >= 0 && listBoxAtom.SelectedIndex < listJsonPerson.Count) - { - GetPersonOrder(); - string atomName = listBoxAtom.SelectedItem.ToString(); - try - { - RunBackendJob("scene_preset_animation", new - { - var_name = varName, - entry_name = entryName, - atom_name = atomName, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - labelMessage.Text = "Load Animation completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - catch (Exception ex) - { - MessageBox.Show($"Load Animation failed: {ex.Message}"); - } - } - else - { - MessageBox.Show("Please select a character"); - listBoxAtom.Select(); - return; - } - - } - - private void triStateTreeViewAtoms_AfterSelect(object sender, TreeViewEventArgs e) - { - - } - - private void triStateTreeViewAtoms_AfterCheck(object sender, TreeViewEventArgs e) - { - if (e.Node.Checked) - { - if (parentAtoms.ContainsKey(e.Node.Text)) - { - foreach (string child in parentAtoms[e.Node.Text]) - { - var tn = atomnodes.Where(x => x.Text == child).First(); - if (!tn.Checked) - tn.Checked = true; - } - - } - } - - } - - private void buttonAddToScene_Click(object sender, EventArgs e) - { - saveNames = new List(); - AddToScene(); - } - - private void AddToScene(bool asSubScene=false) - { - GetPersonOrder(); - List atomPaths = CollectCheckedAtomPaths(); - string jobKind = asSubScene ? "scene_add_subscene" : "scene_add_atoms"; - try - { - RunBackendJob(jobKind, new - { - var_name = varName, - entry_name = entryName, - atom_paths = atomPaths, - ignore_gender = ignoreGender, - person_order = PersonOrder - }); - } - catch (Exception ex) - { - MessageBox.Show($"Add atoms failed: {ex.Message}"); - return; - } - labelMessage.Text = "Add Selected Atoms to Scene completed!"; - labelMessage.Visible = true; - timer1.Enabled = true; - } - - private void buttonAddAsSubscene_Click(object sender, EventArgs e) - { - saveNames = new List(); - AddToScene(true); - } - - private void timer1_Tick(object sender, EventArgs e) - { - labelMessage.Visible = false; - timer1.Enabled = false; - } - } - -} diff --git a/_archived/varManager/FormAnalysis.resx b/_archived/varManager/FormAnalysis.resx deleted file mode 100644 index b552389..0000000 --- a/_archived/varManager/FormAnalysis.resx +++ /dev/null @@ -1,293 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 135, 17 - - - - - AAABAAEAMDAAAAAAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5KPETtRTd+7UU3fe1FN33tRTd87kk7MgAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiSTsN7EY4a+5EN33tRTd97UU3fe1F - N23sSDkPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKhQ - QS6lSTh8pUg3faVIN32lSDd+pko5RwAAAAAAAAAAAAAAAO5JO23tRTf/7UU3/+1FN//tRTf/7Uc4se5M - PQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMD+6IzA/umcwP7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AAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAVNjY2jjMzM6IzMzOiMzMzojQ0 - NIw5OTkRAAAAAAAAAAAAAAAApfQ9KaP0Opuh9DmiofQ5oqH0OaKm9Dp+u+8/CQAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJCQkBAAAAAQAAAAEPDw8BAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEx - MQEzMzMBMjIyAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACn9D0BqPQ9Aaf0OwEAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////8AAMD/+A//gQAAwH/4D/8B - AADAf/AH/wEAAOA/8Af+AwAA4D/gA/4DAADwH+AD/AcAAPAfwAH8BwAA+A/AAfgPAAD4D4CA+A8AAPwH - gIDwHwAA/AcBwHAfAAD+AwHAID8AAP4CA+AgPwAA/wAD4AB/AAD/AAfwAH8AAP+AB/AA/wAA/4AP+AD/ - AAD/wA/4Af8AAP/AH/wB/wAA/+Af/AP/AAD/4D/+A/8AAP///////wAA////////AAD///////8AAP// - /////wAA/+A4D/+BAAD/4BgP/wEAAP/AHAf/AQAA/8AMB/4BAAD/gA4D/gMAAP+ABgP8BwAA/wAHAfwH - AAD/AAMB+A8AAP4CA4D4DwAA/gIBgPAfAAD8BwHAcB8AAPwHAMBgPwAA+A+A4CA/AAD4D4BgAH8AAPAf - wHAAfwAA8B/AMAD/AADgP+A4AP8AAOA/8BgB/wAAwH/wHAH/AADAf/gMA/8AAMD/+A4D/wAA4f/+P4// - AAA= - - - \ No newline at end of file diff --git a/_archived/varManager/FormHub.Designer.cs b/_archived/varManager/FormHub.Designer.cs deleted file mode 100644 index 455e06f..0000000 --- a/_archived/varManager/FormHub.Designer.cs +++ /dev/null @@ -1,679 +0,0 @@ -锘縩amespace varManager -{ - partial class FormHub - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormHub)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.listBoxLog = new System.Windows.Forms.ListBox(); - this.panel3 = new System.Windows.Forms.Panel(); - this.buttonNextPage = new System.Windows.Forms.Button(); - this.buttonPrevPage = new System.Windows.Forms.Button(); - this.buttonEmptySearch = new System.Windows.Forms.Button(); - this.buttonLastPage = new System.Windows.Forms.Button(); - this.buttonFirstPage = new System.Windows.Forms.Button(); - this.buttonClose = new System.Windows.Forms.Button(); - this.buttonScanHubUpdate = new System.Windows.Forms.Button(); - this.buttonScanHub = new System.Windows.Forms.Button(); - this.textBoxSearch = new System.Windows.Forms.TextBox(); - this.buttonRefresh = new System.Windows.Forms.Button(); - this.buttonClearFilters = new System.Windows.Forms.Button(); - this.comboBoxPages = new System.Windows.Forms.ComboBox(); - this.comboBoxSecSort = new System.Windows.Forms.ComboBox(); - this.comboBoxPriSort = new System.Windows.Forms.ComboBox(); - this.comboBoxTags = new System.Windows.Forms.ComboBox(); - this.comboBoxCreator = new System.Windows.Forms.ComboBox(); - this.comboBoxCategory = new System.Windows.Forms.ComboBox(); - this.comboBoxPayType = new System.Windows.Forms.ComboBox(); - this.comboBoxHosted = new System.Windows.Forms.ComboBox(); - this.labelTotal = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.flowLayoutPanelHubItems = new System.Windows.Forms.FlowLayoutPanel(); - this.listViewDownList = new System.Windows.Forms.ListView(); - this.columnHeaderPackageName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeaderDownUrl = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.panel1 = new System.Windows.Forms.Panel(); - this.button1 = new System.Windows.Forms.Button(); - this.buttonCopytoClip = new System.Windows.Forms.Button(); - this.buttonDownloadAll = new System.Windows.Forms.Button(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.tableLayoutPanel1.SuspendLayout(); - this.panel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 223F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.listBoxLog, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.panel3, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 1, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 180F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1024, 751); - this.tableLayoutPanel1.TabIndex = 0; - this.tableLayoutPanel1.UseWaitCursor = true; - // - // listBoxLog - // - this.listBoxLog.Dock = System.Windows.Forms.DockStyle.Fill; - this.listBoxLog.FormattingEnabled = true; - this.listBoxLog.ItemHeight = 14; - this.listBoxLog.Location = new System.Drawing.Point(226, 574); - this.listBoxLog.Name = "listBoxLog"; - this.listBoxLog.Size = new System.Drawing.Size(795, 174); - this.listBoxLog.TabIndex = 3; - this.listBoxLog.UseWaitCursor = true; - // - // panel3 - // - this.panel3.BackColor = System.Drawing.Color.DarkSlateGray; - this.panel3.Controls.Add(this.buttonNextPage); - this.panel3.Controls.Add(this.buttonPrevPage); - this.panel3.Controls.Add(this.buttonEmptySearch); - this.panel3.Controls.Add(this.buttonLastPage); - this.panel3.Controls.Add(this.buttonFirstPage); - this.panel3.Controls.Add(this.buttonClose); - this.panel3.Controls.Add(this.buttonScanHubUpdate); - this.panel3.Controls.Add(this.buttonScanHub); - this.panel3.Controls.Add(this.textBoxSearch); - this.panel3.Controls.Add(this.buttonRefresh); - this.panel3.Controls.Add(this.buttonClearFilters); - this.panel3.Controls.Add(this.comboBoxPages); - this.panel3.Controls.Add(this.comboBoxSecSort); - this.panel3.Controls.Add(this.comboBoxPriSort); - this.panel3.Controls.Add(this.comboBoxTags); - this.panel3.Controls.Add(this.comboBoxCreator); - this.panel3.Controls.Add(this.comboBoxCategory); - this.panel3.Controls.Add(this.comboBoxPayType); - this.panel3.Controls.Add(this.comboBoxHosted); - this.panel3.Controls.Add(this.labelTotal); - this.panel3.Controls.Add(this.label7); - this.panel3.Controls.Add(this.label6); - this.panel3.Controls.Add(this.label5); - this.panel3.Controls.Add(this.label4); - this.panel3.Controls.Add(this.label3); - this.panel3.Controls.Add(this.label2); - this.panel3.Controls.Add(this.label1); - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(3, 3); - this.panel3.Name = "panel3"; - this.tableLayoutPanel1.SetRowSpan(this.panel3, 2); - this.panel3.Size = new System.Drawing.Size(217, 745); - this.panel3.TabIndex = 5; - this.panel3.UseWaitCursor = true; - // - // buttonNextPage - // - this.buttonNextPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonNextPage.BackColor = System.Drawing.SystemColors.ButtonFace; - this.buttonNextPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonNextPage.Location = new System.Drawing.Point(154, 650); - this.buttonNextPage.Name = "buttonNextPage"; - this.buttonNextPage.Size = new System.Drawing.Size(24, 23); - this.buttonNextPage.TabIndex = 15; - this.buttonNextPage.Text = "鈻"; - this.buttonNextPage.UseVisualStyleBackColor = false; - this.buttonNextPage.UseWaitCursor = true; - this.buttonNextPage.Click += new System.EventHandler(this.buttonNextPage_Click); - // - // buttonPrevPage - // - this.buttonPrevPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonPrevPage.BackColor = System.Drawing.SystemColors.ButtonFace; - this.buttonPrevPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonPrevPage.Location = new System.Drawing.Point(42, 650); - this.buttonPrevPage.Name = "buttonPrevPage"; - this.buttonPrevPage.Size = new System.Drawing.Size(24, 23); - this.buttonPrevPage.TabIndex = 13; - this.buttonPrevPage.Text = "鈼"; - this.buttonPrevPage.UseVisualStyleBackColor = false; - this.buttonPrevPage.UseWaitCursor = true; - this.buttonPrevPage.Click += new System.EventHandler(this.buttonPrevPage_Click); - // - // buttonEmptySearch - // - this.buttonEmptySearch.BackColor = System.Drawing.SystemColors.ButtonFace; - this.buttonEmptySearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonEmptySearch.Location = new System.Drawing.Point(184, 327); - this.buttonEmptySearch.Name = "buttonEmptySearch"; - this.buttonEmptySearch.Size = new System.Drawing.Size(24, 25); - this.buttonEmptySearch.TabIndex = 4; - this.buttonEmptySearch.Text = "鉁"; - this.buttonEmptySearch.UseVisualStyleBackColor = false; - this.buttonEmptySearch.UseWaitCursor = true; - this.buttonEmptySearch.Click += new System.EventHandler(this.buttonEmptySearch_Click); - // - // buttonLastPage - // - this.buttonLastPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLastPage.BackColor = System.Drawing.SystemColors.ButtonFace; - this.buttonLastPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonLastPage.Location = new System.Drawing.Point(177, 650); - this.buttonLastPage.Name = "buttonLastPage"; - this.buttonLastPage.Size = new System.Drawing.Size(33, 23); - this.buttonLastPage.TabIndex = 16; - this.buttonLastPage.Text = "鈻秥"; - this.buttonLastPage.UseVisualStyleBackColor = false; - this.buttonLastPage.UseWaitCursor = true; - this.buttonLastPage.Click += new System.EventHandler(this.buttonLastPage_Click); - // - // buttonFirstPage - // - this.buttonFirstPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonFirstPage.BackColor = System.Drawing.SystemColors.ButtonFace; - this.buttonFirstPage.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonFirstPage.Location = new System.Drawing.Point(10, 650); - this.buttonFirstPage.Name = "buttonFirstPage"; - this.buttonFirstPage.Size = new System.Drawing.Size(33, 23); - this.buttonFirstPage.TabIndex = 12; - this.buttonFirstPage.Text = "|鈼"; - this.buttonFirstPage.UseVisualStyleBackColor = false; - this.buttonFirstPage.UseWaitCursor = true; - this.buttonFirstPage.Click += new System.EventHandler(this.buttonFirstPage_Click); - // - // buttonClose - // - this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.buttonClose.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonClose.ForeColor = System.Drawing.SystemColors.HighlightText; - this.buttonClose.Location = new System.Drawing.Point(9, 703); - this.buttonClose.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size(199, 33); - this.buttonClose.TabIndex = 17; - this.buttonClose.Text = "Close"; - this.buttonClose.UseVisualStyleBackColor = false; - this.buttonClose.UseWaitCursor = true; - this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); - // - // buttonScanHubUpdate - // - this.buttonScanHubUpdate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonScanHubUpdate.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.buttonScanHubUpdate.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonScanHubUpdate.ForeColor = System.Drawing.SystemColors.HighlightText; - this.buttonScanHubUpdate.Location = new System.Drawing.Point(10, 584); - this.buttonScanHubUpdate.Name = "buttonScanHubUpdate"; - this.buttonScanHubUpdate.Size = new System.Drawing.Size(199, 40); - this.buttonScanHubUpdate.TabIndex = 11; - this.buttonScanHubUpdate.Text = "Scan Hub For\r\nPackages With Updates\r\n"; - this.toolTip1.SetToolTip(this.buttonScanHubUpdate, "Scan Hub For Packages With Updates"); - this.buttonScanHubUpdate.UseVisualStyleBackColor = false; - this.buttonScanHubUpdate.UseWaitCursor = true; - this.buttonScanHubUpdate.Click += new System.EventHandler(this.buttonScanHubUpdate_Click); - // - // buttonScanHub - // - this.buttonScanHub.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonScanHub.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.buttonScanHub.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.buttonScanHub.ForeColor = System.Drawing.SystemColors.HighlightText; - this.buttonScanHub.Location = new System.Drawing.Point(9, 538); - this.buttonScanHub.Name = "buttonScanHub"; - this.buttonScanHub.Size = new System.Drawing.Size(199, 40); - this.buttonScanHub.TabIndex = 10; - this.buttonScanHub.Text = "Scan Hub For\r\nMissing Referenced Packages"; - this.toolTip1.SetToolTip(this.buttonScanHub, "Scan hub for missing Depends from All organized vars"); - this.buttonScanHub.UseVisualStyleBackColor = false; - this.buttonScanHub.UseWaitCursor = true; - this.buttonScanHub.Click += new System.EventHandler(this.buttonScanHub_Click); - // - // textBoxSearch - // - this.textBoxSearch.ForeColor = System.Drawing.SystemColors.GrayText; - this.textBoxSearch.Location = new System.Drawing.Point(9, 327); - this.textBoxSearch.Name = "textBoxSearch"; - this.textBoxSearch.Size = new System.Drawing.Size(174, 22); - this.textBoxSearch.TabIndex = 7; - this.textBoxSearch.Text = "Search..."; - this.textBoxSearch.UseWaitCursor = true; - this.textBoxSearch.Enter += new System.EventHandler(this.textBoxSearch_Enter); - this.textBoxSearch.Leave += new System.EventHandler(this.textBoxSearch_Leave); - // - // buttonRefresh - // - this.buttonRefresh.Location = new System.Drawing.Point(10, 3); - this.buttonRefresh.Name = "buttonRefresh"; - this.buttonRefresh.Size = new System.Drawing.Size(121, 29); - this.buttonRefresh.TabIndex = 0; - this.buttonRefresh.Text = "Refresh"; - this.buttonRefresh.UseVisualStyleBackColor = true; - this.buttonRefresh.UseWaitCursor = true; - this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click); - // - // buttonClearFilters - // - this.buttonClearFilters.Location = new System.Drawing.Point(9, 88); - this.buttonClearFilters.Name = "buttonClearFilters"; - this.buttonClearFilters.Size = new System.Drawing.Size(199, 33); - this.buttonClearFilters.TabIndex = 2; - this.buttonClearFilters.Text = "Clear Filters"; - this.buttonClearFilters.UseVisualStyleBackColor = true; - this.buttonClearFilters.UseWaitCursor = true; - this.buttonClearFilters.Click += new System.EventHandler(this.buttonClearFilters_Click); - // - // comboBoxPages - // - this.comboBoxPages.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxPages.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxPages.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxPages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxPages.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxPages.FormattingEnabled = true; - this.comboBoxPages.Location = new System.Drawing.Point(65, 651); - this.comboBoxPages.Name = "comboBoxPages"; - this.comboBoxPages.Size = new System.Drawing.Size(91, 22); - this.comboBoxPages.TabIndex = 14; - this.comboBoxPages.UseWaitCursor = true; - // - // comboBoxSecSort - // - this.comboBoxSecSort.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxSecSort.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxSecSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxSecSort.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxSecSort.FormattingEnabled = true; - this.comboBoxSecSort.Location = new System.Drawing.Point(9, 431); - this.comboBoxSecSort.Name = "comboBoxSecSort"; - this.comboBoxSecSort.Size = new System.Drawing.Size(199, 22); - this.comboBoxSecSort.TabIndex = 9; - this.comboBoxSecSort.UseWaitCursor = true; - // - // comboBoxPriSort - // - this.comboBoxPriSort.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxPriSort.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxPriSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxPriSort.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxPriSort.FormattingEnabled = true; - this.comboBoxPriSort.Location = new System.Drawing.Point(9, 380); - this.comboBoxPriSort.Name = "comboBoxPriSort"; - this.comboBoxPriSort.Size = new System.Drawing.Size(199, 22); - this.comboBoxPriSort.TabIndex = 8; - this.comboBoxPriSort.UseWaitCursor = true; - // - // comboBoxTags - // - this.comboBoxTags.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxTags.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxTags.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxTags.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxTags.FormattingEnabled = true; - this.comboBoxTags.Location = new System.Drawing.Point(9, 299); - this.comboBoxTags.Name = "comboBoxTags"; - this.comboBoxTags.Size = new System.Drawing.Size(199, 22); - this.comboBoxTags.TabIndex = 6; - this.comboBoxTags.UseWaitCursor = true; - // - // comboBoxCreator - // - this.comboBoxCreator.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxCreator.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxCreator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown; - this.comboBoxCreator.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxCreator.FormattingEnabled = true; - this.comboBoxCreator.Location = new System.Drawing.Point(9, 249); - this.comboBoxCreator.Name = "comboBoxCreator"; - this.comboBoxCreator.Size = new System.Drawing.Size(199, 22); - this.comboBoxCreator.TabIndex = 5; - this.comboBoxCreator.UseWaitCursor = true; - // - // comboBoxCategory - // - this.comboBoxCategory.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxCategory.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxCategory.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxCategory.FormattingEnabled = true; - this.comboBoxCategory.Location = new System.Drawing.Point(9, 199); - this.comboBoxCategory.Name = "comboBoxCategory"; - this.comboBoxCategory.Size = new System.Drawing.Size(199, 22); - this.comboBoxCategory.TabIndex = 4; - this.comboBoxCategory.UseWaitCursor = true; - // - // comboBoxPayType - // - this.comboBoxPayType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxPayType.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxPayType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxPayType.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxPayType.FormattingEnabled = true; - this.comboBoxPayType.Location = new System.Drawing.Point(9, 149); - this.comboBoxPayType.Name = "comboBoxPayType"; - this.comboBoxPayType.Size = new System.Drawing.Size(199, 22); - this.comboBoxPayType.TabIndex = 3; - this.comboBoxPayType.UseWaitCursor = true; - // - // comboBoxHosted - // - this.comboBoxHosted.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; - this.comboBoxHosted.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.comboBoxHosted.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxHosted.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.comboBoxHosted.FormattingEnabled = true; - this.comboBoxHosted.Location = new System.Drawing.Point(9, 60); - this.comboBoxHosted.Name = "comboBoxHosted"; - this.comboBoxHosted.Size = new System.Drawing.Size(199, 22); - this.comboBoxHosted.TabIndex = 1; - this.comboBoxHosted.UseWaitCursor = true; - // - // labelTotal - // - this.labelTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.labelTotal.BackColor = System.Drawing.Color.LightSlateGray; - this.labelTotal.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.labelTotal.Location = new System.Drawing.Point(11, 629); - this.labelTotal.Name = "labelTotal"; - this.labelTotal.Size = new System.Drawing.Size(199, 21); - this.labelTotal.TabIndex = 0; - this.labelTotal.Text = "Total: 0"; - this.labelTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.labelTotal.UseWaitCursor = true; - // - // label7 - // - this.label7.BackColor = System.Drawing.Color.LightSlateGray; - this.label7.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label7.Location = new System.Drawing.Point(9, 405); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(199, 24); - this.label7.TabIndex = 0; - this.label7.Text = "Secondary Sort"; - this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label7.UseWaitCursor = true; - // - // label6 - // - this.label6.BackColor = System.Drawing.Color.LightSlateGray; - this.label6.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label6.Location = new System.Drawing.Point(9, 354); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(199, 24); - this.label6.TabIndex = 0; - this.label6.Text = "Primary Sort"; - this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label6.UseWaitCursor = true; - // - // label5 - // - this.label5.BackColor = System.Drawing.Color.LightSlateGray; - this.label5.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label5.Location = new System.Drawing.Point(9, 274); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(199, 24); - this.label5.TabIndex = 0; - this.label5.Text = "Tags"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label5.UseWaitCursor = true; - // - // label4 - // - this.label4.BackColor = System.Drawing.Color.LightSlateGray; - this.label4.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label4.Location = new System.Drawing.Point(9, 224); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(199, 24); - this.label4.TabIndex = 0; - this.label4.Text = "Creator"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label4.UseWaitCursor = true; - // - // label3 - // - this.label3.BackColor = System.Drawing.Color.LightSlateGray; - this.label3.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label3.Location = new System.Drawing.Point(9, 174); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(199, 24); - this.label3.TabIndex = 0; - this.label3.Text = "Category"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label3.UseWaitCursor = true; - // - // label2 - // - this.label2.BackColor = System.Drawing.Color.LightSlateGray; - this.label2.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label2.Location = new System.Drawing.Point(9, 124); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(199, 24); - this.label2.TabIndex = 0; - this.label2.Text = "Pay Type"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label2.UseWaitCursor = true; - // - // label1 - // - this.label1.BackColor = System.Drawing.Color.LightSlateGray; - this.label1.ForeColor = System.Drawing.SystemColors.ButtonHighlight; - this.label1.Location = new System.Drawing.Point(9, 35); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(199, 24); - this.label1.TabIndex = 0; - this.label1.Text = "Hosted Option"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.label1.UseWaitCursor = true; - // - // splitContainer1 - // - this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(226, 3); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanelHubItems); - this.splitContainer1.Panel1.UseWaitCursor = true; - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.listViewDownList); - this.splitContainer1.Panel2.Controls.Add(this.panel1); - this.splitContainer1.Panel2.UseWaitCursor = true; - this.splitContainer1.Size = new System.Drawing.Size(795, 565); - this.splitContainer1.SplitterDistance = 265; - this.splitContainer1.TabIndex = 7; - this.splitContainer1.UseWaitCursor = true; - // - // flowLayoutPanelHubItems - // - this.flowLayoutPanelHubItems.AutoScroll = true; - this.flowLayoutPanelHubItems.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanelHubItems.Location = new System.Drawing.Point(0, 0); - this.flowLayoutPanelHubItems.Name = "flowLayoutPanelHubItems"; - this.flowLayoutPanelHubItems.Size = new System.Drawing.Size(261, 561); - this.flowLayoutPanelHubItems.TabIndex = 6; - this.flowLayoutPanelHubItems.UseWaitCursor = true; - this.flowLayoutPanelHubItems.MouseEnter += new System.EventHandler(this.HideDownLoadList); - // - // listViewDownList - // - this.listViewDownList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeaderPackageName, - this.columnHeaderDownUrl}); - this.listViewDownList.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewDownList.HideSelection = false; - this.listViewDownList.Location = new System.Drawing.Point(0, 0); - this.listViewDownList.Name = "listViewDownList"; - this.listViewDownList.Size = new System.Drawing.Size(522, 514); - this.listViewDownList.TabIndex = 4; - this.toolTip1.SetToolTip(this.listViewDownList, "download link list"); - this.listViewDownList.UseCompatibleStateImageBehavior = false; - this.listViewDownList.UseWaitCursor = true; - this.listViewDownList.View = System.Windows.Forms.View.Details; - this.listViewDownList.MouseEnter += new System.EventHandler(this.DownList_MouseEnter); - // - // columnHeaderPackageName - // - this.columnHeaderPackageName.Text = "Name"; - this.columnHeaderPackageName.Width = 120; - // - // columnHeaderDownUrl - // - this.columnHeaderDownUrl.Text = "Url"; - this.columnHeaderDownUrl.Width = 400; - // - // panel1 - // - this.panel1.Controls.Add(this.button1); - this.panel1.Controls.Add(this.buttonCopytoClip); - this.panel1.Controls.Add(this.buttonDownloadAll); - this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 514); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(522, 47); - this.panel1.TabIndex = 2; - this.panel1.UseWaitCursor = true; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(139, 4); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(82, 40); - this.button1.TabIndex = 2; - this.button1.Text = "Clear"; - this.button1.UseVisualStyleBackColor = true; - this.button1.UseWaitCursor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // buttonCopytoClip - // - this.buttonCopytoClip.Location = new System.Drawing.Point(3, 4); - this.buttonCopytoClip.Name = "buttonCopytoClip"; - this.buttonCopytoClip.Size = new System.Drawing.Size(130, 40); - this.buttonCopytoClip.TabIndex = 0; - this.buttonCopytoClip.Text = "Copy to clipboard"; - this.buttonCopytoClip.UseVisualStyleBackColor = true; - this.buttonCopytoClip.UseWaitCursor = true; - this.buttonCopytoClip.Click += new System.EventHandler(this.buttonCopytoClip_Click); - // - // buttonDownloadAll - // - this.buttonDownloadAll.Location = new System.Drawing.Point(250, 4); - this.buttonDownloadAll.Name = "buttonDownloadAll"; - this.buttonDownloadAll.Size = new System.Drawing.Size(100, 40); - this.buttonDownloadAll.TabIndex = 0; - this.buttonDownloadAll.Text = "Download All"; - - this.buttonDownloadAll.UseVisualStyleBackColor = true; - this.buttonDownloadAll.UseWaitCursor = true; - this.buttonDownloadAll.Click += new System.EventHandler(this.buttonDownloadAll_Click); - // - // FormHub - // - this.AcceptButton = this.buttonClose; - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1024, 751); - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "FormHub"; - this.Text = "Hub Browse"; - this.UseWaitCursor = true; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormHub_FormClosing); - this.Load += new System.EventHandler(this.FormHub_Load); - this.tableLayoutPanel1.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); - this.splitContainer1.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Button buttonScanHub; - private System.Windows.Forms.ListBox listBoxLog; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Button buttonFirstPage; - private System.Windows.Forms.Button buttonClose; - private System.Windows.Forms.Button buttonScanHubUpdate; - private System.Windows.Forms.TextBox textBoxSearch; - private System.Windows.Forms.Button buttonClearFilters; - private System.Windows.Forms.ComboBox comboBoxSecSort; - private System.Windows.Forms.ComboBox comboBoxPriSort; - private System.Windows.Forms.ComboBox comboBoxTags; - private System.Windows.Forms.ComboBox comboBoxCreator; - private System.Windows.Forms.ComboBox comboBoxCategory; - private System.Windows.Forms.ComboBox comboBoxPayType; - private System.Windows.Forms.ComboBox comboBoxHosted; - private System.Windows.Forms.Label labelTotal; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanelHubItems; - private System.Windows.Forms.Button buttonNextPage; - private System.Windows.Forms.Button buttonPrevPage; - private System.Windows.Forms.Button buttonEmptySearch; - private System.Windows.Forms.Button buttonRefresh; - private System.Windows.Forms.Button buttonLastPage; - private System.Windows.Forms.ComboBox comboBoxPages; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.Button buttonCopytoClip; - private System.Windows.Forms.Button buttonDownloadAll; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.ListView listViewDownList; - private System.Windows.Forms.ColumnHeader columnHeaderPackageName; - private System.Windows.Forms.ColumnHeader columnHeaderDownUrl; - private System.Windows.Forms.ToolTip toolTip1; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormHub.cs b/_archived/varManager/FormHub.cs deleted file mode 100644 index 3b41615..0000000 --- a/_archived/varManager/FormHub.cs +++ /dev/null @@ -1,1118 +0,0 @@ -锘縰sing SimpleJSON; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Windows.Forms; -using varManager.Backend; -using varManager.Properties; -using static SimpleLogger; - -namespace varManager -{ - public partial class FormHub : Form - { - private static SimpleLogger simpLog = new SimpleLogger(); - public Form1 form1; - private static HttpClient httpClient; - private static CancellationToken cancellationToken; - private List listPayType, listLocation, listSort, listTags, listCategory, listCreator; - private bool downlistHide = true; - Dictionary downloadUrls = new Dictionary(); - private readonly Dictionary downloadUrlsByUrl = new Dictionary(StringComparer.OrdinalIgnoreCase); - private bool refreshInProgress; - private bool refreshQueued; - private bool refreshQueuedGenePages; - private string? lastQuerySignature; - private const int intPerPage = 48; - private InvokeAddLoglist addlog; - static string vam_download_exe = "vam_downloader.exe"; - static string vam_download_path = Path.Combine(".\\plugin\\", vam_download_exe); - static string vam_download_save_path = Path.Combine(Settings.Default.vampath, "AddonPackages"); - - private void LogBackendLine(string line) - { - if (string.IsNullOrWhiteSpace(line)) - { - return; - } - string msg = line.Trim(); - LogLevel level = LogLevel.INFO; - if (msg.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - msg = msg.Substring("error:".Length).TrimStart(); - } - else if (msg.StartsWith("debug:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.DEBUG; - msg = msg.Substring("debug:".Length).TrimStart(); - } - BeginInvoke(addlog, new Object[] { msg, level }); - } - - private void LogDebug(string message) - { - LogBackendLine($"debug: {message}"); - } - - private static bool IsVersionedVarName(string name) - { - if (string.IsNullOrWhiteSpace(name)) - { - return false; - } - string[] parts = name.Split('.'); - if (parts.Length < 3) - { - return false; - } - return int.TryParse(parts[parts.Length - 1], out _); - } - - private void AddDownloadUrl(string varName, string url) - { - if (string.IsNullOrWhiteSpace(varName) || string.IsNullOrWhiteSpace(url)) - { - return; - } - if (downloadUrls.TryGetValue(varName, out var existingUrl) && - !string.Equals(existingUrl, url, StringComparison.OrdinalIgnoreCase)) - { - downloadUrlsByUrl.Remove(existingUrl); - } - if (downloadUrlsByUrl.TryGetValue(url, out var existingName)) - { - if (string.Equals(existingName, varName, StringComparison.OrdinalIgnoreCase)) - { - downloadUrls[varName] = url; - return; - } - bool existingVersioned = IsVersionedVarName(existingName); - bool newVersioned = IsVersionedVarName(varName); - if (newVersioned && !existingVersioned) - { - downloadUrls.Remove(existingName); - downloadUrls[varName] = url; - downloadUrlsByUrl[url] = varName; - } - return; - } - downloadUrls[varName] = url; - downloadUrlsByUrl[url] = varName; - } - - private void NormalizeDownloadUrls() - { - var source = downloadUrls; - downloadUrls = new Dictionary(); - downloadUrlsByUrl.Clear(); - foreach (var kvp in source) - { - AddDownloadUrl(kvp.Key, kvp.Value); - } - } - - private static string? NormalizeFilter(string? value) - { - if (string.IsNullOrWhiteSpace(value)) - { - return null; - } - string trimmed = value.Trim(); - if (trimmed.Equals("All", StringComparison.OrdinalIgnoreCase)) - { - return null; - } - return trimmed; - } - - private static string BuildQuerySignature( - int perpage, - string? location, - string? paytype, - string? category, - string? username, - string? tags, - string? search, - string? sort, - int page) - { - return string.Join("|", perpage, - location ?? string.Empty, - paytype ?? string.Empty, - category ?? string.Empty, - username ?? string.Empty, - tags ?? string.Empty, - search ?? string.Empty, - sort ?? string.Empty, - page); - } - - private static string TrimForLog(string value, int maxLength) - { - if (string.IsNullOrEmpty(value)) - { - return string.Empty; - } - if (value.Length <= maxLength) - { - return value; - } - return value.Substring(0, maxLength) + "..."; - } - - private Task RunBackendJobAsync(string kind, object? args) - { - return BackendSession.RunJobAsync(kind, args, LogBackendLine, CancellationToken.None); - } - - private BackendJobResult RunBackendJob(string kind, object? args) - { - return BackendSession.RunJob(kind, args, LogBackendLine, CancellationToken.None); - } - - private T? DeserializeResult(BackendJobResult result) - { - if (!result.Result.HasValue) - { - return default; - } - return JsonSerializer.Deserialize(result.Result.Value.GetRawText()); - } - - private sealed class HubDownloadList - { - [JsonPropertyName("download_urls")] - public Dictionary DownloadUrls { get; set; } = new Dictionary(); - - [JsonPropertyName("download_urls_no_version")] - public Dictionary DownloadUrlsNoVersion { get; set; } = new Dictionary(); - } - - public FormHub() - { - InitializeComponent(); - addlog = new InvokeAddLoglist(UpdateAddLoglist); - httpClient = new HttpClient(); - cancellationToken = new CancellationToken(); - } - private void buttonScanHub_Click(object sender, EventArgs e) - { - string message = "Scan hub for missing Depends from All organized vars. A download link list that will be generated. You must be logged in at hub.virtamate.com before you can download these links, It is recommended to use Chrono for Chrome to download."; - - const string caption = "AllMissingDepends"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - AllMissingDepends(); - } - } - public delegate void InvokeAddLoglist(string message, LogLevel logLevel); - - public void UpdateAddLoglist(string message, LogLevel logLevel) - { - string msg = simpLog.WriteFormattedLog(logLevel, message); - listBoxLog.Items.Add(msg); - listBoxLog.TopIndex = listBoxLog.Items.Count - 1; - } - private async void AllMissingDepends() - { - this.BeginInvoke(addlog, new Object[] { "Search for dependencies...", LogLevel.INFO }); - try - { - var result = await RunBackendJobAsync("hub_missing_scan", null); - var payload = DeserializeResult(result); - downloadUrls = payload?.DownloadUrls ?? new Dictionary(); - if (payload != null) - { - foreach (var kvp in payload.DownloadUrlsNoVersion) - { - if (!downloadUrls.ContainsKey(kvp.Key)) - { - downloadUrls[kvp.Key] = kvp.Value; - } - } - } - NormalizeDownloadUrls(); - if (form1 != null) - { - downloadUrls = downloadUrls - .Where(kvp => !form1.FindByvarName(kvp.Key)) - .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - NormalizeDownloadUrls(); - } - - if (downloadUrls.Count > 0) - { - this.BeginInvoke(addlog, new Object[] { $"Total {downloadUrls.Count} download links found", LogLevel.INFO }); - ShowDownList(); - DrawDownloadListView(); - } - else - { - this.BeginInvoke(addlog, new Object[] { "No download link found", LogLevel.INFO }); - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"Hub scan failed: {ex.Message}", LogLevel.ERROR }); - } - } - - private void DrawDownloadListView() - { - listViewDownList.Items.Clear(); - foreach (var varname in downloadUrls.Keys) - { - ListViewItem downloaditem = new ListViewItem(); - downloaditem.Text = varname; - downloaditem.SubItems.Add(downloadUrls[varname]); - listViewDownList.Items.Add(downloaditem); - } - } - - private static async Task FindPackages(string packages) - { - string url = "https://hub.virtamate.com/citizenx/api.php"; - JSONClass jns = new JSONClass(); - jns.Add("source", "VaM"); - jns.Add("action", "findPackages"); - jns.Add("packages", packages); - var data = new StringContent(jns.ToString(), Encoding.UTF8, "application/json"); - - using (var client = new HttpClient()) - { - var response = await client.PostAsync(url, data); - string reponse = response.Content.ReadAsStringAsync().Result; - return reponse; - } - } - - private async void FormHub_Load(object sender, EventArgs e) - { - this.Enabled = false; - this.UseWaitCursor = true; - if(!await GetInfoListAsync()) - { - MessageBox.Show("Error getting HUB information!"); - this.Close(); - return; - } - comboBoxHosted.Items.Add("All"); - foreach (string item in listLocation) - { - comboBoxHosted.Items.Add(item); - } - - comboBoxPayType.Items.Add("All"); - foreach (string item in listPayType) - { - comboBoxPayType.Items.Add(item); - } - - - comboBoxCategory.Items.Add("All"); - foreach (string item in listCategory) - { - comboBoxCategory.Items.Add(item); - } - - comboBoxCreator.Items.Add("All"); - foreach (string item in listCreator) - { - comboBoxCreator.Items.Add(item); - } - - comboBoxTags.Items.Add("All"); - foreach (string item in listTags) - { - comboBoxTags.Items.Add(item); - } - foreach (string item in listSort) - { - comboBoxPriSort.Items.Add(item); - } - comboBoxSecSort.Items.Add(""); - foreach (string item in listSort) - { - comboBoxSecSort.Items.Add(item); - } - downlistHide = true; - splitContainer1.SplitterDistance = splitContainer1.Size.Width - 80; - List items = new List(); - - for (int i = 0; i < intPerPage; i++) - { - HubItem item = new HubItem(); - item.LogSink = LogBackendLine; - item.ClickFilter += Item_ClickFilter; - item.GenLinkList += Item_GenLinkList; - item.RetPackageName += Item_RetPackageName; - - - flowLayoutPanelHubItems.Controls.Add(item); - items.Add(item); - } - ClearFilter(); - this.UseWaitCursor = false; - this.Enabled = true; - await GenerateHabItemsAsync(force: true); - EnableFilterEvent(); - - } - - private void Item_RetPackageName(object sender, PackageNameEventArgs e) - { - form1.SelectVarInList(e.PackageName); - form1.Activate(); - //form1.LocateVar(e.PackageName); - } - - private void Item_GenLinkList(object sender, DownloadLinkListEventArgs e) - { - foreach (var kvp in e.DownloadLinks) - { - string varname = kvp.Key; - string url = kvp.Value; - var exitname = form1.VarExistName(varname); - if (exitname == "missing"|| exitname.EndsWith("$")) - { - AddDownloadUrl(varname, url); - } - } - DrawDownloadListView(); - } - - private void DisableFilterEvent() - { - comboBoxHosted.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxPayType.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxCategory.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxCreator.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxTags.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxPriSort.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxSecSort.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxPages.SelectedIndexChanged -= ComboBoxSelectedChanged; - textBoxSearch.TextChanged -= ComboBoxSelectedChanged; - } - - private void EnableFilterEvent() - { - comboBoxHosted.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxPayType.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxCategory.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxCreator.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxTags.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxPriSort.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxSecSort.SelectedIndexChanged += ComboBoxSelectedChanged; - comboBoxPages.SelectedIndexChanged += ComboBoxSelectedChanged; - textBoxSearch.TextChanged += ComboBoxSelectedChanged; - } - - private void ClearFilter() - { - // if (comboBoxHosted.Items.Contains("Hub And Dependencies")) - // comboBoxHosted.SelectedItem = "Hub And Dependencies"; - // else - comboBoxHosted.SelectedIndex = 0; - - if (comboBoxPayType.Items.Contains("Free")) - comboBoxPayType.SelectedItem = "Free"; - else - comboBoxPayType.SelectedIndex = 0; - - comboBoxCategory.SelectedIndex = 0; - comboBoxCreator.SelectedIndex = 0; - comboBoxTags.SelectedIndex = 0; - comboBoxPriSort.SelectedIndex = 0; - comboBoxSecSort.SelectedIndex = 0; - - textBoxSearch.Text = "Search..."; - textBoxSearch.ForeColor = SystemColors.GrayText; - - } - - private void Item_ClickFilter(object sender, HubItemFilterEventArgs e) - { - DisableFilterEvent(); - - HubItem hubItem = sender as HubItem; - if (e.FilterType == "category") - { - ClearFilter(); - comboBoxPayType.Text = e.PayType; - comboBoxCategory.Text = e.Category; - } - else if (e.FilterType == "creator") - { - ClearFilter(); - comboBoxCreator.Text = e.Creator; - } - EnableFilterEvent(); - _ = GenerateHabItemsAsync(); - } - - private void ComboBoxSelectedChanged(object sender, EventArgs e) - { - - if (comboBoxPages == sender) - { - _ = GenerateHabItemsAsync(false); - } - else - { - _ = GenerateHabItemsAsync(); - } - } - - private async Task GenerateHabItemsAsync(bool genePages = true, bool force = false) - { - if (refreshInProgress) - { - refreshQueued = true; - refreshQueuedGenePages = refreshQueuedGenePages || genePages; - return; - } - refreshInProgress = true; - string location = comboBoxHosted.Text, paytype = comboBoxPayType.Text, - category = comboBoxCategory.Text, username = comboBoxCreator.Text, - tags = comboBoxTags.Text, search = textBoxSearch.Text; - if(search == "Search...") - { - search = ""; - } - string? locationFilter = NormalizeFilter(location); - string? paytypeFilter = NormalizeFilter(paytype); - string? categoryFilter = NormalizeFilter(category); - string? usernameFilter = NormalizeFilter(username); - string? tagsFilter = NormalizeFilter(tags); - string? searchFilter = string.IsNullOrWhiteSpace(search) ? null : search.Trim(); - string sort = comboBoxPriSort.Text; - if (!string.IsNullOrEmpty(comboBoxSecSort.Text)) - sort = sort + "," + comboBoxSecSort.Text; - int page = 1; - if (comboBoxPages.Items.Count > 0) - { - if (comboBoxPages.SelectedIndex >= 0) - page = comboBoxPages.SelectedIndex + 1; - } - string signature = BuildQuerySignature(intPerPage, locationFilter, paytypeFilter, categoryFilter, - usernameFilter, tagsFilter, searchFilter, sort, page); - try - { - if (!force && signature == lastQuerySignature) - { - return; - } - LogDebug($"hub_resources request perpage={intPerPage} location='{locationFilter ?? ""}' paytype='{paytypeFilter ?? ""}' category='{categoryFilter ?? ""}' username='{usernameFilter ?? ""}' tags='{tagsFilter ?? ""}' search='{searchFilter ?? ""}' sort='{sort}' page={page}"); - string response = await GetResourcesAsync(intPerPage, locationFilter, paytypeFilter, categoryFilter, usernameFilter, tagsFilter, searchFilter, sort, page); - if (string.IsNullOrEmpty(response)) - { - LogBackendLine("error: hub_resources returned empty response"); - return; - } - LogDebug($"hub_resources raw length={response.Length}"); - LogDebug($"hub_resources raw preview={TrimForLog(response, 200)}"); - RefreshResource(response, genePages); - lastQuerySignature = signature; - } - catch (Exception ex) - { - LogBackendLine($"error: GenerateHabItemsAsync failed: {ex.Message}"); - } - finally - { - refreshInProgress = false; - if (refreshQueued) - { - bool queuedGenePages = refreshQueuedGenePages; - refreshQueued = false; - refreshQueuedGenePages = false; - await GenerateHabItemsAsync(queuedGenePages); - } - } - } - - private async Task GetInfoListAsync() - { - try - { - var result = await RunBackendJobAsync("hub_info", null); - if (!result.Succeeded) - { - LogBackendLine($"error: hub_info job failed status={result.Job.Status} error={result.Job.Error ?? "unknown"}"); - } - if (!result.Result.HasValue) - { - LogBackendLine("error: hub_info returned no result"); - return false; - } - string raw = result.Result.Value.GetRawText(); - LogDebug($"hub_info raw length={raw.Length}"); - LogDebug($"hub_info raw preview={TrimForLog(raw, 200)}"); - JSONNode jsonResult = JSON.Parse(raw); - - if (jsonResult == null) - { - LogBackendLine("error: Failed to parse hub_info JSON response"); - return false; - } - - JSONArray jArray = jsonResult["category"] as JSONArray; - listPayType = new List(); - if (jArray != null) - { - foreach (var item in jArray.Childs) - { - listPayType.Add(item.Value); - } - } - - jArray = jsonResult["location"] as JSONArray; - listLocation = new List(); - if (jArray != null) - { - foreach (var item in jArray.Childs) - { - listLocation.Add(item.Value); - } - } - - jArray = jsonResult["type"] as JSONArray; - listCategory = new List(); - if (jArray != null) - { - foreach (var item in jArray.Childs) - { - listCategory.Add(item.Value); - } - } - - jArray = jsonResult["sort"] as JSONArray; - listSort = new List(); - if (jArray != null) - { - foreach (var item in jArray.Childs) - { - listSort.Add(item.Value); - } - } - - JSONClass jClass = jsonResult["tags"] as JSONClass; - listTags = new List(); - if (jClass != null) - { - foreach (var item in jClass.Keys) - { - listTags.Add(item); - } - } - - jClass = jsonResult["users"] as JSONClass; - listCreator = new List(); - if (jClass != null) - { - foreach (var item in jClass.Keys) - { - listCreator.Add(item); - } - } - LogDebug($"hub_info counts location={listLocation.Count} paytype={listPayType.Count} category={listCategory.Count} sort={listSort.Count} tags={listTags.Count} users={listCreator.Count}"); - return true; - } - catch (Exception ex) - { - LogBackendLine($"error: GetInfoListAsync failed: {ex.Message}"); - return false; - } - } - - private void buttonFirstPage_Click(object sender, EventArgs e) - { - if (comboBoxPages.SelectedIndex > 0) comboBoxPages.SelectedIndex = 0; - } - - private void buttonPrevPage_Click(object sender, EventArgs e) - { - if (comboBoxPages.SelectedIndex > 0) comboBoxPages.SelectedIndex--; - } - - private void buttonNextPage_Click(object sender, EventArgs e) - { - if (comboBoxPages.SelectedIndex < comboBoxPages.Items.Count - 1) comboBoxPages.SelectedIndex++; - } - - private void buttonLastPage_Click(object sender, EventArgs e) - { - if (comboBoxPages.SelectedIndex < comboBoxPages.Items.Count - 1) comboBoxPages.SelectedIndex = comboBoxPages.Items.Count - 1; - } - - private void buttonRefresh_Click(object sender, EventArgs e) - { - _ = GenerateHabItemsAsync(force: true); - } - - private async Task GetResourcesAsync(int perpage = intPerPage, - string? location = null, string? paytype = null, - string? category = null, string? username = null, string? tags = null, string? search = null, - string sort = "Latest Update", - int page = 1) - { - var result = await RunBackendJobAsync("hub_resources", new - { - perpage = perpage, - location = location, - paytype = paytype, - category = category, - username = username, - tags = tags, - search = search, - sort = sort, - page = page - }); - if (!result.Succeeded) - { - LogBackendLine($"error: hub_resources job failed status={result.Job.Status} error={result.Job.Error ?? "unknown"}"); - } - return result.Result.HasValue ? result.Result.Value.GetRawText() : string.Empty; - } - - public delegate void InvokeRefreshResource(string response, bool rebuildPages); - - private void buttonClearFilters_Click(object sender, EventArgs e) - { - DisableFilterEvent(); - ClearFilter(); - EnableFilterEvent(); - _ = GenerateHabItemsAsync(force: true); - } - - private void buttonEmptySearch_Click(object sender, EventArgs e) - { - textBoxSearch.Text = "Search..."; - textBoxSearch.ForeColor = SystemColors.GrayText; - } - - private void buttonScanHubUpdate_Click(object sender, EventArgs e) - { - string message = "Scan Hub For Packages With Updates.A download link list that will be generated. You must be logged in at hub.virtamate.com before you can download these links, It is recommended to use Chrono for Chrome to download."; - - const string caption = "AllMissingDepends"; - var result = MessageBox.Show(message, caption, - MessageBoxButtons.YesNo, - MessageBoxIcon.Question, - MessageBoxDefaultButton.Button1); - if (result == DialogResult.Yes) - { - UpdatAllPackages(); - } - } - struct PackVerDownID - { - public int ver; - public string downloadid; - - public PackVerDownID(int ver, string downloadid) - { - this.ver = ver; - this.downloadid = downloadid; - } - } - private async void UpdatAllPackages() - { - this.BeginInvoke(addlog, new Object[] { "Search for upgradable vars...", LogLevel.INFO }); - try - { - var result = await RunBackendJobAsync("hub_updates_scan", null); - var payload = DeserializeResult(result); - downloadUrls = payload?.DownloadUrls ?? new Dictionary(); - if (payload != null) - { - foreach (var kvp in payload.DownloadUrlsNoVersion) - { - if (!downloadUrls.ContainsKey(kvp.Key)) - { - downloadUrls[kvp.Key] = kvp.Value; - } - } - } - NormalizeDownloadUrls(); - if (form1 != null) - { - downloadUrls = downloadUrls - .Where(kvp => !form1.FindByvarName(kvp.Key)) - .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - NormalizeDownloadUrls(); - } - if (downloadUrls.Count > 0) - { - this.BeginInvoke(addlog, new Object[] { $"Total {downloadUrls.Count} updatable download links found", LogLevel.INFO }); - ShowDownList(); - DrawDownloadListView(); - } - else - { - this.BeginInvoke(addlog, new Object[] { "No download link found", LogLevel.WARNING }); - } - } - catch (Exception ex) - { - this.BeginInvoke(addlog, new Object[] { $"Hub update scan failed: {ex.Message}", LogLevel.ERROR }); - } - } - - - - private static async Task GetHubPackages() - { - string url = "https://s3cdn.virtamate.com/data/packages.json"; - - using (var client = new HttpClient()) - { - var response = await client.GetAsync(url); - string reponse = response.Content.ReadAsStringAsync().Result; - return reponse; - } - } - - private void ShowDownList() - { - if (downlistHide) - { - int splitterDistance = splitContainer1.Size.Width - 500; - if (splitterDistance < 80) splitterDistance = 80; - splitContainer1.SplitterDistance = splitterDistance; - downlistHide = false; - } - } - - private void HideDownLoadList(object sender, EventArgs e) - { - if (!downlistHide) - { - splitContainer1.SplitterDistance = splitContainer1.Size.Width - 80; - downlistHide = true; - } - } - - private void textBoxSearch_Enter(object sender, EventArgs e) - { - if(textBoxSearch.Text=="Search...") - { - textBoxSearch.Text = ""; - } - textBoxSearch.ForeColor = SystemColors.WindowText; - } - - private void textBoxSearch_Leave(object sender, EventArgs e) - { - if (string.IsNullOrWhiteSpace(textBoxSearch.Text)||textBoxSearch.Text == "Search...") - { - textBoxSearch.Text = "Search..."; - textBoxSearch.ForeColor = SystemColors.GrayText; - } - } - - private void DownList_MouseEnter(object sender, EventArgs e) - { - ShowDownList(); - } - - private void buttonCopytoClip_Click(object sender, EventArgs e) - { - if (downloadUrls.Count > 0) - { - Clipboard.SetText(string.Join("\r\n", downloadUrls.Values)); - MessageBox.Show("Copied to clipboard, you can paste to chrono for chrome(edge) to download"); - } - } - - // Assuming downloadUrls is a member of FormHub, populated elsewhere - // private Dictionary downloadUrls = new Dictionary(); - // Add the new button click event handler - private async void buttonDownloadAll_Click(object sender, EventArgs e) - { - // 1. Collect all unique download URLs from the downloadUrls dictionary - HashSet allUrlsToDownload = new HashSet(); - if (downloadUrls != null) // Ensure downloadUrls is not null - { - foreach (var url in downloadUrls.Values) - { - if (!string.IsNullOrEmpty(url) && url != "null") - { - allUrlsToDownload.Add(url); - } - } - } - // 2. Check if there are any URLs - if (allUrlsToDownload.Count == 0) - { - MessageBox.Show("No download links available. Please ensure data has been loaded and contains download links.", - "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); - return; - } - try - { - this.buttonDownloadAll.Enabled = false; - this.buttonCopytoClip.Enabled = false; - this.button1.Enabled = false; // Assuming button1 is the Clear button - await RunBackendJobAsync("hub_download_all", new { urls = allUrlsToDownload.ToList() }); - MessageBox.Show($"All {allUrlsToDownload.Count} items have been queued for download.\n" + - "Download process complete.", - "Download All Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - catch (Exception ex) - { - MessageBox.Show($"An error occurred during the Download All process: {ex.Message}", - "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - finally - { - // Re-enable buttons - this.buttonDownloadAll.Enabled = true; - this.buttonCopytoClip.Enabled = true; - this.button1.Enabled = true; - } - } - - private void button1_Click(object sender, EventArgs e) - { - downloadUrls.Clear(); - downloadUrlsByUrl.Clear(); - DrawDownloadListView(); - } - - private void buttonClose_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void FormHub_FormClosing(object sender, FormClosingEventArgs e) - { - if (listViewDownList.Items.Count > 0) - { - if (MessageBox.Show("Download list data will be lost, confirm exit?", "Warning", - MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2) == DialogResult.No) - { - e.Cancel = true; - } - } - } - - public void RefreshResource(string response, bool rebuildPages = true) - { - try - { - if (string.IsNullOrEmpty(response)) - { - LogBackendLine("error: RefreshResource received empty response"); - return; - } - - JSONNode jsonResult = JSON.Parse(response); - if (jsonResult == null) - { - LogBackendLine("error: Failed to parse hub_resources JSON response"); - return; - } - - JSONClass pagination = jsonResult["pagination"] as JSONClass; - if (pagination == null) - { - LogBackendLine("error: hub_resources response missing pagination field"); - return; - } - - int totalFound = 0; - if (pagination["total_found"] != null) - { - int.TryParse(pagination["total_found"].Value, out totalFound); - } - labelTotal.Text = $"Total: {totalFound}"; - - int totalPages = 0; - if (pagination["total_pages"] != null) - { - int.TryParse(pagination["total_pages"].Value, out totalPages); - } - - int curPage = 1; - if (pagination["page"] != null) - { - int.TryParse(pagination["page"].Value, out curPage); - } - - if (rebuildPages) - { - if (curPage > totalPages) curPage = totalPages; - if (curPage < 1) curPage = 1; - comboBoxPages.SelectedIndexChanged -= ComboBoxSelectedChanged; - comboBoxPages.Items.Clear(); - for (int i = 0; i < totalPages; i++) - { - comboBoxPages.Items.Add($"{i + 1 } of {totalPages}"); - } - if (comboBoxPages.Items.Count > 0) - comboBoxPages.SelectedIndex = curPage - 1; - comboBoxPages.SelectedIndexChanged += ComboBoxSelectedChanged; - } - - var resources = jsonResult["resources"]?.AsArray; - LogDebug($"hub_resources pagination total_found={totalFound} total_pages={totalPages} page={curPage} resources={(resources != null ? resources.Count : 0)}"); - if (resources == null) - { - LogBackendLine("error: hub_resources response missing resources field"); - // Hide all items if no resources - for (int index = 0; index < intPerPage; index++) - { - HubItem hubItem = (HubItem)flowLayoutPanelHubItems.Controls[index]; - hubItem.Visible = false; - } - return; - } - - for (int index = 0; index < intPerPage; index++) - { - HubItem hubItem = (HubItem)flowLayoutPanelHubItems.Controls[index]; - if (resources.Count > index) - { - hubItem.Visible = true; - JSONClass resource = resources[index] as JSONClass; - if (resource == null) - { - hubItem.Visible = false; - continue; - } - hubItem.SetResource(resource); - string inRepository = "Unknown Status"; - if (resource.HasKey("hubFiles")) - { - var hubfiles = resource["hubFiles"]?.AsArray; - if (hubfiles != null && hubfiles.Count > 0) - { - int inrepons = -1; - //JSONClass hubfile = hubfiles[0] as JSONClass; - foreach (JSONClass hubfile in hubfiles) - { - if (hubfile == null || hubfile["filename"] == null) continue; - string filename = hubfile["filename"].Value; - if (filename.EndsWith(".var")) - filename = filename.Substring(0, filename.Length - 4); - hubItem.PackageName = filename; - //int splitindex = filename.LastIndexOf('.'); - string[] filenameparts = filename.Split(('.')); - if (filenameparts.Length >= 2) - { - string hubpackageName = filenameparts[0] + "." + filenameparts[1]; - int hubversion = 1; - if (filenameparts.Length >= 3) - int.TryParse(filenameparts[2], out hubversion); - string varlastname = form1.VarExistName(hubpackageName + ".latest"); - if (varlastname != "missing") - { - int lastversion = int.Parse(varlastname.Substring(filename.LastIndexOf('.') + 1)); - if (lastversion >= hubversion) - { - if (inrepons < 0) - { - inRepository = "In Repository"; - inrepons = 0; - } - } - else - { - if (inrepons < 1) - { - inRepository = $"{lastversion} Upgrade to {hubversion}"; - inrepons = 1; - } - } - - } - else - { - inRepository = "Generate Download List"; - break; - } - } - } - } - } - else - { - if (resource.HasKey("download_url")) - { - inRepository = "Go To Download"; - } - } - hubItem.InRepository = inRepository; - hubItem.RefreshItem(); - } - else - hubItem.Visible = false; - } - } - catch (Exception ex) - { - LogBackendLine($"error: RefreshResource failed: {ex.Message}\n{ex.StackTrace}"); - } - } - private void ResponseTask(Task responseTask) - { - try - { - InvokeRefreshResource refreshResource = new InvokeRefreshResource(RefreshResource); - string response = responseTask.Result; - this.BeginInvoke(refreshResource, new Object[] { response, true }); - } - catch (Exception) { } - } - - private static async Task GetResponse(string url, StringContent data) - { - //using (var client = new HttpClient()) - //{ - string strresponse = ""; - httpClient.Timeout = TimeSpan.FromSeconds(60); - try - { - var response = await httpClient.PostAsync(url, data, cancellationToken); - - strresponse = response.Content.ReadAsStringAsync().Result; - } - catch - { - - } - return strresponse; - //} - } - - private static async Task GetInfo() - { - string url = "https://hub.virtamate.com/citizenx/api.php"; - - JSONClass jns = new JSONClass(); - jns.Add("source", "VaM"); - jns.Add("action", "getInfo"); - var data = new StringContent(jns.ToString(), Encoding.UTF8, "application/json"); - return await GetResponse(url, data); - } - - private void buttonExit_Click(object sender, EventArgs e) - { - this.Close(); - } - } -} diff --git a/_archived/varManager/FormHub.resx b/_archived/varManager/FormHub.resx deleted file mode 100644 index dc6897e..0000000 --- a/_archived/varManager/FormHub.resx +++ /dev/null @@ -1,411 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - - AAABAAEAQEAAAAEAIAAoQgAAFgAAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAA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AA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAA - APIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAA - APIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAA - APIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAAAPIAAADyAAAA8gAA - APIAAADlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - - - \ No newline at end of file diff --git a/_archived/varManager/FormMissingVars.Designer.cs b/_archived/varManager/FormMissingVars.Designer.cs deleted file mode 100644 index 1f99088..0000000 --- a/_archived/varManager/FormMissingVars.Designer.cs +++ /dev/null @@ -1,771 +0,0 @@ -锘 -namespace varManager -{ - partial class FormMissingVars - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - dbContext?.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMissingVars)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - this.varsBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.panel2 = new System.Windows.Forms.Panel(); - this.textBoxFilter = new System.Windows.Forms.TextBox(); - this.comboBoxCreater = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.varsDataGridView = new System.Windows.Forms.DataGridView(); - this.dataGridViewMissingVars = new System.Windows.Forms.DataGridView(); - this.ColumnVarname = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColumnLinkto = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColumnUnLink = new System.Windows.Forms.DataGridViewButtonColumn(); - this.ColumnGoogle = new System.Windows.Forms.DataGridViewButtonColumn(); - this.ColumnDownload = new System.Windows.Forms.DataGridViewButtonColumn(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.buttonSaveTxt = new System.Windows.Forms.Button(); - this.buttonLoadTxt = new System.Windows.Forms.Button(); - this.buttonLinkto = new System.Windows.Forms.Button(); - this.textBoxLinkVar = new System.Windows.Forms.TextBox(); - this.textBoxMissingVar = new System.Windows.Forms.TextBox(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.buttonOK = new System.Windows.Forms.Button(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); - this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); - this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripComboBoxIgnoreVersion = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButtonFetchDownload = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButtonDownloadAll = new System.Windows.Forms.ToolStripButton(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.dataGridViewDependent = new System.Windows.Forms.DataGridView(); - this.ColumnDependentName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColumnLocate = new System.Windows.Forms.DataGridViewButtonColumn(); - this.openFileDialogLoadTXT = new System.Windows.Forms.OpenFileDialog(); - this.saveFileDialogSaveTxt = new System.Windows.Forms.SaveFileDialog(); - this.panel3 = new System.Windows.Forms.Panel(); - this.dataGridViewTextBoxColumnvarName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.varDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ColumnLocateExistVar = new System.Windows.Forms.DataGridViewButtonColumn(); - ((System.ComponentModel.ISupportInitialize)(this.varsBindingSource)).BeginInit(); - this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.varsDataGridView)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMissingVars)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.toolStrip1.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependent)).BeginInit(); - this.panel3.SuspendLayout(); - this.SuspendLayout(); - // - // varsBindingSource - // - this.varsBindingSource.DataMember = "vars"; - // - // - this.panel2.Controls.Add(this.groupBox2); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(667, 3); - this.panel2.Name = "panel2"; - this.tableLayoutPanel1.SetRowSpan(this.panel2, 2); - this.panel2.Size = new System.Drawing.Size(658, 270); - this.panel2.TabIndex = 4; - // - // textBoxFilter - // - this.textBoxFilter.Location = new System.Drawing.Point(334, 7); - this.textBoxFilter.Name = "textBoxFilter"; - this.textBoxFilter.Size = new System.Drawing.Size(196, 25); - this.textBoxFilter.TabIndex = 7; - this.textBoxFilter.TextChanged += new System.EventHandler(this.textBoxFilter_TextChanged); - // - // comboBoxCreater - // - this.comboBoxCreater.AllowDrop = true; - this.comboBoxCreater.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxCreater.FormattingEnabled = true; - this.comboBoxCreater.Location = new System.Drawing.Point(92, 8); - this.comboBoxCreater.Name = "comboBoxCreater"; - this.comboBoxCreater.Size = new System.Drawing.Size(153, 23); - this.comboBoxCreater.TabIndex = 6; - this.comboBoxCreater.SelectedIndexChanged += new System.EventHandler(this.comboBoxCreater_SelectedIndexChanged); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(265, 12); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(63, 15); - this.label2.TabIndex = 0; - this.label2.Text = "Filter:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(15, 12); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(71, 15); - this.label1.TabIndex = 0; - this.label1.Text = "Creator:"; - // - // varsDataGridView - // - this.varsDataGridView.AllowUserToAddRows = false; - this.varsDataGridView.AllowUserToDeleteRows = false; - this.varsDataGridView.AutoGenerateColumns = false; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.varsDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; - this.varsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.varsDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.dataGridViewTextBoxColumnvarName, - this.varDate, - this.ColumnLocateExistVar}); - this.varsDataGridView.DataSource = this.varsBindingSource; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.varsDataGridView.DefaultCellStyle = dataGridViewCellStyle2; - this.varsDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; - this.varsDataGridView.Location = new System.Drawing.Point(3, 62); - this.varsDataGridView.MultiSelect = false; - this.varsDataGridView.Name = "varsDataGridView"; - this.varsDataGridView.ReadOnly = true; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle3.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.varsDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; - this.varsDataGridView.RowHeadersWidth = 51; - this.varsDataGridView.RowTemplate.Height = 27; - this.varsDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.varsDataGridView.Size = new System.Drawing.Size(652, 205); - this.varsDataGridView.TabIndex = 3; - this.varsDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.varsDataGridView_CellContentClick); - this.varsDataGridView.SelectionChanged += new System.EventHandler(this.varsDataGridView_SelectionChanged); - // - // dataGridViewMissingVars - // - this.dataGridViewMissingVars.AllowUserToAddRows = false; - this.dataGridViewMissingVars.AllowUserToDeleteRows = false; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewMissingVars.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; - this.dataGridViewMissingVars.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewMissingVars.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ColumnVarname, - this.ColumnLinkto, - this.ColumnUnLink, - this.ColumnGoogle, - this.ColumnDownload}); - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle5.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewMissingVars.DefaultCellStyle = dataGridViewCellStyle5; - this.dataGridViewMissingVars.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewMissingVars.Location = new System.Drawing.Point(3, 21); - this.dataGridViewMissingVars.MultiSelect = false; - this.dataGridViewMissingVars.Name = "dataGridViewMissingVars"; - this.dataGridViewMissingVars.ReadOnly = true; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle6.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewMissingVars.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; - this.dataGridViewMissingVars.RowHeadersWidth = 51; - this.dataGridViewMissingVars.RowTemplate.Height = 27; - this.dataGridViewMissingVars.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewMissingVars.Size = new System.Drawing.Size(652, 454); - this.dataGridViewMissingVars.TabIndex = 0; - this.dataGridViewMissingVars.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewMissingVars_CellContentClick); - this.dataGridViewMissingVars.RowEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewMissingVars_RowEnter); - this.dataGridViewMissingVars.SelectionChanged += new System.EventHandler(this.dataGridViewMissingVars_SelectionChanged); - // - // ColumnVarname - // - this.ColumnVarname.HeaderText = "Varname"; - this.ColumnVarname.MinimumWidth = 6; - this.ColumnVarname.Name = "ColumnVarname"; - this.ColumnVarname.ReadOnly = true; - this.ColumnVarname.Width = 180; - // - // ColumnLinkto - // - this.ColumnLinkto.HeaderText = "Linkto"; - this.ColumnLinkto.MinimumWidth = 6; - this.ColumnLinkto.Name = "ColumnLinkto"; - this.ColumnLinkto.ReadOnly = true; - this.ColumnLinkto.Width = 180; - // - // ColumnUnLink - // - this.ColumnUnLink.HeaderText = "UnLink"; - this.ColumnUnLink.MinimumWidth = 6; - this.ColumnUnLink.Name = "ColumnUnLink"; - this.ColumnUnLink.ReadOnly = true; - this.ColumnUnLink.Width = 125; - // - // ColumnGoogle - // - this.ColumnGoogle.HeaderText = "Google"; - this.ColumnGoogle.MinimumWidth = 6; - this.ColumnGoogle.Name = "ColumnGoogle"; - this.ColumnGoogle.ReadOnly = true; - this.ColumnGoogle.Width = 125; - // - // ColumnDownload Download from vam hub - // - this.ColumnDownload.HeaderText = "Download"; - this.ColumnDownload.MinimumWidth = 6; - this.ColumnDownload.Name = "ColumnDownload"; - this.ColumnDownload.ReadOnly = true; - this.ColumnDownload.Width = 125; - this.ColumnDownload.UseColumnTextForButtonValue = false; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.panel2, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.toolStrip1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.groupBox1, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.groupBox3, 1, 2); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 4; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1328, 569); - this.tableLayoutPanel1.TabIndex = 0; - // - // panel1 - // - this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2); - this.panel1.Controls.Add(this.buttonSaveTxt); - this.panel1.Controls.Add(this.buttonLoadTxt); - this.panel1.Controls.Add(this.buttonLinkto); - this.panel1.Controls.Add(this.textBoxLinkVar); - this.panel1.Controls.Add(this.textBoxMissingVar); - this.panel1.Controls.Add(this.buttonCancel); - this.panel1.Controls.Add(this.buttonOK); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(3, 521); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1322, 45); - this.panel1.TabIndex = 1; - // - // buttonSaveTxt - // - this.buttonSaveTxt.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.buttonSaveTxt.ForeColor = System.Drawing.Color.DarkGreen; - this.buttonSaveTxt.Location = new System.Drawing.Point(667, 9); - this.buttonSaveTxt.Name = "buttonSaveTxt"; - this.buttonSaveTxt.Size = new System.Drawing.Size(117, 28); - this.buttonSaveTxt.TabIndex = 9; - this.buttonSaveTxt.Text = "SaveTXT"; - this.buttonSaveTxt.UseVisualStyleBackColor = true; - this.buttonSaveTxt.Click += new System.EventHandler(this.buttonSaveTxt_Click); - // - // buttonLoadTxt - // - this.buttonLoadTxt.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.buttonLoadTxt.ForeColor = System.Drawing.Color.Sienna; - this.buttonLoadTxt.Location = new System.Drawing.Point(790, 9); - this.buttonLoadTxt.Name = "buttonLoadTxt"; - this.buttonLoadTxt.Size = new System.Drawing.Size(117, 28); - this.buttonLoadTxt.TabIndex = 10; - this.buttonLoadTxt.Text = "LoadTXT"; - this.buttonLoadTxt.UseVisualStyleBackColor = true; - this.buttonLoadTxt.Click += new System.EventHandler(this.buttonLoadTxt_Click); - // - // buttonLinkto - // - this.buttonLinkto.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.buttonLinkto.ForeColor = System.Drawing.Color.Crimson; - this.buttonLinkto.Location = new System.Drawing.Point(275, 9); - this.buttonLinkto.Name = "buttonLinkto"; - this.buttonLinkto.Size = new System.Drawing.Size(117, 28); - this.buttonLinkto.TabIndex = 6; - this.buttonLinkto.Text = "Linkto"; - this.buttonLinkto.UseVisualStyleBackColor = true; - this.buttonLinkto.Click += new System.EventHandler(this.buttonLinkto_Click); - // - // textBoxLinkVar - // - this.textBoxLinkVar.Location = new System.Drawing.Point(404, 11); - this.textBoxLinkVar.Name = "textBoxLinkVar"; - this.textBoxLinkVar.ReadOnly = true; - this.textBoxLinkVar.Size = new System.Drawing.Size(257, 25); - this.textBoxLinkVar.TabIndex = 5; - // - // textBoxMissingVar - // - this.textBoxMissingVar.Location = new System.Drawing.Point(10, 11); - this.textBoxMissingVar.Name = "textBoxMissingVar"; - this.textBoxMissingVar.ReadOnly = true; - this.textBoxMissingVar.Size = new System.Drawing.Size(257, 25); - this.textBoxMissingVar.TabIndex = 5; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(1193, 9); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(117, 28); - this.buttonCancel.TabIndex = 4; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.buttonOK.Location = new System.Drawing.Point(1063, 9); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(117, 28); - this.buttonOK.TabIndex = 3; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // toolStrip1 - // - this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.bindingNavigatorMoveFirstItem, - this.bindingNavigatorMovePreviousItem, - this.bindingNavigatorPositionItem, - this.bindingNavigatorCountItem, - this.bindingNavigatorMoveNextItem, - this.bindingNavigatorMoveLastItem, - this.toolStripSeparator1, - this.toolStripComboBoxIgnoreVersion, - this.toolStripSeparator2, - this.toolStripSeparator3, - this.toolStripButtonFetchDownload, - this.toolStripSeparator4, - this.toolStripButtonDownloadAll - }); - this.toolStrip1.Location = new System.Drawing.Point(0, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(664, 28); - this.toolStrip1.TabIndex = 5; - this.toolStrip1.Text = "toolStrip1"; - // - // bindingNavigatorMoveFirstItem - // - this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image"))); - this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem"; - this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(29, 25); - this.bindingNavigatorMoveFirstItem.Text = "First"; - this.bindingNavigatorMoveFirstItem.Click += new System.EventHandler(this.bindingNavigatorMoveFirstItem_Click); - // - // bindingNavigatorMovePreviousItem - // - this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image"))); - this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem"; - this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(29, 25); - this.bindingNavigatorMovePreviousItem.Text = "Previous"; - this.bindingNavigatorMovePreviousItem.Click += new System.EventHandler(this.bindingNavigatorMovePreviousItem_Click); - // - // bindingNavigatorPositionItem - // - this.bindingNavigatorPositionItem.AccessibleName = "浣嶇疆"; - this.bindingNavigatorPositionItem.AutoSize = false; - this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; - this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 27); - this.bindingNavigatorPositionItem.Text = "0"; - this.bindingNavigatorPositionItem.ToolTipText = "Current"; - // - // bindingNavigatorCountItem - // - this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; - this.bindingNavigatorCountItem.Size = new System.Drawing.Size(38, 25); - this.bindingNavigatorCountItem.Text = "/ {0}"; - this.bindingNavigatorCountItem.ToolTipText = "Total number"; - // - // bindingNavigatorMoveNextItem - // - this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image"))); - this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem"; - this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(29, 25); - this.bindingNavigatorMoveNextItem.Text = "Next"; - this.bindingNavigatorMoveNextItem.Click += new System.EventHandler(this.bindingNavigatorMoveNextItem_Click); - // - // bindingNavigatorMoveLastItem - // - this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image"))); - this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem"; - this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(29, 25); - this.bindingNavigatorMoveLastItem.Text = "Last"; - this.bindingNavigatorMoveLastItem.Click += new System.EventHandler(this.bindingNavigatorMoveLastItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 28); - // - // toolStripComboBoxIgnoreVersion - // - this.toolStripComboBoxIgnoreVersion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripComboBoxIgnoreVersion.Items.AddRange(new object[] { - "Ignore missing version", - "All missing vars"}); - this.toolStripComboBoxIgnoreVersion.Name = "toolStripComboBoxIgnoreVersion"; - this.toolStripComboBoxIgnoreVersion.Size = new System.Drawing.Size(200, 28); - this.toolStripComboBoxIgnoreVersion.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxIgnoreVersion_SelectedIndexChanged); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(6, 28); - - // - // toolStripButtonFillDownloadText - // - this.toolStripButtonFetchDownload.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; // 璁剧疆鎸夐挳闈犲彸 - this.toolStripButtonFetchDownload.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonFetchDownload.Name = "toolStripButtonFetchDownload"; - this.toolStripButtonFetchDownload.Size = new System.Drawing.Size(200, 24); - this.toolStripButtonFetchDownload.Text = "Fetch Download"; - this.toolStripButtonFetchDownload.ToolTipText = "Fetch Download From Hub Before Downloading"; - this.toolStripButtonFetchDownload.BackColor = Color.Aquamarine; - this.toolStripButtonFetchDownload.Click += new System.EventHandler(this.toolStripButtonFillDownloadText_Click); - - // - // toolStripButtonDownloadAll (This will be generated by the designer) - // - this.toolStripButtonDownloadAll.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; - this.toolStripButtonDownloadAll.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonDownloadAll.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonDownloadAll.Image"))); // Or remove if no image - this.toolStripButtonDownloadAll.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonDownloadAll.Name = "toolStripButtonDownloadAll"; - this.toolStripButtonDownloadAll.Size = new System.Drawing.Size(95, 24); // Example size - this.toolStripButtonDownloadAll.Text = "Download All"; - this.toolStripButtonDownloadAll.ToolTipText = "Download All After Fetching"; - this.toolStripButtonDownloadAll.BackColor = System.Drawing.Color.LightSkyBlue; // Optional - this.toolStripButtonDownloadAll.Click += new System.EventHandler(this.toolStripButtonDownloadAll_Click); // Add this line in Form.cs or double click in designer - - - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.dataGridViewMissingVars); - this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(3, 37); - this.groupBox1.Name = "groupBox1"; - this.tableLayoutPanel1.SetRowSpan(this.groupBox1, 2); - this.groupBox1.Size = new System.Drawing.Size(658, 478); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Missing Vars"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.varsDataGridView); - this.groupBox2.Controls.Add(this.panel3); - this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox2.Location = new System.Drawing.Point(0, 0); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(658, 270); - this.groupBox2.TabIndex = 7; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Exist Vars"; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.dataGridViewDependent); - this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox3.Location = new System.Drawing.Point(667, 279); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(658, 236); - this.groupBox3.TabIndex = 8; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Dependents"; - // - // dataGridViewDependent - // - this.dataGridViewDependent.AllowUserToAddRows = false; - this.dataGridViewDependent.AllowUserToDeleteRows = false; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle7.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewDependent.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; - this.dataGridViewDependent.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewDependent.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ColumnDependentName, - this.ColumnLocate}); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle8.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewDependent.DefaultCellStyle = dataGridViewCellStyle8; - this.dataGridViewDependent.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewDependent.Location = new System.Drawing.Point(3, 21); - this.dataGridViewDependent.MultiSelect = false; - this.dataGridViewDependent.Name = "dataGridViewDependent"; - this.dataGridViewDependent.ReadOnly = true; - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewDependent.RowHeadersDefaultCellStyle = dataGridViewCellStyle9; - this.dataGridViewDependent.RowHeadersWidth = 51; - this.dataGridViewDependent.RowTemplate.Height = 27; - this.dataGridViewDependent.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewDependent.Size = new System.Drawing.Size(652, 212); - this.dataGridViewDependent.TabIndex = 4; - this.dataGridViewDependent.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewDependent_CellContentClick); - // - // ColumnDependentName - // - this.ColumnDependentName.HeaderText = "DependentName"; - this.ColumnDependentName.MinimumWidth = 6; - this.ColumnDependentName.Name = "ColumnDependentName"; - this.ColumnDependentName.ReadOnly = true; - this.ColumnDependentName.Width = 200; - // - // ColumnLocate - // - this.ColumnLocate.HeaderText = "Locate"; - this.ColumnLocate.MinimumWidth = 6; - this.ColumnLocate.Name = "ColumnLocate"; - this.ColumnLocate.ReadOnly = true; - this.ColumnLocate.Width = 125; - // - // openFileDialogLoadTXT - // - this.openFileDialogLoadTXT.DefaultExt = "txt"; - this.openFileDialogLoadTXT.FileName = "missingvarlinks"; - this.openFileDialogLoadTXT.Filter = "text file|*.txt"; - // - // saveFileDialogSaveTxt - // - this.saveFileDialogSaveTxt.DefaultExt = "txt"; - this.saveFileDialogSaveTxt.FileName = "missingvarlinks"; - this.saveFileDialogSaveTxt.Filter = "text file|*.txt"; - // - // panel3 - // - this.panel3.Controls.Add(this.label1); - this.panel3.Controls.Add(this.textBoxFilter); - this.panel3.Controls.Add(this.label2); - this.panel3.Controls.Add(this.comboBoxCreater); - this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(3, 21); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(652, 41); - this.panel3.TabIndex = 8; - // - // dataGridViewTextBoxColumnvarName - // - this.dataGridViewTextBoxColumnvarName.DataPropertyName = "varName"; - this.dataGridViewTextBoxColumnvarName.HeaderText = "varName"; - this.dataGridViewTextBoxColumnvarName.MinimumWidth = 6; - this.dataGridViewTextBoxColumnvarName.Name = "dataGridViewTextBoxColumnvarName"; - this.dataGridViewTextBoxColumnvarName.ReadOnly = true; - this.dataGridViewTextBoxColumnvarName.Width = 200; - // - // varDate - // - this.varDate.DataPropertyName = "varDate"; - this.varDate.HeaderText = "varDate"; - this.varDate.MinimumWidth = 6; - this.varDate.Name = "varDate"; - this.varDate.ReadOnly = true; - this.varDate.Width = 125; - // - // ColumnLocateExistVar - // - this.ColumnLocateExistVar.DataPropertyName = "varDate"; - this.ColumnLocateExistVar.HeaderText = "Locate"; - this.ColumnLocateExistVar.MinimumWidth = 6; - this.ColumnLocateExistVar.Name = "ColumnLocateExistVar"; - this.ColumnLocateExistVar.ReadOnly = true; - this.ColumnLocateExistVar.Text = "Locate"; - this.ColumnLocateExistVar.UseColumnTextForButtonValue = true; - this.ColumnLocateExistVar.Width = 125; - // - // FormMissingVars - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(1328, 569); - this.ControlBox = false; - this.Controls.Add(this.tableLayoutPanel1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "FormMissingVars"; - this.Text = "FormMissingVars"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.FormMissingVars_Load); - ((System.ComponentModel.ISupportInitialize)(this.varsBindingSource)).EndInit(); - this.panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.varsDataGridView)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMissingVars)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.toolStrip1.ResumeLayout(false); - this.toolStrip1.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependent)).EndInit(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - private System.Windows.Forms.BindingSource varsBindingSource; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.TextBox textBoxFilter; - private System.Windows.Forms.ComboBox comboBoxCreater; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.DataGridView varsDataGridView; - private System.Windows.Forms.DataGridView dataGridViewMissingVars; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnVarname; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnLinkto; - private System.Windows.Forms.DataGridViewButtonColumn ColumnUnLink; - private System.Windows.Forms.DataGridViewButtonColumn ColumnGoogle; - private System.Windows.Forms.DataGridViewButtonColumn ColumnDownload; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button buttonLinkto; - private System.Windows.Forms.TextBox textBoxLinkVar; - private System.Windows.Forms.TextBox textBoxMissingVar; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; - private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem; - private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; - private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; - private System.Windows.Forms.Button buttonSaveTxt; - private System.Windows.Forms.Button buttonLoadTxt; - private System.Windows.Forms.OpenFileDialog openFileDialogLoadTXT; - private System.Windows.Forms.SaveFileDialog saveFileDialogSaveTxt; - private System.Windows.Forms.ToolStripComboBox toolStripComboBoxIgnoreVersion; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; - private System.Windows.Forms.ToolStripButton toolStripButtonFetchDownload; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; - private System.Windows.Forms.ToolStripButton toolStripButtonDownloadAll; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.DataGridView dataGridViewDependent; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDependentName; - private System.Windows.Forms.DataGridViewButtonColumn ColumnLocate; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumnvarName; - private System.Windows.Forms.DataGridViewTextBoxColumn varDate; - private System.Windows.Forms.DataGridViewButtonColumn ColumnLocateExistVar; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormMissingVars.cs b/_archived/varManager/FormMissingVars.cs deleted file mode 100644 index 14cf66f..0000000 --- a/_archived/varManager/FormMissingVars.cs +++ /dev/null @@ -1,598 +0,0 @@ -锘縰sing SimpleJSON; -using System; -using System.Collections.Generic; -using System.Data; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using varManager.Backend; -using varManager.Properties; -using varManager.Data; -using varManager.Models; -using static SimpleLogger; - -namespace varManager -{ - public partial class FormMissingVars : Form - { - private static string missingVarLinkDirName = "___MissingVarLink___"; - private List missingVars; - public Form1 form1; - private VarManagerContext dbContext; - Dictionary downloadUrls = new Dictionary(); - Dictionary downloadUrlsNoVersion = new Dictionary(); - - static string vam_download_exe = "vam_downloader.exe"; - static string vam_download_path = Path.Combine(".\\plugin\\", vam_download_exe); - static string vam_download_save_path = Path.Combine(Settings.Default.vampath, "AddonPackages"); - - private void LogBackendLine(string line) - { - if (form1 == null) - { - return; - } - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - form1.BeginInvoke(new Form1.InvokeAddLoglist(form1.UpdateAddLoglist), new object[] { line, level }); - } - - private Task RunBackendJobAsync(string kind, object? args) - { - return BackendSession.RunJobAsync(kind, args, LogBackendLine, CancellationToken.None); - } - - private T? DeserializeResult(BackendJobResult result) - { - if (!result.Result.HasValue) - { - return default; - } - return JsonSerializer.Deserialize(result.Result.Value.GetRawText()); - } - - private sealed class HubDownloadList - { - [JsonPropertyName("download_urls")] - public Dictionary DownloadUrls { get; set; } = new Dictionary(); - - [JsonPropertyName("download_urls_no_version")] - public Dictionary DownloadUrlsNoVersion { get; set; } = new Dictionary(); - } - - public FormMissingVars() - { - InitializeComponent(); - dbContext = new VarManagerContext(); - } - - public List MissingVars { get => missingVars; set => missingVars = value; } - public static string MissingVarLinkDirName { get => missingVarLinkDirName; set => missingVarLinkDirName = value; } - - private void FormMissingVars_Load(object sender, EventArgs e) - { - Directory.CreateDirectory(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName)); - // Load data using EF Core instead of TableAdapter - toolStripComboBoxIgnoreVersion.SelectedIndex = 0; - FillMissVarGridView(); - } - - // Assuming these are class members, populated by FillColumnDownloadText - // Dictionary downloadUrls = new Dictionary(); - // Dictionary downloadUrlsNoVersion = new Dictionary(); - // string vam_download_path = "path_to_your_downloader.exe"; // Make sure this is set - // string vam_download_save_path = "path_to_save_downloads"; // Make sure this is set - private async void toolStripButtonDownloadAll_Click(object sender, EventArgs e) - { - // 1. Collect all unique download URLs - HashSet allUrlsToDownload = new HashSet(); - foreach (var url in downloadUrls.Values) - { - if (!string.IsNullOrEmpty(url) && url != "null") - { - allUrlsToDownload.Add(url); - } - } - foreach (var url in downloadUrlsNoVersion.Values) - { - if (!string.IsNullOrEmpty(url) && url != "null") - { - // It's possible some URLs are already in downloadUrls, HashSet handles duplicates - allUrlsToDownload.Add(url); - } - } - // 2. Check if there are any URLs - if (allUrlsToDownload.Count == 0) - { - MessageBox.Show("No download links found. Please click 'Fetch Download' try to fetch download var links.", - "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); - return; - } - try - { - await RunBackendJobAsync("hub_download_all", new { urls = allUrlsToDownload.ToList() }); - MessageBox.Show($"All {allUrlsToDownload.Count} items have been queued for download.\n" + - "Download process complete. Please click the 'UPD_DB' button to update the database after downloads finish.", - "Download All Complete", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - catch (Exception ex) - { - MessageBox.Show($"An error occurred during the Download All process: {ex.Message}", - "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - private void toolStripButtonFillDownloadText_Click(object sender, EventArgs e) - { - // It's good practice to disable UI elements that shouldn't be clicked during an async operation - this.toolStripButtonFetchDownload.Enabled = false; - this.toolStripButtonDownloadAll.Enabled = false; - try - { - FillColumnDownloadText(); - } - catch (Exception ex) - { - MessageBox.Show($"Error fetching download info: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - finally - { - this.toolStripButtonFetchDownload.Enabled = true; - this.toolStripButtonDownloadAll.Enabled = true; - } - } - - private async void FillColumnDownloadText() - { - var result = await RunBackendJobAsync("hub_find_packages", new { packages = missingVars }); - var payload = DeserializeResult(result); - downloadUrls = payload?.DownloadUrls ?? new Dictionary(); - downloadUrlsNoVersion = payload?.DownloadUrlsNoVersion ?? new Dictionary(); - - if (form1 != null) - { - downloadUrls = downloadUrls - .Where(kvp => !form1.FindByvarName(kvp.Key)) - .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - downloadUrlsNoVersion = downloadUrlsNoVersion - .Where(kvp => !form1.FindByvarName(kvp.Key)) - .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - } - - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - string rowVarName = row.Cells["ColumnVarName"].Value.ToString(); - if (downloadUrls.ContainsKey(rowVarName)) - { - row.Cells["ColumnDownload"].Value = rowVarName; - row.Cells["ColumnDownload"].Style.SelectionBackColor = Color.LightGreen; - row.Cells["ColumnDownload"].Style.BackColor = Color.SkyBlue; - } - else if (downloadUrlsNoVersion.ContainsKey(rowVarName.Substring(0, rowVarName.LastIndexOf('.')))) - { - row.Cells["ColumnDownload"].Value = rowVarName; - row.Cells["ColumnDownload"].Style.SelectionBackColor = Color.Orange; - row.Cells["ColumnDownload"].Style.BackColor = Color.Yellow; - } - else - { - row.Cells["ColumnDownload"].Value = ""; - } - } - MessageBox.Show("Fetch Download From Hub Complete!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private static async Task FindPackages(string packages) - { - string url = "https://hub.virtamate.com/citizenx/api.php"; - JSONClass jns = new JSONClass(); - jns.Add("source", "VaM"); - jns.Add("action", "findPackages"); - jns.Add("packages", packages); - var data = new StringContent(jns.ToString(), Encoding.UTF8, "application/json"); - - using (var client = new HttpClient()) - { - var response = await client.PostAsync(url, data); - string reponse = response.Content.ReadAsStringAsync().Result; - return reponse; - } - } - - private void FillMissVarGridView() - { - if (missingVars != null) - { - dataGridViewMissingVars.Rows.Clear(); - foreach (string missingvar in missingVars) - { - string missingvarname = missingvar; - if(missingvarname.EndsWith("$")) - { - if (toolStripComboBoxIgnoreVersion.SelectedIndex == 1) - { - missingvarname = missingvarname.Substring(0, missingvarname.Length - 1); - } - else - continue; - } - if (missingvarname.LastIndexOf('/') > 1) - missingvarname = missingvarname.Substring(missingvarname.LastIndexOf('/') + 1); - string searchPattern = missingvarname + ".var"; - if (missingvarname.IndexOf(".latest") > 0) - searchPattern = missingvarname.Substring(0, missingvarname.LastIndexOf('.') + 1) + "*.var"; - var files = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName), searchPattern, SearchOption.AllDirectories).OrderByDescending(q => Path.GetFileNameWithoutExtension(q)).ToArray(); - if (files.Length == 0) - dataGridViewMissingVars.Rows.Add(new string[] { missingvarname, "", "UnLink", "Google", "" }); - else - { - string destfilename = Path.GetFileNameWithoutExtension(Comm.ReparsePoint(files[0])); - dataGridViewMissingVars.Rows.Add(new string[] { missingvarname, destfilename, "UnLink", "Google", "" }); - } - - } - bindingNavigatorCountItem.Text = "/" + dataGridViewMissingVars.Rows.Count; - } - } - - private void textBoxFilter_TextChanged(object sender, EventArgs e) - { - FilterVars(); - } - - private void FilterVars() - { - string strFilter = "1=1"; - if (comboBoxCreater.SelectedItem != null) - if (comboBoxCreater.SelectedItem.ToString() != "____ALL") - strFilter += " AND creatorName = '" + comboBoxCreater.SelectedItem.ToString() + "'"; - if (textBoxFilter.Text.Trim() != "") - { - strFilter += " AND varName Like '%" + Regex.Replace(Regex.Replace(textBoxFilter.Text.Trim(), @"[\x5B\x5D]", "[$0]", RegexOptions.Multiline), @"[\x27]", @"\x27\x27", RegexOptions.Multiline) + "*'"; - } - - this.comboBoxCreater.SelectedIndexChanged -= new System.EventHandler(this.comboBoxCreater_SelectedIndexChanged); - var creators = dbContext.Vars.GroupBy(g => g.CreatorName); - if (textBoxFilter.Text.Trim() != "") - creators = dbContext.Vars.Where(q => q.VarName.ToLower().IndexOf(textBoxFilter.Text.Trim().ToLower()) >= 0).GroupBy(g => g.CreatorName); - string curcreator = comboBoxCreater.Text; - comboBoxCreater.Items.Clear(); - comboBoxCreater.Items.Add("____ALL"); - foreach (var creator in creators) - { - comboBoxCreater.Items.Add(creator.Key); - } - if (comboBoxCreater.Items.Contains(curcreator)) - comboBoxCreater.SelectedItem = curcreator; - else - comboBoxCreater.SelectedIndex = 0; - this.comboBoxCreater.SelectedIndexChanged += new System.EventHandler(this.comboBoxCreater_SelectedIndexChanged); - - varsBindingSource.Filter = strFilter; - varsDataGridView.Update(); - } - - private void comboBoxCreater_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(); - } - - private void varsDataGridView_SelectionChanged(object sender, EventArgs e) - { - if (varsDataGridView.SelectedRows.Count > 0) - textBoxLinkVar.Text = varsDataGridView.SelectedRows[0].Cells[0].Value.ToString(); - } - - private void dataGridViewMissingVars_SelectionChanged(object sender, EventArgs e) - { - if (dataGridViewMissingVars.SelectedRows.Count > 0) - { - string missingVarName = dataGridViewMissingVars.SelectedRows[0].Cells[0].Value.ToString(); - string missingvarnamepart = missingVarName.Split('.')[1]; - textBoxMissingVar.Text = missingVarName; - textBoxFilter.Text = missingvarnamepart; - - List depends = form1.GetDependents(missingVarName); - dataGridViewDependent.Rows.Clear(); - foreach (string depend in depends) - { - dataGridViewDependent.Rows.Add(depend, "locate"); - } - } - } - - private void buttonLinkto_Click(object sender, EventArgs e) - { - string missingvar = textBoxMissingVar.Text; - string linkvar = textBoxLinkVar.Text; - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - if (row.Cells[0].Value.ToString() == missingvar) - { - row.Cells[1].Value = linkvar; - break; - } - } - } - - private async void dataGridViewMissingVars_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (e.ColumnIndex == 2) - { - dataGridViewMissingVars.Rows[e.RowIndex].Cells[1].Value = ""; - } - if (e.ColumnIndex == 3) - { - string varname = dataGridViewMissingVars.Rows[e.RowIndex].Cells[0].Value.ToString().Replace(".latest", ".1"); - string url = "https://www.google.com/search?q=" + varname + " var"; - try - { - await RunBackendJobAsync("open_url", new { url = url }); - } - catch (Exception ex) - { - MessageBox.Show("An error occurred trying to open url: " + ex.Message); - } - } - if (e.ColumnIndex == 4) - { - string varname = dataGridViewMissingVars.Rows[e.RowIndex].Cells[0].Value.ToString(); - string varnameNoVersion = varname.Substring(0, varname.LastIndexOf('.')); - if (downloadUrls.TryGetValue(varname, out var var_url)) - { - try - { - await RunBackendJobAsync("hub_download_all", new { urls = new List { var_url } }); - } - catch (Exception ex) - { - MessageBox.Show($"Download {varname} failed: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else if (downloadUrlsNoVersion.TryGetValue(varnameNoVersion, out var var_noversion_url)) - { - try - { - await RunBackendJobAsync("hub_download_all", new { urls = new List { var_noversion_url } }); - } - catch (Exception ex) - { - MessageBox.Show($"Download {varnameNoVersion} failed: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - else - { - // For Debug - // var allUrls = string.Join("\n", downloadUrls.Select(kvp => $"Key: {kvp.Key}, Value: {kvp.Value}")); - // var allUrlsNoVersion = string.Join("\n", downloadUrlsNoVersion.Select(kvp => $"Key: {kvp.Key}, Value: {kvp.Value}")); - // MessageBox.Show("Download URLs:\n" + allUrls + "\n" + allUrlsNoVersion); - MessageBox.Show("No download url found for " + varname); - } - } - } - - private async void buttonOK_Click(object sender, EventArgs e) - { - var links = new List(); - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - string missingvarname = row.Cells[0].Value.ToString(); - string destvarname = row.Cells[1].Value.ToString(); - if (!string.IsNullOrEmpty(missingvarname) && !string.IsNullOrEmpty(destvarname)) - { - links.Add(new { missing_var = missingvarname, dest_var = destvarname }); - } - } - - try - { - await RunBackendJobAsync("links_missing_create", new { links = links }); - } - catch (Exception ex) - { - MessageBox.Show($"Create link failed: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - - this.Close(); - } - - private void Createlink() - { - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - string missingvarname = row.Cells[0].Value.ToString(); - string destvarname = row.Cells[1].Value.ToString(); - string searchPattern = missingvarname + ".var"; - if (missingvarname.IndexOf(".latest") > 0) - searchPattern = missingvarname.Substring(0, missingvarname.LastIndexOf('.') + 1) + "*.var"; - var files = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName), searchPattern, SearchOption.AllDirectories).OrderByDescending(q => Path.GetFileNameWithoutExtension(q)).ToArray(); - if (files.Length > 0) - { - File.Delete(files[0]); - if (File.Exists(files[0] + ".disabled")) - File.Delete(files[0] + ".disabled"); - } - - if (!string.IsNullOrEmpty(destvarname)) - { - var varsrow = dbContext.Vars.FirstOrDefault(v => v.VarName == destvarname); - if (missingvarname.Substring(missingvarname.LastIndexOf('.')) == ".latest") - { - missingvarname = missingvarname.Substring(0, missingvarname.LastIndexOf('.')) + destvarname.Substring(destvarname.LastIndexOf('.')); - } - if (varsrow != null) - { - string missingvar = Path.Combine(Settings.Default.vampath, "AddonPackages", missingVarLinkDirName, missingvarname + ".var"); - string destvarfile = Path.Combine(Settings.Default.varspath, varsrow.VarPath!, varsrow.VarName + ".var"); - Comm.CreateSymbolicLink(missingvar, destvarfile, Comm.SYMBOLIC_LINK_FLAG.File); - Comm.SetSymboLinkFileTime(missingvar, File.GetCreationTime(destvarfile), File.GetLastWriteTime(destvarfile)); - //File.SetCreationTime(missingvar, File.GetCreationTime(destvarfile)); - //File.SetLastWriteTime(missingvar, File.GetLastWriteTime(destvarfile)); - } - } - } - } - - private void buttonCancel_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void dataGridViewMissingVars_RowEnter(object sender, DataGridViewCellEventArgs e) - { - bindingNavigatorPositionItem.Text = (e.RowIndex + 1).ToString(); - } - - private void bindingNavigatorMoveNextItem_Click(object sender, EventArgs e) - { - int nRow = dataGridViewMissingVars.CurrentCell.RowIndex; - if (nRow < dataGridViewMissingVars.RowCount - 1) - { - dataGridViewMissingVars.CurrentCell = dataGridViewMissingVars.Rows[++nRow].Cells[0]; - } - } - - private void bindingNavigatorMovePreviousItem_Click(object sender, EventArgs e) - { - int nRow = dataGridViewMissingVars.CurrentCell.RowIndex; - if (nRow > 0) - { - dataGridViewMissingVars.CurrentCell = dataGridViewMissingVars.Rows[--nRow].Cells[0]; - } - } - - private void bindingNavigatorMoveLastItem_Click(object sender, EventArgs e) - { - int nRow = dataGridViewMissingVars.CurrentCell.RowIndex; - if (nRow < dataGridViewMissingVars.RowCount - 1) - { - dataGridViewMissingVars.CurrentCell = dataGridViewMissingVars.Rows[dataGridViewMissingVars.RowCount - 1].Cells[0]; - } - } - - private void bindingNavigatorMoveFirstItem_Click(object sender, EventArgs e) - { - int nRow = dataGridViewMissingVars.CurrentCell.RowIndex; - if (nRow > 0) - { - dataGridViewMissingVars.CurrentCell = dataGridViewMissingVars.Rows[0].Cells[0]; - } - } - - private void buttonSave_Click(object sender, EventArgs e) - { - if (saveFileDialogSaveTxt.ShowDialog() == DialogResult.OK) - { - try - { - BackendSession.RunJob("vars_export_installed", new { path = saveFileDialogSaveTxt.FileName }, LogBackendLine, CancellationToken.None); - } - catch (Exception ex) - { - MessageBox.Show($"Export failed: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - private void buttonSaveTxt_Click(object sender, EventArgs e) - { - if (saveFileDialogSaveTxt.ShowDialog() == DialogResult.OK) - { - List varlinktoList = new List(); - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - string missingvarname = row.Cells[0].Value.ToString(); - string destvarname = row.Cells[1].Value.ToString(); - if (!string.IsNullOrEmpty(destvarname)) - { - varlinktoList.Add($"{missingvarname}|{destvarname}"); - } - } - - File.WriteAllLines(saveFileDialogSaveTxt.FileName, varlinktoList.ToArray()); - } - } - private void buttonLoadTxt_Click(object sender, EventArgs e) - { - if (openFileDialogLoadTXT.ShowDialog() == DialogResult.OK) - { - Dictionary varlinktoDict = new Dictionary(); - foreach (string varlinkto in File.ReadAllLines(openFileDialogLoadTXT.FileName)) - { - string[] varlinktos = varlinkto.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); - if (varlinktos.Length == 2) - { - varlinktoDict[varlinktos[0]] = varlinktos[1]; - } - } - foreach (DataGridViewRow row in dataGridViewMissingVars.Rows) - { - string missingvarname = row.Cells[0].Value.ToString(); - if (varlinktoDict.ContainsKey(missingvarname)) - { - row.Cells[1].Value = varlinktoDict[missingvarname]; - } - } - } - - } - - private void toolStripComboBoxIgnoreVersion_SelectedIndexChanged(object sender, EventArgs e) - { - FillMissVarGridView(); - } - - private void dataGridViewDependent_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (dataGridViewDependent.Columns[e.ColumnIndex].Name == "ColumnLocate" && e.RowIndex >= 0) - { - string dependentName = dataGridViewDependent.Rows[e.RowIndex].Cells["ColumnDependentName"].Value.ToString(); - if (dependentName.StartsWith("\\")) - { - dependentName = dependentName.Substring(1); - try - { - BackendSession.RunJob("vars_locate", new { path = dependentName.Replace('/', '\\') }, LogBackendLine, CancellationToken.None); - } - catch (Exception ex) - { - MessageBox.Show($"Locate failed: {ex.Message}"); - } - } - else - { - if (Form1.ComplyVarName(dependentName)) - { - form1.LocateVar(dependentName); - form1.SelectVarInList(dependentName); - form1.Activate(); - } - } - - } - } - - private void varsDataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (varsDataGridView.Columns[e.ColumnIndex].Name == "ColumnLocateExistVar" && e.RowIndex >= 0) - { - string varName = varsDataGridView.Rows[e.RowIndex].Cells["dataGridViewTextBoxColumnvarName"].Value.ToString(); - form1.LocateVar(varName); - form1.SelectVarInList(varName); - - form1.Activate(); - } - } - } -} diff --git a/_archived/varManager/FormMissingVars.resx b/_archived/varManager/FormMissingVars.resx deleted file mode 100644 index 1d2fe91..0000000 --- a/_archived/varManager/FormMissingVars.resx +++ /dev/null @@ -1,366 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 220, 17 - - - True - - - True - - - 819, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 - wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 - v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg - UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA - Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu - lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w - 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f - Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ - 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 - n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI - N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f - oAc0QjgAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAS - cQAAEnEB89x6jgAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// - h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B - twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA - kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG - WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 - 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== - - - - True - - - True - - - True - - - True - - - True - - - True - - - 17, 59 - - - 257, 55 - - - 141 - - - - AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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fgPAAD4D4CA+A8AAPwH - gIDwHwAA/AcBwHAfAAD+AwHAID8AAP4CA+AgPwAA/wAD4AB/AAD/AAfwAH8AAP+AB/AA/wAA/4AP+AD/ - AAD/wA/4Af8AAP/AH/wB/wAA/+Af/AP/AAD/4D/+A/8AAP///////wAA////////AAD///////8AAP// - /////wAA/+A4D/+BAAD/4BgP/wEAAP/AHAf/AQAA/8AMB/4BAAD/gA4D/gMAAP+ABgP8BwAA/wAHAfwH - AAD/AAMB+A8AAP4CA4D4DwAA/gIBgPAfAAD8BwHAcB8AAPwHAMBgPwAA+A+A4CA/AAD4D4BgAH8AAPAf - wHAAfwAA8B/AMAD/AADgP+A4AP8AAOA/8BgB/wAAwH/wHAH/AADAf/gMA/8AAMD/+A4D/wAA4f/+P4// - AAA= - - - \ No newline at end of file diff --git a/_archived/varManager/FormScenes.Designer.cs b/_archived/varManager/FormScenes.Designer.cs deleted file mode 100644 index 11c5944..0000000 --- a/_archived/varManager/FormScenes.Designer.cs +++ /dev/null @@ -1,1023 +0,0 @@ -锘 -namespace varManager -{ - partial class FormScenes - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - dbContext?.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormScenes)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.panel5 = new System.Windows.Forms.Panel(); - this.buttonRemoveHide = new System.Windows.Forms.Button(); - this.buttonAddHide = new System.Windows.Forms.Button(); - this.panel6 = new System.Windows.Forms.Panel(); - this.buttonAddFav = new System.Windows.Forms.Button(); - this.buttonRemoveFav = new System.Windows.Forms.Button(); - this.listViewHide = new DragNDrop.DragAndDropListView(); - this.imageListScenes = new System.Windows.Forms.ImageList(this.components); - this.listViewNormal = new DragNDrop.DragAndDropListView(); - this.listViewFav = new DragNDrop.DragAndDropListView(); - this.panel3 = new System.Windows.Forms.Panel(); - this.buttonNormal = new System.Windows.Forms.Button(); - this.labelNormal = new System.Windows.Forms.Label(); - this.panel4 = new System.Windows.Forms.Panel(); - this.buttonFav = new System.Windows.Forms.Button(); - this.labelFav = new System.Windows.Forms.Label(); - this.panel7 = new System.Windows.Forms.Panel(); - this.buttonHide = new System.Windows.Forms.Button(); - this.labelHide = new System.Windows.Forms.Label(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.radioButtonCategory4 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory6 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory2 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory7 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory3 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory5 = new System.Windows.Forms.RadioButton(); - this.radioButtonCategory1 = new System.Windows.Forms.RadioButton(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.chklistLocation = new System.Windows.Forms.CheckedListBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.checkedListBoxHideFav = new System.Windows.Forms.CheckedListBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.textBoxFilter = new System.Windows.Forms.TextBox(); - this.groupBox5 = new System.Windows.Forms.GroupBox(); - this.comboBoxCreator = new System.Windows.Forms.ComboBox(); - this.groupBox6 = new System.Windows.Forms.GroupBox(); - this.comboBoxOrderBy = new System.Windows.Forms.ComboBox(); - this.buttonResetFilter = new System.Windows.Forms.Button(); - this.buttonLoadscene = new System.Windows.Forms.Button(); - this.panelImage = new System.Windows.Forms.Panel(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.labelPreviewVarName = new System.Windows.Forms.Label(); - this.panel2 = new System.Windows.Forms.Panel(); - this.checkBoxForMale = new System.Windows.Forms.CheckBox(); - this.checkBoxIgnoreGender = new System.Windows.Forms.CheckBox(); - this.groupBoxPersonOrder = new System.Windows.Forms.GroupBox(); - this.radioButtonPersonOrder6 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder8 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder7 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder5 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder4 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder3 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder2 = new System.Windows.Forms.RadioButton(); - this.radioButtonPersonOrder1 = new System.Windows.Forms.RadioButton(); - this.checkBoxMerge = new System.Windows.Forms.CheckBox(); - this.buttonClearCache = new System.Windows.Forms.Button(); - this.buttonAnalysis = new System.Windows.Forms.Button(); - this.pictureBoxPreview = new System.Windows.Forms.PictureBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.buttonFilterByCreator = new System.Windows.Forms.Button(); - this.buttonLocate = new System.Windows.Forms.Button(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); - this.backgroundWorkerGenerate = new System.ComponentModel.BackgroundWorker(); - // DataSet components removed - using EF Core - this.tableLayoutPanel1.SuspendLayout(); - this.panel5.SuspendLayout(); - this.panel6.SuspendLayout(); - this.panel3.SuspendLayout(); - this.panel4.SuspendLayout(); - this.panel7.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox4.SuspendLayout(); - this.groupBox5.SuspendLayout(); - this.groupBox6.SuspendLayout(); - this.panelImage.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.panel2.SuspendLayout(); - this.groupBoxPersonOrder.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).BeginInit(); - this.panel1.SuspendLayout(); - // DataSet init removed - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 6; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33334F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 55F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 55F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 232F)); - this.tableLayoutPanel1.Controls.Add(this.panel5, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.panel6, 3, 1); - this.tableLayoutPanel1.Controls.Add(this.listViewHide, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.listViewNormal, 2, 1); - this.tableLayoutPanel1.Controls.Add(this.listViewFav, 4, 1); - this.tableLayoutPanel1.Controls.Add(this.panel3, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.panel4, 4, 0); - this.tableLayoutPanel1.Controls.Add(this.panel7, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 5, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 36); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1324, 636); - this.tableLayoutPanel1.TabIndex = 0; - // - // panel5 - // - this.panel5.AutoScroll = true; - this.panel5.Controls.Add(this.buttonRemoveHide); - this.panel5.Controls.Add(this.buttonAddHide); - this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel5.Location = new System.Drawing.Point(330, 43); - this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(49, 590); - this.panel5.TabIndex = 4; - // - // buttonRemoveHide - // - this.buttonRemoveHide.Anchor = System.Windows.Forms.AnchorStyles.None; - this.buttonRemoveHide.Location = new System.Drawing.Point(-1, 388); - this.buttonRemoveHide.Name = "buttonRemoveHide"; - this.buttonRemoveHide.Size = new System.Drawing.Size(50, 36); - this.buttonRemoveHide.TabIndex = 1; - this.buttonRemoveHide.Text = ">>"; - this.toolTip1.SetToolTip(this.buttonRemoveHide, "Selected items in the Hide list will be moved to the Normal list"); - this.buttonRemoveHide.UseVisualStyleBackColor = true; - this.buttonRemoveHide.Click += new System.EventHandler(this.buttonRemoveHide_Click); - // - // buttonAddHide - // - this.buttonAddHide.Anchor = System.Windows.Forms.AnchorStyles.None; - this.buttonAddHide.Location = new System.Drawing.Point(-1, 147); - this.buttonAddHide.Name = "buttonAddHide"; - this.buttonAddHide.Size = new System.Drawing.Size(50, 36); - this.buttonAddHide.TabIndex = 0; - this.buttonAddHide.Text = "<<"; - this.toolTip1.SetToolTip(this.buttonAddHide, "Selected items in the normal list will be moved to the Hide list"); - this.buttonAddHide.UseVisualStyleBackColor = true; - this.buttonAddHide.Click += new System.EventHandler(this.buttonAddHide_Click); - // - // panel6 - // - this.panel6.Controls.Add(this.buttonAddFav); - this.panel6.Controls.Add(this.buttonRemoveFav); - this.panel6.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel6.Location = new System.Drawing.Point(712, 43); - this.panel6.Name = "panel6"; - this.panel6.Size = new System.Drawing.Size(49, 590); - this.panel6.TabIndex = 5; - // - // buttonAddFav - // - this.buttonAddFav.Anchor = System.Windows.Forms.AnchorStyles.None; - this.buttonAddFav.Location = new System.Drawing.Point(-1, 147); - this.buttonAddFav.Name = "buttonAddFav"; - this.buttonAddFav.Size = new System.Drawing.Size(50, 36); - this.buttonAddFav.TabIndex = 0; - this.buttonAddFav.Text = ">>"; - this.toolTip1.SetToolTip(this.buttonAddFav, "Selected items in the normal list will be moved to the Fav list"); - this.buttonAddFav.UseVisualStyleBackColor = true; - this.buttonAddFav.Click += new System.EventHandler(this.buttonAddFav_Click); - // - // buttonRemoveFav - // - this.buttonRemoveFav.Anchor = System.Windows.Forms.AnchorStyles.None; - this.buttonRemoveFav.Location = new System.Drawing.Point(-1, 388); - this.buttonRemoveFav.Name = "buttonRemoveFav"; - this.buttonRemoveFav.Size = new System.Drawing.Size(50, 36); - this.buttonRemoveFav.TabIndex = 1; - this.buttonRemoveFav.Text = "<<"; - this.toolTip1.SetToolTip(this.buttonRemoveFav, "Selected items in the Fav list will be moved to the Normal list"); - this.buttonRemoveFav.UseVisualStyleBackColor = true; - this.buttonRemoveFav.Click += new System.EventHandler(this.buttonRemoveFav_Click); - // - // listViewHide - // - this.listViewHide.AllowDrop = true; - this.listViewHide.AllowReorder = true; - this.listViewHide.AllowSelfDrop = false; - this.listViewHide.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewHide.HideSelection = false; - this.listViewHide.LargeImageList = this.imageListScenes; - this.listViewHide.LineColor = System.Drawing.Color.Red; - this.listViewHide.Location = new System.Drawing.Point(3, 43); - this.listViewHide.Name = "listViewHide"; - this.listViewHide.Size = new System.Drawing.Size(321, 590); - this.listViewHide.TabIndex = 7; - this.toolTip1.SetToolTip(this.listViewHide, "Normal list,Multiple selections available,double click wite"); - this.listViewHide.UseCompatibleStateImageBehavior = false; - this.listViewHide.VirtualMode = true; - this.listViewHide.ListViewDragDrop += new DragNDrop.DragAndDropListView.DragDropHandle(this.listViewHide_ListViewDragDrop); - this.listViewHide.ItemActivate += new System.EventHandler(this.listView_ItemActivate); - this.listViewHide.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listViewHide_RetrieveVirtualItem); - // - // imageListScenes - // - this.imageListScenes.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; - this.imageListScenes.ImageSize = new System.Drawing.Size(128, 128); - this.imageListScenes.TransparentColor = System.Drawing.Color.Transparent; - // - // listViewNormal - // - this.listViewNormal.AllowDrop = true; - this.listViewNormal.AllowReorder = true; - this.listViewNormal.AllowSelfDrop = false; - this.listViewNormal.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewNormal.HideSelection = false; - this.listViewNormal.LargeImageList = this.imageListScenes; - this.listViewNormal.LineColor = System.Drawing.Color.Red; - this.listViewNormal.Location = new System.Drawing.Point(385, 43); - this.listViewNormal.Name = "listViewNormal"; - this.listViewNormal.Size = new System.Drawing.Size(321, 590); - this.listViewNormal.TabIndex = 7; - this.listViewNormal.UseCompatibleStateImageBehavior = false; - this.listViewNormal.VirtualMode = true; - this.listViewNormal.ListViewDragDrop += new DragNDrop.DragAndDropListView.DragDropHandle(this.listViewNormal_ListViewDragDrop); - this.listViewNormal.ItemActivate += new System.EventHandler(this.listView_ItemActivate); - this.listViewNormal.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listViewNormal_RetrieveVirtualItem); - // - // listViewFav - // - this.listViewFav.AllowDrop = true; - this.listViewFav.AllowReorder = true; - this.listViewFav.AllowSelfDrop = false; - this.listViewFav.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewFav.HideSelection = false; - this.listViewFav.LargeImageList = this.imageListScenes; - this.listViewFav.LineColor = System.Drawing.Color.Red; - this.listViewFav.Location = new System.Drawing.Point(767, 43); - this.listViewFav.Name = "listViewFav"; - this.listViewFav.Size = new System.Drawing.Size(321, 590); - this.listViewFav.TabIndex = 7; - this.listViewFav.UseCompatibleStateImageBehavior = false; - this.listViewFav.VirtualMode = true; - this.listViewFav.ListViewDragDrop += new DragNDrop.DragAndDropListView.DragDropHandle(this.listViewFav_ListViewDragDrop); - this.listViewFav.ItemActivate += new System.EventHandler(this.listView_ItemActivate); - this.listViewFav.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.listViewFav_RetrieveVirtualItem); - // - // panel3 - // - this.panel3.Controls.Add(this.buttonNormal); - this.panel3.Controls.Add(this.labelNormal); - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(385, 3); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(321, 34); - this.panel3.TabIndex = 10; - // - // buttonNormal - // - this.buttonNormal.Anchor = System.Windows.Forms.AnchorStyles.None; - this.buttonNormal.Location = new System.Drawing.Point(94, 5); - this.buttonNormal.Name = "buttonNormal"; - this.buttonNormal.Size = new System.Drawing.Size(91, 26); - this.buttonNormal.TabIndex = 0; - this.buttonNormal.Text = "鈼Normal鈻"; - this.buttonNormal.UseVisualStyleBackColor = true; - this.buttonNormal.Click += new System.EventHandler(this.buttonNormal_Click); - // - // labelNormal - // - this.labelNormal.Anchor = System.Windows.Forms.AnchorStyles.None; - this.labelNormal.AutoSize = true; - this.labelNormal.Location = new System.Drawing.Point(191, 10); - this.labelNormal.Name = "labelNormal"; - this.labelNormal.Size = new System.Drawing.Size(16, 17); - this.labelNormal.TabIndex = 6; - this.labelNormal.Text = "0"; - // - // panel4 - // - this.panel4.Controls.Add(this.buttonFav); - this.panel4.Controls.Add(this.labelFav); - this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel4.Location = new System.Drawing.Point(767, 3); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(321, 34); - this.panel4.TabIndex = 10; - // - // buttonFav - // - this.buttonFav.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.buttonFav.Location = new System.Drawing.Point(227, 5); - this.buttonFav.Name = "buttonFav"; - this.buttonFav.Size = new System.Drawing.Size(91, 26); - this.buttonFav.TabIndex = 0; - this.buttonFav.Text = "鈼Fav鈻"; - this.buttonFav.UseVisualStyleBackColor = true; - this.buttonFav.Click += new System.EventHandler(this.buttonFav_Click); - // - // labelFav - // - this.labelFav.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.labelFav.AutoSize = true; - this.labelFav.Location = new System.Drawing.Point(180, 10); - this.labelFav.Name = "labelFav"; - this.labelFav.Size = new System.Drawing.Size(16, 17); - this.labelFav.TabIndex = 6; - this.labelFav.Text = "0"; - // - // panel7 - // - this.panel7.Controls.Add(this.buttonHide); - this.panel7.Controls.Add(this.labelHide); - this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel7.Location = new System.Drawing.Point(3, 3); - this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(321, 34); - this.panel7.TabIndex = 10; - // - // buttonHide - // - this.buttonHide.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.buttonHide.Location = new System.Drawing.Point(3, 5); - this.buttonHide.Name = "buttonHide"; - this.buttonHide.Size = new System.Drawing.Size(91, 26); - this.buttonHide.TabIndex = 0; - this.buttonHide.Text = "鈼Hide鈻"; - this.buttonHide.UseVisualStyleBackColor = true; - this.buttonHide.Click += new System.EventHandler(this.buttonHide_Click); - // - // labelHide - // - this.labelHide.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.labelHide.AutoSize = true; - this.labelHide.Location = new System.Drawing.Point(100, 10); - this.labelHide.Name = "labelHide"; - this.labelHide.Size = new System.Drawing.Size(16, 17); - this.labelHide.TabIndex = 6; - this.labelHide.Text = "0"; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Controls.Add(this.groupBox3); - this.flowLayoutPanel1.Controls.Add(this.groupBox1); - this.flowLayoutPanel1.Controls.Add(this.groupBox2); - this.flowLayoutPanel1.Controls.Add(this.groupBox4); - this.flowLayoutPanel1.Controls.Add(this.groupBox5); - this.flowLayoutPanel1.Controls.Add(this.groupBox6); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(1094, 3); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.tableLayoutPanel1.SetRowSpan(this.flowLayoutPanel1, 2); - this.flowLayoutPanel1.Size = new System.Drawing.Size(227, 630); - this.flowLayoutPanel1.TabIndex = 8; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.radioButtonCategory4); - this.groupBox3.Controls.Add(this.radioButtonCategory6); - this.groupBox3.Controls.Add(this.radioButtonCategory2); - this.groupBox3.Controls.Add(this.radioButtonCategory7); - this.groupBox3.Controls.Add(this.radioButtonCategory3); - this.groupBox3.Controls.Add(this.radioButtonCategory5); - this.groupBox3.Controls.Add(this.radioButtonCategory1); - this.groupBox3.Location = new System.Drawing.Point(3, 3); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(170, 128); - this.groupBox3.TabIndex = 0; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Category"; - // - // radioButtonCategory4 - // - this.radioButtonCategory4.AutoSize = true; - this.radioButtonCategory4.Location = new System.Drawing.Point(7, 102); - this.radioButtonCategory4.Name = "radioButtonCategory4"; - this.radioButtonCategory4.Size = new System.Drawing.Size(84, 21); - this.radioButtonCategory4.TabIndex = 2; - this.radioButtonCategory4.Text = "hairstyle"; - this.radioButtonCategory4.UseVisualStyleBackColor = true; - this.radioButtonCategory4.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory6 - // - this.radioButtonCategory6.AutoSize = true; - this.radioButtonCategory6.Location = new System.Drawing.Point(93, 50); - this.radioButtonCategory6.Name = "radioButtonCategory6"; - this.radioButtonCategory6.Size = new System.Drawing.Size(55, 21); - this.radioButtonCategory6.TabIndex = 2; - this.radioButtonCategory6.Text = "skin"; - this.radioButtonCategory6.UseVisualStyleBackColor = true; - this.radioButtonCategory6.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory2 - // - this.radioButtonCategory2.AutoSize = true; - this.radioButtonCategory2.Location = new System.Drawing.Point(7, 50); - this.radioButtonCategory2.Name = "radioButtonCategory2"; - this.radioButtonCategory2.Size = new System.Drawing.Size(63, 21); - this.radioButtonCategory2.TabIndex = 2; - this.radioButtonCategory2.Text = "looks"; - this.radioButtonCategory2.UseVisualStyleBackColor = true; - this.radioButtonCategory2.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory7 - // - this.radioButtonCategory7.AutoSize = true; - this.radioButtonCategory7.Location = new System.Drawing.Point(93, 76); - this.radioButtonCategory7.Name = "radioButtonCategory7"; - this.radioButtonCategory7.Size = new System.Drawing.Size(58, 21); - this.radioButtonCategory7.TabIndex = 1; - this.radioButtonCategory7.Text = "pose"; - this.radioButtonCategory7.UseVisualStyleBackColor = true; - this.radioButtonCategory7.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory3 - // - this.radioButtonCategory3.AutoSize = true; - this.radioButtonCategory3.Location = new System.Drawing.Point(7, 76); - this.radioButtonCategory3.Name = "radioButtonCategory3"; - this.radioButtonCategory3.Size = new System.Drawing.Size(80, 21); - this.radioButtonCategory3.TabIndex = 1; - this.radioButtonCategory3.Text = "clothing"; - this.radioButtonCategory3.UseVisualStyleBackColor = true; - this.radioButtonCategory3.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory5 - // - this.radioButtonCategory5.AutoSize = true; - this.radioButtonCategory5.Location = new System.Drawing.Point(93, 24); - this.radioButtonCategory5.Name = "radioButtonCategory5"; - this.radioButtonCategory5.Size = new System.Drawing.Size(77, 21); - this.radioButtonCategory5.TabIndex = 1; - this.radioButtonCategory5.Text = "morphs"; - this.radioButtonCategory5.UseVisualStyleBackColor = true; - this.radioButtonCategory5.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // radioButtonCategory1 - // - this.radioButtonCategory1.AutoSize = true; - this.radioButtonCategory1.Checked = true; - this.radioButtonCategory1.Location = new System.Drawing.Point(7, 24); - this.radioButtonCategory1.Name = "radioButtonCategory1"; - this.radioButtonCategory1.Size = new System.Drawing.Size(70, 21); - this.radioButtonCategory1.TabIndex = 1; - this.radioButtonCategory1.TabStop = true; - this.radioButtonCategory1.Text = "scenes"; - this.radioButtonCategory1.UseVisualStyleBackColor = true; - this.radioButtonCategory1.CheckedChanged += new System.EventHandler(this.radioButtonCategory_CheckedChanged); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.chklistLocation); - this.groupBox1.Location = new System.Drawing.Point(3, 137); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(170, 117); - this.groupBox1.TabIndex = 0; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "location"; - // - // chklistLocation - // - this.chklistLocation.CheckOnClick = true; - this.chklistLocation.FormattingEnabled = true; - this.chklistLocation.Items.AddRange(new object[] { - "installed", - "not Installed", - "missingLink", - "Save"}); - this.chklistLocation.Location = new System.Drawing.Point(14, 22); - this.chklistLocation.Name = "chklistLocation"; - this.chklistLocation.Size = new System.Drawing.Size(147, 84); - this.chklistLocation.TabIndex = 0; - this.chklistLocation.SelectedIndexChanged += new System.EventHandler(this.chklistLocation_SelectedIndexChanged); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.checkedListBoxHideFav); - this.groupBox2.Location = new System.Drawing.Point(3, 260); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(170, 91); - this.groupBox2.TabIndex = 0; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "hideFav"; - // - // checkedListBoxHideFav - // - this.checkedListBoxHideFav.CheckOnClick = true; - this.checkedListBoxHideFav.FormattingEnabled = true; - this.checkedListBoxHideFav.Items.AddRange(new object[] { - "Hide", - "Normal", - "Fav"}); - this.checkedListBoxHideFav.Location = new System.Drawing.Point(11, 19); - this.checkedListBoxHideFav.Name = "checkedListBoxHideFav"; - this.checkedListBoxHideFav.Size = new System.Drawing.Size(150, 64); - this.checkedListBoxHideFav.TabIndex = 0; - this.checkedListBoxHideFav.SelectedIndexChanged += new System.EventHandler(this.checkedListBoxHideFav_SelectedIndexChanged); - // - // groupBox4 - // - this.groupBox4.Controls.Add(this.textBoxFilter); - this.groupBox4.Location = new System.Drawing.Point(3, 357); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(170, 57); - this.groupBox4.TabIndex = 0; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Name Filter"; - // - // textBoxFilter - // - this.textBoxFilter.Location = new System.Drawing.Point(11, 20); - this.textBoxFilter.Name = "textBoxFilter"; - this.textBoxFilter.Size = new System.Drawing.Size(150, 25); - this.textBoxFilter.TabIndex = 0; - this.toolTip1.SetToolTip(this.textBoxFilter, "Filter by var name or scene name."); - this.textBoxFilter.TextChanged += new System.EventHandler(this.textBoxFilter_TextChanged); - // - // groupBox5 - // - this.groupBox5.Controls.Add(this.comboBoxCreator); - this.groupBox5.Location = new System.Drawing.Point(3, 420); - this.groupBox5.Name = "groupBox5"; - this.groupBox5.Size = new System.Drawing.Size(170, 59); - this.groupBox5.TabIndex = 0; - this.groupBox5.TabStop = false; - this.groupBox5.Text = "Creator"; - // - // comboBoxCreator - // - this.comboBoxCreator.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxCreator.FormattingEnabled = true; - this.comboBoxCreator.Location = new System.Drawing.Point(11, 19); - this.comboBoxCreator.Name = "comboBoxCreator"; - this.comboBoxCreator.Size = new System.Drawing.Size(150, 25); - this.comboBoxCreator.TabIndex = 0; - this.comboBoxCreator.SelectedIndexChanged += new System.EventHandler(this.comboBoxCreator_SelectedIndexChanged); - // - // groupBox6 - // - this.groupBox6.Controls.Add(this.comboBoxOrderBy); - this.groupBox6.Controls.Add(this.buttonResetFilter); - this.groupBox6.Location = new System.Drawing.Point(3, 485); - this.groupBox6.Name = "groupBox6"; - this.groupBox6.Size = new System.Drawing.Size(170, 91); - this.groupBox6.TabIndex = 0; - this.groupBox6.TabStop = false; - this.groupBox6.Text = "OrderBy"; - // - // comboBoxOrderBy - // - this.comboBoxOrderBy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxOrderBy.FormattingEnabled = true; - this.comboBoxOrderBy.Items.AddRange(new object[] { - "New To Old", - "Old To New", - "VarName", - "SceneName"}); - this.comboBoxOrderBy.Location = new System.Drawing.Point(11, 19); - this.comboBoxOrderBy.Name = "comboBoxOrderBy"; - this.comboBoxOrderBy.Size = new System.Drawing.Size(150, 25); - this.comboBoxOrderBy.TabIndex = 0; - this.comboBoxOrderBy.SelectedIndexChanged += new System.EventHandler(this.comboBoxOrderBy_SelectedIndexChanged); - // - // buttonResetFilter - // - this.buttonResetFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonResetFilter.Location = new System.Drawing.Point(60, 53); - this.buttonResetFilter.Name = "buttonResetFilter"; - this.buttonResetFilter.Size = new System.Drawing.Size(101, 32); - this.buttonResetFilter.TabIndex = 1; - this.buttonResetFilter.Text = "Reset Filter"; - this.buttonResetFilter.UseVisualStyleBackColor = true; - this.buttonResetFilter.Click += new System.EventHandler(this.buttonResetFilter_Click); - // - // buttonLoadscene - // - this.buttonLoadscene.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonLoadscene.ForeColor = System.Drawing.Color.SeaGreen; - this.buttonLoadscene.Location = new System.Drawing.Point(382, 89); - this.buttonLoadscene.Name = "buttonLoadscene"; - this.buttonLoadscene.Size = new System.Drawing.Size(118, 30); - this.buttonLoadscene.TabIndex = 1; - this.buttonLoadscene.Text = "Load Scene"; - this.toolTip1.SetToolTip(this.buttonLoadscene, "Load to VAM,Add loadscene.cs as session plugin in VAM first."); - this.buttonLoadscene.UseVisualStyleBackColor = true; - this.buttonLoadscene.Click += new System.EventHandler(this.buttonLoadscene_Click); - // - // panelImage - // - this.panelImage.Anchor = System.Windows.Forms.AnchorStyles.None; - this.panelImage.Controls.Add(this.tableLayoutPanel2); - this.panelImage.Location = new System.Drawing.Point(154, 144); - this.panelImage.Name = "panelImage"; - this.panelImage.Size = new System.Drawing.Size(515, 341); - this.panelImage.TabIndex = 1; - this.panelImage.Visible = false; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset; - this.tableLayoutPanel2.ColumnCount = 2; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Controls.Add(this.labelPreviewVarName, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.panel2, 0, 1); - this.tableLayoutPanel2.Controls.Add(this.pictureBoxPreview, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 3; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 75F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 130F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(515, 341); - this.tableLayoutPanel2.TabIndex = 0; - // - // labelPreviewVarName - // - this.labelPreviewVarName.AutoEllipsis = true; - this.labelPreviewVarName.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelPreviewVarName.Font = new System.Drawing.Font("Cambria", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelPreviewVarName.Location = new System.Drawing.Point(87, 2); - this.labelPreviewVarName.Name = "labelPreviewVarName"; - this.labelPreviewVarName.Padding = new System.Windows.Forms.Padding(50, 0, 0, 0); - this.labelPreviewVarName.Size = new System.Drawing.Size(423, 75); - this.labelPreviewVarName.TabIndex = 0; - this.labelPreviewVarName.Text = "label4"; - this.labelPreviewVarName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // panel2 - // - this.tableLayoutPanel2.SetColumnSpan(this.panel2, 2); - this.panel2.Controls.Add(this.checkBoxForMale); - this.panel2.Controls.Add(this.checkBoxIgnoreGender); - this.panel2.Controls.Add(this.groupBoxPersonOrder); - this.panel2.Controls.Add(this.checkBoxMerge); - this.panel2.Controls.Add(this.buttonClearCache); - this.panel2.Controls.Add(this.buttonAnalysis); - this.panel2.Controls.Add(this.buttonLoadscene); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(5, 82); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(505, 124); - this.panel2.TabIndex = 3; - // - // checkBoxForMale - // - this.checkBoxForMale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxForMale.ForeColor = System.Drawing.Color.SeaGreen; - this.checkBoxForMale.Location = new System.Drawing.Point(382, 39); - this.checkBoxForMale.Name = "checkBoxForMale"; - this.checkBoxForMale.Size = new System.Drawing.Size(118, 21); - this.checkBoxForMale.TabIndex = 12; - this.checkBoxForMale.Text = "For Male"; - this.toolTip1.SetToolTip(this.checkBoxForMale, "Load to male atom."); - this.checkBoxForMale.UseVisualStyleBackColor = true; - // - // checkBoxIgnoreGender - // - this.checkBoxIgnoreGender.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxIgnoreGender.ForeColor = System.Drawing.Color.SeaGreen; - this.checkBoxIgnoreGender.Location = new System.Drawing.Point(382, 13); - this.checkBoxIgnoreGender.Name = "checkBoxIgnoreGender"; - this.checkBoxIgnoreGender.Size = new System.Drawing.Size(118, 21); - this.checkBoxIgnoreGender.TabIndex = 12; - this.checkBoxIgnoreGender.Text = "Ignore gender"; - this.toolTip1.SetToolTip(this.checkBoxIgnoreGender, "futa are seen as female in this preset and VAM."); - this.checkBoxIgnoreGender.UseVisualStyleBackColor = true; - // - // groupBoxPersonOrder - // - this.groupBoxPersonOrder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder6); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder8); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder7); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder5); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder4); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder3); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder2); - this.groupBoxPersonOrder.Controls.Add(this.radioButtonPersonOrder1); - this.groupBoxPersonOrder.ForeColor = System.Drawing.Color.SeaGreen; - this.groupBoxPersonOrder.Location = new System.Drawing.Point(262, 4); - this.groupBoxPersonOrder.Name = "groupBoxPersonOrder"; - this.groupBoxPersonOrder.Size = new System.Drawing.Size(114, 115); - this.groupBoxPersonOrder.TabIndex = 11; - this.groupBoxPersonOrder.TabStop = false; - this.groupBoxPersonOrder.Text = "Person Order"; - this.toolTip1.SetToolTip(this.groupBoxPersonOrder, "Person atom order in VAM"); - // - // radioButtonPersonOrder6 - // - this.radioButtonPersonOrder6.AutoSize = true; - this.radioButtonPersonOrder6.Location = new System.Drawing.Point(49, 68); - this.radioButtonPersonOrder6.Name = "radioButtonPersonOrder6"; - this.radioButtonPersonOrder6.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder6.TabIndex = 13; - this.radioButtonPersonOrder6.Text = "6"; - this.radioButtonPersonOrder6.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder8 - // - this.radioButtonPersonOrder8.AutoSize = true; - this.radioButtonPersonOrder8.Location = new System.Drawing.Point(49, 92); - this.radioButtonPersonOrder8.Name = "radioButtonPersonOrder8"; - this.radioButtonPersonOrder8.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder8.TabIndex = 13; - this.radioButtonPersonOrder8.Text = "8"; - this.radioButtonPersonOrder8.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder7 - // - this.radioButtonPersonOrder7.AutoSize = true; - this.radioButtonPersonOrder7.Location = new System.Drawing.Point(6, 92); - this.radioButtonPersonOrder7.Name = "radioButtonPersonOrder7"; - this.radioButtonPersonOrder7.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder7.TabIndex = 13; - this.radioButtonPersonOrder7.Text = "7"; - this.radioButtonPersonOrder7.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder5 - // - this.radioButtonPersonOrder5.AutoSize = true; - this.radioButtonPersonOrder5.Location = new System.Drawing.Point(6, 68); - this.radioButtonPersonOrder5.Name = "radioButtonPersonOrder5"; - this.radioButtonPersonOrder5.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder5.TabIndex = 13; - this.radioButtonPersonOrder5.Text = "5"; - this.radioButtonPersonOrder5.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder4 - // - this.radioButtonPersonOrder4.AutoSize = true; - this.radioButtonPersonOrder4.Location = new System.Drawing.Point(49, 44); - this.radioButtonPersonOrder4.Name = "radioButtonPersonOrder4"; - this.radioButtonPersonOrder4.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder4.TabIndex = 13; - this.radioButtonPersonOrder4.Text = "4"; - this.radioButtonPersonOrder4.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder3 - // - this.radioButtonPersonOrder3.AutoSize = true; - this.radioButtonPersonOrder3.Location = new System.Drawing.Point(6, 44); - this.radioButtonPersonOrder3.Name = "radioButtonPersonOrder3"; - this.radioButtonPersonOrder3.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder3.TabIndex = 13; - this.radioButtonPersonOrder3.Text = "3"; - this.radioButtonPersonOrder3.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder2 - // - this.radioButtonPersonOrder2.AutoSize = true; - this.radioButtonPersonOrder2.Location = new System.Drawing.Point(49, 20); - this.radioButtonPersonOrder2.Name = "radioButtonPersonOrder2"; - this.radioButtonPersonOrder2.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder2.TabIndex = 13; - this.radioButtonPersonOrder2.Text = "2"; - this.radioButtonPersonOrder2.UseVisualStyleBackColor = true; - // - // radioButtonPersonOrder1 - // - this.radioButtonPersonOrder1.AutoSize = true; - this.radioButtonPersonOrder1.Checked = true; - this.radioButtonPersonOrder1.Location = new System.Drawing.Point(6, 20); - this.radioButtonPersonOrder1.Name = "radioButtonPersonOrder1"; - this.radioButtonPersonOrder1.Size = new System.Drawing.Size(37, 21); - this.radioButtonPersonOrder1.TabIndex = 13; - this.radioButtonPersonOrder1.TabStop = true; - this.radioButtonPersonOrder1.Text = "1"; - this.radioButtonPersonOrder1.UseVisualStyleBackColor = true; - // - // checkBoxMerge - // - this.checkBoxMerge.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxMerge.ForeColor = System.Drawing.Color.SeaGreen; - this.checkBoxMerge.Location = new System.Drawing.Point(382, 66); - this.checkBoxMerge.Name = "checkBoxMerge"; - this.checkBoxMerge.Size = new System.Drawing.Size(118, 21); - this.checkBoxMerge.TabIndex = 0; - this.checkBoxMerge.Text = "Merge"; - this.toolTip1.SetToolTip(this.checkBoxMerge, "Merge Load"); - this.checkBoxMerge.UseVisualStyleBackColor = true; - // - // buttonClearCache - // - this.buttonClearCache.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonClearCache.ForeColor = System.Drawing.Color.Red; - this.buttonClearCache.Location = new System.Drawing.Point(3, 87); - this.buttonClearCache.Name = "buttonClearCache"; - this.buttonClearCache.Size = new System.Drawing.Size(92, 30); - this.buttonClearCache.TabIndex = 1; - this.buttonClearCache.Text = "Clear Cache"; - this.buttonClearCache.UseVisualStyleBackColor = true; - this.buttonClearCache.Click += new System.EventHandler(this.buttonClearCache_Click); - // - // buttonAnalysis - // - this.buttonAnalysis.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.buttonAnalysis.ForeColor = System.Drawing.SystemColors.HotTrack; - this.buttonAnalysis.Location = new System.Drawing.Point(3, 43); - this.buttonAnalysis.Name = "buttonAnalysis"; - this.buttonAnalysis.Size = new System.Drawing.Size(92, 30); - this.buttonAnalysis.TabIndex = 1; - this.buttonAnalysis.Text = "Analysis"; - this.toolTip1.SetToolTip(this.buttonAnalysis, "Analyze the atoms in the scene and load to running VAM,Add loadscene.cs as sessio" + - "n plugin in VAM first."); - this.buttonAnalysis.UseVisualStyleBackColor = true; - this.buttonAnalysis.Click += new System.EventHandler(this.buttonAnalysis_Click); - // - // pictureBoxPreview - // - this.tableLayoutPanel2.SetColumnSpan(this.pictureBoxPreview, 2); - this.pictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBoxPreview.Location = new System.Drawing.Point(5, 214); - this.pictureBoxPreview.Name = "pictureBoxPreview"; - this.pictureBoxPreview.Size = new System.Drawing.Size(505, 122); - this.pictureBoxPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBoxPreview.TabIndex = 1; - this.pictureBoxPreview.TabStop = false; - this.pictureBoxPreview.Click += new System.EventHandler(this.pictureBoxPreview_Click); - // - // panel1 - // - this.panel1.Controls.Add(this.buttonFilterByCreator); - this.panel1.Controls.Add(this.buttonLocate); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(5, 5); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(74, 69); - this.panel1.TabIndex = 4; - // - // buttonFilterByCreator - // - this.buttonFilterByCreator.Dock = System.Windows.Forms.DockStyle.Top; - this.buttonFilterByCreator.Location = new System.Drawing.Point(0, 0); - this.buttonFilterByCreator.Name = "buttonFilterByCreator"; - this.buttonFilterByCreator.Size = new System.Drawing.Size(74, 42); - this.buttonFilterByCreator.TabIndex = 2; - this.buttonFilterByCreator.Text = "FilterBy Creator"; - this.toolTip1.SetToolTip(this.buttonFilterByCreator, "Filter By Creator"); - this.buttonFilterByCreator.UseVisualStyleBackColor = true; - this.buttonFilterByCreator.Click += new System.EventHandler(this.buttonFilterByCreator_Click); - // - // buttonLocate - // - this.buttonLocate.Dock = System.Windows.Forms.DockStyle.Bottom; - this.buttonLocate.Location = new System.Drawing.Point(0, 44); - this.buttonLocate.Name = "buttonLocate"; - this.buttonLocate.Size = new System.Drawing.Size(74, 25); - this.buttonLocate.TabIndex = 2; - this.buttonLocate.Text = "Locate"; - this.toolTip1.SetToolTip(this.buttonLocate, "Locate the current var file in Explorer"); - this.buttonLocate.UseVisualStyleBackColor = true; - this.buttonLocate.Click += new System.EventHandler(this.buttonLocate_Click); - // - // progressBar1 - // - this.progressBar1.Dock = System.Windows.Forms.DockStyle.Top; - this.progressBar1.Location = new System.Drawing.Point(0, 0); - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(1324, 36); - this.progressBar1.TabIndex = 9; - // - // backgroundWorkerGenerate - // - this.backgroundWorkerGenerate.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerGenerate_DoWork); - this.backgroundWorkerGenerate.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerGenerate_RunWorkerCompleted); - // - // FormScenes - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1324, 672); - this.Controls.Add(this.panelImage); - this.Controls.Add(this.tableLayoutPanel1); - this.Controls.Add(this.progressBar1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Name = "FormScenes"; - this.Text = "Hide & Fav"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.FormScenes_Load); - this.tableLayoutPanel1.ResumeLayout(false); - this.panel5.ResumeLayout(false); - this.panel6.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.panel4.ResumeLayout(false); - this.panel4.PerformLayout(); - this.panel7.ResumeLayout(false); - this.panel7.PerformLayout(); - this.flowLayoutPanel1.ResumeLayout(false); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); - this.groupBox5.ResumeLayout(false); - this.groupBox6.ResumeLayout(false); - this.panelImage.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - this.panel2.ResumeLayout(false); - this.groupBoxPersonOrder.ResumeLayout(false); - this.groupBoxPersonOrder.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).EndInit(); - this.panel1.ResumeLayout(false); - // DataSet init removed - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Panel panel5; - private System.Windows.Forms.Panel panel6; - private System.Windows.Forms.Button buttonRemoveHide; - private System.Windows.Forms.Button buttonAddHide; - private System.Windows.Forms.Button buttonAddFav; - private System.Windows.Forms.Button buttonRemoveFav; - private DragNDrop.DragAndDropListView listViewHide; - private DragNDrop.DragAndDropListView listViewNormal; - private DragNDrop.DragAndDropListView listViewFav; - private System.Windows.Forms.ImageList imageListScenes; - private System.Windows.Forms.Panel panelImage; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private System.Windows.Forms.PictureBox pictureBoxPreview; - private System.Windows.Forms.ToolTip toolTip1; - private System.Windows.Forms.ProgressBar progressBar1; - private System.Windows.Forms.Button buttonLoadscene; - private System.ComponentModel.BackgroundWorker backgroundWorkerGenerate; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Label labelPreviewVarName; - private System.Windows.Forms.CheckBox checkBoxMerge; - private System.Windows.Forms.Button buttonLocate; - private System.Windows.Forms.Button buttonNormal; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Label labelNormal; - private System.Windows.Forms.Panel panel4; - private System.Windows.Forms.Button buttonFav; - private System.Windows.Forms.Label labelFav; - private System.Windows.Forms.Panel panel7; - private System.Windows.Forms.Button buttonHide; - private System.Windows.Forms.Label labelHide; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.CheckedListBox chklistLocation; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.CheckedListBox checkedListBoxHideFav; - private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.TextBox textBoxFilter; - private System.Windows.Forms.GroupBox groupBox5; - private System.Windows.Forms.ComboBox comboBoxCreator; - private System.Windows.Forms.GroupBox groupBox6; - private System.Windows.Forms.ComboBox comboBoxOrderBy; - private System.Windows.Forms.RadioButton radioButtonCategory4; - private System.Windows.Forms.RadioButton radioButtonCategory6; - private System.Windows.Forms.RadioButton radioButtonCategory2; - private System.Windows.Forms.RadioButton radioButtonCategory7; - private System.Windows.Forms.RadioButton radioButtonCategory3; - private System.Windows.Forms.RadioButton radioButtonCategory5; - private System.Windows.Forms.RadioButton radioButtonCategory1; - private System.Windows.Forms.Button buttonAnalysis; - private System.Windows.Forms.Button buttonResetFilter; - private System.Windows.Forms.Button buttonFilterByCreator; - private System.Windows.Forms.GroupBox groupBoxPersonOrder; - private System.Windows.Forms.CheckBox checkBoxIgnoreGender; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.RadioButton radioButtonPersonOrder6; - private System.Windows.Forms.RadioButton radioButtonPersonOrder8; - private System.Windows.Forms.RadioButton radioButtonPersonOrder7; - private System.Windows.Forms.RadioButton radioButtonPersonOrder5; - private System.Windows.Forms.RadioButton radioButtonPersonOrder4; - private System.Windows.Forms.RadioButton radioButtonPersonOrder3; - private System.Windows.Forms.RadioButton radioButtonPersonOrder2; - private System.Windows.Forms.RadioButton radioButtonPersonOrder1; - private System.Windows.Forms.CheckBox checkBoxForMale; - private System.Windows.Forms.Button buttonClearCache; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormScenes.cs b/_archived/varManager/FormScenes.cs deleted file mode 100644 index 2d0ad0a..0000000 --- a/_archived/varManager/FormScenes.cs +++ /dev/null @@ -1,1275 +0,0 @@ -锘縰sing SimpleJSON; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Threading; -using System.Windows.Forms; -using System.Threading.Tasks; -using varManager.Backend; -using varManager.Properties; -using varManager.Data; -using varManager.Models; -using static DragNDrop.DragAndDropListView; -using static SimpleLogger; - -namespace varManager -{ - public partial class FormScenes : Form - { - private static string previewpicsDirName = "___PreviewPics___"; - //private static string installLinkDirName = "___VarsLink___"; - private static string missingLinkDirName = "___MissingVarLink___"; - // private static int maxitemPerpage = 100; - private string strCategory = "scenes"; - private string strOrderBy = "_"; - public FormScenes() - { - InitializeComponent(); - } - public Form1 form1; - private VarManagerContext dbContext; - /* - public struct InstalledScene - { - public InstalledScene(string location, string atomtype, string varname, string destvarname, DateTime installdate, string scenepath, string picpath, int hidefav) - { - Location = location; - Atomtype = atomtype; - Varname = varname; - Destvarname = destvarname; - Installdate = installdate; - Scenepath = scenepath; - Picpath = picpath; - Hidefav = hidefav; - } - public string Location { get; } - public string Atomtype { get; } - public string Varname { get; } - public string Destvarname { get; } - public DateTime Installdate { get; } - public string Scenepath { get; } - public string Picpath { get; } - public int Hidefav { get; set; } - } - - private List listInstalledScene = new List(); - private List listFilterScene1 = new List(); - private List listFilterScene2 = new List(); - private List listFilterScene3 = new List(); - private List listFilterCreatorScene = new List(); - private List listFilterPageScene = new List(); - */ - // EF Core scene filtering lists - private List listFilterScene1 = new List(); - private List listFilterScene2 = new List(); - private List listFilterScene3 = new List(); - private List listFilterCreatorScene = new List(); - private List listFilterCreatorSceneHide = new List(); - private List listFilterCreatorSceneNormal = new List(); - private List listFilterCreatorSceneFav = new List(); - - private void LogBackendLine(string line) - { - if (form1 == null) - { - return; - } - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - form1.BeginInvoke(new Form1.InvokeAddLoglist(form1.UpdateAddLoglist), new object[] { line, level }); - } - - private Task RunBackendJobAsync(string kind, object? args) - { - return BackendSession.RunJobAsync(kind, args, LogBackendLine, CancellationToken.None); - } - - private BackendJobResult RunBackendJob(string kind, object? args) - { - return BackendSession.RunJob(kind, args, LogBackendLine, CancellationToken.None); - } - - private void RunSceneHideJob(string kind, string varName, string scene) - { - string? varNameArg = string.IsNullOrWhiteSpace(varName) || varName.StartsWith("(save)", StringComparison.OrdinalIgnoreCase) - ? null - : varName; - try - { - RunBackendJob(kind, new { var_name = varNameArg, scene_path = scene }); - } - catch (Exception ex) - { - LogBackendLine($"scene hide/fav failed: {ex.Message}"); - } - } - private void FormScenes_Load(object sender, EventArgs e) - { - dbContext = new VarManagerContext(); - panelImage.Dock = DockStyle.Fill; - comboBoxOrderBy.SelectedIndex = 0; - progressBar1.Visible = true; - chklistLocation.SetItemChecked(0,true); - chklistLocation.SetItemChecked(1, true); - chklistLocation.SetItemChecked(3, true); - checkedListBoxHideFav.SetItemChecked(0,true); - checkedListBoxHideFav.SetItemChecked(1, true); - checkedListBoxHideFav.SetItemChecked(2, true); - - //backgroundWorkerGenerate.RunWorkerAsync(); - AllInstalledVars(); - //UpdateFileHidefav(); - FilterVars(); - } - public delegate void InvokeProgressBarSetValue(int value); - public void ProgressBarSetValue(int value) - { - progressBar1.Value = value; - } - private void AllInstalledVars() - { - //DirectoryInfo dirinfoInstalled = new DirectoryInfo(Path.Combine(Settings.Default.vampath, "AddonPackages", installLinkDirName)); - - //IOrderedEnumerable fileinfos = dirinfoInstalled.GetFileSystemInfos("*.var").OrderBy(f => f.CreationTime); - //progressBar1.Dock = DockStyle.Top; - //progressBar1.Visible = true; - int i = 0; - // Load data using EF Core - // Vars will be loaded on-demand from dbContext - - Dictionary dictHideFav = new Dictionary(); - DirectoryInfo dirPrefs = new DirectoryInfo(Path.Combine(Settings.Default.vampath, "AddonPackagesFilePrefs")); - foreach (var hidefav in dirPrefs.GetFiles("*.vap.fav", SearchOption.AllDirectories)) - { - string fullname = hidefav.FullName; - fullname = fullname.Substring(fullname.IndexOf("AddonPackagesFilePrefs\\") + 23); - fullname = fullname.Substring(0, fullname.Length - 4); - string varname = fullname.Substring(0, fullname.IndexOf("\\")); - string scenepath = fullname.Substring(fullname.IndexOf("\\") + 1).Replace("\\", "/"); - dictHideFav[varname + ":" + scenepath] = 1; - } - foreach (var hidefav in dirPrefs.GetFiles("*.json.fav", SearchOption.AllDirectories)) - { - string fullname = hidefav.FullName; - fullname = fullname.Substring(fullname.IndexOf("AddonPackagesFilePrefs\\") + 23); - fullname = fullname.Substring(0, fullname.Length - 4); - string varname = fullname.Substring(0, fullname.IndexOf("\\")); - string scenepath = fullname.Substring(fullname.IndexOf("\\") + 1).Replace("\\", "/"); - dictHideFav[varname + ":" + scenepath] = 1; - } - foreach (var hidefav in dirPrefs.GetFiles("*.vap.hide", SearchOption.AllDirectories)) - { - string fullname = hidefav.FullName; - fullname = fullname.Substring(fullname.IndexOf("AddonPackagesFilePrefs\\") + 23); - fullname = fullname.Substring(0, fullname.Length - 5); - string varname = fullname.Substring(0, fullname.IndexOf("\\")); - string scenepath = fullname.Substring(fullname.IndexOf("\\") + 1).Replace("\\", "/"); - dictHideFav[varname + ":" + scenepath] = -1; - } - foreach (var hidefav in dirPrefs.GetFiles("*.json.hide", SearchOption.AllDirectories)) - { - string fullname = hidefav.FullName; - fullname = fullname.Substring(fullname.IndexOf("AddonPackagesFilePrefs\\") + 23); - fullname = fullname.Substring(0, fullname.Length - 5); - string varname = fullname.Substring(0, fullname.IndexOf("\\")); - string scenepath = fullname.Substring(fullname.IndexOf("\\") + 1).Replace("\\", "/"); - dictHideFav[varname + ":" + scenepath] = -1; - } - - // InstallStatus data loaded on-demand from EF Core - - // Load scenes from EF Core - var scenes = dbContext.Scenes.Where(s => s.IsLoadable).ToList(); - //InvokeProgressBarSetValue progressBarSetValue = new InvokeProgressBarSetValue(ProgressBarSetValue); - //this.BeginInvoke(progressBarSetValue, 5 ); - progressBar1.Value = 5; - foreach (var varscene in scenes) - { - int hidefav = 0; - if (dictHideFav.ContainsKey(varscene.VarName + ":" + varscene.ScenePath)) - hidefav = dictHideFav[varscene.VarName + ":" + varscene.ScenePath]; - // if (hidefavrows.Count() > 0) - // hidefav= hidefavrows.First().hidefav; - var varrow = dbContext.Vars.FirstOrDefault(v => v.VarName == varscene.VarName); - - bool installed = false; - var installedrow = dbContext.InstallStatuses.FirstOrDefault(i => i.VarName == varscene.VarName); - - if (installedrow != null && installedrow.Installed) - installed = true; - // Create a temporary scene view object for UI binding - var sceneView = new { - Location = installed ? "installed" : "not Installed", - VarName = varscene.VarName, - AtomType = varscene.AtomType, - IsPreset = varscene.IsPreset, - ScenePath = varscene.ScenePath, - PreviewPic = varscene.PreviewPic, - Installed = installed, - CreatorName = varrow.CreatorName, - PackageName = varrow.PackageName, - VarPath = varrow.VarPath, - Filesize = varrow.Filesize, - MetaDate = varrow.MetaDate, - VarDate = varrow.VarDate, - HideFav = hidefav - }; - // Add to collection for UI (will be handled by EF Core data binding) - progressBar1.Value = 5 + (i * 55 / scenes.Count); - - i++; - } - // EF Core automatically tracks changes - no AcceptChanges needed - DirectoryInfo dirinfoMissinglink = new DirectoryInfo(Path.Combine(Settings.Default.vampath, "AddonPackages", missingLinkDirName)); - if (dirinfoMissinglink.Exists) - { - i = 0; - IOrderedEnumerable misslinks = dirinfoMissinglink.GetFileSystemInfos("*.var").OrderBy(f => f.CreationTime); - foreach (FileSystemInfo fileinfo in misslinks) - { - string varName = Path.GetFileNameWithoutExtension(fileinfo.Name); - string destfilename = varName; - if (fileinfo.Attributes.HasFlag(FileAttributes.ReparsePoint)) - { - destfilename = Comm.ReparsePoint(fileinfo.FullName); - destfilename = Path.GetFileNameWithoutExtension(destfilename); - } - - var scenesForVar = dbContext.Scenes.Where(s => s.VarName == destfilename).ToList(); - foreach (var varscene in scenesForVar) - { - int hidefav = 0; - if (dictHideFav.ContainsKey(varName + ":" + varscene.ScenePath)) - hidefav = dictHideFav[varName + ":" + varscene.ScenePath]; - - //if (hidefavrows.Count() > 0) - // hidefav = hidefavrows.First().hidefav; - var varrow = dbContext.Vars.FirstOrDefault(v => v.VarName == varscene.VarName); - - // Create missing link scene view object - var missingSceneView = new { - Location = "missingLink", - VarName = varscene.VarName, - AtomType = varscene.AtomType, - IsPreset = varscene.IsPreset, - ScenePath = varscene.ScenePath, - PreviewPic = varscene.PreviewPic, - Installed = true, - CreatorName = varrow.CreatorName, - PackageName = varrow.PackageName, - VarPath = varrow.VarPath, - Filesize = varrow.Filesize, - MetaDate = varrow.MetaDate, - VarDate = varrow.VarDate, - HideFav = hidefav - }; - //listInstalledScene.Add(new InstalledScene("VarsLink", varscene.atomType, varscene.varName, varscene.varName, varscene.metaDate, varscene.scenePath, varscene.previewPic, 0)); - - } - progressBar1.Value = 60 + (i * 20 / misslinks.Count()); - //this.BeginInvoke(progressBarSetValue, 60 + (i * 20 / misslinks.Count())); - i++; - } - } - // EF Core automatically tracks changes - no AcceptChanges needed - - List savescenes=new List(); - foreach(SaveScene ss in SaveScenes("scenes", "Saves\\scene", "*.json")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("looks", "Saves\\Person\\full", "*.json")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("looks", "Saves\\Person\\appearance", "*.json")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("looks", "Custom\\Atom\\Person\\Appearance", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("pose", "Saves\\Person\\pose", "*.json")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("pose", "Custom\\Atom\\Person\\Pose", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("clothing", "Custom\\Atom\\Person\\Clothing", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("clothing", "Custom\\Clothing", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("hairstyle", "Custom\\Atom\\Person\\Hair", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("hairstyle", "Custom\\Hair", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("morphs", "Custom\\Atom\\Person\\Morphs", "*.vap")) - { - savescenes.Add(ss); - } - foreach (SaveScene ss in SaveScenes("skin", "Custom\\Atom\\Person\\Skin", "*.vap")) - { - savescenes.Add(ss); - } - i = 0; - foreach (var savescene in savescenes) - { - // Create save scene view object - var saveSceneView = new { - Location = "Save", - VarName = "(save).", - AtomType = savescene.strType, - IsPreset = true, - ScenePath = savescene.strPath, - PreviewPic = savescene.strPreviewPic, - Installed = true, - CreatorName = "(save)", - PackageName = "_", - VarPath = "_", - Filesize = savescene.filesize, - MetaDate = savescene.fdate, - VarDate = savescene.fdate, - HideFav = savescene.hidefav - }; - progressBar1.Value = 80 + (i * 20 / savescenes.Count()); - //this.BeginInvoke(progressBarSetValue, 80 + (i * 20 / savescenes.Count())); - i++; - } - // EF Core automatically tracks changes - no AcceptChanges needed - progressBar1.Visible = false; - } - - private static List SaveScenes(string strType,string strPath,string searchPattern) - { - List savescenes = new List(); - DirectoryInfo dirinfoscenes = new DirectoryInfo(Path.Combine(Settings.Default.vampath, strPath)); - if (dirinfoscenes.Exists) - { - IOrderedEnumerable scenes = dirinfoscenes.GetFiles(searchPattern).OrderBy(f => f.CreationTime); - foreach (FileInfo fileinfo in scenes) - { - string path = strPath + fileinfo.FullName.Replace(dirinfoscenes.FullName, ""); - - string strPreviewPic = fileinfo.FullName.Substring(0, fileinfo.FullName.LastIndexOf('.')) + ".jpg"; - if (!File.Exists(strPreviewPic)) - strPreviewPic = ""; - int hidefav = 0; - if (File.Exists(fileinfo.FullName + ".hide")) - hidefav = -1; - if (File.Exists(fileinfo.FullName + ".fav")) - hidefav = 1; - var saveScene = new SaveScene(); - saveScene.strType = strType; - saveScene.strName = Path.GetFileNameWithoutExtension(path); - saveScene.strPath = path; - saveScene.filesize = fileinfo.Length; - saveScene.fdate = fileinfo.LastWriteTime; - saveScene.strPreviewPic = strPreviewPic; - saveScene.hidefav = hidefav; - savescenes.Add(saveScene); - } - } - - return savescenes; - } - - struct SaveScene - { - public string strType; - public string strName; - public string strPath; - public string strPreviewPic; - public long filesize; - public DateTime fdate; - public int hidefav; - } - private void comboBoxCategory_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(); - } - /* - private void UpdateFileHidefav() - { - for (int i = 0; i < listInstalledScene.Count; i++) - { - var InstalledScene = listInstalledScene[i]; - InstalledScene.Hidefav = GetHideFav(listInstalledScene[i].Varname, listInstalledScene[i].Scenepath); - listInstalledScene[i] = InstalledScene; - } - //strOrderBy = ""; - // FilterVars(); - } - */ - - private void FilterVars(int filterAt = 10) - { - if (filterAt >= 10) - { - // TODO: Replace with EF Core ScenesView query - if (!string.IsNullOrEmpty(strCategory)) - listFilterScene1 = dbContext.ScenesView.Where(q => q.AtomType == strCategory).Select(q => (dynamic)q).ToList(); - - List locations = new List(); - foreach (var locationitem in chklistLocation.CheckedItems) - { - locations.Add(locationitem.ToString()); - } - listFilterScene1 = listFilterScene1.Where(q => locations.IndexOf(q.Location) >= 0).ToList(); - } - if (filterAt >= 9) - { - List hideFavs = new List(); - if (checkedListBoxHideFav.GetItemChecked(0)) hideFavs.Add(-1); - if (checkedListBoxHideFav.GetItemChecked(1)) hideFavs.Add(0); - if (checkedListBoxHideFav.GetItemChecked(2)) hideFavs.Add(1); - listFilterScene2 = listFilterScene1.Where(q => hideFavs.IndexOf(q.HideFav) >= 0).ToList(); - - } - if (filterAt >= 8) - { - if (!string.IsNullOrWhiteSpace(textBoxFilter.Text)) - { - string filtertext = textBoxFilter.Text.Trim().ToLower(); - listFilterScene3 = listFilterScene2.Where(q => q.VarName.ToLower().IndexOf(filtertext) >= 0 || - Path.GetFileNameWithoutExtension(q.ScenePath).ToLower().IndexOf(filtertext) >= 0).ToList(); - } - else - listFilterScene3 = listFilterScene2; - } - comboBoxCreator.SelectedIndexChanged -= new System.EventHandler(comboBoxCreator_SelectedIndexChanged); - string creatorname = comboBoxCreator.Text; - var Creators = listFilterScene3.Select(q => q.CreatorName).Distinct().OrderBy(o => o).ToArray(); - comboBoxCreator.Items.Clear(); - comboBoxCreator.Items.Add("____ALL"); - comboBoxCreator.Items.AddRange(Creators); - if (!string.IsNullOrEmpty(creatorname) && creatorname != "____ALL") - { - if (comboBoxCreator.Items.Contains(creatorname)) - { - comboBoxCreator.SelectedItem = creatorname; - listFilterCreatorScene = listFilterScene3.Where(q => q.VarName.StartsWith(creatorname + ".")).ToList(); - } - } - else - { - comboBoxCreator.SelectedIndex = 0; - listFilterCreatorScene = listFilterScene3.ToList(); - } - comboBoxCreator.SelectedIndexChanged += new System.EventHandler(comboBoxCreator_SelectedIndexChanged); - FilterVarsCreator(); - } - - private void FilterVarsCreator() - { - string creatorname = comboBoxCreator.Text; - - if (!string.IsNullOrEmpty(creatorname) && creatorname != "____ALL") - { - listFilterCreatorScene = listFilterScene3.Where(q => q.VarName.StartsWith(creatorname+".")).ToList(); - } - else - { - listFilterCreatorScene = listFilterScene3.ToList(); - } - strOrderBy = "none"; - /* - if (pages > 0) - toolStripComboBoxScenePage.SelectedIndex = 0; - else - { - imageListScenes.Images.Clear(); - listSceneItem.Clear(); - listViewHide.Items.Clear(); - listViewNormal.Items.Clear(); - listViewFav.Items.Clear(); - } - toolStripComboBoxScenePage.SelectedIndexChanged += new System.EventHandler(toolStripComboBoxScenePage_SelectedIndexChanged); - */ - GenerateItems(); - } - - private void toolStripComboBoxScenePage_SelectedIndexChanged(object sender, EventArgs e) - { - GenerateItems(); - } - - private List listSceneItem = new List(); - - private string GetPreviewPicPath(string atomType, string varName, string picName) - { - - string fullpicname = Path.Combine(Settings.Default.varspath, previewpicsDirName, atomType, varName, picName); - if (File.Exists(fullpicname)) - return fullpicname; - else - return ""; - } - private int GetHideFav(string varName, string scenepath) - { - string pathhide = Path.Combine(Settings.Default.vampath, "AddonPackagesFilePrefs", varName, scenepath + ".hide"); - string pathfav = Path.Combine(Settings.Default.vampath, "AddonPackagesFilePrefs", varName, scenepath + ".fav"); - - if (string.IsNullOrEmpty(varName)) - { - pathhide = Path.Combine(Settings.Default.vampath, scenepath + ".hide"); - pathfav = Path.Combine(Settings.Default.vampath, scenepath + ".fav"); - - } - if (File.Exists(pathhide)) - { - return -1; - } - if (File.Exists(pathfav)) - { - return 1; - } - return 0; - } - - private void UpdateHidefav(string varName, string scenepath) - { - // TODO: Update with EF Core ScenesView if needed - // For now, this is handled by the file system operations in SetHideFav - // The UI will be refreshed through GenerateItems() - } - private void GenerateItems() - { - panelImage.Visible = false; - if (comboBoxOrderBy.Text != strOrderBy) - { - strOrderBy = comboBoxOrderBy.Text; - switch (strOrderBy) - { - case "New To Old": - listFilterCreatorScene = listFilterCreatorScene.OrderByDescending(q => q.VarDate).ToList(); - break; - case "Old To New": - listFilterCreatorScene = listFilterCreatorScene.OrderBy(q => q.VarDate).ToList(); - break; - case "VarName": - listFilterCreatorScene = listFilterCreatorScene.OrderBy(q => q.VarName).ToList(); - break; - case "SceneName": - listFilterCreatorScene = listFilterCreatorScene.OrderBy(q => Path.GetFileNameWithoutExtension(q.ScenePath)).ToList(); - break; - } - } - listFilterCreatorSceneHide = listFilterCreatorScene.Where(q => q.HideFav == -1).ToList(); - listViewHide.VirtualListSize = listFilterCreatorSceneHide.Count; - listFilterCreatorSceneNormal = listFilterCreatorScene.Where(q => q.HideFav == 0).ToList(); - listViewNormal.VirtualListSize = listFilterCreatorSceneNormal.Count; - listFilterCreatorSceneFav = listFilterCreatorScene.Where(q => q.HideFav == 1).ToList(); - listViewFav.VirtualListSize = listFilterCreatorSceneFav.Count; - labelHide.Text = listFilterCreatorSceneHide.Count.ToString(); - labelNormal.Text = listFilterCreatorSceneNormal.Count.ToString(); - labelFav.Text = listFilterCreatorSceneFav.Count.ToString(); - listViewHide.Invalidate(); - listViewNormal.Invalidate(); - listViewFav.Invalidate(); - /* - int startpic = maxitemPerpage * toolStripComboBoxScenePage.SelectedIndex; - imageListScenes.Images.Clear(); - listSceneItem.Clear(); - for (int i = 0; i < maxitemPerpage; i++) - { - int cur = startpic + i; - if (cur >= listFilterCreatorScene.Count()) break; - string scenePath = listFilterCreatorScene[cur].scenePath; - string sceneName = listFilterCreatorScene[cur].varName+ " - " + Path.GetFileNameWithoutExtension(scenePath); - //Image previwPic = Image.FromHbitmap(Properties.Resources.icoVarManager.ToBitmap().GetHbitmap()); - //Image previwPic = Image.FromFile("vam.png"); - string picpath = GetPreviewPicPath(listFilterCreatorScene[cur].atomType, listFilterCreatorScene[cur].varName, listFilterCreatorScene[cur].previewPic); - if (string.IsNullOrEmpty(picpath)) - { - picpath = "vam.png"; - //previwPic = Image.FromFile(picpath); - } - imageListScenes.Images.Add(Image.FromFile(picpath)); - ListViewItem item = new ListViewItem(sceneName, i); - item.SubItems.Add(listFilterCreatorScene[cur].varName); - item.SubItems.Add(listFilterCreatorScene[cur].scenePath); - item.SubItems.Add(picpath); - item.SubItems.Add(listFilterCreatorScene[cur].varDate.ToString()); - item.SubItems.Add(listFilterCreatorScene[cur].hidefav.ToString()); - item.SubItems.Add(listFilterCreatorScene[cur].atomType.ToString()); - item.SubItems.Add(listFilterCreatorScene[cur].location.ToString()); - listSceneItem.Add(item); - } - FillItems(); - */ - } - /* - private void FillItems() - { - int hideIndex = 0; - for (hideIndex = 0; hideIndex < listViewHide.Items.Count; hideIndex++) - { - var rect = listViewHide.GetItemRect(hideIndex); - if (rect.Bottom + rect.Height >= listViewHide.Height) - break; - } - int nomalIndex = 0; - for (nomalIndex = 0; nomalIndex < listViewNormal.Items.Count; nomalIndex++) - { - var rect = listViewNormal.GetItemRect(nomalIndex); - if (rect.Bottom + rect.Height >= listViewNormal.Height) - break; - } - int favIndex = 0; - for (favIndex = 0; favIndex < listViewFav.Items.Count; favIndex++) - { - var rect = listViewFav.GetItemRect(favIndex); - if (rect.Bottom + rect.Height >= listViewFav.Height) - break; - } - while (backgroundWorkerFillListView.IsBusy) - { - backgroundWorkerFillListView.CancelAsync(); - // Keep UI messages moving, so the form remains - // responsive during the asynchronous operation. - Application.DoEvents(); - } - backgroundWorkerFillListView.RunWorkerAsync(new int[] { hideIndex, nomalIndex, favIndex }); - - } - - private void backgroundWorkerFillListView_DoWork(object sender, DoWorkEventArgs e) - { - InvokeFillListView fillListView = new InvokeFillListView(FillListView); - int[] index = (int[])e.Argument; - this.BeginInvoke(fillListView, new Object[] { index[0], index[1], index[2] }); - - } - - public delegate void InvokeFillListView(ref int hideIndex, ref int nomalIndex, ref int favIndex); - public void FillListView(ref int hideIndex, ref int nomalIndex, ref int favIndex) - { - listViewHide.Items.Clear(); - listViewNormal.Items.Clear(); - listViewFav.Items.Clear(); - int countHide = 0, countNormal = 0, countFav = 0; - - // List locations = new List(); - // foreach (var locationitem in chklistLocation.CheckedItems) - // { - // locations.Add(locationitem.ToString()); - // } - // Note: This section needs to be refactored to use EF Core ScenesView properly - // List sceneviewarray = dbContext.ScenesView.Where(q => locations.Contains(q.Location)).ToList(); - - foreach (var item in listSceneItem) - { - Thread.Sleep(1); - - switch (int.Parse(item.SubItems[5].Text)) - { - case -1: listViewHide.Items.Add(item); countHide++; break; - case 0: listViewNormal.Items.Add(item); countNormal++; break; - case 1: listViewFav.Items.Add(item); countFav++; break; - } - } - labelHide.Text = countHide.ToString(); - labelNormal.Text = countNormal.ToString(); - labelFav.Text = countFav.ToString(); - if (hideIndex >= listViewHide.Items.Count) - hideIndex = listViewHide.Items.Count - 1; - if (hideIndex >= 0) listViewHide.EnsureVisible(hideIndex); - if (nomalIndex >= listViewNormal.Items.Count) - nomalIndex = listViewNormal.Items.Count - 1; - if (nomalIndex >= 0) listViewNormal.EnsureVisible(nomalIndex); - if (favIndex >= listViewFav.Items.Count) - favIndex = listViewFav.Items.Count - 1; - if (favIndex >= 0) listViewFav.EnsureVisible(favIndex); - } - */ - - private void pictureBoxPreview_Click(object sender, EventArgs e) - { - panelImage.Visible = false; - } - - - private void buttonAddHide_Click(object sender, EventArgs e) - { - if (listViewNormal.SelectedIndices.Count > 0) - { - foreach (int itemindex in listViewNormal.SelectedIndices) - { - string varName = listFilterCreatorSceneNormal[itemindex].VarName; - string scene = listFilterCreatorSceneNormal[itemindex].ScenePath; - RunSceneHideJob("scene_hide", varName, scene); - UpdateHidefav(varName, scene); - } - //UpdateFileHidefav(); - //FilterVars(); - GenerateItems(); - } - } - - private static void SetHideFav(string varName, string scene,int hidefav) - { - string scenepath = Path.GetDirectoryName(scene); - string scenename = Path.GetFileName(scene); - string pathhide = Path.Combine(Settings.Default.vampath, "AddonPackagesFilePrefs", varName, scenepath, scenename + ".hide"); - string pathfav = Path.Combine(Settings.Default.vampath, "AddonPackagesFilePrefs", varName, scenepath, scenename + ".fav"); - if (string.IsNullOrEmpty(varName)) - { - pathhide = Path.Combine(Settings.Default.vampath, scenepath, scenename + ".hide"); - pathfav = Path.Combine(Settings.Default.vampath, scenepath, scenename + ".fav"); - - } - switch (hidefav) - { - case -1: - if (File.Exists(pathfav)) - File.Delete(pathfav); - if (!File.Exists(pathhide)) - { - Directory.CreateDirectory(Path.GetDirectoryName(pathhide)); - using (File.Create(pathhide)) { } - } - break; - case 0: - if (File.Exists(pathfav)) - File.Delete(pathfav); - if (File.Exists(pathhide)) - File.Delete(pathhide); - break; - case 1: - if (File.Exists(pathhide)) - File.Delete(pathhide); - if (!File.Exists(pathfav)) - { - Directory.CreateDirectory(Path.GetDirectoryName(pathfav)); - using (File.Create(pathfav)) { } - } - break; - } - - } - - private void buttonAddFav_Click(object sender, EventArgs e) - { - if (listViewNormal.SelectedIndices.Count > 0) - { - foreach (int itemindex in listViewNormal.SelectedIndices) - { - string varName = listFilterCreatorSceneNormal[itemindex].VarName; - string scene = listFilterCreatorSceneNormal[itemindex].ScenePath; - RunSceneHideJob("scene_fav", varName, scene); - UpdateHidefav(varName, scene); - } - //UpdateFileHidefav(); - GenerateItems(); - } - } - - private void buttonRemoveHide_Click(object sender, EventArgs e) - { - if (listViewHide.SelectedIndices.Count > 0) - { - foreach (int itemindex in listViewHide.SelectedIndices) - { - string varName = listFilterCreatorSceneHide[itemindex].VarName; - string scene = listFilterCreatorSceneHide[itemindex].ScenePath; - RunSceneHideJob("scene_unhide", varName, scene); - UpdateHidefav(varName, scene); - } - //UpdateFileHidefav(); - GenerateItems(); - } - } - - private void buttonRemoveFav_Click(object sender, EventArgs e) - { - if (listViewFav.SelectedIndices.Count > 0) - { - foreach (int itemindex in listViewFav.SelectedIndices) - { - string varName = listFilterCreatorSceneFav[itemindex].VarName; - string scene = listFilterCreatorSceneFav[itemindex].ScenePath; - RunSceneHideJob("scene_unfav", varName, scene); - UpdateHidefav(varName, scene); - } - //UpdateFileHidefav(); - GenerateItems(); - } - } - private string curVarName = "", curEntryName = ""; - private JSONClass jsonLoadScene; - - private void listView_ItemActivate(object sender, EventArgs e) - { - ListView listView=(ListView)sender; - if (listView.SelectedIndices.Count == 1) - { - panelImage.Parent = listView; - int index = listView.SelectedIndices[0]; - var item = listView.Items[index]; - if (item != null) - { - curVarName = item.SubItems[1].Text; - curEntryName = item.SubItems[2].Text; - string varname = ""; - if (!string.IsNullOrEmpty(curVarName) && curVarName != "(save).") - { - varname = item.SubItems[1].Text + ":/"; - } - jsonLoadScene = new JSONClass(); - jsonLoadScene.Add("rescan", item.SubItems[7].Text == "not Installed" ? "true" : "false"); - - jsonLoadScene.Add("resources", new JSONArray()); - JSONArray resources = jsonLoadScene["resources"].AsArray; - resources.Add(new JSONClass()); - JSONClass resource = (JSONClass)resources[resources.Count - 1]; - resource.Add("type", item.SubItems[6].Text); - resource.Add("saveName", varname + curEntryName.Replace('\\', '/')); - UpdateButtonClearCache(); - if (!string.IsNullOrEmpty(item.SubItems[3].Text)) - { - labelPreviewVarName.Text = item.Text; - checkBoxMerge.Checked = false; - buttonLoadscene.Text = "Load " + item.SubItems[6].Text; - pictureBoxPreview.Image = Image.FromFile(item.SubItems[3].Text); - - panelImage.Visible = true; - radioButtonPersonOrder1.Checked = true; - if (item.SubItems[6].Text.ToLower() == "scenes" || item.SubItems[6].Text.ToLower() == "looks") - { - buttonAnalysis.Visible = true; - } - else - { - buttonAnalysis.Visible = false; - } - if (item.SubItems[6].Text.ToLower() == "looks" || item.SubItems[6].Text.ToLower() == "clothing" || - item.SubItems[6].Text.ToLower() == "morphs" || item.SubItems[6].Text.ToLower() == "hairstyle" || - item.SubItems[6].Text.ToLower() == "skin" || item.SubItems[6].Text.ToLower() == "pose") - { - groupBoxPersonOrder.Visible = true; - checkBoxIgnoreGender.Visible = true; - } - else - { - groupBoxPersonOrder.Visible = false; - checkBoxIgnoreGender.Visible = false; - } - if (item.SubItems[6].Text.ToLower() == "morphs" || - item.SubItems[6].Text.ToLower() == "skin" || - item.SubItems[6].Text.ToLower() == "pose") - { - checkBoxForMale.Visible = true; - } - else - { - checkBoxForMale.Visible = false; - } - } - } - } - } - - private void UpdateButtonClearCache() - { - string sceneCacheFolderName = Path.Combine(Directory.GetCurrentDirectory(), "Cache", - Comm.ValidFileName(curVarName == "(save)." ? "save" : curVarName), Comm.ValidFileName(curEntryName.Replace('\\', '_').Replace('/', '_'))); - if (Directory.Exists(sceneCacheFolderName)) - { - buttonClearCache.Visible = true; - } - else - { - buttonClearCache.Visible = false; - } - } - - private void toolStripComboBoxHideFav_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(9); - } - - private void toolStripComboBoxOrderBy_SelectedIndexChanged(object sender, EventArgs e) - { - if (listFilterCreatorScene != null) - { - if (listFilterCreatorScene.Count() > 0) - GenerateItems(); - } - } - - private void listViewNormal_ListViewDragDrop(object sender, DragEventArgs e) - { - DragItemData data = (DragItemData)e.Data.GetData(typeof(DragItemData).ToString()); - List listfilter = listFilterCreatorSceneNormal; - if (data.ListView == listViewHide) - { - listfilter = listFilterCreatorSceneHide; - } - if (data.ListView == listViewFav) - { - listfilter = listFilterCreatorSceneFav; - } - foreach (int itemindex in data.ListView.SelectedIndices) - { - string varName = listfilter[itemindex].VarName; - string scene = listfilter[itemindex].ScenePath; - RunSceneHideJob("scene_unhide", varName, scene); - UpdateHidefav(varName, scene); - } - GenerateItems(); - } - - private void listViewHide_ListViewDragDrop(object sender, DragEventArgs e) - { - DragItemData data = (DragItemData)e.Data.GetData(typeof(DragItemData).ToString()); - List listfilter = listFilterCreatorSceneNormal; - if (data.ListView == listViewHide) - { - listfilter = listFilterCreatorSceneHide; - } - if (data.ListView == listViewFav) - { - listfilter = listFilterCreatorSceneFav; - } - foreach (int itemindex in data.ListView.SelectedIndices) - { - string varName = listfilter[itemindex].VarName; - string scene = listfilter[itemindex].ScenePath; - RunSceneHideJob("scene_hide", varName, scene); - UpdateHidefav(varName, scene); - } - GenerateItems(); - } - - private void listViewFav_ListViewDragDrop(object sender, DragEventArgs e) - { - DragItemData data = (DragItemData)e.Data.GetData(typeof(DragItemData).ToString()); - List listfilter = listFilterCreatorSceneNormal; - if (data.ListView == listViewHide) - { - listfilter = listFilterCreatorSceneHide; - } - if (data.ListView == listViewFav) - { - listfilter = listFilterCreatorSceneFav; - } - foreach (int itemindex in data.ListView.SelectedIndices) - { - string varName = listfilter[itemindex].VarName; - string scene = listfilter[itemindex].ScenePath; - RunSceneHideJob("scene_fav", varName, scene); - UpdateHidefav(varName, scene); - } - GenerateItems(); - } - - private void buttonLoadscene_Click(object sender, EventArgs e) - { - bool merge = false; - if (checkBoxMerge.Checked) merge = true; - bool ignoreGender = false; - if(checkBoxIgnoreGender.Checked) ignoreGender = true; - string characterGender = "unknown"; - if (checkBoxForMale.Visible) - { - if (checkBoxForMale.Checked) characterGender = "male"; - else characterGender = "female"; - } - int personOrder = 1; - foreach (RadioButton rbperson in groupBoxPersonOrder.Controls) - { - if (rbperson.Checked) - { - personOrder = int.Parse(rbperson.Text); - break; - } - } - panelImage.Visible = false; - Cursor = Cursors.WaitCursor; - - JSONArray resources = jsonLoadScene["resources"].AsArray; - string saveName = ""; - - if (resources.Count > 0) - { - JSONClass resource = (JSONClass)resources[0]; - saveName = resource["saveName"].Value; - } - - try - { - form1.LoadScene(jsonLoadScene, merge, ignoreGender, characterGender, personOrder); - } - catch (Exception ex) - { - LogBackendLine($"load scene failed: {ex.Message}"); - } - Cursor = Cursors.Arrow; - UpdateButtonClearCache(); - } - - private void chklistLocation_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(); - //FillItems(); - } - - private void backgroundWorkerGenerate_DoWork(object sender, DoWorkEventArgs e) - { - AllInstalledVars(); - } - - private void backgroundWorkerGenerate_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - //progressBar1.Visible = false; - } - - private void checkedListBoxHideFav_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVars(9); - } - - private void textBoxFilter_TextChanged(object sender, EventArgs e) - { - FilterVars(8); - } - - private void comboBoxCreator_SelectedIndexChanged(object sender, EventArgs e) - { - FilterVarsCreator(); - } - - private void buttonLocate_Click(object sender, EventArgs e) - { - - JSONArray resources = jsonLoadScene["resources"].AsArray; - JSONClass resource = (JSONClass)resources[resources.Count - 1]; - string varName = resource["saveName"]; - - if (varName.IndexOf(":/") > 0) - { - varName = varName.Substring(0, varName.IndexOf(":/")); - form1.LocateVar(varName); - form1.SelectVarInList(varName); - form1.Activate(); - } - else - { - try - { - RunBackendJob("vars_locate", new { path = varName.Replace('/', '\\') }); - } - catch (Exception ex) - { - LogBackendLine($"locate failed: {ex.Message}"); - } - } - } - - int layoutPanelWidthMode = 0; - private void buttonFav_Click(object sender, EventArgs e) - { - if (layoutPanelWidthMode == 3) - { - tableLayoutPanel1.ColumnStyles[0].Width = 33; - tableLayoutPanel1.ColumnStyles[2].Width = 33; - tableLayoutPanel1.ColumnStyles[4].Width = 33; - layoutPanelWidthMode = 0; - buttonFav.Text = "鈼Fav鈻"; - } - else - { - tableLayoutPanel1.ColumnStyles[0].Width = 10; - tableLayoutPanel1.ColumnStyles[2].Width = 10; - tableLayoutPanel1.ColumnStyles[4].Width = 80; - layoutPanelWidthMode = 3; - buttonFav.Text = "鈻禙av鈼"; - } - } - - private void buttonNormal_Click(object sender, EventArgs e) - { - if (layoutPanelWidthMode == 2) - { - tableLayoutPanel1.ColumnStyles[0].Width = 33; - tableLayoutPanel1.ColumnStyles[2].Width = 33; - tableLayoutPanel1.ColumnStyles[4].Width = 33; - layoutPanelWidthMode = 0; - buttonNormal.Text = "鈼Normal鈻"; - } - else - { - tableLayoutPanel1.ColumnStyles[0].Width = 10; - tableLayoutPanel1.ColumnStyles[2].Width = 80; - tableLayoutPanel1.ColumnStyles[4].Width = 10; - layoutPanelWidthMode = 2; - buttonNormal.Text = "鈻禢ormal鈼"; - } - } - - private void buttonHide_Click(object sender, EventArgs e) - { - if (layoutPanelWidthMode == 1) - { - tableLayoutPanel1.ColumnStyles[0].Width = 33; - tableLayoutPanel1.ColumnStyles[2].Width = 33; - tableLayoutPanel1.ColumnStyles[4].Width = 33; - layoutPanelWidthMode = 0; - buttonHide.Text = "鈼Hide鈻"; - } - else - { - tableLayoutPanel1.ColumnStyles[0].Width = 80; - tableLayoutPanel1.ColumnStyles[2].Width = 10; - tableLayoutPanel1.ColumnStyles[4].Width = 10; - layoutPanelWidthMode = 1; - buttonHide.Text = "鈻禜ide鈼"; - } - } - - private void listViewHide_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) - { - var curpriviewscene = listFilterCreatorSceneHide[e.ItemIndex]; - RetrieveVirtualItem(e, curpriviewscene); - } - - - private void listViewNormal_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) - { - - var curpriviewscene = listFilterCreatorSceneNormal[e.ItemIndex]; - RetrieveVirtualItem(e, curpriviewscene); - } - - private void listViewFav_RetrieveVirtualItem(object sender, RetrieveVirtualItemEventArgs e) - { - var curpriviewscene = listFilterCreatorSceneFav[e.ItemIndex]; - RetrieveVirtualItem(e, curpriviewscene); - } - - private void RetrieveVirtualItem(RetrieveVirtualItemEventArgs e, dynamic curpriviewscene) // TODO: Replace with ScenesView - { - string key = "vam.png"; - if (!string.IsNullOrWhiteSpace(curpriviewscene.PreviewPic)) - { - string picpath = Path.Combine(Settings.Default.varspath, previewpicsDirName, curpriviewscene.AtomType, curpriviewscene.VarName, curpriviewscene.PreviewPic); - if (File.Exists(picpath)) key = picpath; - } - if (!imageListScenes.Images.ContainsKey(key)) - { - imageListScenes.Images.Add(key, Image.FromFile(key)); - if (imageListScenes.Images.Count > 40) imageListScenes.Images.RemoveAt(0); - } - - - string scenePath = curpriviewscene.ScenePath; - string sceneName = curpriviewscene.VarName + " - " + Path.GetFileNameWithoutExtension(scenePath); - - e.Item = new ListViewItem(sceneName, imageListScenes.Images.IndexOfKey(key)); - e.Item.SubItems.Add(curpriviewscene.VarName); - e.Item.SubItems.Add(curpriviewscene.ScenePath); - e.Item.SubItems.Add(key); - e.Item.SubItems.Add(curpriviewscene.VarDate.ToString()); - e.Item.SubItems.Add(curpriviewscene.HideFav.ToString()); - e.Item.SubItems.Add(curpriviewscene.AtomType.ToString()); - e.Item.SubItems.Add(curpriviewscene.Location.ToString()); - } - - - private void comboBoxOrderBy_SelectedIndexChanged(object sender, EventArgs e) - { - if (listFilterCreatorScene != null&& listFilterCreatorScene.Count() > 0) - { - GenerateItems(); - } - } - - private void radioButtonCategory_CheckedChanged(object sender, EventArgs e) - { - RadioButton rb = sender as RadioButton; - if (rb == null) - { - //MessageBox.Show("Sender is not a RadioButton"); - return; - } - if (strCategory != rb.Text) - { - strCategory = rb.Text; - FilterVars(); - } - } - - private void buttonAnalysis_Click(object sender, EventArgs e) - { - try - { - form1.Analysisscene(jsonLoadScene); - } - catch (Exception ex) - { - LogBackendLine($"analysis failed: {ex.Message}"); - } - UpdateButtonClearCache(); - } - - private void buttonResetFilter_Click(object sender, EventArgs e) - { - textBoxFilter.Text = ""; - comboBoxCreator.SelectedItem = "____ALL"; - comboBoxOrderBy.SelectedItem = "New To Old"; - } - - private void buttonClearCache_Click(object sender, EventArgs e) - { - if (MessageBox.Show("The cache can improve the speed of secondary analysis, normally you don't need to clear it, unless you modify the scene file. This operation only clears the cache of the current scene, if you need to clear all the cache, please delete the cache directory manually.", "Clear Cache", MessageBoxButtons.YesNo) == DialogResult.Yes) - { - try - { - RunBackendJob("cache_clear", new { var_name = curVarName, entry_name = curEntryName }); - } - catch (Exception ex) - { - LogBackendLine($"cache clear failed: {ex.Message}"); - } - UpdateButtonClearCache(); - } - } - - private void buttonFilterByCreator_Click(object sender, EventArgs e) - { - JSONArray resources = jsonLoadScene["resources"].AsArray; - JSONClass resource = (JSONClass)resources[resources.Count - 1]; - string varName = resource["saveName"]; - if (varName.IndexOf(":/") > 0) - { - varName = varName.Substring(0, varName.IndexOf(":/")); - string[] varnamepart = varName.Split('.'); - - if (varnamepart.Length == 3) - { - comboBoxCreator.SelectedItem = varnamepart[0]; - textBoxFilter.Text = ""; - panelImage.Visible = false; - } - } - } - } -} diff --git a/_archived/varManager/FormScenes.resx b/_archived/varManager/FormScenes.resx deleted file mode 100644 index 8ffb2ae..0000000 --- a/_archived/varManager/FormScenes.resx +++ /dev/null @@ -1,299 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 603, 17 - - - 425, 17 - - - 448, 59 - - - 120 - - - - - AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAO5KPETtRTd+7UU3fe1FN33tRTd87kk7MgAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADiSTsN7EY4a+5EN33tRTd97UU3fe1F - N23sSDkP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8AAP4CA4D4DwAA/gIBgPAfAAD8BwHAcB8AAPwHAMBgPwAA+A+A4CA/AAD4D4BgAH8AAPAf - wHAAfwAA8B/AMAD/AADgP+A4AP8AAOA/8BgB/wAAwH/wHAH/AADAf/gMA/8AAMD/+A4D/wAA4f/+P4// - AAA= - - - \ No newline at end of file diff --git a/_archived/varManager/FormSettings.Designer.cs b/_archived/varManager/FormSettings.Designer.cs deleted file mode 100644 index e8c7ba4..0000000 --- a/_archived/varManager/FormSettings.Designer.cs +++ /dev/null @@ -1,224 +0,0 @@ -锘 -namespace varManager -{ - partial class FormSettings - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.Windows.Forms.Label label3; - this.label1 = new System.Windows.Forms.Label(); - this.textBoxVarspath = new System.Windows.Forms.TextBox(); - this.buttonVarspath = new System.Windows.Forms.Button(); - this.buttonSave = new System.Windows.Forms.Button(); - this.folderBrowserDialogVars = new System.Windows.Forms.FolderBrowserDialog(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); - this.textBoxVamPath = new System.Windows.Forms.TextBox(); - this.buttonVamPath = new System.Windows.Forms.Button(); - this.folderBrowserDialogVam = new System.Windows.Forms.FolderBrowserDialog(); - this.labelExec = new System.Windows.Forms.Label(); - this.textBoxExec = new System.Windows.Forms.TextBox(); - this.buttonExec = new System.Windows.Forms.Button(); - this.openFileDialogExec = new System.Windows.Forms.OpenFileDialog(); - label3 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label3 - // - label3.AutoSize = true; - label3.ForeColor = System.Drawing.Color.Crimson; - label3.Location = new System.Drawing.Point(105, 254); - label3.Name = "label3"; - label3.Size = new System.Drawing.Size(495, 51); - label3.TabIndex = 5; - label3.Text = "This is a repository for the original var files.\r\nNote that that it is NOT {vamIn" + - "stallDir} \\AddonPackages directory\r\nIt is recommended to have the same partition" + - " as the VAM installation directory"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(80, 218); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(70, 17); - this.label1.TabIndex = 0; - this.label1.Text = "vars path:"; - // - // textBoxVarspath - // - this.textBoxVarspath.Location = new System.Drawing.Point(173, 212); - this.textBoxVarspath.Name = "textBoxVarspath"; - this.textBoxVarspath.Size = new System.Drawing.Size(574, 25); - this.textBoxVarspath.TabIndex = 2; - this.textBoxVarspath.Text = "d:\\vars"; - // - // buttonVarspath - // - this.buttonVarspath.Location = new System.Drawing.Point(753, 211); - this.buttonVarspath.Name = "buttonVarspath"; - this.buttonVarspath.Size = new System.Drawing.Size(35, 29); - this.buttonVarspath.TabIndex = 3; - this.buttonVarspath.Text = ".."; - this.buttonVarspath.UseVisualStyleBackColor = true; - this.buttonVarspath.Click += new System.EventHandler(this.buttonVarspath_Click); - // - // labelExec - // - this.labelExec.AutoSize = true; - this.labelExec.Location = new System.Drawing.Point(32, 154); - this.labelExec.Name = "labelExec"; - this.labelExec.Size = new System.Drawing.Size(118, 17); - this.labelExec.TabIndex = 6; - this.labelExec.Text = "defaultVamExec:"; - // - // textBoxExec - // - this.textBoxExec.Location = new System.Drawing.Point(173, 148); - this.textBoxExec.Name = "textBoxExec"; - this.textBoxExec.Size = new System.Drawing.Size(574, 25); - this.textBoxExec.TabIndex = 7; - this.textBoxExec.Text = "VaM (Desktop Mode).bat"; - // - // buttonExec - // - this.buttonExec.Location = new System.Drawing.Point(753, 148); - this.buttonExec.Name = "buttonExec"; - this.buttonExec.Size = new System.Drawing.Size(35, 29); - this.buttonExec.TabIndex = 8; - this.buttonExec.Text = ".."; - this.buttonExec.UseVisualStyleBackColor = true; - this.buttonExec.Click += new System.EventHandler(this.buttonExec_Click); - // - // buttonSave - // - this.buttonSave.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonSave.Location = new System.Drawing.Point(597, 470); - this.buttonSave.Name = "buttonSave"; - this.buttonSave.Size = new System.Drawing.Size(75, 26); - this.buttonSave.TabIndex = 4; - this.buttonSave.Text = "Save"; - this.buttonSave.UseVisualStyleBackColor = true; - this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); - // - // folderBrowserDialogVars - // - this.folderBrowserDialogVars.Description = global::varManager.Properties.Settings.Default.varspath; - this.folderBrowserDialogVars.SelectedPath = global::varManager.Properties.Settings.Default.varspath; - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(713, 470); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 26); - this.buttonCancel.TabIndex = 5; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(24, 90); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(114, 17); - this.label2.TabIndex = 0; - this.label2.Text = "VAM Install path:"; - // - // textBoxVamPath - // - this.textBoxVamPath.Location = new System.Drawing.Point(173, 86); - this.textBoxVamPath.Name = "textBoxVamPath"; - this.textBoxVamPath.Size = new System.Drawing.Size(574, 25); - this.textBoxVamPath.TabIndex = 0; - this.textBoxVamPath.Text = "d:\\Virt_a_mate"; - // - // buttonVamPath - // - this.buttonVamPath.Location = new System.Drawing.Point(753, 85); - this.buttonVamPath.Name = "buttonVamPath"; - this.buttonVamPath.Size = new System.Drawing.Size(35, 29); - this.buttonVamPath.TabIndex = 1; - this.buttonVamPath.Text = ".."; - this.buttonVamPath.UseVisualStyleBackColor = true; - this.buttonVamPath.Click += new System.EventHandler(this.buttonVamPath_Click); - // - // folderBrowserDialogVam - // - this.folderBrowserDialogVam.Description = global::varManager.Properties.Settings.Default.varspath; - this.folderBrowserDialogVam.SelectedPath = global::varManager.Properties.Settings.Default.varspath; - this.folderBrowserDialogVam.ShowNewFolderButton = false; - // - // FormSettings - // - this.AcceptButton = this.buttonSave; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(800, 510); - this.ControlBox = false; - this.Controls.Add(this.buttonExec); - this.Controls.Add(this.textBoxExec); - this.Controls.Add(this.labelExec); - this.Controls.Add(label3); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonSave); - this.Controls.Add(this.buttonVamPath); - this.Controls.Add(this.textBoxVamPath); - this.Controls.Add(this.buttonVarspath); - this.Controls.Add(this.label2); - this.Controls.Add(this.textBoxVarspath); - this.Controls.Add(this.label1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormSettings"; - this.Text = "Settings"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormSettings_FormClosing); - this.Load += new System.EventHandler(this.FormSettings_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBoxVarspath; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogVars; - private System.Windows.Forms.Button buttonVarspath; - private System.Windows.Forms.Button buttonSave; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox textBoxVamPath; - private System.Windows.Forms.Button buttonVamPath; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogVam; - private System.Windows.Forms.Label labelExec; - private System.Windows.Forms.TextBox textBoxExec; - private System.Windows.Forms.Button buttonExec; - private System.Windows.Forms.OpenFileDialog openFileDialogExec; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormSettings.cs b/_archived/varManager/FormSettings.cs deleted file mode 100644 index 731e148..0000000 --- a/_archived/varManager/FormSettings.cs +++ /dev/null @@ -1,83 +0,0 @@ -锘縰sing System; -using System.IO; -using System.Threading; -using System.Windows.Forms; -using varManager.Backend; -using varManager.Properties; - -namespace varManager -{ - public partial class FormSettings : Form - { - public FormSettings() - { - InitializeComponent(); - } - - private void buttonVarspath_Click(object sender, EventArgs e) - { - folderBrowserDialogVars.SelectedPath = textBoxVarspath.Text; - folderBrowserDialogVars.ShowDialog(); - textBoxVarspath.Text = folderBrowserDialogVars.SelectedPath; - } - - private void buttonVamPath_Click(object sender, EventArgs e) - { - folderBrowserDialogVam.SelectedPath = textBoxVamPath.Text; - folderBrowserDialogVam.ShowDialog(); - textBoxVamPath.Text = folderBrowserDialogVam.SelectedPath; - } - - private void buttonExec_Click(object sender, EventArgs e) - { - openFileDialogExec.InitialDirectory = Path.GetDirectoryName(textBoxExec.Text); - openFileDialogExec.FileName = Path.GetFileName(textBoxExec.Text); - if (openFileDialogExec.ShowDialog() == DialogResult.OK) - { - textBoxExec.Text = Path.GetFileName(openFileDialogExec.FileName); // 鍙幏鍙栨枃浠跺悕 - } - } - - private async void FormSettings_Load(object sender, EventArgs e) - { - try - { - await BackendSession.EnsureStartedAsync(null, CancellationToken.None).ConfigureAwait(true); - } - catch - { - } - - var cfg = BackendSession.Config; - textBoxVarspath.Text = cfg?.Varspath ?? Properties.Settings.Default.varspath; - textBoxVamPath.Text = cfg?.Vampath ?? Properties.Settings.Default.vampath; - textBoxExec.Text = cfg?.VamExec ?? Properties.Settings.Default.defaultVamExec; - - SetReadOnlyUi(); - } - - private void SetReadOnlyUi() - { - textBoxVarspath.ReadOnly = true; - textBoxVamPath.ReadOnly = true; - textBoxExec.ReadOnly = true; - buttonVarspath.Enabled = false; - buttonVamPath.Enabled = false; - buttonExec.Enabled = false; - buttonSave.Text = "Close"; - } - - private void buttonSave_Click(object sender, EventArgs e) - { - MessageBox.Show("閰嶇疆鐢卞悗绔鐞嗭紝璇风紪杈 config.json 鍚庨噸鍚"); - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void FormSettings_FormClosing(object sender, FormClosingEventArgs e) - { - if (this.DialogResult == DialogResult.None) - e.Cancel = true; - } - } -} diff --git a/_archived/varManager/FormSettings.resx b/_archived/varManager/FormSettings.resx deleted file mode 100644 index 20c94ca..0000000 --- a/_archived/varManager/FormSettings.resx +++ /dev/null @@ -1,129 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - - 17, 17 - - - 405, 21 - - \ No newline at end of file diff --git a/_archived/varManager/FormStaleVars.Designer.cs b/_archived/varManager/FormStaleVars.Designer.cs deleted file mode 100644 index 6c531bd..0000000 --- a/_archived/varManager/FormStaleVars.Designer.cs +++ /dev/null @@ -1,166 +0,0 @@ -锘縩amespace varManager -{ - partial class FormStaleVars - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.checkBoxRemoveOldVersion = new System.Windows.Forms.CheckBox(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.buttonOk = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.label4 = new System.Windows.Forms.Label(); - this.groupBox1.SuspendLayout(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoEllipsis = true; - this.label1.Location = new System.Drawing.Point(49, 46); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(487, 72); - this.label1.TabIndex = 0; - this.label1.Text = "Stale var means:\r\n1,The version is not the latest.\r\n2,Not depended by other var."; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.checkBoxRemoveOldVersion); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.ForeColor = System.Drawing.Color.Red; - this.groupBox1.Location = new System.Drawing.Point(12, 138); - this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.groupBox1.Size = new System.Drawing.Size(607, 180); - this.groupBox1.TabIndex = 1; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Follow-up Step"; - // - // checkBoxRemoveOldVersion - // - this.checkBoxRemoveOldVersion.AutoSize = true; - this.checkBoxRemoveOldVersion.Location = new System.Drawing.Point(11, 29); - this.checkBoxRemoveOldVersion.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.checkBoxRemoveOldVersion.Name = "checkBoxRemoveOldVersion"; - this.checkBoxRemoveOldVersion.Size = new System.Drawing.Size(185, 22); - this.checkBoxRemoveOldVersion.TabIndex = 3; - this.checkBoxRemoveOldVersion.Text = "Remove Old Version Vars"; - this.checkBoxRemoveOldVersion.UseVisualStyleBackColor = true; - // - // label3 - // - this.label3.ForeColor = System.Drawing.SystemColors.ActiveCaptionText; - this.label3.Location = new System.Drawing.Point(7, 94); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(595, 65); - this.label3.TabIndex = 2; - this.label3.Text = "The following packages will be moved to \"___OldVersionVars___\" directory\r\n1. Not " + - "pure plug-in packages\r\n2. Not the latest version\r\n"; - // - // label2 - // - this.label2.AutoEllipsis = true; - this.label2.Location = new System.Drawing.Point(31, 61); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(448, 26); - this.label2.TabIndex = 1; - this.label2.Text = "Warning: This operation may cause a dependency error"; - // - // buttonOk - // - this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOk.Location = new System.Drawing.Point(374, 340); - this.buttonOk.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonOk.Name = "buttonOk"; - this.buttonOk.Size = new System.Drawing.Size(75, 28); - this.buttonOk.TabIndex = 3; - this.buttonOk.Text = "OK"; - this.buttonOk.UseVisualStyleBackColor = true; - this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(539, 340); - this.buttonCancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 28); - this.buttonCancel.TabIndex = 3; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.ForeColor = System.Drawing.Color.Red; - this.label4.Location = new System.Drawing.Point(19, 11); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(341, 18); - this.label4.TabIndex = 4; - this.label4.Text = "鈼 Will moved stale vars to \"___StaleVars___\" directory"; - // - // FormStaleVars - // - this.AcceptButton = this.buttonOk; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(639, 388); - this.ControlBox = false; - this.Controls.Add(this.label4); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOk); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.label1); - this.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "FormStaleVars"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "StaleVars"; - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.CheckBox checkBoxRemoveOldVersion; - private System.Windows.Forms.Button buttonOk; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label label4; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormStaleVars.cs b/_archived/varManager/FormStaleVars.cs deleted file mode 100644 index 3d070e9..0000000 --- a/_archived/varManager/FormStaleVars.cs +++ /dev/null @@ -1,27 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace varManager -{ - public partial class FormStaleVars : Form - { - public bool removeOldVersion; - public FormStaleVars() - { - InitializeComponent(); - removeOldVersion = false; - } - - private void buttonOk_Click(object sender, EventArgs e) - { - removeOldVersion = checkBoxRemoveOldVersion.Checked; - } - } -} diff --git a/_archived/varManager/FormStaleVars.resx b/_archived/varManager/FormStaleVars.resx deleted file mode 100644 index 1af7de1..0000000 --- a/_archived/varManager/FormStaleVars.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/_archived/varManager/FormSwitchAdd.Designer.cs b/_archived/varManager/FormSwitchAdd.Designer.cs deleted file mode 100644 index d35a706..0000000 --- a/_archived/varManager/FormSwitchAdd.Designer.cs +++ /dev/null @@ -1,93 +0,0 @@ -锘 -namespace varManager -{ - partial class FormSwitchAdd - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.textBoxSwitchName = new System.Windows.Forms.TextBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // textBoxSwitchName - // - this.textBoxSwitchName.Location = new System.Drawing.Point(12, 14); - this.textBoxSwitchName.Name = "textBoxSwitchName"; - this.textBoxSwitchName.Size = new System.Drawing.Size(246, 25); - this.textBoxSwitchName.TabIndex = 0; - // - // buttonOK - // - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(90, 66); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 26); - this.buttonOK.TabIndex = 1; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(185, 66); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 26); - this.buttonCancel.TabIndex = 2; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // FormSwitchAdd - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(272, 113); - this.ControlBox = false; - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.textBoxSwitchName); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Name = "FormSwitchAdd"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Add AddonPackages Switch"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormSwitchAdd_FormClosing); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox textBoxSwitchName; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormSwitchAdd.cs b/_archived/varManager/FormSwitchAdd.cs deleted file mode 100644 index 5816dd9..0000000 --- a/_archived/varManager/FormSwitchAdd.cs +++ /dev/null @@ -1,34 +0,0 @@ -锘縰sing System; -using System.Windows.Forms; - -namespace varManager -{ - public partial class FormSwitchAdd : Form - { - private string switchName; - - public string SwitchName { get => switchName; set => switchName = value; } - - public FormSwitchAdd() - { - InitializeComponent(); - } - - private void FormSwitchAdd_FormClosing(object sender, FormClosingEventArgs e) - { - if (this.DialogResult == DialogResult.None) - e.Cancel = true; - } - - private void buttonOK_Click(object sender, EventArgs e) - { - if (string.IsNullOrWhiteSpace(textBoxSwitchName.Text.Trim())) - this.DialogResult = DialogResult.None; - else - { - SwitchName = textBoxSwitchName.Text; - this.DialogResult = DialogResult.OK; - } - } - } -} diff --git a/_archived/varManager/FormSwitchAdd.resx b/_archived/varManager/FormSwitchAdd.resx deleted file mode 100644 index 1af7de1..0000000 --- a/_archived/varManager/FormSwitchAdd.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/_archived/varManager/FormSwitchRename.Designer.cs b/_archived/varManager/FormSwitchRename.Designer.cs deleted file mode 100644 index dc5c87c..0000000 --- a/_archived/varManager/FormSwitchRename.Designer.cs +++ /dev/null @@ -1,119 +0,0 @@ -锘 -namespace varManager -{ - partial class FormSwitchRename - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.textBoxSwitchNewName = new System.Windows.Forms.TextBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.textBoxSwitchOldName = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // textBoxSwitchNewName - // - this.textBoxSwitchNewName.Location = new System.Drawing.Point(11, 76); - this.textBoxSwitchNewName.Name = "textBoxSwitchNewName"; - this.textBoxSwitchNewName.Size = new System.Drawing.Size(246, 25); - this.textBoxSwitchNewName.TabIndex = 0; - // - // buttonOK - // - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(85, 111); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 26); - this.buttonOK.TabIndex = 1; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(185, 111); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 26); - this.buttonCancel.TabIndex = 2; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // textBoxSwitchOldName - // - this.textBoxSwitchOldName.Location = new System.Drawing.Point(11, 14); - this.textBoxSwitchOldName.Name = "textBoxSwitchOldName"; - this.textBoxSwitchOldName.ReadOnly = true; - this.textBoxSwitchOldName.Size = new System.Drawing.Size(246, 25); - this.textBoxSwitchOldName.TabIndex = 3; - this.textBoxSwitchOldName.TabStop = false; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Cambria", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(114, 45); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(31, 22); - this.label1.TabIndex = 4; - this.label1.Text = "to:"; - // - // FormSwitchRename - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(277, 150); - this.ControlBox = false; - this.Controls.Add(this.label1); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.textBoxSwitchOldName); - this.Controls.Add(this.textBoxSwitchNewName); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Name = "FormSwitchRename"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Rename AddonPackages Switch"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormSwitchAdd_FormClosing); - this.Load += new System.EventHandler(this.FormSwitchRename_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox textBoxSwitchNewName; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.TextBox textBoxSwitchOldName; - private System.Windows.Forms.Label label1; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormSwitchRename.cs b/_archived/varManager/FormSwitchRename.cs deleted file mode 100644 index acc9cd1..0000000 --- a/_archived/varManager/FormSwitchRename.cs +++ /dev/null @@ -1,45 +0,0 @@ -锘縰sing System; -using System.Windows.Forms; - -namespace varManager -{ - public partial class FormSwitchRename : Form - { - private string newName; - - public string NewName { get => newName; set => newName = value; } - private string oldName; - - public string OldName { get => oldName; set => oldName = value; } - public FormSwitchRename() - { - InitializeComponent(); - } - - private void FormSwitchAdd_FormClosing(object sender, FormClosingEventArgs e) - { - if (this.DialogResult == DialogResult.None) - e.Cancel = true; - } - - private void buttonOK_Click(object sender, EventArgs e) - { - if (string.IsNullOrWhiteSpace(textBoxSwitchNewName.Text.Trim())) - this.DialogResult = DialogResult.None; - else if (textBoxSwitchNewName.Text.ToLower() == textBoxSwitchOldName.Text.ToLower()) - { - this.DialogResult = DialogResult.None; - } - else - { - NewName = textBoxSwitchNewName.Text; - this.DialogResult = DialogResult.OK; - } - } - - private void FormSwitchRename_Load(object sender, EventArgs e) - { - textBoxSwitchOldName.Text = oldName; - } - } -} diff --git a/_archived/varManager/FormSwitchRename.resx b/_archived/varManager/FormSwitchRename.resx deleted file mode 100644 index 1af7de1..0000000 --- a/_archived/varManager/FormSwitchRename.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/_archived/varManager/FormUninstallVars.Designer.cs b/_archived/varManager/FormUninstallVars.Designer.cs deleted file mode 100644 index 57f4463..0000000 --- a/_archived/varManager/FormUninstallVars.Designer.cs +++ /dev/null @@ -1,617 +0,0 @@ -锘 -namespace varManager -{ - partial class FormUninstallVars - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - if (components != null) - { - components.Dispose(); - } - dbContext?.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelWarning = new System.Windows.Forms.Label(); - this.buttonOK = new System.Windows.Forms.Button(); - this.dataGridViewVars = new System.Windows.Forms.DataGridView(); - this.varNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.metaDateColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.sizeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.scenesDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.looksDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.clothingDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.hairstyleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pluginsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.assetsDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.panel2 = new System.Windows.Forms.Panel(); - this.tableLayoutPanelPreview = new System.Windows.Forms.TableLayoutPanel(); - this.pictureBoxPreview = new System.Windows.Forms.PictureBox(); - this.panel3 = new System.Windows.Forms.Panel(); - this.labelPreviewVarName = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.buttonpreviewback = new System.Windows.Forms.Button(); - this.listViewPreviewPics = new System.Windows.Forms.ListView(); - this.imageListPreviewPics = new System.Windows.Forms.ImageList(this.components); - this.toolStripPreview = new System.Windows.Forms.ToolStrip(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); - this.toolStripComboBoxPreviewType = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.toolStripButtonPreviewFirst = new System.Windows.Forms.ToolStripButton(); - this.toolStripButtonPreviewPrev = new System.Windows.Forms.ToolStripButton(); - this.toolStripComboBoxPreviewPage = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripLabelPreviewCountItem = new System.Windows.Forms.ToolStripLabel(); - this.toolStripButtonPreviewNext = new System.Windows.Forms.ToolStripButton(); - this.toolStripButtonPreviewLast = new System.Windows.Forms.ToolStripButton(); - this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.iDDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.varNameDataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dependencyDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dependenciesBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.backgroundWorkerPreview = new System.ComponentModel.BackgroundWorker(); - this.tableLayoutPanel1.SuspendLayout(); - this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewVars)).BeginInit(); - this.panel2.SuspendLayout(); - this.tableLayoutPanelPreview.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).BeginInit(); - this.panel3.SuspendLayout(); - this.toolStripPreview.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dependenciesBindingSource)).BeginInit(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.dataGridViewVars, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.panel2, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.dataGridView1, 0, 1); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(2); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 57F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(1185, 546); - this.tableLayoutPanel1.TabIndex = 0; - // - // panel1 - // - this.panel1.AutoScroll = true; - this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2); - this.panel1.Controls.Add(this.buttonCancel); - this.panel1.Controls.Add(this.labelWarning); - this.panel1.Controls.Add(this.buttonOK); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(2, 490); - this.panel1.Margin = new System.Windows.Forms.Padding(2); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1181, 54); - this.panel1.TabIndex = 0; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(1080, 10); - this.buttonCancel.Margin = new System.Windows.Forms.Padding(2); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(74, 25); - this.buttonCancel.TabIndex = 2; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // labelWarning - // - this.labelWarning.AutoSize = true; - this.labelWarning.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.labelWarning.ForeColor = System.Drawing.Color.Crimson; - this.labelWarning.Location = new System.Drawing.Point(24, 14); - this.labelWarning.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.labelWarning.Name = "labelWarning"; - this.labelWarning.Size = new System.Drawing.Size(439, 15); - this.labelWarning.TabIndex = 1; - this.labelWarning.Text = "Warning: The above VAR list will be uninstalled!"; - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.buttonOK.ForeColor = System.Drawing.Color.Crimson; - this.buttonOK.Location = new System.Drawing.Point(970, 10); - this.buttonOK.Margin = new System.Windows.Forms.Padding(2); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(74, 25); - this.buttonOK.TabIndex = 0; - this.buttonOK.Text = "Sure!"; - this.buttonOK.UseVisualStyleBackColor = true; - // - // dataGridViewVars - // - this.dataGridViewVars.AllowUserToAddRows = false; - this.dataGridViewVars.AllowUserToDeleteRows = false; - this.dataGridViewVars.AutoGenerateColumns = false; - this.dataGridViewVars.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewVars.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.varNameDataGridViewTextBoxColumn, - this.metaDateColumn, - this.sizeColumn, - this.scenesDataGridViewTextBoxColumn, - this.looksDataGridViewTextBoxColumn, - this.clothingDataGridViewTextBoxColumn, - this.hairstyleDataGridViewTextBoxColumn, - this.pluginsDataGridViewTextBoxColumn, - this.assetsDataGridViewTextBoxColumn}); - this.dataGridViewVars.DataMember = "varsView"; - this.dataGridViewVars.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewVars.Location = new System.Drawing.Point(2, 2); - this.dataGridViewVars.Margin = new System.Windows.Forms.Padding(2); - this.dataGridViewVars.Name = "dataGridViewVars"; - this.dataGridViewVars.ReadOnly = true; - this.dataGridViewVars.RowHeadersWidth = 40; - this.dataGridViewVars.RowTemplate.Height = 27; - this.dataGridViewVars.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridViewVars.Size = new System.Drawing.Size(588, 240); - this.dataGridViewVars.TabIndex = 1; - this.dataGridViewVars.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dataGridViewVars_DataError); - this.dataGridViewVars.SelectionChanged += new System.EventHandler(this.dataGridViewVars_SelectionChanged); - // - // varNameDataGridViewTextBoxColumn - // - this.varNameDataGridViewTextBoxColumn.DataPropertyName = "varName"; - this.varNameDataGridViewTextBoxColumn.HeaderText = "varName"; - this.varNameDataGridViewTextBoxColumn.MinimumWidth = 6; - this.varNameDataGridViewTextBoxColumn.Name = "varNameDataGridViewTextBoxColumn"; - this.varNameDataGridViewTextBoxColumn.ReadOnly = true; - this.varNameDataGridViewTextBoxColumn.Width = 125; - // - // metaDateColumn - // - this.metaDateColumn.DataPropertyName = "metaDate"; - this.metaDateColumn.HeaderText = "metaDate"; - this.metaDateColumn.MinimumWidth = 6; - this.metaDateColumn.Name = "metaDateColumn"; - this.metaDateColumn.ReadOnly = true; - this.metaDateColumn.Width = 80; - // - // sizeColumn - // - this.sizeColumn.DataPropertyName = "size"; - dataGridViewCellStyle2.Format = "N2"; - dataGridViewCellStyle2.NullValue = null; - this.sizeColumn.DefaultCellStyle = dataGridViewCellStyle2; - this.sizeColumn.HeaderText = "fsize(MB)"; - this.sizeColumn.MinimumWidth = 6; - this.sizeColumn.Name = "sizeColumn"; - this.sizeColumn.ReadOnly = true; - this.sizeColumn.Width = 80; - // - // scenesDataGridViewTextBoxColumn - // - this.scenesDataGridViewTextBoxColumn.DataPropertyName = "scenes"; - this.scenesDataGridViewTextBoxColumn.HeaderText = "scenes"; - this.scenesDataGridViewTextBoxColumn.MinimumWidth = 6; - this.scenesDataGridViewTextBoxColumn.Name = "scenesDataGridViewTextBoxColumn"; - this.scenesDataGridViewTextBoxColumn.ReadOnly = true; - this.scenesDataGridViewTextBoxColumn.Width = 40; - // - // looksDataGridViewTextBoxColumn - // - this.looksDataGridViewTextBoxColumn.DataPropertyName = "looks"; - this.looksDataGridViewTextBoxColumn.HeaderText = "looks"; - this.looksDataGridViewTextBoxColumn.MinimumWidth = 6; - this.looksDataGridViewTextBoxColumn.Name = "looksDataGridViewTextBoxColumn"; - this.looksDataGridViewTextBoxColumn.ReadOnly = true; - this.looksDataGridViewTextBoxColumn.Width = 40; - // - // clothingDataGridViewTextBoxColumn - // - this.clothingDataGridViewTextBoxColumn.DataPropertyName = "clothing"; - this.clothingDataGridViewTextBoxColumn.HeaderText = "clothing"; - this.clothingDataGridViewTextBoxColumn.MinimumWidth = 6; - this.clothingDataGridViewTextBoxColumn.Name = "clothingDataGridViewTextBoxColumn"; - this.clothingDataGridViewTextBoxColumn.ReadOnly = true; - this.clothingDataGridViewTextBoxColumn.Width = 40; - // - // hairstyleDataGridViewTextBoxColumn - // - this.hairstyleDataGridViewTextBoxColumn.DataPropertyName = "hairstyle"; - this.hairstyleDataGridViewTextBoxColumn.HeaderText = "hairstyle"; - this.hairstyleDataGridViewTextBoxColumn.MinimumWidth = 6; - this.hairstyleDataGridViewTextBoxColumn.Name = "hairstyleDataGridViewTextBoxColumn"; - this.hairstyleDataGridViewTextBoxColumn.ReadOnly = true; - this.hairstyleDataGridViewTextBoxColumn.Width = 40; - // - // pluginsDataGridViewTextBoxColumn - // - this.pluginsDataGridViewTextBoxColumn.DataPropertyName = "plugins"; - this.pluginsDataGridViewTextBoxColumn.HeaderText = "plugins"; - this.pluginsDataGridViewTextBoxColumn.MinimumWidth = 6; - this.pluginsDataGridViewTextBoxColumn.Name = "pluginsDataGridViewTextBoxColumn"; - this.pluginsDataGridViewTextBoxColumn.ReadOnly = true; - this.pluginsDataGridViewTextBoxColumn.Width = 40; - // - // assetsDataGridViewTextBoxColumn - // - this.assetsDataGridViewTextBoxColumn.DataPropertyName = "assets"; - this.assetsDataGridViewTextBoxColumn.HeaderText = "assets"; - this.assetsDataGridViewTextBoxColumn.MinimumWidth = 6; - this.assetsDataGridViewTextBoxColumn.Name = "assetsDataGridViewTextBoxColumn"; - this.assetsDataGridViewTextBoxColumn.ReadOnly = true; - this.assetsDataGridViewTextBoxColumn.Width = 40; - // - // - // panel2 - // - this.panel2.Controls.Add(this.tableLayoutPanelPreview); - this.panel2.Controls.Add(this.listViewPreviewPics); - this.panel2.Controls.Add(this.toolStripPreview); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(594, 2); - this.panel2.Margin = new System.Windows.Forms.Padding(2); - this.panel2.Name = "panel2"; - this.tableLayoutPanel1.SetRowSpan(this.panel2, 2); - this.panel2.Size = new System.Drawing.Size(589, 484); - this.panel2.TabIndex = 2; - // - // tableLayoutPanelPreview - // - this.tableLayoutPanelPreview.ColumnCount = 1; - this.tableLayoutPanelPreview.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanelPreview.Controls.Add(this.pictureBoxPreview, 0, 0); - this.tableLayoutPanelPreview.Controls.Add(this.panel3, 0, 1); - this.tableLayoutPanelPreview.Location = new System.Drawing.Point(30, 184); - this.tableLayoutPanelPreview.Margin = new System.Windows.Forms.Padding(2); - this.tableLayoutPanelPreview.Name = "tableLayoutPanelPreview"; - this.tableLayoutPanelPreview.RowCount = 2; - this.tableLayoutPanelPreview.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanelPreview.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F)); - this.tableLayoutPanelPreview.Size = new System.Drawing.Size(336, 138); - this.tableLayoutPanelPreview.TabIndex = 5; - this.tableLayoutPanelPreview.Visible = false; - // - // pictureBoxPreview - // - this.pictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBoxPreview.Location = new System.Drawing.Point(2, 2); - this.pictureBoxPreview.Margin = new System.Windows.Forms.Padding(2); - this.pictureBoxPreview.Name = "pictureBoxPreview"; - this.pictureBoxPreview.Size = new System.Drawing.Size(332, 89); - this.pictureBoxPreview.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pictureBoxPreview.TabIndex = 1; - this.pictureBoxPreview.TabStop = false; - this.pictureBoxPreview.Click += new System.EventHandler(this.pictureBoxPreview_Click); - // - // panel3 - // - this.panel3.Controls.Add(this.labelPreviewVarName); - this.panel3.Controls.Add(this.label3); - this.panel3.Controls.Add(this.buttonpreviewback); - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(2, 95); - this.panel3.Margin = new System.Windows.Forms.Padding(2); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(332, 41); - this.panel3.TabIndex = 0; - // - // labelPreviewVarName - // - this.labelPreviewVarName.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.labelPreviewVarName.AutoSize = true; - this.labelPreviewVarName.Location = new System.Drawing.Point(81, 11); - this.labelPreviewVarName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.labelPreviewVarName.Name = "labelPreviewVarName"; - this.labelPreviewVarName.Size = new System.Drawing.Size(36, 17); - this.labelPreviewVarName.TabIndex = 2; - this.labelPreviewVarName.Text = "a.a.1"; - // - // label3 - // - this.label3.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 11); - this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(69, 17); - this.label3.TabIndex = 1; - this.label3.Text = "VarName:"; - // - // buttonpreviewback - // - this.buttonpreviewback.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.buttonpreviewback.Location = new System.Drawing.Point(243, 11); - this.buttonpreviewback.Margin = new System.Windows.Forms.Padding(2); - this.buttonpreviewback.Name = "buttonpreviewback"; - this.buttonpreviewback.Size = new System.Drawing.Size(74, 25); - this.buttonpreviewback.TabIndex = 0; - this.buttonpreviewback.Text = "return"; - this.buttonpreviewback.UseVisualStyleBackColor = true; - this.buttonpreviewback.Click += new System.EventHandler(this.buttonpreviewback_Click); - // - // listViewPreviewPics - // - this.listViewPreviewPics.Dock = System.Windows.Forms.DockStyle.Fill; - this.listViewPreviewPics.HideSelection = false; - this.listViewPreviewPics.LargeImageList = this.imageListPreviewPics; - this.listViewPreviewPics.Location = new System.Drawing.Point(0, 31); - this.listViewPreviewPics.Margin = new System.Windows.Forms.Padding(2); - this.listViewPreviewPics.MultiSelect = false; - this.listViewPreviewPics.Name = "listViewPreviewPics"; - this.listViewPreviewPics.Size = new System.Drawing.Size(589, 453); - this.listViewPreviewPics.SmallImageList = this.imageListPreviewPics; - this.listViewPreviewPics.TabIndex = 4; - this.listViewPreviewPics.UseCompatibleStateImageBehavior = false; - this.listViewPreviewPics.Click += new System.EventHandler(this.listViewPreviewPics_Click); - // - // imageListPreviewPics - // - this.imageListPreviewPics.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; - this.imageListPreviewPics.ImageSize = new System.Drawing.Size(128, 128); - this.imageListPreviewPics.TransparentColor = System.Drawing.Color.Transparent; - // - // toolStripPreview - // - this.toolStripPreview.ImageScalingSize = new System.Drawing.Size(20, 20); - this.toolStripPreview.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel1, - this.toolStripComboBoxPreviewType, - this.toolStripSeparator1, - this.toolStripButtonPreviewFirst, - this.toolStripButtonPreviewPrev, - this.toolStripComboBoxPreviewPage, - this.toolStripLabelPreviewCountItem, - this.toolStripButtonPreviewNext, - this.toolStripButtonPreviewLast}); - this.toolStripPreview.Location = new System.Drawing.Point(0, 0); - this.toolStripPreview.Name = "toolStripPreview"; - this.toolStripPreview.Size = new System.Drawing.Size(589, 31); - this.toolStripPreview.TabIndex = 3; - this.toolStripPreview.Text = "toolStrip1"; - // - // toolStripLabel1 - // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(106, 25); - this.toolStripLabel1.Text = "PreviewType:"; - // - // toolStripComboBoxPreviewType - // - this.toolStripComboBoxPreviewType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripComboBoxPreviewType.Items.AddRange(new object[] { - "_All", - "scenes", - "looks", - "clothing", - "hairstyle", - "assets"}); - this.toolStripComboBoxPreviewType.Name = "toolStripComboBoxPreviewType"; - this.toolStripComboBoxPreviewType.Size = new System.Drawing.Size(122, 28); - this.toolStripComboBoxPreviewType.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxPreviewType_SelectedIndexChanged); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 28); - // - // toolStripButtonPreviewFirst - // - this.toolStripButtonPreviewFirst.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonPreviewFirst.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonPreviewFirst.Name = "toolStripButtonPreviewFirst"; - this.toolStripButtonPreviewFirst.Size = new System.Drawing.Size(29, 25); - this.toolStripButtonPreviewFirst.Text = "|<"; - this.toolStripButtonPreviewFirst.Click += new System.EventHandler(this.toolStripButtonPreviewFirst_Click); - // - // toolStripButtonPreviewPrev - // - this.toolStripButtonPreviewPrev.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonPreviewPrev.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonPreviewPrev.Name = "toolStripButtonPreviewPrev"; - this.toolStripButtonPreviewPrev.Size = new System.Drawing.Size(29, 25); - this.toolStripButtonPreviewPrev.Text = "<"; - this.toolStripButtonPreviewPrev.Click += new System.EventHandler(this.toolStripButtonPreviewPrev_Click); - // - // toolStripComboBoxPreviewPage - // - this.toolStripComboBoxPreviewPage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.toolStripComboBoxPreviewPage.Name = "toolStripComboBoxPreviewPage"; - this.toolStripComboBoxPreviewPage.Size = new System.Drawing.Size(122, 28); - this.toolStripComboBoxPreviewPage.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxPreviewPage_SelectedIndexChanged); - // - // toolStripLabelPreviewCountItem - // - this.toolStripLabelPreviewCountItem.Name = "toolStripLabelPreviewCountItem"; - this.toolStripLabelPreviewCountItem.Size = new System.Drawing.Size(34, 25); - this.toolStripLabelPreviewCountItem.Text = "/{0}"; - // - // toolStripButtonPreviewNext - // - this.toolStripButtonPreviewNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonPreviewNext.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonPreviewNext.Name = "toolStripButtonPreviewNext"; - this.toolStripButtonPreviewNext.Size = new System.Drawing.Size(29, 25); - this.toolStripButtonPreviewNext.Text = ">"; - this.toolStripButtonPreviewNext.Click += new System.EventHandler(this.toolStripButtonPreviewNext_Click); - // - // toolStripButtonPreviewLast - // - this.toolStripButtonPreviewLast.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.toolStripButtonPreviewLast.ImageTransparentColor = System.Drawing.Color.Magenta; - this.toolStripButtonPreviewLast.Name = "toolStripButtonPreviewLast"; - this.toolStripButtonPreviewLast.Size = new System.Drawing.Size(29, 25); - this.toolStripButtonPreviewLast.Text = ">|"; - this.toolStripButtonPreviewLast.Click += new System.EventHandler(this.toolStripButtonPreviewLast_Click); - // - // dataGridView1 - // - this.dataGridView1.AllowUserToAddRows = false; - this.dataGridView1.AllowUserToDeleteRows = false; - this.dataGridView1.AutoGenerateColumns = false; - this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.iDDataGridViewTextBoxColumn, - this.varNameDataGridViewTextBoxColumn1, - this.dependencyDataGridViewTextBoxColumn}); - this.dataGridView1.DataSource = this.dependenciesBindingSource; - this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridView1.Location = new System.Drawing.Point(2, 246); - this.dataGridView1.Margin = new System.Windows.Forms.Padding(2); - this.dataGridView1.MultiSelect = false; - this.dataGridView1.Name = "dataGridView1"; - this.dataGridView1.ReadOnly = true; - this.dataGridView1.RowHeadersWidth = 40; - this.dataGridView1.RowTemplate.Height = 27; - this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView1.Size = new System.Drawing.Size(588, 240); - this.dataGridView1.TabIndex = 1; - // - // iDDataGridViewTextBoxColumn - // - this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID"; - this.iDDataGridViewTextBoxColumn.HeaderText = "ID"; - this.iDDataGridViewTextBoxColumn.MinimumWidth = 6; - this.iDDataGridViewTextBoxColumn.Name = "iDDataGridViewTextBoxColumn"; - this.iDDataGridViewTextBoxColumn.ReadOnly = true; - this.iDDataGridViewTextBoxColumn.Visible = false; - this.iDDataGridViewTextBoxColumn.Width = 125; - // - // varNameDataGridViewTextBoxColumn1 - // - this.varNameDataGridViewTextBoxColumn1.DataPropertyName = "VarName"; - this.varNameDataGridViewTextBoxColumn1.HeaderText = "varName"; - this.varNameDataGridViewTextBoxColumn1.MinimumWidth = 6; - this.varNameDataGridViewTextBoxColumn1.Name = "varNameDataGridViewTextBoxColumn1"; - this.varNameDataGridViewTextBoxColumn1.ReadOnly = true; - this.varNameDataGridViewTextBoxColumn1.Width = 125; - // - // dependencyDataGridViewTextBoxColumn - // - this.dependencyDataGridViewTextBoxColumn.DataPropertyName = "DependencyName"; - this.dependencyDataGridViewTextBoxColumn.HeaderText = "dependency"; - this.dependencyDataGridViewTextBoxColumn.MinimumWidth = 6; - this.dependencyDataGridViewTextBoxColumn.Name = "dependencyDataGridViewTextBoxColumn"; - this.dependencyDataGridViewTextBoxColumn.ReadOnly = true; - this.dependencyDataGridViewTextBoxColumn.Width = 150; - // - // dependenciesBindingSource - // - this.dependenciesBindingSource.DataMember = "dependencies"; - // - // - // backgroundWorkerPreview - // - this.backgroundWorkerPreview.WorkerSupportsCancellation = true; - this.backgroundWorkerPreview.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerPreview_DoWork); - // - // FormUninstallVars - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(1185, 546); - this.ControlBox = false; - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "FormUninstallVars"; - this.Text = "Uninstall"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.FormUninstallVars_Load); - this.tableLayoutPanel1.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewVars)).EndInit(); - // DataSet EndInit removed - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.tableLayoutPanelPreview.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxPreview)).EndInit(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.toolStripPreview.ResumeLayout(false); - this.toolStripPreview.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dependenciesBindingSource)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.DataGridView dataGridViewVars; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label labelWarning; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.ToolStrip toolStripPreview; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; - private System.Windows.Forms.ToolStripComboBox toolStripComboBoxPreviewType; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ListView listViewPreviewPics; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanelPreview; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Label labelPreviewVarName; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button buttonpreviewback; - private System.Windows.Forms.PictureBox pictureBoxPreview; - private System.Windows.Forms.ImageList imageListPreviewPics; - private System.Windows.Forms.DataGridView dataGridView1; - private System.Windows.Forms.BindingSource dependenciesBindingSource; - private System.Windows.Forms.DataGridViewTextBoxColumn iDDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn varNameDataGridViewTextBoxColumn1; - private System.Windows.Forms.DataGridViewTextBoxColumn dependencyDataGridViewTextBoxColumn; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewFirst; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewPrev; - private System.Windows.Forms.ToolStripComboBox toolStripComboBoxPreviewPage; - private System.Windows.Forms.ToolStripLabel toolStripLabelPreviewCountItem; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewNext; - private System.Windows.Forms.ToolStripButton toolStripButtonPreviewLast; - private System.ComponentModel.BackgroundWorker backgroundWorkerPreview; - private System.Windows.Forms.DataGridViewTextBoxColumn varNameDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn metaDateColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn sizeColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn scenesDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn looksDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn clothingDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn hairstyleDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn pluginsDataGridViewTextBoxColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn assetsDataGridViewTextBoxColumn; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormUninstallVars.cs b/_archived/varManager/FormUninstallVars.cs deleted file mode 100644 index c6d3c83..0000000 --- a/_archived/varManager/FormUninstallVars.cs +++ /dev/null @@ -1,297 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Threading; -using System.Windows.Forms; -using varManager.Properties; -using varManager.Data; -using varManager.Models; - -namespace varManager -{ - public partial class FormUninstallVars : Form - { - public string operationType; - public string previewpicsDirName; - public string deleVarsDirName; - private VarManagerContext dbContext; - public List VarsToUninstall { get; set; } = new List(); - - public FormUninstallVars() - { - InitializeComponent(); - dbContext = new VarManagerContext(); - } - - private void FormUninstallVars_Load(object sender, EventArgs e) - { - // Load data using EF Core instead of TableAdapter - switch (operationType) - { - case "delete": - this.Text = "Delete Vars"; - labelWarning.Text = $"Warning: The above VAR list will be Move to {deleVarsDirName} !"; - break; - } - - // Load vars to uninstall into the grid - if (VarsToUninstall != null && VarsToUninstall.Count > 0) - { - // Remove duplicates from the list first - var uniqueVars = VarsToUninstall.Distinct().ToList(); - - var varsData = uniqueVars.Select(varName => - dbContext.VarsView.FirstOrDefault(v => v.VarName == varName) - ).Where(v => v != null).ToList(); - - dataGridViewVars.DataSource = varsData; - } - - // Hide ID and VarName columns in dependencies grid to avoid confusion - if (dataGridView1.Columns.Contains("iDDataGridViewTextBoxColumn")) - { - dataGridView1.Columns["iDDataGridViewTextBoxColumn"].Visible = false; - } - if (dataGridView1.Columns.Contains("varNameDataGridViewTextBoxColumn1")) - { - dataGridView1.Columns["varNameDataGridViewTextBoxColumn1"].Visible = false; - } - - toolStripComboBoxPreviewType.SelectedIndex = 0; - } - - - private void dataGridViewVars_SelectionChanged(object sender, EventArgs e) - { - // Get selected var names for dependency filtering - List selectedVarNames = new List(); - foreach (DataGridViewRow row in dataGridViewVars.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - selectedVarNames.Add(varName); - } - - // Update dependencies display using EF Core - var dependencies = dbContext.Dependencies.Where(d => selectedVarNames.Contains(d.VarName)).ToList(); - dependenciesBindingSource.DataSource = dependencies; - - UpdatePreviewPics(); - tableLayoutPanelPreview.Visible = false; - } - public struct Previewpic - { - public Previewpic(string varname, string pretype, string picpath) - { - Varname = varname; - Pretype = pretype; - Picpath = picpath; - } - public string Varname { get; } - public string Pretype { get; } - public string Picpath { get; } - } - - private List previewpics = new List(); - - private List previewpicsfilter = new List(); - private void UpdatePreviewPics() - { - previewpics.Clear(); - foreach (DataGridViewRow row in dataGridViewVars.SelectedRows) - { - string varName = row.Cells["varNameDataGridViewTextBoxColumn"].Value.ToString(); - string[] typenames = new string[5] { "scenes", "looks", "clothing", "hairstyle", "assets" }; - foreach (string typename in typenames) - { - string typepath = Path.Combine(Settings.Default.varspath, previewpicsDirName, typename, varName); - if (Directory.Exists(typepath)) - { - foreach (string jpgfile in Directory.GetFiles(typepath, "*.jpg", SearchOption.AllDirectories)) - { - previewpics.Add(new Previewpic(varName, typename, jpgfile)); - } - } - } - } - PreviewInitType(); - } - private static int maxpicxPerpage = 100; - private int previewPages = 0, previewCurPage = -1; - private System.Threading.Mutex mut = new Mutex(); - private void PreviewInitType() - { - /* - previewpicsfilter = previewpics; - string previewtype = "all"; - if (new string[5] { "scenes", "looks", "clothing", "hairstyle", "assets" }.Contains(toolStripComboBoxPreviewType.Text)) - previewtype = toolStripComboBoxPreviewType.Text; - - if (previewtype != "all") - previewpicsfilter = previewpics.Where(q => q.Pretype == previewtype).ToList(); - - imageListPreviewPics.Images.Clear(); - listViewPreviewPics.Items.Clear(); - for (int i = 0; i < previewpicsfilter.Count; i++) - { - imageListPreviewPics.Images.Add(Image.FromFile(previewpicsfilter[i].Picpath)); - var item = listViewPreviewPics.Items.Add(Path.GetFileNameWithoutExtension(previewpicsfilter[i].Picpath), imageListPreviewPics.Images.Count - 1); - item.SubItems.Add(previewpicsfilter[i].Varname); - item.SubItems.Add(previewpicsfilter[i].Picpath); - }*/ - mut.WaitOne(); - previewpicsfilter = previewpics; - string previewtype = "all"; - if (new string[5] { "scenes", "looks", "clothing", "hairstyle", "assets" }.Contains(toolStripComboBoxPreviewType.Text)) - previewtype = toolStripComboBoxPreviewType.Text; - if (previewtype != "all") - previewpicsfilter = previewpics.Where(q => q.Pretype == previewtype).ToList(); - mut.ReleaseMutex(); - toolStripComboBoxPreviewPage.SelectedIndexChanged -= new System.EventHandler(this.toolStripComboBoxPreviewPage_SelectedIndexChanged); toolStripComboBoxPreviewPage.Items.Clear(); - previewPages = (previewpicsfilter.Count + maxpicxPerpage - 1) / maxpicxPerpage; - toolStripLabelPreviewCountItem.Text = "/" + previewpicsfilter.Count.ToString(); - toolStripComboBoxPreviewPage.Items.Clear(); - if (previewPages >= 1) - { - for (int page = 0; page < previewPages; page++) - { - int min = page * maxpicxPerpage + 1; - int max = (page + 1) * maxpicxPerpage; - if (max > previewpicsfilter.Count) max = previewpicsfilter.Count; - - string strpage = min.ToString("000") + " - " + max.ToString("000"); - toolStripComboBoxPreviewPage.Items.Add(strpage); - } - toolStripComboBoxPreviewPage.SelectedIndex = 0; - //PreviewPage(); - } - else - { - imageListPreviewPics.Images.Clear(); - listViewPreviewPics.Items.Clear(); - } - toolStripComboBoxPreviewPage.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBoxPreviewPage_SelectedIndexChanged); - if (previewPages >= 1) - PreviewPage(); - } - private void PreviewPage() - { - previewCurPage = toolStripComboBoxPreviewPage.SelectedIndex; - while (backgroundWorkerPreview.IsBusy) - { - backgroundWorkerPreview.CancelAsync(); - // Keep UI messages moving, so the form remains - // responsive during the asynchronous operation. - Application.DoEvents(); - } - backgroundWorkerPreview.RunWorkerAsync(); - } - - private void toolStripComboBoxPreviewType_SelectedIndexChanged(object sender, EventArgs e) - { - PreviewInitType(); - } - - private void listViewPreviewPics_Click(object sender, EventArgs e) - { - if (listViewPreviewPics.SelectedIndices.Count >= 1) - { - int index = listViewPreviewPics.SelectedIndices[0]; - var item = listViewPreviewPics.Items[index]; - if (item != null) - { - labelPreviewVarName.Text = item.SubItems[1].Text; - pictureBoxPreview.Image = Image.FromFile(item.SubItems[2].Text); - - tableLayoutPanelPreview.Dock = DockStyle.Fill; - tableLayoutPanelPreview.Visible = true; - } - } - } - - private void pictureBoxPreview_Click(object sender, EventArgs e) - { - tableLayoutPanelPreview.Visible = false; - } - - private void buttonpreviewback_Click(object sender, EventArgs e) - { - tableLayoutPanelPreview.Visible = false; - } - public delegate void InvokePreviewPics(string varname, string picpath); - public void PreviewPics(string varname, string picpath) - { - if (varname == "clear") - { - imageListPreviewPics.Images.Clear(); - listViewPreviewPics.Items.Clear(); - } - else - { - imageListPreviewPics.Images.Add(Image.FromFile(picpath)); - var item = listViewPreviewPics.Items.Add(Path.GetFileNameWithoutExtension(picpath), imageListPreviewPics.Images.Count - 1); - item.SubItems.Add(varname); - item.SubItems.Add(picpath); - } - } - private void backgroundWorkerPreview_DoWork(object sender, DoWorkEventArgs e) - { - InvokePreviewPics previewpics = new InvokePreviewPics(PreviewPics); - int startpic = maxpicxPerpage * previewCurPage; - listViewPreviewPics.BeginInvoke(previewpics, new Object[] { "clear", "" }); - for (int i = 0; i < maxpicxPerpage; i++) - { - Thread.Sleep(5); - if (backgroundWorkerPreview.CancellationPending) - { - //Tell the Backgroundworker you are canceling and exit the for-loop - e.Cancel = true; - return; - } - mut.WaitOne(); - if (previewpicsfilter.Count > startpic + i) - { - this.BeginInvoke(previewpics, new Object[] { previewpicsfilter[startpic + i].Varname, - previewpicsfilter[startpic + i].Picpath }); - - } - mut.ReleaseMutex(); - } - } - - private void toolStripComboBoxPreviewPage_SelectedIndexChanged(object sender, EventArgs e) - { - PreviewPage(); - } - - private void toolStripButtonPreviewFirst_Click(object sender, EventArgs e) - { - if (toolStripComboBoxPreviewPage.SelectedIndex > 0) toolStripComboBoxPreviewPage.SelectedIndex = 0; - } - - private void toolStripButtonPreviewPrev_Click(object sender, EventArgs e) - { - if (toolStripComboBoxPreviewPage.SelectedIndex > 0) toolStripComboBoxPreviewPage.SelectedIndex--; - } - - private void toolStripButtonPreviewNext_Click(object sender, EventArgs e) - { - if (toolStripComboBoxPreviewPage.SelectedIndex < toolStripComboBoxPreviewPage.Items.Count - 1) toolStripComboBoxPreviewPage.SelectedIndex++; - } - - private void dataGridViewVars_DataError(object sender, DataGridViewDataErrorEventArgs e) - { - ; - //e.Exception.Message - } - - private void toolStripButtonPreviewLast_Click(object sender, EventArgs e) - { - if (toolStripComboBoxPreviewPage.SelectedIndex < toolStripComboBoxPreviewPage.Items.Count - 1) toolStripComboBoxPreviewPage.SelectedIndex = toolStripComboBoxPreviewPage.Items.Count - 1; - - } - } -} diff --git a/_archived/varManager/FormUninstallVars.resx b/_archived/varManager/FormUninstallVars.resx deleted file mode 100644 index e03ff20..0000000 --- a/_archived/varManager/FormUninstallVars.resx +++ /dev/null @@ -1,150 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - 398, 17 - - - 220, 17 - - - 611, 17 - - - True - - - True - - - 611, 17 - - - 495, 59 - - - 125 - - \ No newline at end of file diff --git a/_archived/varManager/FormVarDetail.Designer.cs b/_archived/varManager/FormVarDetail.Designer.cs deleted file mode 100644 index 4501fde..0000000 --- a/_archived/varManager/FormVarDetail.Designer.cs +++ /dev/null @@ -1,294 +0,0 @@ -锘縩amespace varManager -{ - partial class FormVarDetail - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.label1 = new System.Windows.Forms.Label(); - this.textBoxVarName = new System.Windows.Forms.TextBox(); - this.buttonLocate = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.dataGridViewDependency = new System.Windows.Forms.DataGridView(); - this.ColumnAction1 = new System.Windows.Forms.DataGridViewButtonColumn(); - this.ColumnDependName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.dataGridViewDependentVar = new System.Windows.Forms.DataGridView(); - this.ColumnAction2 = new System.Windows.Forms.DataGridViewButtonColumn(); - this.ColumnDependentVar = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.dataGridViewDependentSaved = new System.Windows.Forms.DataGridView(); - this.ColumnAction3 = new System.Windows.Forms.DataGridViewButtonColumn(); - this.ColumnDependentSaved = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.buttonFilter = new System.Windows.Forms.Button(); - this.buttonOK = new System.Windows.Forms.Button(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependency)).BeginInit(); - this.groupBox2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependentVar)).BeginInit(); - this.groupBox3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependentSaved)).BeginInit(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 23); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(69, 17); - this.label1.TabIndex = 3; - this.label1.Text = "VarName:"; - // - // textBoxVarName - // - this.textBoxVarName.Location = new System.Drawing.Point(90, 17); - this.textBoxVarName.Name = "textBoxVarName"; - this.textBoxVarName.ReadOnly = true; - this.textBoxVarName.Size = new System.Drawing.Size(315, 25); - this.textBoxVarName.TabIndex = 4; - // - // buttonLocate - // - this.buttonLocate.Location = new System.Drawing.Point(434, 5); - this.buttonLocate.Name = "buttonLocate"; - this.buttonLocate.Size = new System.Drawing.Size(84, 52); - this.buttonLocate.TabIndex = 5; - this.buttonLocate.Text = "Locate"; - this.buttonLocate.UseVisualStyleBackColor = true; - this.buttonLocate.Click += new System.EventHandler(this.buttonLocate_Click); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.dataGridViewDependency); - this.groupBox1.Location = new System.Drawing.Point(16, 63); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(321, 526); - this.groupBox1.TabIndex = 6; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Dependency Vars"; - // - // dataGridViewDependency - // - this.dataGridViewDependency.AllowUserToAddRows = false; - this.dataGridViewDependency.AllowUserToDeleteRows = false; - this.dataGridViewDependency.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewDependency.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ColumnAction1, - this.ColumnDependName}); - this.dataGridViewDependency.Location = new System.Drawing.Point(6, 27); - this.dataGridViewDependency.Name = "dataGridViewDependency"; - this.dataGridViewDependency.ReadOnly = true; - this.dataGridViewDependency.RowHeadersWidth = 10; - this.dataGridViewDependency.RowTemplate.Height = 27; - this.dataGridViewDependency.Size = new System.Drawing.Size(309, 492); - this.dataGridViewDependency.TabIndex = 0; - this.toolTip1.SetToolTip(this.dataGridViewDependency, "Yellow:Missing but an another version exists\r\nRed:Missing"); - this.dataGridViewDependency.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewDependency_CellContentClick); - // - // ColumnAction1 - // - this.ColumnAction1.HeaderText = "Action"; - this.ColumnAction1.MinimumWidth = 6; - this.ColumnAction1.Name = "ColumnAction1"; - this.ColumnAction1.ReadOnly = true; - this.ColumnAction1.Text = "Locate"; - this.ColumnAction1.Width = 60; - // - // ColumnDependName - // - this.ColumnDependName.HeaderText = "DependName"; - this.ColumnDependName.MinimumWidth = 6; - this.ColumnDependName.Name = "ColumnDependName"; - this.ColumnDependName.ReadOnly = true; - this.ColumnDependName.Width = 230; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.dataGridViewDependentVar); - this.groupBox2.Location = new System.Drawing.Point(354, 63); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(321, 526); - this.groupBox2.TabIndex = 6; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Dependent Vars"; - // - // dataGridViewDependentVar - // - this.dataGridViewDependentVar.AllowUserToAddRows = false; - this.dataGridViewDependentVar.AllowUserToDeleteRows = false; - this.dataGridViewDependentVar.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewDependentVar.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ColumnAction2, - this.ColumnDependentVar}); - this.dataGridViewDependentVar.Location = new System.Drawing.Point(6, 27); - this.dataGridViewDependentVar.Name = "dataGridViewDependentVar"; - this.dataGridViewDependentVar.ReadOnly = true; - this.dataGridViewDependentVar.RowHeadersWidth = 10; - this.dataGridViewDependentVar.RowTemplate.Height = 27; - this.dataGridViewDependentVar.Size = new System.Drawing.Size(309, 492); - this.dataGridViewDependentVar.TabIndex = 1; - this.toolTip1.SetToolTip(this.dataGridViewDependentVar, "Green:Installed"); - this.dataGridViewDependentVar.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewDependentVar_CellContentClick); - // - // ColumnAction2 - // - this.ColumnAction2.HeaderText = "Action"; - this.ColumnAction2.MinimumWidth = 6; - this.ColumnAction2.Name = "ColumnAction2"; - this.ColumnAction2.ReadOnly = true; - this.ColumnAction2.Text = "Locate"; - this.ColumnAction2.Width = 60; - // - // ColumnDependentVar - // - this.ColumnDependentVar.HeaderText = "DependentVar"; - this.ColumnDependentVar.MinimumWidth = 6; - this.ColumnDependentVar.Name = "ColumnDependentVar"; - this.ColumnDependentVar.ReadOnly = true; - this.ColumnDependentVar.Width = 230; - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.dataGridViewDependentSaved); - this.groupBox3.Location = new System.Drawing.Point(693, 63); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(321, 526); - this.groupBox3.TabIndex = 6; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Dependent saved Json&&vap"; - // - // dataGridViewDependentSaved - // - this.dataGridViewDependentSaved.AllowUserToAddRows = false; - this.dataGridViewDependentSaved.AllowUserToDeleteRows = false; - this.dataGridViewDependentSaved.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewDependentSaved.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.ColumnAction3, - this.ColumnDependentSaved}); - this.dataGridViewDependentSaved.Location = new System.Drawing.Point(6, 27); - this.dataGridViewDependentSaved.Name = "dataGridViewDependentSaved"; - this.dataGridViewDependentSaved.ReadOnly = true; - this.dataGridViewDependentSaved.RowHeadersWidth = 10; - this.dataGridViewDependentSaved.RowTemplate.Height = 27; - this.dataGridViewDependentSaved.Size = new System.Drawing.Size(309, 492); - this.dataGridViewDependentSaved.TabIndex = 2; - this.toolTip1.SetToolTip(this.dataGridViewDependentSaved, "Json&vap under Save&Custom folder"); - this.dataGridViewDependentSaved.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewDependentSaved_CellContentClick); - // - // ColumnAction3 - // - this.ColumnAction3.HeaderText = "Action"; - this.ColumnAction3.MinimumWidth = 6; - this.ColumnAction3.Name = "ColumnAction3"; - this.ColumnAction3.ReadOnly = true; - this.ColumnAction3.Text = "Locate"; - this.ColumnAction3.Width = 60; - // - // ColumnDependentSaved - // - this.ColumnDependentSaved.HeaderText = "Dependent saved"; - this.ColumnDependentSaved.MinimumWidth = 6; - this.ColumnDependentSaved.Name = "ColumnDependentSaved"; - this.ColumnDependentSaved.ReadOnly = true; - this.ColumnDependentSaved.Width = 230; - // - // buttonFilter - // - this.buttonFilter.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonFilter.Location = new System.Drawing.Point(528, 5); - this.buttonFilter.Name = "buttonFilter"; - this.buttonFilter.Size = new System.Drawing.Size(84, 52); - this.buttonFilter.TabIndex = 5; - this.buttonFilter.Text = "FilterBy Creator"; - this.buttonFilter.UseVisualStyleBackColor = true; - this.buttonFilter.Click += new System.EventHandler(this.buttonFilter_Click); - // - // buttonOK - // - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(920, 603); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(94, 41); - this.buttonOK.TabIndex = 7; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - // - // FormVarDetail - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1026, 657); - this.ControlBox = false; - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.groupBox3); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.buttonFilter); - this.Controls.Add(this.buttonLocate); - this.Controls.Add(this.textBoxVarName); - this.Controls.Add(this.label1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Name = "FormVarDetail"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "FormVarDetail"; - this.Load += new System.EventHandler(this.FormVarDetail_Load); - this.groupBox1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependency)).EndInit(); - this.groupBox2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependentVar)).EndInit(); - this.groupBox3.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewDependentSaved)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBoxVarName; - private System.Windows.Forms.Button buttonLocate; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Button buttonFilter; - private System.Windows.Forms.DataGridView dataGridViewDependency; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.DataGridView dataGridViewDependentVar; - private System.Windows.Forms.DataGridView dataGridViewDependentSaved; - private System.Windows.Forms.DataGridViewButtonColumn ColumnAction1; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDependName; - private System.Windows.Forms.DataGridViewButtonColumn ColumnAction2; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDependentVar; - private System.Windows.Forms.DataGridViewButtonColumn ColumnAction3; - private System.Windows.Forms.DataGridViewTextBoxColumn ColumnDependentSaved; - private System.Windows.Forms.ToolTip toolTip1; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormVarDetail.cs b/_archived/varManager/FormVarDetail.cs deleted file mode 100644 index daa968e..0000000 --- a/_archived/varManager/FormVarDetail.cs +++ /dev/null @@ -1,201 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Threading; -using varManager.Backend; -using static SimpleLogger; -using varManager.Properties; - -namespace varManager -{ - public partial class FormVarDetail : Form - { - public string strVarName; - public Form1 form1; - public string strAction; - public Dictionary dependencies; - public List DependentVarList; - public List DependentJsonList; - private Size _layoutClientSize; - - private void LogBackendLine(string line) - { - if (form1 == null) - { - return; - } - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - form1.BeginInvoke(new Form1.InvokeAddLoglist(form1.UpdateAddLoglist), new object[] { line, level }); - } - - private BackendJobResult RunBackendJob(string kind, object? args) - { - return BackendSession.RunJob(kind, args, LogBackendLine, CancellationToken.None); - } - public FormVarDetail() - { - InitializeComponent(); - _layoutClientSize = ClientSize; - AutoScroll = true; - AutoScrollMinSize = _layoutClientSize; - } - - private void FormVarDetail_Load(object sender, EventArgs e) - { - textBoxVarName.Text = strVarName; - - foreach (var dep in dependencies) - { - if (dep.Value == "missing") - dataGridViewDependency.Rows.Add("search", dep.Key); - else - dataGridViewDependency.Rows.Add("locate", dep.Key); - } - foreach (DataGridViewRow deprow in dataGridViewDependency.Rows) - { - - string dependName = (string)deprow.Cells["ColumnDependName"].Value; - string dependVar = dependencies[dependName]; - if (dependVar == "missing") - { - deprow.DefaultCellStyle.BackColor = Color.Red; - } - else if (!dependName.ToLower().EndsWith("latest")) - { - if (dependName.ToLower() != dependVar.ToLower()) - deprow.DefaultCellStyle.BackColor = Color.Yellow; - } - - } - foreach (string dependentvar in DependentVarList) - { - dataGridViewDependentVar.Rows.Add("locate", dependentvar); - } - foreach (DataGridViewRow deprow in dataGridViewDependentVar.Rows) - { - - string dependentVar = (string)deprow.Cells["ColumnDependentVar"].Value; - - if (form1.IsVarInstalled(dependentVar)) - { - deprow.DefaultCellStyle.BackColor = Color.Green; - } - - } - foreach (string dependentsaved in DependentJsonList) - { - dataGridViewDependentSaved.Rows.Add("locate", dependentsaved); - } - - FitToWorkingArea(); - } - - private void FitToWorkingArea() - { - var workingArea = Screen.FromControl(this).WorkingArea; - var nonClientSize = new Size(Width - ClientSize.Width, Height - ClientSize.Height); - var maxClientWidth = workingArea.Width - nonClientSize.Width; - var maxClientHeight = workingArea.Height - nonClientSize.Height; - var targetClientWidth = Math.Min(_layoutClientSize.Width, maxClientWidth); - var targetClientHeight = Math.Min(_layoutClientSize.Height, maxClientHeight); - if (targetClientWidth < _layoutClientSize.Width || targetClientHeight < _layoutClientSize.Height) - { - ClientSize = new Size( - Math.Max(200, targetClientWidth), - Math.Max(200, targetClientHeight)); - } - - var bounds = Bounds; - var x = Math.Max(workingArea.Left, Math.Min(bounds.Left, workingArea.Right - bounds.Width)); - var y = Math.Max(workingArea.Top, Math.Min(bounds.Top, workingArea.Bottom - bounds.Height)); - Location = new Point(x, y); - } - - private void buttonLocate_Click(object sender, EventArgs e) - { - try - { - RunBackendJob("vars_locate", new { var_name = strVarName }); - } - catch (Exception ex) - { - MessageBox.Show($"Locate failed: {ex.Message}"); - } - } - - private void buttonFilter_Click(object sender, EventArgs e) - { - strAction = "filter"; - DialogResult = DialogResult.OK; - this.Close(); - } - - private void dataGridViewDependency_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (dataGridViewDependency.Columns[e.ColumnIndex].Name == "ColumnAction1" && e.RowIndex >= 0) - { - string dependName = dataGridViewDependency.Rows[e.RowIndex].Cells["ColumnDependName"].Value.ToString(); - string dependVar = dependencies[dependName]; - if (dependVar == "missing") - { - string varname = dependName.Replace(".latest", ".1"); - try - { - RunBackendJob("open_url", new { url = "https://www.google.com/search?q=" + varname + " var" }); - } - catch (Exception ex) - { - MessageBox.Show($"Open url failed: {ex.Message}"); - } - } - else - { - form1.SelectVarInList(dependVar); - form1.Activate(); - } - } - } - - private void dataGridViewDependentVar_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (dataGridViewDependentVar.Columns[e.ColumnIndex].Name == "ColumnAction2" && e.RowIndex >= 0) - { - string varName = dataGridViewDependentVar.Rows[e.RowIndex].Cells["ColumnDependentVar"].Value.ToString(); - - form1.SelectVarInList(varName); - form1.Activate(); - } - } - - private void dataGridViewDependentSaved_CellContentClick(object sender, DataGridViewCellEventArgs e) - { - if (dataGridViewDependentSaved.Columns[e.ColumnIndex].Name == "ColumnAction3" && e.RowIndex >= 0) - { - string saved = dataGridViewDependentSaved.Rows[e.RowIndex].Cells["ColumnDependentSaved"].Value.ToString(); - if(saved.StartsWith("\\")) - saved = saved.Substring(1); - - try - { - RunBackendJob("vars_locate", new { path = saved.Replace('/', '\\') }); - } - catch (Exception ex) - { - MessageBox.Show($"Locate failed: {ex.Message}"); - } - - } - } - } -} diff --git a/_archived/varManager/FormVarDetail.resx b/_archived/varManager/FormVarDetail.resx deleted file mode 100644 index 86e5b60..0000000 --- a/_archived/varManager/FormVarDetail.resx +++ /dev/null @@ -1,141 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - 17, 17 - - - True - - - True - - - True - - - True - - \ No newline at end of file diff --git a/_archived/varManager/FormVarsMove.Designer.cs b/_archived/varManager/FormVarsMove.Designer.cs deleted file mode 100644 index c234037..0000000 --- a/_archived/varManager/FormVarsMove.Designer.cs +++ /dev/null @@ -1,185 +0,0 @@ -锘 -namespace varManager -{ - partial class FormVarsMove - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.labelTided = new System.Windows.Forms.Label(); - this.textBoxMoveto = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.buttonCancle = new System.Windows.Forms.Button(); - this.buttonOK = new System.Windows.Forms.Button(); - this.listView1 = new System.Windows.Forms.ListView(); - this.flowLayoutPanel1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::varManager.Properties.Settings.Default, "vampath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.label1.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(3, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(100, 18); - this.label1.TabIndex = 3; - this.label1.Text = global::varManager.Properties.Settings.Default.vampath; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.AutoSize = true; - this.flowLayoutPanel1.Controls.Add(this.label1); - this.flowLayoutPanel1.Controls.Add(this.labelTided); - this.flowLayoutPanel1.Controls.Add(this.textBoxMoveto); - this.flowLayoutPanel1.Controls.Add(this.label3); - this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 397); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(824, 32); - this.flowLayoutPanel1.TabIndex = 1; - // - // labelTided - // - this.labelTided.AutoSize = true; - this.labelTided.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelTided.Location = new System.Drawing.Point(109, 0); - this.labelTided.Name = "labelTided"; - this.labelTided.Size = new System.Drawing.Size(209, 18); - this.labelTided.TabIndex = 2; - this.labelTided.Text = "\\AddonPackages\\___VarsLink__\\"; - // - // textBoxMoveto - // - this.textBoxMoveto.BackColor = System.Drawing.Color.Yellow; - this.textBoxMoveto.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxMoveto.Location = new System.Drawing.Point(324, 3); - this.textBoxMoveto.Name = "textBoxMoveto"; - this.textBoxMoveto.Size = new System.Drawing.Size(240, 26); - this.textBoxMoveto.TabIndex = 0; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Calibri", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(570, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(14, 18); - this.label3.TabIndex = 1; - this.label3.Text = "\\"; - // - // panel1 - // - this.panel1.Controls.Add(this.buttonCancle); - this.panel1.Controls.Add(this.buttonOK); - this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 429); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(824, 39); - this.panel1.TabIndex = 2; - // - // buttonCancle - // - this.buttonCancle.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancle.Location = new System.Drawing.Point(705, 8); - this.buttonCancle.Name = "buttonCancle"; - this.buttonCancle.Size = new System.Drawing.Size(75, 25); - this.buttonCancle.TabIndex = 1; - this.buttonCancle.Text = "Cancle"; - this.buttonCancle.UseVisualStyleBackColor = true; - // - // buttonOK - // - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(582, 8); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(75, 25); - this.buttonOK.TabIndex = 0; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // listView1 - // - this.listView1.BackColor = System.Drawing.SystemColors.ControlDark; - this.listView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.listView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.listView1.HideSelection = false; - this.listView1.Location = new System.Drawing.Point(0, 0); - this.listView1.MultiSelect = false; - this.listView1.Name = "listView1"; - this.listView1.Size = new System.Drawing.Size(824, 397); - this.listView1.TabIndex = 3; - this.listView1.TabStop = false; - this.listView1.UseCompatibleStateImageBehavior = false; - this.listView1.View = System.Windows.Forms.View.List; - // - // FormVarsMove - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancle; - this.ClientSize = new System.Drawing.Size(824, 468); - this.ControlBox = false; - this.Controls.Add(this.listView1); - this.Controls.Add(this.flowLayoutPanel1); - this.Controls.Add(this.panel1); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FormVarsMove"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Move selected Varlinks To ..."; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormVarsMove_FormClosing); - this.Load += new System.EventHandler(this.FormVarsMove_Load); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Label labelTided; - private System.Windows.Forms.TextBox textBoxMoveto; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button buttonCancle; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.ListView listView1; - } -} \ No newline at end of file diff --git a/_archived/varManager/FormVarsMove.cs b/_archived/varManager/FormVarsMove.cs deleted file mode 100644 index 3475816..0000000 --- a/_archived/varManager/FormVarsMove.cs +++ /dev/null @@ -1,44 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace varManager -{ - - public partial class FormVarsMove : Form - { - private string varlinkDirName; - private string movetoDirName; - private List varsToMove; - public FormVarsMove() - { - InitializeComponent(); - } - - public string VarlinkDirName { get => varlinkDirName; set => varlinkDirName = value; } - public string MovetoDirName { get => movetoDirName; set => movetoDirName = value; } - public List VarsToMove { get => varsToMove; set => varsToMove = value; } - - private void FormVarsMove_Load(object sender, EventArgs e) - { - labelTided.Text = "\\AddonPackages\\" + varlinkDirName + "\\"; - foreach (string var in varsToMove) - listView1.Items.Add(var); - } - - private void buttonOK_Click(object sender, EventArgs e) - { - if (string.IsNullOrWhiteSpace(textBoxMoveto.Text.Trim())) - this.DialogResult = DialogResult.None; - else - movetoDirName = textBoxMoveto.Text; - - } - - private void FormVarsMove_FormClosing(object sender, FormClosingEventArgs e) - { - if (this.DialogResult == DialogResult.None) - e.Cancel = true; - } - } -} diff --git a/_archived/varManager/FormVarsMove.resx b/_archived/varManager/FormVarsMove.resx deleted file mode 100644 index 1af7de1..0000000 --- a/_archived/varManager/FormVarsMove.resx +++ /dev/null @@ -1,120 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/_archived/varManager/HubItem.Designer.cs b/_archived/varManager/HubItem.Designer.cs deleted file mode 100644 index 975b0e9..0000000 --- a/_archived/varManager/HubItem.Designer.cs +++ /dev/null @@ -1,311 +0,0 @@ -锘縩amespace varManager -{ - partial class HubItem - { - /// - /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 娓呯悊鎵鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆 - /// - /// 濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓 true锛涘惁鍒欎负 false銆 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 缁勪欢璁捐鍣ㄧ敓鎴愮殑浠g爜 - - /// - /// 璁捐鍣ㄦ敮鎸佹墍闇鐨勬柟娉 - 涓嶈淇敼 - /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广 - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.buttonType = new System.Windows.Forms.Button(); - this.labelTitle = new System.Windows.Forms.Label(); - this.buttonUser = new System.Windows.Forms.Button(); - this.labelVersion = new System.Windows.Forms.Label(); - this.labelTagLine = new System.Windows.Forms.Label(); - this.labelRatingCount = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.labelDownloads = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.labelLastUpdated = new System.Windows.Forms.Label(); - this.picRating5 = new System.Windows.Forms.PictureBox(); - this.picRating4 = new System.Windows.Forms.PictureBox(); - this.picRating3 = new System.Windows.Forms.PictureBox(); - this.picRating2 = new System.Windows.Forms.PictureBox(); - this.picRating1 = new System.Windows.Forms.PictureBox(); - this.pictureBoxUser = new System.Windows.Forms.PictureBox(); - this.pictureBoxImage = new System.Windows.Forms.PictureBox(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.buttonInRepository = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.picRating5)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxUser)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxImage)).BeginInit(); - this.SuspendLayout(); - // - // buttonType - // - this.buttonType.Location = new System.Drawing.Point(0, 0); - this.buttonType.Name = "buttonType"; - this.buttonType.Size = new System.Drawing.Size(116, 26); - this.buttonType.TabIndex = 1; - this.buttonType.Text = "Free Scene"; - this.buttonType.UseVisualStyleBackColor = true; - this.buttonType.Click += new System.EventHandler(this.buttonType_Click); - // - // labelTitle - // - this.labelTitle.Font = new System.Drawing.Font("Cambria", 10.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelTitle.ForeColor = System.Drawing.SystemColors.MenuHighlight; - this.labelTitle.Location = new System.Drawing.Point(122, 4); - this.labelTitle.Name = "labelTitle"; - this.labelTitle.Size = new System.Drawing.Size(258, 21); - this.labelTitle.TabIndex = 2; - this.labelTitle.Text = "Title"; - // - // buttonUser - // - this.buttonUser.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.buttonUser.AutoSize = true; - this.buttonUser.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonUser.Location = new System.Drawing.Point(121, 178); - this.buttonUser.Name = "buttonUser"; - this.buttonUser.Size = new System.Drawing.Size(53, 24); - this.buttonUser.TabIndex = 1; - this.buttonUser.Text = "Feelfar"; - this.buttonUser.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.buttonUser.UseVisualStyleBackColor = true; - this.buttonUser.Click += new System.EventHandler(this.buttonUser_Click); - // - // labelVersion - // - this.labelVersion.ForeColor = System.Drawing.SystemColors.HighlightText; - this.labelVersion.Location = new System.Drawing.Point(180, 28); - this.labelVersion.Name = "labelVersion"; - this.labelVersion.Size = new System.Drawing.Size(181, 14); - this.labelVersion.TabIndex = 3; - this.labelVersion.Text = "Version"; - // - // labelTagLine - // - this.labelTagLine.ForeColor = System.Drawing.SystemColors.HighlightText; - this.labelTagLine.Location = new System.Drawing.Point(180, 51); - this.labelTagLine.Name = "labelTagLine"; - this.labelTagLine.Size = new System.Drawing.Size(181, 14); - this.labelTagLine.TabIndex = 3; - this.labelTagLine.Text = "Tag_line"; - // - // labelRatingCount - // - this.labelRatingCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelRatingCount.ForeColor = System.Drawing.SystemColors.HighlightText; - this.labelRatingCount.Location = new System.Drawing.Point(284, 76); - this.labelRatingCount.Name = "labelRatingCount"; - this.labelRatingCount.Size = new System.Drawing.Size(89, 17); - this.labelRatingCount.TabIndex = 3; - this.labelRatingCount.Text = "999 Ratings"; - this.labelRatingCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.ForeColor = System.Drawing.SystemColors.HighlightText; - this.label1.Location = new System.Drawing.Point(180, 103); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(70, 14); - this.label1.TabIndex = 3; - this.label1.Text = "DownLoads:"; - // - // labelDownloads - // - this.labelDownloads.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelDownloads.ForeColor = System.Drawing.SystemColors.HighlightText; - this.labelDownloads.Location = new System.Drawing.Point(285, 102); - this.labelDownloads.Name = "labelDownloads"; - this.labelDownloads.Size = new System.Drawing.Size(88, 17); - this.labelDownloads.TabIndex = 3; - this.labelDownloads.Text = "999999"; - this.labelDownloads.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.ForeColor = System.Drawing.SystemColors.HighlightText; - this.label3.Location = new System.Drawing.Point(180, 126); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(76, 14); - this.label3.TabIndex = 3; - this.label3.Text = "LastUpdated:"; - // - // labelLastUpdated - // - this.labelLastUpdated.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelLastUpdated.ForeColor = System.Drawing.SystemColors.HighlightText; - this.labelLastUpdated.Location = new System.Drawing.Point(285, 123); - this.labelLastUpdated.Name = "labelLastUpdated"; - this.labelLastUpdated.Size = new System.Drawing.Size(88, 17); - this.labelLastUpdated.TabIndex = 3; - this.labelLastUpdated.Text = "Jul 14,2021"; - this.labelLastUpdated.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // picRating5 - // - this.picRating5.Image = global::varManager.Properties.Resources.starEmpty; - this.picRating5.Location = new System.Drawing.Point(270, 74); - this.picRating5.Name = "picRating5"; - this.picRating5.Size = new System.Drawing.Size(20, 20); - this.picRating5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.picRating5.TabIndex = 8; - this.picRating5.TabStop = false; - // - // picRating4 - // - this.picRating4.Image = global::varManager.Properties.Resources.starOneQuarter; - this.picRating4.Location = new System.Drawing.Point(248, 74); - this.picRating4.Name = "picRating4"; - this.picRating4.Size = new System.Drawing.Size(20, 20); - this.picRating4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.picRating4.TabIndex = 8; - this.picRating4.TabStop = false; - // - // picRating3 - // - this.picRating3.Image = global::varManager.Properties.Resources.starHalf; - this.picRating3.Location = new System.Drawing.Point(226, 74); - this.picRating3.Name = "picRating3"; - this.picRating3.Size = new System.Drawing.Size(20, 20); - this.picRating3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.picRating3.TabIndex = 8; - this.picRating3.TabStop = false; - // - // picRating2 - // - this.picRating2.Image = global::varManager.Properties.Resources.starTriQuarter; - this.picRating2.Location = new System.Drawing.Point(205, 74); - this.picRating2.Name = "picRating2"; - this.picRating2.Size = new System.Drawing.Size(20, 20); - this.picRating2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.picRating2.TabIndex = 8; - this.picRating2.TabStop = false; - // - // picRating1 - // - this.picRating1.Image = global::varManager.Properties.Resources.starFull; - this.picRating1.Location = new System.Drawing.Point(183, 74); - this.picRating1.Name = "picRating1"; - this.picRating1.Size = new System.Drawing.Size(20, 20); - this.picRating1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.picRating1.TabIndex = 8; - this.picRating1.TabStop = false; - // - // pictureBoxUser - // - this.pictureBoxUser.Location = new System.Drawing.Point(173, 145); - this.pictureBoxUser.Name = "pictureBoxUser"; - this.pictureBoxUser.Size = new System.Drawing.Size(55, 56); - this.pictureBoxUser.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBoxUser.TabIndex = 7; - this.pictureBoxUser.TabStop = false; - this.pictureBoxUser.Click += new System.EventHandler(this.pictureBoxUser_Click); - // - // pictureBoxImage - // - this.pictureBoxImage.Location = new System.Drawing.Point(0, 28); - this.pictureBoxImage.Name = "pictureBoxImage"; - this.pictureBoxImage.Size = new System.Drawing.Size(174, 173); - this.pictureBoxImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBoxImage.TabIndex = 0; - this.pictureBoxImage.TabStop = false; - this.toolTip1.SetToolTip(this.pictureBoxImage, "Click to view details with browser"); - this.pictureBoxImage.Click += new System.EventHandler(this.pictureBoxImage_Click); - // - // buttonInRepository - // - this.buttonInRepository.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonInRepository.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.buttonInRepository.BackColor = System.Drawing.Color.MediumOrchid; - this.buttonInRepository.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.buttonInRepository.Location = new System.Drawing.Point(226, 177); - this.buttonInRepository.Name = "buttonInRepository"; - this.buttonInRepository.Size = new System.Drawing.Size(147, 26); - this.buttonInRepository.TabIndex = 1; - this.buttonInRepository.Text = "In Repository"; - this.buttonInRepository.UseVisualStyleBackColor = false; - this.buttonInRepository.Click += new System.EventHandler(this.buttonInRepository_Click); - // - // HubItem - // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); - this.Controls.Add(this.picRating5); - this.Controls.Add(this.picRating4); - this.Controls.Add(this.picRating3); - this.Controls.Add(this.picRating2); - this.Controls.Add(this.picRating1); - this.Controls.Add(this.pictureBoxUser); - this.Controls.Add(this.labelTagLine); - this.Controls.Add(this.labelRatingCount); - this.Controls.Add(this.labelLastUpdated); - this.Controls.Add(this.labelDownloads); - this.Controls.Add(this.label3); - this.Controls.Add(this.label1); - this.Controls.Add(this.labelVersion); - this.Controls.Add(this.labelTitle); - this.Controls.Add(this.buttonInRepository); - this.Controls.Add(this.buttonUser); - this.Controls.Add(this.buttonType); - this.Controls.Add(this.pictureBoxImage); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "HubItem"; - this.Size = new System.Drawing.Size(373, 202); - this.Load += new System.EventHandler(this.HubItem_Load); - ((System.ComponentModel.ISupportInitialize)(this.picRating5)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.picRating1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxUser)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoxImage)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.PictureBox pictureBoxImage; - private System.Windows.Forms.Button buttonType; - private System.Windows.Forms.Label labelTitle; - private System.Windows.Forms.Button buttonUser; - private System.Windows.Forms.Label labelVersion; - private System.Windows.Forms.Label labelTagLine; - private System.Windows.Forms.Label labelRatingCount; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label labelDownloads; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label labelLastUpdated; - private System.Windows.Forms.PictureBox pictureBoxUser; - private System.Windows.Forms.PictureBox picRating1; - private System.Windows.Forms.PictureBox picRating2; - private System.Windows.Forms.PictureBox picRating3; - private System.Windows.Forms.PictureBox picRating4; - private System.Windows.Forms.PictureBox picRating5; - private System.Windows.Forms.ToolTip toolTip1; - private System.Windows.Forms.Button buttonInRepository; - } -} diff --git a/_archived/varManager/HubItem.cs b/_archived/varManager/HubItem.cs deleted file mode 100644 index 75055e3..0000000 --- a/_archived/varManager/HubItem.cs +++ /dev/null @@ -1,420 +0,0 @@ -锘縰sing SimpleJSON; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Globalization; -using System.Linq; -using System.Net.Http; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading; -using varManager.Backend; - -namespace varManager -{ - - public partial class HubItem : UserControl - { - private JSONClass resource; - private string paytype, category, title, version, tagLine, imageUrl, creatorName, creatorIcon, resource_id,download_url,packageName; - private double ratingAvg; - private int ratingCount,downloads; - private DateTime lastUpdated; - private string inRepository = ""; - - public string InRepository { get => inRepository; set => inRepository = value; } - public string PackageName { get => packageName; set => packageName = value; } - public Action? LogSink { get; set; } - - private void LogBackendLine(string line) - { - LogSink?.Invoke(line); - } - - private void LogDebug(string message) - { - LogBackendLine($"debug: {message}"); - } - - private T? DeserializeResult(BackendJobResult result) - { - if (!result.Result.HasValue) - { - return default; - } - return JsonSerializer.Deserialize(result.Result.Value.GetRawText()); - } - - private int ParseInt(JSONClass json, string key, int defaultValue = 0) - { - string raw = json[key].Value; - if (string.IsNullOrWhiteSpace(raw) || raw.Equals("null", StringComparison.OrdinalIgnoreCase)) - { - LogDebug($"HubItem parse int empty key={key} resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - if (int.TryParse(raw, NumberStyles.Integer, CultureInfo.InvariantCulture, out int value)) - { - return value; - } - LogDebug($"HubItem parse int failed key={key} value='{raw}' resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - - private long ParseLong(JSONClass json, string key, long defaultValue = 0) - { - string raw = json[key].Value; - if (string.IsNullOrWhiteSpace(raw) || raw.Equals("null", StringComparison.OrdinalIgnoreCase)) - { - LogDebug($"HubItem parse long empty key={key} resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - if (long.TryParse(raw, NumberStyles.Integer, CultureInfo.InvariantCulture, out long value)) - { - return value; - } - LogDebug($"HubItem parse long failed key={key} value='{raw}' resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - - private double ParseDouble(JSONClass json, string key, double defaultValue = 0) - { - string raw = json[key].Value; - if (string.IsNullOrWhiteSpace(raw) || raw.Equals("null", StringComparison.OrdinalIgnoreCase)) - { - LogDebug($"HubItem parse double empty key={key} resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - if (double.TryParse(raw, NumberStyles.Float, CultureInfo.InvariantCulture, out double value)) - { - return value; - } - LogDebug($"HubItem parse double failed key={key} value='{raw}' resource_id='{resource_id}' title='{title}'"); - return defaultValue; - } - - private sealed class HubDownloadList - { - [JsonPropertyName("download_urls")] - public Dictionary DownloadUrls { get; set; } = new Dictionary(); - - [JsonPropertyName("download_urls_no_version")] - public Dictionary DownloadUrlsNoVersion { get; set; } = new Dictionary(); - } - - public HubItem() - { - InitializeComponent(); - } - - private void HubItem_Load(object sender, EventArgs e) - { - RefreshItem(); - } - private bool GetResourceDetail() - { - try - { - var result = BackendSession.RunJob("hub_resource_detail", new { resource_id = resource_id }, LogBackendLine, CancellationToken.None); - if (!result.Succeeded) - { - LogBackendLine($"error: hub_resource_detail job failed status={result.Job.Status} error={result.Job.Error ?? "unknown"}"); - } - var payload = DeserializeResult(result); - if (payload == null) - { - LogDebug($"hub_resource_detail result empty resource_id='{resource_id}'"); - return false; - } - LogDebug($"hub_resource_detail resource_id='{resource_id}' urls={payload.DownloadUrls.Count} urls_no_version={payload.DownloadUrlsNoVersion.Count}"); - Dictionary varDownloadUrl = new Dictionary(); - foreach (var kvp in payload.DownloadUrls) - { - if (!string.IsNullOrEmpty(kvp.Value)) - { - varDownloadUrl[kvp.Key] = kvp.Value; - } - } - foreach (var kvp in payload.DownloadUrlsNoVersion) - { - if (!string.IsNullOrEmpty(kvp.Value) && !varDownloadUrl.ContainsKey(kvp.Key)) - { - varDownloadUrl[kvp.Key] = kvp.Value; - } - } - RaiseGenLinkListFilterEvent(varDownloadUrl); - return true; - } - catch (Exception ex) - { - LogBackendLine($"error: GetResourceDetail failed: {ex.Message}"); - return false; - } - } - private static async Task GetResourceDetail(string resourceid) - { - string url = "https://hub.virtamate.com/citizenx/api.php"; - - JSONClass jns = new JSONClass(); - jns.Add("source", "VaM"); - jns.Add("action", "getResourceDetail"); - jns.Add("latest_image", "Y"); - jns.Add("resource_id", resourceid); - - var data = new StringContent(jns.ToString(), Encoding.UTF8, "application/json"); - return await GetResponse(url, data); - } - private static async Task GetResponse(string url, StringContent data) - { - //using (var client = new HttpClient()) - //{ - string strresponse = ""; - HttpClient httpClient = new HttpClient(); - httpClient.Timeout = TimeSpan.FromSeconds(60); - try - { - var response = await httpClient.PostAsync(url, data); - - strresponse = response.Content.ReadAsStringAsync().Result; - } - catch - { - - } - return strresponse; - //} - } - private void buttonInRepository_Click(object sender, EventArgs e) - { - if (buttonInRepository.Text.Contains("Generate Download List")|| buttonInRepository.Text.Contains("Upgrade to")) - { - GetResourceDetail(); - } - if (buttonInRepository.Text.Contains("In Repository")) - { - RaisePackageNameEvent(packageName); - } - if (buttonInRepository.Text.StartsWith("Go To ")) - { - if (!string.IsNullOrEmpty(download_url)) - { - try - { - BackendSession.RunJob("open_url", new { url = download_url }, LogBackendLine, CancellationToken.None); - } - catch (Exception ex) - { - MessageBox.Show($"Open url failed: {ex.Message}"); - } - } - } - } - void RaiseGenLinkListFilterEvent(Dictionary varDownloadUrl) - { - DownloadLinkListEventArgs newEventArgs = - new DownloadLinkListEventArgs(); - newEventArgs.DownloadLinks = varDownloadUrl; - if (GenLinkList != null) - GenLinkList(this, newEventArgs); - } - - public delegate void GenLinkListHandle(object sender, DownloadLinkListEventArgs e); - //Event name - public event GenLinkListHandle GenLinkList; - - public delegate void ClickFilterHandle(object sender, HubItemFilterEventArgs e); - //Event name - public event ClickFilterHandle ClickFilter; - - public delegate void RetPackageNameHandle(object sender, PackageNameEventArgs e); - //Event name - public event RetPackageNameHandle RetPackageName; - public void RefreshItem() - { - buttonType.Text = $"{paytype} {category}"; - labelTitle.Text = title; - labelVersion.Text = version; - labelTagLine.Text = tagLine; - PictureBox[] ratingCtls = { picRating1, picRating2, picRating3, picRating4, picRating5 }; - double rating = ratingAvg + 1; - foreach (PictureBox rctl in ratingCtls) - { - toolTip1.SetToolTip(rctl, $"{ratingAvg}/5"); - rating--; - if (rating < 0.125) - { - rctl.Image = global::varManager.Properties.Resources.starEmpty; - continue; - } - if (rating < 0.375) - { - rctl.Image = global::varManager.Properties.Resources.starOneQuarter; - continue; - } - if (rating < 0.625) - { - rctl.Image = global::varManager.Properties.Resources.starHalf; - continue; - } - if (rating < 0.875) - { - rctl.Image = global::varManager.Properties.Resources.starTriQuarter; - continue; - } - rctl.Image = global::varManager.Properties.Resources.starFull; - } - labelRatingCount.Text = $"{ratingCount} ratings"; - labelDownloads.Text = $"{downloads}"; - labelLastUpdated.Text = $"{lastUpdated.ToString("MMM d,yyyy", CultureInfo.CreateSpecificCulture("en-US"))}"; - try - { - if (!string.IsNullOrEmpty(imageUrl)) - pictureBoxImage.LoadAsync(imageUrl); - } - catch - { - - } - try - { - if (!string.IsNullOrEmpty(creatorIcon)) - pictureBoxUser.LoadAsync(creatorIcon); - } - catch - { - - } - buttonUser.Text = creatorName; - buttonInRepository.Text = inRepository; - switch (inRepository) - { - case "In Repository": - buttonInRepository.BackColor = Color.DarkCyan; - toolTip1.SetToolTip(buttonInRepository, "You already own this package, click to locate it in the main window"); - break; - case "Go To Download": - buttonInRepository.BackColor = Color.MediumOrchid; - toolTip1.SetToolTip(buttonInRepository, "Clicking will open the download page with your browser"); - break; - default: - buttonInRepository.BackColor = Color.SteelBlue; - if (buttonInRepository.Text.Contains("Generate Download List") || buttonInRepository.Text.Contains("Upgrade to")) - { - toolTip1.SetToolTip(buttonInRepository, "A list of downloads will be generated"); - } - break; - - - } - - } - - private void pictureBoxImage_Click(object sender, EventArgs e) - { - // Construct the URL to open based on the resource_id - string urlToOpen = $"https://hub.virtamate.com/resources/{resource_id}/"; - try - { - BackendSession.RunJob("open_url", new { url = urlToOpen }, LogBackendLine, CancellationToken.None); - } - catch (Exception ex) - { - MessageBox.Show( - $"An unexpected error occurred while trying to open the link: {ex.Message}\nLink: {urlToOpen}", - "Open Link Error", - MessageBoxButtons.OK, - MessageBoxIcon.Error - ); - } - } - - void RaiseClickFilterEvent(string filterType,string payType,string category,string creator) - { - HubItemFilterEventArgs newEventArgs = - new HubItemFilterEventArgs(); - newEventArgs.FilterType = filterType; - newEventArgs.PayType = payType; - newEventArgs.Category = category; - newEventArgs.Creator = creator; - if (ClickFilter!=null) - ClickFilter(this,newEventArgs); - } - - void RaisePackageNameEvent(string packageName) - { - PackageNameEventArgs newEventArgs = new PackageNameEventArgs(); - newEventArgs.PackageName = packageName; - if (RetPackageName != null) - RetPackageName(this, newEventArgs); - } - - private void buttonType_Click(object sender, EventArgs e) - { - RaiseClickFilterEvent("category", paytype, category, creatorName); - } - - private void buttonUser_Click(object sender, EventArgs e) - { - RaiseClickFilterEvent("creator", paytype, category, creatorName); - } - - private void pictureBoxUser_Click(object sender, EventArgs e) - { - RaiseClickFilterEvent("creator", paytype, category, creatorName); - } - - - public void SetResource(JSONClass json) - { - this.resource = json; - this.resource_id = resource["resource_id"].Value; - this.title = resource["title"].Value; - this.paytype = resource["category"].Value; - this.category = resource["type"].Value; - this.version = resource["version_string"].Value; - this.tagLine = resource["tag_line"].Value; - this.imageUrl = resource["image_url"].Value; - this.creatorIcon = resource["icon_url"].Value; - this.creatorName = resource["username"].Value; - this.download_url = resource["download_url"].Value; - this.ratingAvg = ParseDouble(resource, "rating_avg"); - this.ratingCount = ParseInt(resource, "rating_count"); - this.downloads = ParseInt(resource, "download_count"); - long unixTimeStamp = ParseLong(resource, "last_update"); - DateTime dt1 = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); - this.lastUpdated = dt1.AddSeconds(unixTimeStamp).ToLocalTime(); - } - } - public class HubItemFilterEventArgs : EventArgs - { - private string filterType,payType,category,creator; - public string FilterType { get => filterType; set => filterType = value; } - public string PayType { get => payType; set => payType = value; } - public string Category { get => category; set => category = value; } - public string Creator { get => creator; set => creator = value; } - } - public class DownloadLinkListEventArgs : EventArgs - { - private Dictionary downloadLinks; - - public Dictionary DownloadLinks { get => downloadLinks; set => downloadLinks = value; } - } - - public class GotoDownloadEventArgs : EventArgs - { - private string gotoDownload; - - public string GotoDownload { get => gotoDownload; set => gotoDownload = value; } - } - public class PackageNameEventArgs : EventArgs - { - private string packageName; - - public string PackageName { get => packageName; set => packageName = value; } - } -} diff --git a/_archived/varManager/HubItem.resx b/_archived/varManager/HubItem.resx deleted file mode 100644 index df8339b..0000000 --- a/_archived/varManager/HubItem.resx +++ /dev/null @@ -1,123 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/_archived/varManager/Migrations/20250807184700_Initial.Designer.cs b/_archived/varManager/Migrations/20250807184700_Initial.Designer.cs deleted file mode 100644 index a9bc946..0000000 --- a/_archived/varManager/Migrations/20250807184700_Initial.Designer.cs +++ /dev/null @@ -1,251 +0,0 @@ -锘// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using varManager.Data; - -#nullable disable - -namespace varManager.Migrations -{ - [DbContext(typeof(VarManagerContext))] - [Migration("20250807184700_Initial")] - partial class Initial - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.8"); - - modelBuilder.Entity("varManager.Models.Dependency", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DependencyName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("dependency"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("dependencies", (string)null); - }); - - modelBuilder.Entity("varManager.Models.HideFav", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Fav") - .HasColumnType("INTEGER") - .HasColumnName("fav"); - - b.Property("Hide") - .HasColumnType("INTEGER") - .HasColumnName("hide"); - - b.Property("ID") - .HasColumnType("INTEGER"); - - b.HasKey("VarName"); - - b.ToTable("HideFav", (string)null); - }); - - modelBuilder.Entity("varManager.Models.InstallStatus", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Disabled") - .HasColumnType("INTEGER") - .HasColumnName("disabled"); - - b.Property("Installed") - .HasColumnType("INTEGER") - .HasColumnName("installed"); - - b.HasKey("VarName"); - - b.ToTable("installStatus", (string)null); - }); - - modelBuilder.Entity("varManager.Models.SavedDependency", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DependencyName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("dependency"); - - b.Property("ModiDate") - .HasColumnType("TEXT"); - - b.Property("SavePath") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("savedepens", (string)null); - }); - - modelBuilder.Entity("varManager.Models.Scene", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AtomType") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("atomType"); - - b.Property("IsLoadable") - .HasColumnType("INTEGER") - .HasColumnName("isLoadable"); - - b.Property("IsPreset") - .HasColumnType("INTEGER") - .HasColumnName("isPreset"); - - b.Property("PreviewPic") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("previewPic"); - - b.Property("ScenePath") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("scenePath"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("scenes", (string)null); - }); - - modelBuilder.Entity("varManager.Models.Var", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Appearance") - .HasColumnType("INTEGER") - .HasColumnName("appearance"); - - b.Property("Asset") - .HasColumnType("INTEGER") - .HasColumnName("asset"); - - b.Property("Cloth") - .HasColumnType("INTEGER") - .HasColumnName("cloth"); - - b.Property("CreatorName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("creatorName"); - - b.Property("DependencyCnt") - .HasColumnType("INTEGER") - .HasColumnName("dependencyCnt"); - - b.Property("Description") - .HasColumnType("TEXT") - .HasColumnName("description"); - - b.Property("Hair") - .HasColumnType("INTEGER") - .HasColumnName("hair"); - - b.Property("Look") - .HasColumnType("INTEGER") - .HasColumnName("look"); - - b.Property("MetaDate") - .HasColumnType("TEXT") - .HasColumnName("metaDate"); - - b.Property("Morph") - .HasColumnType("INTEGER") - .HasColumnName("morph"); - - b.Property("PackageName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("packageName"); - - b.Property("Plugin") - .HasColumnType("INTEGER") - .HasColumnName("plugin"); - - b.Property("Pose") - .HasColumnType("INTEGER") - .HasColumnName("pose"); - - b.Property("Scene") - .HasColumnType("INTEGER") - .HasColumnName("scene"); - - b.Property("Script") - .HasColumnType("INTEGER") - .HasColumnName("script"); - - b.Property("Skin") - .HasColumnType("INTEGER") - .HasColumnName("skin"); - - b.Property("SubScene") - .HasColumnType("INTEGER") - .HasColumnName("subScene"); - - b.Property("Texture") - .HasColumnType("INTEGER") - .HasColumnName("texture"); - - b.Property("VarDate") - .HasColumnType("TEXT") - .HasColumnName("varDate"); - - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("TEXT") - .HasColumnName("version"); - - b.HasKey("VarName"); - - b.ToTable("vars", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/_archived/varManager/Migrations/20250807184700_Initial.cs b/_archived/varManager/Migrations/20250807184700_Initial.cs deleted file mode 100644 index dac16e7..0000000 --- a/_archived/varManager/Migrations/20250807184700_Initial.cs +++ /dev/null @@ -1,143 +0,0 @@ -锘縰sing System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace varManager.Migrations -{ - /// - public partial class Initial : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "dependencies", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - varName = table.Column(type: "TEXT", maxLength: 255, nullable: true), - dependency = table.Column(type: "TEXT", maxLength: 255, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_dependencies", x => x.ID); - }); - - migrationBuilder.CreateTable( - name: "HideFav", - columns: table => new - { - varName = table.Column(type: "TEXT", maxLength: 255, nullable: false), - ID = table.Column(type: "INTEGER", nullable: false), - hide = table.Column(type: "INTEGER", nullable: false), - fav = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_HideFav", x => x.varName); - }); - - migrationBuilder.CreateTable( - name: "installStatus", - columns: table => new - { - varName = table.Column(type: "TEXT", maxLength: 255, nullable: false), - installed = table.Column(type: "INTEGER", nullable: false), - disabled = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_installStatus", x => x.varName); - }); - - migrationBuilder.CreateTable( - name: "savedepens", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - varName = table.Column(type: "TEXT", maxLength: 255, nullable: true), - dependency = table.Column(type: "TEXT", maxLength: 255, nullable: true), - SavePath = table.Column(type: "TEXT", maxLength: 500, nullable: true), - ModiDate = table.Column(type: "TEXT", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_savedepens", x => x.ID); - }); - - migrationBuilder.CreateTable( - name: "scenes", - columns: table => new - { - ID = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - varName = table.Column(type: "TEXT", maxLength: 255, nullable: true), - atomType = table.Column(type: "TEXT", maxLength: 255, nullable: true), - previewPic = table.Column(type: "TEXT", maxLength: 255, nullable: true), - scenePath = table.Column(type: "TEXT", maxLength: 255, nullable: true), - isPreset = table.Column(type: "INTEGER", nullable: false), - isLoadable = table.Column(type: "INTEGER", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_scenes", x => x.ID); - }); - - migrationBuilder.CreateTable( - name: "vars", - columns: table => new - { - varName = table.Column(type: "TEXT", maxLength: 255, nullable: false), - creatorName = table.Column(type: "TEXT", maxLength: 255, nullable: true), - packageName = table.Column(type: "TEXT", maxLength: 255, nullable: true), - metaDate = table.Column(type: "TEXT", nullable: true), - varDate = table.Column(type: "TEXT", nullable: true), - version = table.Column(type: "TEXT", maxLength: 50, nullable: true), - description = table.Column(type: "TEXT", nullable: true), - morph = table.Column(type: "INTEGER", nullable: true), - cloth = table.Column(type: "INTEGER", nullable: true), - hair = table.Column(type: "INTEGER", nullable: true), - skin = table.Column(type: "INTEGER", nullable: true), - pose = table.Column(type: "INTEGER", nullable: true), - scene = table.Column(type: "INTEGER", nullable: true), - script = table.Column(type: "INTEGER", nullable: true), - plugin = table.Column(type: "INTEGER", nullable: true), - asset = table.Column(type: "INTEGER", nullable: true), - texture = table.Column(type: "INTEGER", nullable: true), - look = table.Column(type: "INTEGER", nullable: true), - subScene = table.Column(type: "INTEGER", nullable: true), - appearance = table.Column(type: "INTEGER", nullable: true), - dependencyCnt = table.Column(type: "INTEGER", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_vars", x => x.varName); - }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "dependencies"); - - migrationBuilder.DropTable( - name: "HideFav"); - - migrationBuilder.DropTable( - name: "installStatus"); - - migrationBuilder.DropTable( - name: "savedepens"); - - migrationBuilder.DropTable( - name: "scenes"); - - migrationBuilder.DropTable( - name: "vars"); - } - } -} diff --git a/_archived/varManager/Migrations/VarManagerContextModelSnapshot.cs b/_archived/varManager/Migrations/VarManagerContextModelSnapshot.cs deleted file mode 100644 index 54d6ccd..0000000 --- a/_archived/varManager/Migrations/VarManagerContextModelSnapshot.cs +++ /dev/null @@ -1,248 +0,0 @@ -锘// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using varManager.Data; - -#nullable disable - -namespace varManager.Migrations -{ - [DbContext(typeof(VarManagerContext))] - partial class VarManagerContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "9.0.8"); - - modelBuilder.Entity("varManager.Models.Dependency", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DependencyName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("dependency"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("dependencies", (string)null); - }); - - modelBuilder.Entity("varManager.Models.HideFav", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Fav") - .HasColumnType("INTEGER") - .HasColumnName("fav"); - - b.Property("Hide") - .HasColumnType("INTEGER") - .HasColumnName("hide"); - - b.Property("ID") - .HasColumnType("INTEGER"); - - b.HasKey("VarName"); - - b.ToTable("HideFav", (string)null); - }); - - modelBuilder.Entity("varManager.Models.InstallStatus", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Disabled") - .HasColumnType("INTEGER") - .HasColumnName("disabled"); - - b.Property("Installed") - .HasColumnType("INTEGER") - .HasColumnName("installed"); - - b.HasKey("VarName"); - - b.ToTable("installStatus", (string)null); - }); - - modelBuilder.Entity("varManager.Models.SavedDependency", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("DependencyName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("dependency"); - - b.Property("ModiDate") - .HasColumnType("TEXT"); - - b.Property("SavePath") - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("savedepens", (string)null); - }); - - modelBuilder.Entity("varManager.Models.Scene", b => - { - b.Property("ID") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("AtomType") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("atomType"); - - b.Property("IsLoadable") - .HasColumnType("INTEGER") - .HasColumnName("isLoadable"); - - b.Property("IsPreset") - .HasColumnType("INTEGER") - .HasColumnName("isPreset"); - - b.Property("PreviewPic") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("previewPic"); - - b.Property("ScenePath") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("scenePath"); - - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.HasKey("ID"); - - b.ToTable("scenes", (string)null); - }); - - modelBuilder.Entity("varManager.Models.Var", b => - { - b.Property("VarName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("varName"); - - b.Property("Appearance") - .HasColumnType("INTEGER") - .HasColumnName("appearance"); - - b.Property("Asset") - .HasColumnType("INTEGER") - .HasColumnName("asset"); - - b.Property("Cloth") - .HasColumnType("INTEGER") - .HasColumnName("cloth"); - - b.Property("CreatorName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("creatorName"); - - b.Property("DependencyCnt") - .HasColumnType("INTEGER") - .HasColumnName("dependencyCnt"); - - b.Property("Description") - .HasColumnType("TEXT") - .HasColumnName("description"); - - b.Property("Hair") - .HasColumnType("INTEGER") - .HasColumnName("hair"); - - b.Property("Look") - .HasColumnType("INTEGER") - .HasColumnName("look"); - - b.Property("MetaDate") - .HasColumnType("TEXT") - .HasColumnName("metaDate"); - - b.Property("Morph") - .HasColumnType("INTEGER") - .HasColumnName("morph"); - - b.Property("PackageName") - .HasMaxLength(255) - .HasColumnType("TEXT") - .HasColumnName("packageName"); - - b.Property("Plugin") - .HasColumnType("INTEGER") - .HasColumnName("plugin"); - - b.Property("Pose") - .HasColumnType("INTEGER") - .HasColumnName("pose"); - - b.Property("Scene") - .HasColumnType("INTEGER") - .HasColumnName("scene"); - - b.Property("Script") - .HasColumnType("INTEGER") - .HasColumnName("script"); - - b.Property("Skin") - .HasColumnType("INTEGER") - .HasColumnName("skin"); - - b.Property("SubScene") - .HasColumnType("INTEGER") - .HasColumnName("subScene"); - - b.Property("Texture") - .HasColumnType("INTEGER") - .HasColumnName("texture"); - - b.Property("VarDate") - .HasColumnType("TEXT") - .HasColumnName("varDate"); - - b.Property("Version") - .HasMaxLength(50) - .HasColumnType("TEXT") - .HasColumnName("version"); - - b.HasKey("VarName"); - - b.ToTable("vars", (string)null); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/_archived/varManager/Models/Dependency.cs b/_archived/varManager/Models/Dependency.cs deleted file mode 100644 index f94e305..0000000 --- a/_archived/varManager/Models/Dependency.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace varManager.Models -{ - public class Dependency - { - [Key] - public int ID { get; set; } - - [StringLength(255)] - public string? VarName { get; set; } - - [StringLength(255)] - public string? DependencyName { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/HideFav.cs b/_archived/varManager/Models/HideFav.cs deleted file mode 100644 index 3e3cb3d..0000000 --- a/_archived/varManager/Models/HideFav.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class HideFav - { - [Key] - public int ID { get; set; } - - [StringLength(255)] - public string? VarName { get; set; } - - public bool Hide { get; set; } - - public bool Fav { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/InstallStatus.cs b/_archived/varManager/Models/InstallStatus.cs deleted file mode 100644 index aa8538e..0000000 --- a/_archived/varManager/Models/InstallStatus.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class InstallStatus - { - [Key] - [StringLength(255)] - public string VarName { get; set; } = string.Empty; - - public bool Installed { get; set; } - - public bool Disabled { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/SavedDependency.cs b/_archived/varManager/Models/SavedDependency.cs deleted file mode 100644 index 1e0d40e..0000000 --- a/_archived/varManager/Models/SavedDependency.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class SavedDependency - { - [Key] - public int ID { get; set; } - - [StringLength(255)] - public string? VarName { get; set; } - - [StringLength(255)] - public string? DependencyName { get; set; } - - [StringLength(500)] - public string? SavePath { get; set; } - - public DateTime? ModiDate { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/Scene.cs b/_archived/varManager/Models/Scene.cs deleted file mode 100644 index cd5e760..0000000 --- a/_archived/varManager/Models/Scene.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class Scene - { - [Key] - public int ID { get; set; } - - [StringLength(255)] - public string? VarName { get; set; } - - [StringLength(255)] - public string? AtomType { get; set; } - - [StringLength(255)] - public string? PreviewPic { get; set; } - - [StringLength(255)] - public string? ScenePath { get; set; } - - public bool IsPreset { get; set; } - - public bool IsLoadable { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/ScenesView.cs b/_archived/varManager/Models/ScenesView.cs deleted file mode 100644 index 71b35fc..0000000 --- a/_archived/varManager/Models/ScenesView.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class ScenesView - { - public string? VarName { get; set; } - public string? AtomType { get; set; } - public bool IsPreset { get; set; } - public string? ScenePath { get; set; } - public string? PreviewPic { get; set; } - public string? CreatorName { get; set; } - public string? PackageName { get; set; } - public DateTime? MetaDate { get; set; } - public string? Version { get; set; } - public bool Installed { get; set; } - public bool Disabled { get; set; } - public bool Hide { get; set; } - public bool Fav { get; set; } - } -} \ No newline at end of file diff --git a/_archived/varManager/Models/Var.cs b/_archived/varManager/Models/Var.cs deleted file mode 100644 index d2d4f4f..0000000 --- a/_archived/varManager/Models/Var.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace varManager.Models -{ - public class Var - { - [Key] - [StringLength(255)] - public string VarName { get; set; } = string.Empty; - - [StringLength(255)] - public string? CreatorName { get; set; } - - [StringLength(255)] - public string? PackageName { get; set; } - - public DateTime? MetaDate { get; set; } - - public DateTime? VarDate { get; set; } - - [StringLength(50)] - public string? Version { get; set; } - - public string? Description { get; set; } - - // Map to existing database columns - public int? Morph { get; set; } - public int? Cloth { get; set; } - public int? Hair { get; set; } - public int? Skin { get; set; } - public int? Pose { get; set; } - public int? Scene { get; set; } - public int? Script { get; set; } - public int? Plugin { get; set; } - public int? Asset { get; set; } - public int? Texture { get; set; } - public int? Look { get; set; } - public int? SubScene { get; set; } - public int? Appearance { get; set; } - public int? DependencyCnt { get; set; } - public double? Fsize { get; set; } - - // Compatibility properties for existing code (not mapped to database) - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public string? VarPath { get => ""; set { } } // Not available in existing schema - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public long? Filesize { get => Fsize.HasValue ? (long?)(Fsize.Value * 1024 * 1024) : null; set { } } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Scenes { get => Scene; set => Scene = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Looks { get => Look; set => Look = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Clothing { get => Cloth; set => Cloth = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Hairstyle { get => Hair; set => Hair = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Plugins { get => Plugin; set => Plugin = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Assets { get => Asset; set => Asset = value; } - - [System.ComponentModel.DataAnnotations.Schema.NotMapped] - public int? Morphs { get => Morph; set => Morph = value; } - } -} \ No newline at end of file diff --git a/_archived/varManager/PrepareSaves.Designer.cs b/_archived/varManager/PrepareSaves.Designer.cs deleted file mode 100644 index d1820df..0000000 --- a/_archived/varManager/PrepareSaves.Designer.cs +++ /dev/null @@ -1,222 +0,0 @@ -锘縩amespace varManager -{ - partial class PrepareSaves - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.groupBoxSaves = new System.Windows.Forms.GroupBox(); - this.treeViewSaves = new nsThreeStateTreeview.TriStateTreeView(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.buttonVarCopyToClip = new System.Windows.Forms.Button(); - this.listBoxVars = new System.Windows.Forms.ListBox(); - this.buttonAnalysis = new System.Windows.Forms.Button(); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); - this.labelProgress = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.textBoxOutputFolder = new System.Windows.Forms.TextBox(); - this.buttonOutputFolder = new System.Windows.Forms.Button(); - this.buttonOutput = new System.Windows.Forms.Button(); - this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); - this.buttonExit = new System.Windows.Forms.Button(); - this.groupBoxSaves.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.SuspendLayout(); - // - // groupBoxSaves - // - this.groupBoxSaves.Controls.Add(this.treeViewSaves); - this.groupBoxSaves.Location = new System.Drawing.Point(13, 14); - this.groupBoxSaves.Name = "groupBoxSaves"; - this.groupBoxSaves.Size = new System.Drawing.Size(542, 639); - this.groupBoxSaves.TabIndex = 0; - this.groupBoxSaves.TabStop = false; - this.groupBoxSaves.Text = "Saves"; - // - // treeViewSaves - // - this.treeViewSaves.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeViewSaves.FullRowSelect = true; - this.treeViewSaves.Location = new System.Drawing.Point(3, 21); - this.treeViewSaves.Name = "treeViewSaves"; - this.treeViewSaves.Size = new System.Drawing.Size(536, 615); - this.treeViewSaves.TabIndex = 0; - this.treeViewSaves.TriStateStyleProperty = nsThreeStateTreeview.TriStateTreeView.TriStateStyles.Standard; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.buttonVarCopyToClip); - this.groupBox2.Controls.Add(this.listBoxVars); - this.groupBox2.Location = new System.Drawing.Point(561, 14); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(587, 639); - this.groupBox2.TabIndex = 1; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "dependency files"; - // - // buttonVarCopyToClip - // - this.buttonVarCopyToClip.Location = new System.Drawing.Point(453, -3); - this.buttonVarCopyToClip.Name = "buttonVarCopyToClip"; - this.buttonVarCopyToClip.Size = new System.Drawing.Size(128, 29); - this.buttonVarCopyToClip.TabIndex = 1; - this.buttonVarCopyToClip.Text = "CopyToClipboard"; - this.buttonVarCopyToClip.UseVisualStyleBackColor = true; - this.buttonVarCopyToClip.Click += new System.EventHandler(this.buttonVarCopyToClip_Click); - // - // listBoxVars - // - this.listBoxVars.Dock = System.Windows.Forms.DockStyle.Fill; - this.listBoxVars.FormattingEnabled = true; - this.listBoxVars.HorizontalScrollbar = true; - this.listBoxVars.ItemHeight = 17; - this.listBoxVars.Location = new System.Drawing.Point(3, 21); - this.listBoxVars.Name = "listBoxVars"; - this.listBoxVars.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.listBoxVars.Size = new System.Drawing.Size(581, 615); - this.listBoxVars.TabIndex = 0; - // - // buttonAnalysis - // - this.buttonAnalysis.Location = new System.Drawing.Point(387, 691); - this.buttonAnalysis.Name = "buttonAnalysis"; - this.buttonAnalysis.Size = new System.Drawing.Size(168, 35); - this.buttonAnalysis.TabIndex = 2; - this.buttonAnalysis.Text = "Step1: Analysis"; - this.buttonAnalysis.UseVisualStyleBackColor = true; - this.buttonAnalysis.Click += new System.EventHandler(this.buttonAnalysis_Click); - // - // progressBar1 - // - this.progressBar1.Location = new System.Drawing.Point(107, 656); - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(445, 26); - this.progressBar1.TabIndex = 3; - // - // labelProgress - // - this.labelProgress.AutoSize = true; - this.labelProgress.Location = new System.Drawing.Point(22, 661); - this.labelProgress.Name = "labelProgress"; - this.labelProgress.Size = new System.Drawing.Size(79, 17); - this.labelProgress.TabIndex = 4; - this.labelProgress.Text = "9999/9999"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(561, 661); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(99, 17); - this.label1.TabIndex = 5; - this.label1.Text = "Output Folder:"; - // - // textBoxOutputFolder - // - this.textBoxOutputFolder.Location = new System.Drawing.Point(682, 657); - this.textBoxOutputFolder.Name = "textBoxOutputFolder"; - this.textBoxOutputFolder.Size = new System.Drawing.Size(429, 25); - this.textBoxOutputFolder.TabIndex = 6; - // - // buttonOutputFolder - // - this.buttonOutputFolder.Location = new System.Drawing.Point(1106, 657); - this.buttonOutputFolder.Name = "buttonOutputFolder"; - this.buttonOutputFolder.Size = new System.Drawing.Size(39, 25); - this.buttonOutputFolder.TabIndex = 7; - this.buttonOutputFolder.Text = ".."; - this.buttonOutputFolder.UseVisualStyleBackColor = true; - this.buttonOutputFolder.Click += new System.EventHandler(this.buttonOutputFolder_Click); - // - // buttonOutput - // - this.buttonOutput.Location = new System.Drawing.Point(682, 691); - this.buttonOutput.Name = "buttonOutput"; - this.buttonOutput.Size = new System.Drawing.Size(190, 35); - this.buttonOutput.TabIndex = 2; - this.buttonOutput.Text = "Step2: Output"; - this.buttonOutput.UseVisualStyleBackColor = true; - this.buttonOutput.Click += new System.EventHandler(this.buttonOutput_Click); - // - // buttonExit - // - this.buttonExit.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonExit.Location = new System.Drawing.Point(1048, 691); - this.buttonExit.Name = "buttonExit"; - this.buttonExit.Size = new System.Drawing.Size(100, 35); - this.buttonExit.TabIndex = 2; - this.buttonExit.Text = "Exit"; - this.buttonExit.UseVisualStyleBackColor = true; - // - // PrepareSaves - // - this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonExit; - this.ClientSize = new System.Drawing.Size(1160, 732); - this.ControlBox = false; - this.Controls.Add(this.buttonOutputFolder); - this.Controls.Add(this.textBoxOutputFolder); - this.Controls.Add(this.label1); - this.Controls.Add(this.labelProgress); - this.Controls.Add(this.progressBar1); - this.Controls.Add(this.buttonExit); - this.Controls.Add(this.buttonOutput); - this.Controls.Add(this.buttonAnalysis); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.groupBoxSaves); - this.Font = new System.Drawing.Font("Cambria", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; - this.Name = "PrepareSaves"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "PrepareSaves"; - this.Load += new System.EventHandler(this.PrepareSaves_Load); - this.groupBoxSaves.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.GroupBox groupBoxSaves; - private nsThreeStateTreeview.TriStateTreeView treeViewSaves; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.ListBox listBoxVars; - private System.Windows.Forms.Button buttonAnalysis; - private System.Windows.Forms.ProgressBar progressBar1; - private System.Windows.Forms.Label labelProgress; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBoxOutputFolder; - private System.Windows.Forms.Button buttonOutputFolder; - private System.Windows.Forms.Button buttonOutput; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; - private System.Windows.Forms.Button buttonVarCopyToClip; - private System.Windows.Forms.Button buttonExit; - } -} \ No newline at end of file diff --git a/_archived/varManager/PrepareSaves.cs b/_archived/varManager/PrepareSaves.cs deleted file mode 100644 index 3813d08..0000000 --- a/_archived/varManager/PrepareSaves.cs +++ /dev/null @@ -1,273 +0,0 @@ -锘縰sing ICSharpCode.SharpZipLib.Zip; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Windows.Forms; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Threading; -using varManager.Backend; -using static SimpleLogger; -using varManager.Properties; - -namespace varManager -{ - public partial class PrepareSaves : Form - { - public Form1 form1; - public PrepareSaves() - { - InitializeComponent(); - treeViewSaves.Nodes.Add("nodeScenes", "[Scenes]: ./Saves/scene"); - treeViewSaves.Nodes.Add("NodeAppearances", "[Appearance]: ./Saves/Person/appearance"); - treeViewSaves.Nodes.Add("NodePresets", "[Apperance Presets]: ./Custom/Atom/Person/Appearance"); - } - - private void LogBackendLine(string line) - { - if (form1 == null) - { - return; - } - LogLevel level = LogLevel.INFO; - if (line.StartsWith("error:", StringComparison.OrdinalIgnoreCase)) - { - level = LogLevel.ERROR; - } - form1.BeginInvoke(new Form1.InvokeAddLoglist(form1.UpdateAddLoglist), new object[] { line, level }); - } - - private Task RunBackendJobAsync(string kind, object? args) - { - return BackendSession.RunJobAsync(kind, args, LogBackendLine, CancellationToken.None); - } - - private T? DeserializeResult(BackendJobResult result) - { - if (!result.Result.HasValue) - { - return default; - } - return JsonSerializer.Deserialize(result.Result.Value.GetRawText()); - } - - private sealed class DepsJobResult - { - [JsonPropertyName("missing")] - public List Missing { get; set; } = new List(); - - [JsonPropertyName("installed")] - public List Installed { get; set; } = new List(); - - [JsonPropertyName("dependency_count")] - public int DependencyCount { get; set; } - } - - private void PrepareSaves_Load(object sender, EventArgs e) - { - List scenefiles = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "Saves\\scene"), "*.json", SearchOption.AllDirectories).ToList(); - foreach (string scenefile in scenefiles) - { - int pathLength = Path.Combine(Settings.Default.vampath, "Saves\\scene").Length; - string scenefilename ="."+ scenefile.Substring(pathLength); - treeViewSaves.Nodes["nodeScenes"].Nodes.Add(scenefile,scenefilename); - } - treeViewSaves.Nodes["nodeScenes"].Checked = true; - List appearancefiles = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "Saves\\Person\\appearance"), "*.json", SearchOption.AllDirectories).ToList(); - foreach (string appearancefile in appearancefiles) - { - int pathLength = Path.Combine(Settings.Default.vampath, "Saves\\Person\\appearance").Length; - string appearancefilename = "." + appearancefile.Substring(pathLength); - treeViewSaves.Nodes["NodeAppearances"].Nodes.Add(appearancefile, appearancefilename); - } - treeViewSaves.Nodes["NodeAppearances"].Checked = true; - List presetfiles = Directory.GetFiles(Path.Combine(Settings.Default.vampath, "Custom\\Atom\\Person\\Appearance"), "*.vap", SearchOption.AllDirectories).ToList(); - foreach (string presetfile in presetfiles) - { - int pathLength = Path.Combine(Settings.Default.vampath, "Custom\\Atom\\Person\\Appearance").Length; - string presetfilename = "." + presetfile.Substring(pathLength); - treeViewSaves.Nodes["NodePresets"].Nodes.Add(presetfile, presetfilename); - } - treeViewSaves.Nodes["NodePresets"].Checked = true; - } - - private async void buttonAnalysis_Click(object sender, EventArgs e) - { - listBoxVars.Items.Clear(); - try - { - var result = await RunBackendJobAsync("saves_deps", null); - var payload = DeserializeResult(result); - if (payload != null) - { - foreach (var missing in payload.Missing) - { - listBoxVars.Items.Add(missing); - } - } - } - catch (Exception ex) - { - MessageBox.Show($"Analysis failed: {ex.Message}"); - } - } - - private void dependFiles(ref List jsonfiles, ref List jsonfilesOK,bool progress=false) - { - int totlajsonfiles = jsonfiles.Count; - labelProgress.Text = String.Format("{0}/{1}", 0, totlajsonfiles); - - List varfiles = new List(); - List customfiles = new List(); - int intCur = 0; - Regex regexObjVar = new Regex(@"[\x22](?(?[^\r\n\x22\x3A\x2E]+?\x2e[^\r\n\x22\x3A\x2E]+?\x2e(?:\d+?|latest))\x3A[^\r\n\x22\x3A]+?)[\x22]", RegexOptions.IgnoreCase | RegexOptions.Singleline); - Regex regexObjCustom = new Regex(@"[\x22](?Custom\x2F.*?)[\x22]", RegexOptions.IgnoreCase | RegexOptions.Singleline); - foreach (string jsonfile in jsonfiles) - { - try - { - string jsonstring = ReadJsonfile(jsonfile); - - Match matchResultVars = regexObjVar.Match(jsonstring); - while (matchResultVars.Success) - { - // matched text: matchResults.Value - // match start: matchResults.Index - // match length: matchResults.Length - varfiles.Add(matchResultVars.Groups["filepath"].Value); - matchResultVars = matchResultVars.NextMatch(); - } - - Match matchResultCustom = regexObjCustom.Match(jsonstring); - while (matchResultCustom.Success) - { - // matched text: matchResults.Value - // match start: matchResults.Index - // match length: matchResults.Length - customfiles.Add(matchResultCustom.Groups["customfile"].Value); - matchResultCustom = matchResultCustom.NextMatch(); - } - } - catch (Exception) - { - } - intCur++; - if (progress) - { - progressBar1.Value = intCur * 100 / totlajsonfiles; - labelProgress.Text = String.Format("{0}/{1}", intCur, totlajsonfiles); - } - } - varfiles = varfiles.Distinct().ToList(); - //varfiles.Sort(); - customfiles = customfiles.Distinct().ToList(); - //customfiles.Sort(); - if (!progress) - { - jsonfilesOK.AddRange(jsonfiles); - } - jsonfiles.Clear(); - - foreach (var varfile in varfiles) - { - if(varfile.ToLower().EndsWith(".vap")|| varfile.ToLower().EndsWith(".json")) - jsonfiles.Add(varfile); - else - jsonfilesOK.Add(varfile); - } - - foreach (var customfile in customfiles) - { - if (customfile.ToLower().EndsWith(".vap") || customfile.ToLower().EndsWith(".json")) - jsonfiles.Add(customfile); - else - jsonfilesOK.Add(customfile); - } - if (jsonfiles.Count > 0) - dependFiles(ref jsonfiles, ref jsonfilesOK); - jsonfilesOK = jsonfilesOK.Distinct().ToList(); - jsonfilesOK.Sort(); - foreach (var jsonfile in jsonfilesOK) - { - listBoxVars.Items.Add(jsonfile); - } - - } - - private string ReadJsonfile(string jsonfile) - { - string jsonstring=""; - if (jsonfile.IndexOf(":/") > 1) - { - string varName = jsonfile.Substring(0, jsonfile.IndexOf(":/")); - varName= form1.VarExistName(varName); - if (varName.EndsWith("$")) - { - varName = varName.Substring(0, varName.Length - 1); - } - string entryname = jsonfile.Substring(jsonfile.IndexOf(":/") + 2).Trim(); - - string destvarfile = form1.getVarFilePath(varName); - if (!string.IsNullOrEmpty(destvarfile)) - { - if (File.Exists(destvarfile)) - { - using (ZipFile varzipfile = new ZipFile(destvarfile)) - { - var entry = varzipfile.GetEntry(entryname); - var entryStream = new StreamReader(varzipfile.GetInputStream(entry)); - jsonstring = entryStream.ReadToEnd(); - } - } - } - } - else - { - jsonfile = Path.Combine(Settings.Default.vampath, jsonfile); - if (File.Exists(jsonfile)) - { - using (StreamReader sr = new StreamReader(jsonfile)) - { - jsonstring = sr.ReadToEnd(); - } - } - } - - return jsonstring; - } - - private void buttonOutputFolder_Click(object sender, EventArgs e) - { - folderBrowserDialog1.SelectedPath = textBoxOutputFolder.Text; - folderBrowserDialog1.ShowDialog(); - textBoxOutputFolder.Text = folderBrowserDialog1.SelectedPath; - } - - private void buttonOutput_Click(object sender, EventArgs e) - { - if(! Directory.Exists(textBoxOutputFolder.Text)) - { - MessageBox.Show("Please select an exist output directory"); - return; - } - if (Directory.GetFiles(textBoxOutputFolder.Text, "*.*", SearchOption.AllDirectories).ToList().Count() > 0) - { - MessageBox.Show("The output directory must be empty"); - return; - } - } - private void buttonVarCopyToClip_Click(object sender, EventArgs e) - { - string s1 = ""; - foreach (object item in listBoxVars.Items) s1 += item.ToString() + "\r\n"; - Clipboard.SetText(s1); - } - } -} diff --git a/_archived/varManager/PrepareSaves.resx b/_archived/varManager/PrepareSaves.resx deleted file mode 100644 index 69f943d..0000000 --- a/_archived/varManager/PrepareSaves.resx +++ /dev/null @@ -1,123 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/_archived/varManager/Program.cs b/_archived/varManager/Program.cs deleted file mode 100644 index d5e175b..0000000 --- a/_archived/varManager/Program.cs +++ /dev/null @@ -1,21 +0,0 @@ -锘縰sing System; -using System.Windows.Forms; -using varManager.Data; - -namespace varManager -{ - static class Program - { - /// - /// 搴旂敤绋嬪簭鐨勪富鍏ュ彛鐐广 - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - VarManagerContext.EnsureCreatedOnce(); - Application.Run(new Form1()); - } - } -} diff --git a/_archived/varManager/Properties/AssemblyInfo.cs b/_archived/varManager/Properties/AssemblyInfo.cs deleted file mode 100644 index 6e00163..0000000 --- a/_archived/varManager/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -锘縰sing System.Resources; -using System.Reflection; -using System.Runtime.InteropServices; - -// 鏈夊叧绋嬪簭闆嗙殑涓鑸俊鎭敱浠ヤ笅 -// 鎺у埗銆傛洿鏀硅繖浜涚壒鎬у煎彲淇敼 -// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭 -[assembly: AssemblyTitle("varManager")] -[assembly: AssemblyDescription("vars Manager For VirtAMate")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("feelfar")] -[assembly: AssemblyProduct("varManager")] -[assembly: AssemblyCopyright("Copyright 漏 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 灏 ComVisible 璁剧疆涓 false 浼氫娇姝ょ▼搴忛泦涓殑绫诲瀷 -//瀵 COM 缁勪欢涓嶅彲瑙併傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷 -//璇峰皢姝ょ被鍨嬬殑 ComVisible 鐗规ц缃负 true銆 -[assembly: ComVisible(false)] - -// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID -[assembly: Guid("ea2a1b27-ca81-4dbf-8e10-97a0243b6184")] - -// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓肩粍鎴: -// -// 涓荤増鏈 -// 娆$増鏈 -// 鐢熸垚鍙 -// 淇鍙 -// -//鍙互鎸囧畾鎵鏈夎繖浜涘硷紝涔熷彲浠ヤ娇鐢ㄢ滅敓鎴愬彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊 -//閫氳繃浣跨敤 "*"锛屽涓嬫墍绀: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.4.13")] -[assembly: AssemblyFileVersion("1.0.4.13")] -[assembly: NeutralResourcesLanguage("en")] diff --git a/_archived/varManager/Properties/Resources.Designer.cs b/_archived/varManager/Properties/Resources.Designer.cs deleted file mode 100644 index 62aadb0..0000000 --- a/_archived/varManager/Properties/Resources.Designer.cs +++ /dev/null @@ -1,143 +0,0 @@ -锘//------------------------------------------------------------------------------ -// -// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆 -// 杩愯鏃剁増鏈:4.0.30319.42000 -// -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋 -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便 -// -//------------------------------------------------------------------------------ - -namespace varManager.Properties { - using System; - - - /// - /// 涓涓己绫诲瀷鐨勮祫婧愮被锛岀敤浜庢煡鎵炬湰鍦板寲鐨勫瓧绗︿覆绛夈 - /// - // 姝ょ被鏄敱 StronglyTypedResourceBuilder - // 绫婚氳繃绫讳技浜 ResGen 鎴 Visual Studio 鐨勫伐鍏疯嚜鍔ㄧ敓鎴愮殑銆 - // 鑻ヨ娣诲姞鎴栫Щ闄ゆ垚鍛橈紝璇风紪杈 .ResX 鏂囦欢锛岀劧鍚庨噸鏂拌繍琛 ResGen - // (浠 /str 浣滀负鍛戒护閫夐」)锛屾垨閲嶆柊鐢熸垚 VS 椤圭洰銆 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// 杩斿洖姝ょ被浣跨敤鐨勭紦瀛樼殑 ResourceManager 瀹炰緥銆 - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("varManager.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// 閲嶅啓褰撳墠绾跨▼鐨 CurrentUICulture 灞炴э紝瀵 - /// 浣跨敤姝ゅ己绫诲瀷璧勬簮绫荤殑鎵鏈夎祫婧愭煡鎵炬墽琛岄噸鍐欍 - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap hub { - get { - object obj = ResourceManager.GetObject("hub", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘绫讳技浜 (鍥炬爣) 鐨 System.Drawing.Icon 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Icon icoVarManager { - get { - object obj = ResourceManager.GetObject("icoVarManager", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap starEmpty { - get { - object obj = ResourceManager.GetObject("starEmpty", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap starFull { - get { - object obj = ResourceManager.GetObject("starFull", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap starHalf { - get { - object obj = ResourceManager.GetObject("starHalf", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap starOneQuarter { - get { - object obj = ResourceManager.GetObject("starOneQuarter", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap starTriQuarter { - get { - object obj = ResourceManager.GetObject("starTriQuarter", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// 鏌ユ壘 System.Drawing.Bitmap 绫诲瀷鐨勬湰鍦板寲璧勬簮銆 - /// - internal static System.Drawing.Bitmap vam_logo_hub { - get { - object obj = ResourceManager.GetObject("vam_logo_hub", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/_archived/varManager/Properties/Resources.resx b/_archived/varManager/Properties/Resources.resx deleted file mode 100644 index 783f0a4..0000000 --- a/_archived/varManager/Properties/Resources.resx +++ /dev/null @@ -1,145 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\starEmpty.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\hub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\starOneQuarter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\starHalf.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\starTriQuarter.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\icoVarManager.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\starFull.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\vam_logo_hub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/_archived/varManager/Properties/Settings.Designer.cs b/_archived/varManager/Properties/Settings.Designer.cs deleted file mode 100644 index 29e359a..0000000 --- a/_archived/varManager/Properties/Settings.Designer.cs +++ /dev/null @@ -1,144 +0,0 @@ -锘//------------------------------------------------------------------------------ -// -// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆 -// 杩愯鏃剁増鏈:4.0.30319.42000 -// -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋 -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便 -// -//------------------------------------------------------------------------------ - -namespace varManager.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("d:\\vars")] - public string varspath { - get { - return ((string)(this["varspath"])); - } - set { - this["varspath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("d:\\virt_a_mate")] - public string vampath { - get { - return ((string)(this["vampath"])); - } - set { - this["vampath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("VaM (Desktop Mode).bat")] - public string defaultVamExec { - get { - return ((string)(this["defaultVamExec"])); - } - set { - this["defaultVamExec"] = value; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] - [global::System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\\varManager.db")] - public string varManagerConnectionString { - get { - return ((string)(this["varManagerConnectionString"])); - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool presetMorphs { - get { - return ((bool)(this["presetMorphs"])); - } - set { - this["presetMorphs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool presetHair { - get { - return ((bool)(this["presetHair"])); - } - set { - this["presetHair"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool presetClothing { - get { - return ((bool)(this["presetClothing"])); - } - set { - this["presetClothing"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool presetSkin { - get { - return ((bool)(this["presetSkin"])); - } - set { - this["presetSkin"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool presetBreast { - get { - return ((bool)(this["presetBreast"])); - } - set { - this["presetBreast"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool presetGlute { - get { - return ((bool)(this["presetGlute"])); - } - set { - this["presetGlute"] = value; - } - } - } -} diff --git a/_archived/varManager/Properties/Settings.settings b/_archived/varManager/Properties/Settings.settings deleted file mode 100644 index 06a2761..0000000 --- a/_archived/varManager/Properties/Settings.settings +++ /dev/null @@ -1,38 +0,0 @@ -锘 - - - - - d:\vars - - - d:\virt_a_mate - - - <?xml version="1.0" encoding="utf-16"?> -<SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <ConnectionString>Data Source=|DataDirectory|\varManager.db</ConnectionString> - <ProviderName>Microsoft.Data.Sqlite</ProviderName> -</SerializableConnectionString> - Data Source=|DataDirectory|\varManager.db - - - True - - - True - - - False - - - True - - - True - - - False - - - \ No newline at end of file diff --git a/_archived/varManager/Resources/IconHub.ico b/_archived/varManager/Resources/IconHub.ico deleted file mode 100644 index 5d06b9f2857b39f0b5d3395e3e7999ba6bcc3a38..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45451 zcmeHQ2V4`$_n!>`f|LYoh=qWPSiy=FB49<4^YlDC1oTw&lwubJvRJ^5oLDFdo((IW z*bpR96!ApE*^r{)4iE(uM5G8w{xgB)x2_3AY2KgtFnKfc-n{pHZ`JR%LyWA^>Ijs5h#!!DKZ6<{ARP;Z)WQ z%>g()gwV$Z;XMI(w3^Td>rl`75JDdtETRL@{VV`mZLBA#x6x?>)v8aLXgM8elUh`Q z#BO=`LR4EZeS$eS_n^ybSfM+OojMkPKmAlI=0Z$B#ciVP3IH_XP{!`KhR+9}P530s zu`|}%zkP1CsB3a3{`*Xq&9AyUKAzJjCUVX{?Yi7cqHm<1?do<=St)r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`0N{TphVzg9pHRYI z=s)rstD*{3RJn>WtEg@jHLIdrNKxFR@s!T)BE^*wXEaZX4KoL3;{W;JELdqxwMGD* zlhO4>2y;VSC(*SEuhlRVfO0ksXqSq=Rt(U#)Ng-(f4R?!>pQ+gx~hE2uPp|I@Ab7& zn>?YnzV@m2iS?}$xW0G$gdeq0YJ3R!Z}p$hL;XH9dXGx}4m7e)$dbzqWuJJLg}y~c ze5aQDPK#`lTy7})Kg#5HQbZd;iC8q0ee}+h&`r>q-lI08{hHp3%6kvmkoE~( zHGPv0#e|R}mm4bngl>7?#3S1zmmAtXfrCnsO>!pq-)f(%vp(fk`<36jYKZs~u_VWz z+(wjT(dM*IUK`t(*MC`llWoHogf^x9`r1a=i0wr9Lf+Q3m5DxxevR#hvj4TVW!WeD zRG0F%*siiK9e*P|b+Jd5`BvLi_R+l$F<$>#>W6fFZG!gEJ&-gGUxCH(YwiAj>?eI} z0Dns1YB0D2jM=~$=`@3x3$vsEKJh4kYuQTCI<~5Wo>Q=3X2VQ8r{K_GrIAv7_a`b0 z)SrCJ)l^2Z^7_~1Tv}UyVjN0Pq!ZyGXl?z8?`g{#S0g<&^(W5(MfR!xv!J&Ag#Tph z1a5-XWS{6SYkq2d`V)Gnv@ZC`u_kPyHX_#rKiMwP57DY~`4`VikWR!W_an+gf1)px vHI}#k5wcVo5)y*8y8vc3wJ)k8`?X}$7ah_Kn$R;(zCt~-GL&alJ}>=0A=}t% diff --git a/_archived/varManager/Resources/hub.ico b/_archived/varManager/Resources/hub.ico deleted file mode 100644 index e126b10318bcff737f2418b38abe9331d61b395b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16958 zcmeHO3rtjJ7M@`SW`+@%0R=|H9iAcz)&~qT0}Kox6{(S3F`z4G>qe_~#hUm`5bIX$ zf?79OMWgjy>svq&*H(AcWV6+1G`lfwVm6v>x2tQ{;A#bgZ~t@0d!5TX7-=WAGM8ND z-ZSUF=X~e&|NQ47kx1E3PL72A)=Q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xCW-%fZFZQxGCH#)7frP&-yiAZ06EqZOSq!(Bk726*7Xn=- zm9c#JCzm%5SWQ&QY<)wL|8Bx;miG<#+|mdw%LCpo?(mnEmZGt-k@NkSF=Iqy$jAKA z)zu~REa*KC^1Xe}o|kpJoQ={rkDTCB=drKg(e$s2|NAe5{l2)6>(1KBoPcFtq~Mkk4vC7EV+oL+K~O znbdTA$9i~A3ML>(?%2aw6urn60}PKT#Dp-F7H63co6Sd2l{8PJ6Uoy0YdL-{Z&*DD z3DBTaU&8p0;DV(Ek%6{es=Z$9+5vxNW+vx*%6;lJ_2B33}iLVmKMPV^o|3~4}8DACokRW zwJKn90luqY3!F73e3Qo}`J9Oe^?#A~J;!}ab-=>Jurye&^1e+ z(EB?)-QDLXT@W&c1S2I~9Shu>BH9F)Cq^MJ1)|%No>%3Mx zmnYzNCI2<2`|x|P|M42ffY1Lv|5FUOt*5W?_rCb|#lJ89efjUJfBiEC`g88{G2h?+ O|D7#wd`Ew^!2bbjxZ8UG diff --git a/_archived/varManager/Resources/hub.png b/_archived/varManager/Resources/hub.png deleted file mode 100644 index 0bbfc405c01725eea4ba2e73a5517ab03ac086be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4127 zcmcInc{o)49v@4DsE90KOhu{LH#3Z#B5Ntz4YQmXQ?tD@gP~2KrW6t)*-D!%y-15P zvP7a%iWa4ix4M?}HidA{wB6;o_kH^3p65B|{LVR_-{<@JF6a9@XTP7%8f{HuO$Y>{ z?XlK%J$QCh>~qz?V+s4W=io_0ur^o(foSO|b|uKMe`>>MNlDt#*;hSC5Qn@53-*2-W|HiH5S#CxN>1uj4&du^N$*bwIvK#$u> zCoy0S_E0+s86@BWVk%U^-w~;XDSBQ8k1?HqM2o3V~gSzmA02GfP z!0Bil9!ex3&;%@wL|P5SpwKo*lnoM%g`){%9Eyy=K)-J=(3+6JB(HaM|85JsqQD}> zVgVV6jERXs#9$G8Aq$Bnkw{1s28qGIK?GbB%M(*2aGq%C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~-=e3um*NRmU#+K62!DK4oZb z_3C}0eYhMRm#+~f+nJZ^A`)Q@RtG_Hy!M*fM)#Cggj{TM+UuswRI@&%*&a1F zk=Eojg%2{jA0*V)o-e!5UvbV>joYuE?WNZA=d8Z|0*hPxC7&i?R~9&2m!(Z==H<1A zubS_OIPt{E)v&^+_%*D#W+wK6I3zN{YQ@>vWYb+6r#AepE5F|#fgamzyl^s3E&fJC z9~BMli+x7f{uz~?o-WBvy4BF&tZsCA&c}}*7Y#>8o@hXApLr2cSar%zdA>uql6_RP ztKW=d)%F#a^&j~Zr%u?)=M|Q4luNYnJ)5gqUK#-%;r-MhmF$&~M$^pxv9t8!;mh=> zE)UgkhWVt{fun;?s}DCu5MHSt#!|wyj@!lRhLmOHHZ<+m<4#vGJ6*hPK^erp)kc3AkKKZ%wl(uB^PDH6B(Q-N7Xr zFE;gh9vtRew`Rk0w(VSv10Khk+9BI z$KG~eGEa=R3EQRmaIz)9XTRj3bSSn%OIr|Z!kB=p69u=PFE5uz=BymmYp=946o-_= z8C?3ZTE4G!#l0qJ$d0l#ccp%=jBodfAc`Sv$Kq5aNF~3V{~>*$#+aaB5K{6o11l}IZsP#O_#Hp zX`FlBcFu3x+M zY-B2-t1BQZ?A@_90|SiOtIJd>tE(5;+uH}#M#Bx@Ax&CD&Vwwr($n&H{t)p)Jvxnc z`D)dL7Q0=6;m*#=11*bA=`f?R zvUo*`8Kn&fD#}!yyLnbW`pZoNNgbr7_5F}ZKlpT|cZfC(=SgbSf;I@vA!Qm^SA)&co^f`s| z?DFAVY46EzF6KIR|IX|%PS46>c3 z-tBC8MAWRG_%L(}{LV1_qGB?Z8^=sljwe|g%j4Q2@|63^=EcS&{wUJI#TzPShuAes f%11h4>vutxFe%5*9URb5{K9*<`M8!lN9_3rmvYq6 diff --git a/_archived/varManager/Resources/star.psd b/_archived/varManager/Resources/star.psd deleted file mode 100644 index c071d2ce3db9f6ceaefafd4d6601e6a9bf55c476..0000000000000000000000000000000000000000 GIT binary patch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JG&M|ifsSRkpIOKq_C@ z)G)s=+Az+Y*Hte2@}N@Z`lWS880=}?p3EFMv+fgW+hK-%+O~C{ZrrZ_F4leZHRbW+ zg~`^k8_+nx?kcg7%5n&fSUY#QXky65 zd37Uo5{+g`DJYknL=}p8(x}}BGczB6iTZaCUvMC8GfQ=O=oYwC1Er-LV(JF6Pi+cOuYVspkv6of2^tgZB2zo~U>%F+~)b~hsO zSnHdc-Kv~Dn2>qt5MhaLZST?`&|Nc#G7mnCLR;&+mT)6-Z#3XH(yxHvouKmi1g}k_ zfkYVtU1OtY+^nc&fIi8AQ}D4ugVlbmvviY$rI>=q zSpqX`V6$os&)IGLgsNJv<2w)?PN8&oh7IOnQpLZ>{?8K*X!o z$YLUbdLA3K^)*~J3L$_W1{5u=)FrM5gVkK^X#|21IklciY5XePWdIU^`Hyd^EVkgwQ-=MXz?I55o_K7O2NLru915HOAt9ju*V** zmcGUyudVYM%v*XU(xx7(UM2A0@r<>XC=8`rJT!rU2E3y1r5{reIm?HJxGOObyi8Ek zO9N7`?;WD%ftP|Of&~Lnv_xU_?5&f%EiwIkMmnc Kx}5*h!T$id+ll%B diff --git a/_archived/varManager/Resources/starEmpty.png b/_archived/varManager/Resources/starEmpty.png deleted file mode 100644 index 3fbcd4bc7e293268bf129de30c4a925e8c2f0ed7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5181 zcmbtY2Ut_twhqG#sF$Xq6r;pop-2iOm_(!q(loSypi+#<0YV6=ND~{5WDpS)iAEey zDN>9A;s}b$6$G)+VL(MEfFO!UQ49*coq*2V_swhf<@?AvXRo#Y^{;>Jz1Io9c(^&K zFVJ5AgTd5YoE^MiFeMFeKQ&JUe0$UutN@q!9OvzP80;U5<$p>rai%T|_TxCi+fU#} z-b$jeStu%=1^%&NPyT4g)kyEB1dlCK_VFRjYwZS8AImSL!k`k zSRO=)b@QghGHFCQ(#9HL6-@#FEJ#2_M6<#p_@wBKNChql+{=g2NQA;gz}$$mlLtij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%?X-WWQgx$jQ4g^E7nV!UYa%knZ15 XC^GR^HUa+wguz@kyE#ZU?K<=y=^*{> diff --git a/_archived/varManager/Resources/starFull.png b/_archived/varManager/Resources/starFull.png deleted file mode 100644 index e42adecd0edd1ac0b971c10de34a40de359790b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5159 zcmbVQ2|U#6*B@(^84WQeQe!M3%vc&sWE*>m5Rv8A%rKJ~qnWWq)=Uy9S0$;&cD2~b z5=n%lB5NVpN*5_A5napsL-pSKfA72f=kuAFXP)2pobx^BJm;L}Gp8K(TERqQL?93d z%*L9q9|GZlg6nTWg5c+P(UB$aOE}Q_APWK!-L(4Vfn;PNArSrTuJsMg1rWT#_$ zor%Z%i3TLJ@oto1C>~TmC$j-mD4iC-!iO56*Yx7S_3AbTjaq}S{f*G3s|HbS_6{g> z29u21sfp7dYU%Do=^1Eh;dFEj4AfEDSS@`FRv)9KqoIYv>tgZR+Nd8dG-!=U^2P5b zSpKjD{xU*S*z7<&1``qzq8Xy2$zb|nvlZeV!eBF46vls}`q$&X8303TZ~x22KXRedf0mSzE&<03Y9F}OHt4mz>0+c5(h(W8# z{V7lSf6DJ;Qo-T^X#cjJ)skC16?khZ3(Qy8kD_oQAN{eSQBi9L0S^#Y54aJUxSClq z3H@W6`fo>IU2O=33@ZH}(!CC2F?`t}0F!L$2S)4va-uLGf6Qt%uDgQyS1;F|{iSk$ z!oha1y8P9Lz#qRl894xKUrex1T_Es+y-@6x4Z+ko^wq~JAAfUt!E|L1e0mnIwvCKc8O&jP{={c(-1WaIjdJ%6H zcZIQ4<9J>Wki6-QjnX|jLRcw)1Az!ZuRB@&5vBj`8jpiSdVzwuTwav2T9mJ0G=~Sm zFBp15fg;RR9Co*Qs@N{U1t5?Z9@ts?ZPzEK>(tEdcW&D9-F(P1SK&oc0{bW;j$aoF zL1F6@+qh1_}9cQ*c)o$|x#k=3f+d@90j`Jjzg4fOS z=PHaLKMX!I$ySU$!&NeAfIxW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I(<$j78o~@I&u+Ua`)l?0#Wq4h5!Hn diff --git a/_archived/varManager/Resources/starTriQuarter.png b/_archived/varManager/Resources/starTriQuarter.png deleted file mode 100644 index 8a667da7a4c9317126b3aaa12128586f142f4dd8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6634 zcmbVR2{@GN+aEb`5@SnQCdNoeV}>m6OlUNA8Eck`8e=dRGh>S+N-;QDN|6*!c14b* z#g>c~N6EfaI!$D!g=C5EeMj~E&v%{w_x-QWbusU}&%ONa-+e##b3d1OTauZGkgO04 z1{1L`H@1ht_~794(ys#GU)z>qdGKQs)7&)(2HPwN{qn&wv!r3LjU6;cmtYs`19%F9 zu0i%>cu+OM=uA)=2Gidc#w1hxsKH1Nsy8jb05x0Nh(gjl4N%TH)>vyMk?KP;KM_cE zI6-oxobaRIJW=}$k@{hH&;XqpOh$&${R4vVVFoCkT|D>f*Jrcr7jD_a7AKEzr{o zZ*Oe+-52=H0Ob=L%*10b$B!S^IKD@N5$KK4#NlultQJN~3k^!3gTe!X$zkY#Af+D` zjHyACKpHcc#t1+{7RerrkYEE8h;%&!I`gO5fS~U*frMeg$V`l;1{Mm5C+JD}DaQ;6 z^yfMEq+qE2R5~>vI0%&0{3*-yVFWXRd>H@6^v~tLIRL4(w*KkkAFfW%S{NIkz_2xFG*7&qt_M!b6RbE-4+?;$YH4H9 zB?L+?q`zM0o(u|TDLIY$#2dzuh($ev z6G#KM8rlC}twN|gL5rTco_aW}hc;Rp@bE(G>T2tvJ#d~BG!DR$DLCvN3KrxR+JI1v z;LT}4VD`elZxIJ7>-&>G4aqADJedNOy8(&<<(cY<`u>{s4}APbp1?ezoRlKk=BbeSYc`;)evoL{x7WEFLL&x&L7v^CYq+hgg$)0Va9f)gL+KfwnMK zbV4S|Nj(0EvC>`ulv2qCUF0OzzEM2wVaQSIy8Zf-Kzucpo9wxn&?GH(Jd74Q&44 zMBayE-xkQ?i%UO5{|Fg*+Fe*4_?MWVSyP1$wacdEA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=py=u8zd4_CNRrEr zR*hk~;}%=KOq-AOzG}A@DkHZBfoI>g=;uh9^P&Ci+R;m6R@|5uOILp|J3>FTaE@Ne z)Y@>LCIfpOyidABA(a6wQ{!Xh2Pd=oTZT*lRpzd4gEtXMA)Z69O z7oOiSGBgmTP3PREnl0wZHJUAu6Ikj{Gqe*U?kp_FIQK5qWg4G)CZL{En;OC$XvuUw zXMzpTOkcjQ19^!l=}6Dbc~`VbIemS2(i+v@NN+yBd9iAswJhY`)tyt(&~SUj5w&f* zXUs>=E>2j@>U&c9C|lF+{o$!;8aRW%gV$qL^X3n>cv;5b*Ye8;J63H9>APf(42YGV zo-lvWP(xfe?{Q)6g1tJsDyn{cf$(a7VWZ>s=}pw86ow>ED;3ao!qnzF#_s;W)F%oy9q7X8uElis84 z#U6Wmsa%gJrGB&LofrKd-MtHLo8l9s8jqDfbotV@l@B{Q)!yU`Mro{YqklD0E#TKs z45Jab%T}M8qo&sXY&bs)Q*c@6;IRDpf;&1Y`Sz5mm)*^IS4OfTUOmPwDesBhYT@UM zjX%JyT|!IXW+uz(c5a;SZLc{SCjOxOAY?IOM#usb5iVqZ=1U1B*|86+KFOna&4?mJhexSv?!mT6#nvMLigZguYM;kQ~AgqpmBqem$b5AM%u zNJ?#+eqbPOjmf$@t&E=B$SmLNr%D#vdchNFlKL%=lr1!3_ufC`2()cHDE^>(+decj zbgCQ$Nbw<~Ct3&fbyknQ|m6^U?PHgD2;Zwh;~ugl&IcXZ00DoxfF* zMGr=W?NQp*Nv{aLW2fu#A<8``qJL(A)*ZA-?ZZQdH#DcklH$@b<0Rx@`S3y>T3u^T z#&BB6vQAcp&@m&s+Ht$SM1wOrv+Sn3rqbfhzC^@yE*s#}c_DEiP-8h?=)b!bDi}b%-8w&^XTvPAx{{c5FD186` diff --git a/_archived/varManager/SimpleJSON/JSON.cs b/_archived/varManager/SimpleJSON/JSON.cs deleted file mode 100644 index 8af87f9..0000000 --- a/_archived/varManager/SimpleJSON/JSON.cs +++ /dev/null @@ -1,14 +0,0 @@ -锘縰sing System; - -namespace SimpleJSON -{ - // Token: 0x02000CCD RID: 3277 - public static class JSON - { - // Token: 0x060062FB RID: 25339 RVA: 0x0024B7DB File Offset: 0x00249BDB - public static JSONNode Parse(string aJSON) - { - return JSONNode.Parse(aJSON); - } - } -} diff --git a/_archived/varManager/SimpleJSON/JSONArray.cs b/_archived/varManager/SimpleJSON/JSONArray.cs deleted file mode 100644 index f5830ac..0000000 --- a/_archived/varManager/SimpleJSON/JSONArray.cs +++ /dev/null @@ -1,173 +0,0 @@ -锘縰sing System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Text; - -namespace SimpleJSON -{ - // Token: 0x02000CC9 RID: 3273 - public class JSONArray : JSONNode, IEnumerable - { - // Token: 0x17000E8F RID: 3727 - public override JSONNode this[int aIndex] - { - get - { - if (aIndex < 0 || aIndex >= this.m_List.Count) - { - return new JSONLazyCreator(this); - } - return this.m_List[aIndex]; - } - set - { - if (aIndex < 0 || aIndex >= this.m_List.Count) - { - this.m_List.Add(value); - } - else - { - this.m_List[aIndex] = value; - } - } - } - - // Token: 0x17000E90 RID: 3728 - public override JSONNode this[string aKey] - { - get - { - return new JSONLazyCreator(this); - } - set - { - this.m_List.Add(value); - } - } - - // Token: 0x17000E91 RID: 3729 - // (get) Token: 0x060062BA RID: 25274 RVA: 0x0024A356 File Offset: 0x00248756 - public override int Count - { - get - { - return this.m_List.Count; - } - } - - // Token: 0x060062BB RID: 25275 RVA: 0x0024A363 File Offset: 0x00248763 - public override void Add(string aKey, JSONNode aItem) - { - this.m_List.Add(aItem); - } - - // Token: 0x060062BC RID: 25276 RVA: 0x0024A374 File Offset: 0x00248774 - public override JSONNode Remove(int aIndex) - { - if (aIndex < 0 || aIndex >= this.m_List.Count) - { - return null; - } - JSONNode result = this.m_List[aIndex]; - this.m_List.RemoveAt(aIndex); - return result; - } - - // Token: 0x060062BD RID: 25277 RVA: 0x0024A3B5 File Offset: 0x002487B5 - public override JSONNode Remove(JSONNode aNode) - { - this.m_List.Remove(aNode); - return aNode; - } - - // Token: 0x17000E92 RID: 3730 - // (get) Token: 0x060062BE RID: 25278 RVA: 0x0024A3C8 File Offset: 0x002487C8 - public override IEnumerable Childs - { - get - { - foreach (JSONNode N in this.m_List) - { - yield return N; - } - yield break; - } - } - - // Token: 0x060062BF RID: 25279 RVA: 0x0024A3EC File Offset: 0x002487EC - public IEnumerator GetEnumerator() - { - foreach (JSONNode N in this.m_List) - { - yield return N; - } - yield break; - } - - // Token: 0x060062C0 RID: 25280 RVA: 0x0024A408 File Offset: 0x00248808 - public override string ToString() - { - string text = "[ "; - foreach (JSONNode jsonnode in this.m_List) - { - if (text.Length > 2) - { - text += ", "; - } - text += jsonnode.ToString(); - } - text += " ]"; - return text; - } - - // Token: 0x060062C1 RID: 25281 RVA: 0x0024A498 File Offset: 0x00248898 - public override string ToString(string aPrefix) - { - string text = "[ "; - foreach (JSONNode jsonnode in this.m_List) - { - if (text.Length > 3) - { - text += ", "; - } - text = text + "\n" + aPrefix + " "; - text += jsonnode.ToString(aPrefix + " "); - } - text = text + "\n" + aPrefix + "]"; - return text; - } - - // Token: 0x060062C2 RID: 25282 RVA: 0x0024A548 File Offset: 0x00248948 - public override void ToString(string aPrefix, StringBuilder sb) - { - sb.Append("[ "); - bool flag = true; - foreach (JSONNode jsonnode in this.m_List) - { - if (!flag) - { - sb.Append(", "); - } - flag = false; - sb.Append("\n" + aPrefix + " "); - jsonnode.ToString(aPrefix + " ", sb); - } - sb.Append("\n" + aPrefix + "]"); - } - - // Token: 0x060062C3 RID: 25283 RVA: 0x0024A600 File Offset: 0x00248A00 - public override void Serialize(BinaryWriter aWriter) - { - aWriter.Write((byte)1); - aWriter.Write(this.m_List.Count); - for (int i = 0; i < this.m_List.Count; i++) - { - this.m_List[i].Serialize(aWriter); - } - } - - // Token: 0x040051CE RID: 20942 - private List m_List = new List(); - } -} diff --git a/_archived/varManager/SimpleJSON/JSONBinaryTag.cs b/_archived/varManager/SimpleJSON/JSONBinaryTag.cs deleted file mode 100644 index 611148f..0000000 --- a/_archived/varManager/SimpleJSON/JSONBinaryTag.cs +++ /dev/null @@ -1,23 +0,0 @@ -锘縰sing System; - -namespace SimpleJSON -{ - // Token: 0x02000CC7 RID: 3271 - public enum JSONBinaryTag - { - // Token: 0x040051C7 RID: 20935 - Array = 1, - // Token: 0x040051C8 RID: 20936 - Class, - // Token: 0x040051C9 RID: 20937 - Value, - // Token: 0x040051CA RID: 20938 - IntValue, - // Token: 0x040051CB RID: 20939 - DoubleValue, - // Token: 0x040051CC RID: 20940 - BoolValue, - // Token: 0x040051CD RID: 20941 - FloatValue - } -} diff --git a/_archived/varManager/SimpleJSON/JSONClass.cs b/_archived/varManager/SimpleJSON/JSONClass.cs deleted file mode 100644 index 245b997..0000000 --- a/_archived/varManager/SimpleJSON/JSONClass.cs +++ /dev/null @@ -1,259 +0,0 @@ -锘縰sing System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace SimpleJSON -{ - // Token: 0x02000CCA RID: 3274 - public class JSONClass : JSONNode, IEnumerable - { - // Token: 0x17000E93 RID: 3731 - public override JSONNode this[string aKey] - { - get - { - if (this.m_Dict.ContainsKey(aKey)) - { - return this.m_Dict[aKey]; - } - return new JSONLazyCreator(this, aKey); - } - set - { - if (this.m_Dict.ContainsKey(aKey)) - { - this.m_Dict[aKey] = value; - } - else - { - this.m_Dict.Add(aKey, value); - } - } - } - - // Token: 0x17000E94 RID: 3732 - public override JSONNode this[int aIndex] - { - get - { - if (aIndex < 0 || aIndex >= this.m_Dict.Count) - { - return null; - } - return this.m_Dict.ElementAt(aIndex).Value; - } - set - { - if (aIndex < 0 || aIndex >= this.m_Dict.Count) - { - return; - } - string key = this.m_Dict.ElementAt(aIndex).Key; - this.m_Dict[key] = value; - } - } - - // Token: 0x17000E95 RID: 3733 - // (get) Token: 0x060062C9 RID: 25289 RVA: 0x0024AA20 File Offset: 0x00248E20 - public override int Count - { - get - { - return this.m_Dict.Count; - } - } - - // Token: 0x060062CA RID: 25290 RVA: 0x0024AA2D File Offset: 0x00248E2D - public bool HasKey(string aKey) - { - return this.m_Dict.ContainsKey(aKey); - } - - // Token: 0x060062CB RID: 25291 RVA: 0x0024AA3C File Offset: 0x00248E3C - public override void Add(string aKey, JSONNode aItem) - { - if (!string.IsNullOrEmpty(aKey)) - { - if (this.m_Dict.ContainsKey(aKey)) - { - this.m_Dict[aKey] = aItem; - } - else - { - this.m_Dict.Add(aKey, aItem); - } - } - else - { - this.m_Dict.Add(Guid.NewGuid().ToString(), aItem); - } - } - - // Token: 0x060062CC RID: 25292 RVA: 0x0024AAA8 File Offset: 0x00248EA8 - public override JSONNode Remove(string aKey) - { - if (!this.m_Dict.ContainsKey(aKey)) - { - return null; - } - JSONNode result = this.m_Dict[aKey]; - this.m_Dict.Remove(aKey); - return result; - } - - // Token: 0x060062CD RID: 25293 RVA: 0x0024AAE4 File Offset: 0x00248EE4 - public override JSONNode Remove(int aIndex) - { - if (aIndex < 0 || aIndex >= this.m_Dict.Count) - { - return null; - } - KeyValuePair keyValuePair = this.m_Dict.ElementAt(aIndex); - this.m_Dict.Remove(keyValuePair.Key); - return keyValuePair.Value; - } - - // Token: 0x060062CE RID: 25294 RVA: 0x0024AB34 File Offset: 0x00248F34 - public override JSONNode Remove(JSONNode aNode) - { - JSONNode result; - try - { - KeyValuePair keyValuePair = (from k in this.m_Dict - where k.Value == aNode - select k).First>(); - this.m_Dict.Remove(keyValuePair.Key); - result = aNode; - } - catch - { - result = null; - } - return result; - } - - // Token: 0x17000E96 RID: 3734 - // (get) Token: 0x060062CF RID: 25295 RVA: 0x0024ABA4 File Offset: 0x00248FA4 - public IEnumerable Keys - { - get - { - foreach (KeyValuePair N in this.m_Dict) - { - yield return N.Key; - } - yield break; - } - } - - // Token: 0x17000E97 RID: 3735 - // (get) Token: 0x060062D0 RID: 25296 RVA: 0x0024ABC8 File Offset: 0x00248FC8 - public override IEnumerable Childs - { - get - { - foreach (KeyValuePair N in this.m_Dict) - { - yield return N.Value; - } - yield break; - } - } - - // Token: 0x060062D1 RID: 25297 RVA: 0x0024ABEC File Offset: 0x00248FEC - public IEnumerator GetEnumerator() - { - foreach (KeyValuePair N in this.m_Dict) - { - yield return N; - } - yield break; - } - - // Token: 0x060062D2 RID: 25298 RVA: 0x0024AC08 File Offset: 0x00249008 - public override string ToString() - { - string text = "{"; - foreach (KeyValuePair keyValuePair in this.m_Dict) - { - if (text.Length > 2) - { - text += ", "; - } - string text2 = text; - text = string.Concat(new string[] - { - text2, - "\"", - JSONNode.Escape(keyValuePair.Key), - "\":", - keyValuePair.Value.ToString() - }); - } - text += "}"; - return text; - } - - // Token: 0x060062D3 RID: 25299 RVA: 0x0024ACC8 File Offset: 0x002490C8 - public override string ToString(string aPrefix) - { - string text = "{ "; - foreach (KeyValuePair keyValuePair in this.m_Dict) - { - if (text.Length > 3) - { - text += ", "; - } - text = text + "\n" + aPrefix + " "; - string text2 = text; - text = string.Concat(new string[] - { - text2, - "\"", - JSONNode.Escape(keyValuePair.Key), - "\" : ", - keyValuePair.Value.ToString(aPrefix + " ") - }); - } - text = text + "\n" + aPrefix + "}"; - return text; - } - - // Token: 0x060062D4 RID: 25300 RVA: 0x0024ADAC File Offset: 0x002491AC - public override void ToString(string aPrefix, StringBuilder sb) - { - bool flag = true; - sb.Append("{ "); - foreach (KeyValuePair keyValuePair in this.m_Dict) - { - if (!flag) - { - sb.Append(", "); - } - flag = false; - sb.Append("\n" + aPrefix + " "); - sb.Append("\"" + JSONNode.Escape(keyValuePair.Key) + "\" : "); - keyValuePair.Value.ToString(aPrefix + " ", sb); - } - sb.Append("\n" + aPrefix + "}"); - } - - // Token: 0x060062D5 RID: 25301 RVA: 0x0024AE8C File Offset: 0x0024928C - public override void Serialize(BinaryWriter aWriter) - { - aWriter.Write((byte)2); - aWriter.Write(this.m_Dict.Count); - foreach (string text in this.m_Dict.Keys) - { - aWriter.Write(text); - this.m_Dict[text].Serialize(aWriter); - } - } - - // Token: 0x040051CF RID: 20943 - private Dictionary m_Dict = new Dictionary(); - } -} diff --git a/_archived/varManager/SimpleJSON/JSONData.cs b/_archived/varManager/SimpleJSON/JSONData.cs deleted file mode 100644 index 4f4944d..0000000 --- a/_archived/varManager/SimpleJSON/JSONData.cs +++ /dev/null @@ -1,112 +0,0 @@ -锘縰sing System; -using System.IO; -using System.Text; - -namespace SimpleJSON -{ - // Token: 0x02000CCB RID: 3275 - public class JSONData : JSONNode - { - // Token: 0x060062D6 RID: 25302 RVA: 0x0024B3A7 File Offset: 0x002497A7 - public JSONData(string aData) - { - this.m_Data = aData; - } - - // Token: 0x060062D7 RID: 25303 RVA: 0x0024B3B6 File Offset: 0x002497B6 - public JSONData(float aData) - { - this.AsFloat = aData; - } - - // Token: 0x060062D8 RID: 25304 RVA: 0x0024B3C5 File Offset: 0x002497C5 - public JSONData(double aData) - { - this.AsDouble = aData; - } - - // Token: 0x060062D9 RID: 25305 RVA: 0x0024B3D4 File Offset: 0x002497D4 - public JSONData(bool aData) - { - this.AsBool = aData; - } - - // Token: 0x060062DA RID: 25306 RVA: 0x0024B3E3 File Offset: 0x002497E3 - public JSONData(int aData) - { - this.AsInt = aData; - } - - // Token: 0x17000E98 RID: 3736 - // (get) Token: 0x060062DB RID: 25307 RVA: 0x0024B3F2 File Offset: 0x002497F2 - // (set) Token: 0x060062DC RID: 25308 RVA: 0x0024B3FA File Offset: 0x002497FA - public override string Value - { - get - { - return this.m_Data; - } - set - { - this.m_Data = value; - } - } - - // Token: 0x060062DD RID: 25309 RVA: 0x0024B403 File Offset: 0x00249803 - public override string ToString() - { - return "\"" + JSONNode.Escape(this.m_Data) + "\""; - } - - // Token: 0x060062DE RID: 25310 RVA: 0x0024B41F File Offset: 0x0024981F - public override string ToString(string aPrefix) - { - return "\"" + JSONNode.Escape(this.m_Data) + "\""; - } - - // Token: 0x060062DF RID: 25311 RVA: 0x0024B43B File Offset: 0x0024983B - public override void ToString(string aPrefix, StringBuilder sb) - { - sb.Append("\"" + JSONNode.Escape(this.m_Data) + "\""); - } - - // Token: 0x060062E0 RID: 25312 RVA: 0x0024B460 File Offset: 0x00249860 - public override void Serialize(BinaryWriter aWriter) - { - JSONData jsondata = new JSONData(string.Empty); - jsondata.AsInt = this.AsInt; - if (jsondata.m_Data == this.m_Data) - { - aWriter.Write((byte)4); - aWriter.Write(this.AsInt); - return; - } - jsondata.AsFloat = this.AsFloat; - if (jsondata.m_Data == this.m_Data) - { - aWriter.Write((byte)7); - aWriter.Write(this.AsFloat); - return; - } - jsondata.AsDouble = this.AsDouble; - if (jsondata.m_Data == this.m_Data) - { - aWriter.Write((byte)5); - aWriter.Write(this.AsDouble); - return; - } - jsondata.AsBool = this.AsBool; - if (jsondata.m_Data == this.m_Data) - { - aWriter.Write((byte)6); - aWriter.Write(this.AsBool); - return; - } - aWriter.Write((byte)3); - aWriter.Write(this.m_Data); - } - - // Token: 0x040051D0 RID: 20944 - private string m_Data; - } -} diff --git a/_archived/varManager/SimpleJSON/JSONLazyCreator.cs b/_archived/varManager/SimpleJSON/JSONLazyCreator.cs deleted file mode 100644 index 470bffb..0000000 --- a/_archived/varManager/SimpleJSON/JSONLazyCreator.cs +++ /dev/null @@ -1,236 +0,0 @@ -锘縰sing System; -using System.Text; - -namespace SimpleJSON -{ - // Token: 0x02000CCC RID: 3276 - internal class JSONLazyCreator : JSONNode - { - // Token: 0x060062E1 RID: 25313 RVA: 0x0024B563 File Offset: 0x00249963 - public JSONLazyCreator(JSONNode aNode) - { - this.m_Node = aNode; - this.m_Key = null; - } - - // Token: 0x060062E2 RID: 25314 RVA: 0x0024B579 File Offset: 0x00249979 - public JSONLazyCreator(JSONNode aNode, string aKey) - { - this.m_Node = aNode; - this.m_Key = aKey; - } - - // Token: 0x060062E3 RID: 25315 RVA: 0x0024B58F File Offset: 0x0024998F - private void Set(JSONNode aVal) - { - if (this.m_Key == null) - { - this.m_Node.Add(aVal); - } - else - { - this.m_Node.Add(this.m_Key, aVal); - } - this.m_Node = null; - } - - // Token: 0x17000E99 RID: 3737 - public override JSONNode this[int aIndex] - { - get - { - return new JSONLazyCreator(this); - } - set - { - this.Set(new JSONArray - { - value - }); - } - } - - // Token: 0x17000E9A RID: 3738 - public override JSONNode this[string aKey] - { - get - { - return new JSONLazyCreator(this, aKey); - } - set - { - this.Set(new JSONClass - { - { - aKey, - value - } - }); - } - } - - // Token: 0x060062E8 RID: 25320 RVA: 0x0024B620 File Offset: 0x00249A20 - public override void Add(JSONNode aItem) - { - this.Set(new JSONArray - { - aItem - }); - } - - // Token: 0x060062E9 RID: 25321 RVA: 0x0024B644 File Offset: 0x00249A44 - public override void Add(string aKey, JSONNode aItem) - { - this.Set(new JSONClass - { - { - aKey, - aItem - } - }); - } - - // Token: 0x060062EA RID: 25322 RVA: 0x0024B666 File Offset: 0x00249A66 - public static bool operator ==(JSONLazyCreator a, object b) - { - return b == null || object.ReferenceEquals(a, b); - } - - // Token: 0x060062EB RID: 25323 RVA: 0x0024B677 File Offset: 0x00249A77 - public static bool operator !=(JSONLazyCreator a, object b) - { - return !(a == b); - } - - // Token: 0x060062EC RID: 25324 RVA: 0x0024B683 File Offset: 0x00249A83 - public override bool Equals(object obj) - { - return obj == null || object.ReferenceEquals(this, obj); - } - - // Token: 0x060062ED RID: 25325 RVA: 0x0024B694 File Offset: 0x00249A94 - public override int GetHashCode() - { - return base.GetHashCode(); - } - - // Token: 0x060062EE RID: 25326 RVA: 0x0024B69C File Offset: 0x00249A9C - public override string ToString() - { - return string.Empty; - } - - // Token: 0x060062EF RID: 25327 RVA: 0x0024B6A3 File Offset: 0x00249AA3 - public override string ToString(string aPrefix) - { - return string.Empty; - } - - // Token: 0x060062F0 RID: 25328 RVA: 0x0024B6AA File Offset: 0x00249AAA - public override void ToString(string aPrefix, StringBuilder sb) - { - } - - // Token: 0x17000E9B RID: 3739 - // (get) Token: 0x060062F1 RID: 25329 RVA: 0x0024B6AC File Offset: 0x00249AAC - // (set) Token: 0x060062F2 RID: 25330 RVA: 0x0024B6C8 File Offset: 0x00249AC8 - public override int AsInt - { - get - { - JSONData aVal = new JSONData(0); - this.Set(aVal); - return 0; - } - set - { - JSONData aVal = new JSONData(value); - this.Set(aVal); - } - } - - // Token: 0x17000E9C RID: 3740 - // (get) Token: 0x060062F3 RID: 25331 RVA: 0x0024B6E4 File Offset: 0x00249AE4 - // (set) Token: 0x060062F4 RID: 25332 RVA: 0x0024B708 File Offset: 0x00249B08 - public override float AsFloat - { - get - { - JSONData aVal = new JSONData(0f); - this.Set(aVal); - return 0f; - } - set - { - JSONData aVal = new JSONData(value); - this.Set(aVal); - } - } - - // Token: 0x17000E9D RID: 3741 - // (get) Token: 0x060062F5 RID: 25333 RVA: 0x0024B724 File Offset: 0x00249B24 - // (set) Token: 0x060062F6 RID: 25334 RVA: 0x0024B750 File Offset: 0x00249B50 - public override double AsDouble - { - get - { - JSONData aVal = new JSONData(0.0); - this.Set(aVal); - return 0.0; - } - set - { - JSONData aVal = new JSONData(value); - this.Set(aVal); - } - } - - // Token: 0x17000E9E RID: 3742 - // (get) Token: 0x060062F7 RID: 25335 RVA: 0x0024B76C File Offset: 0x00249B6C - // (set) Token: 0x060062F8 RID: 25336 RVA: 0x0024B788 File Offset: 0x00249B88 - public override bool AsBool - { - get - { - JSONData aVal = new JSONData(false); - this.Set(aVal); - return false; - } - set - { - JSONData aVal = new JSONData(value); - this.Set(aVal); - } - } - - // Token: 0x17000E9F RID: 3743 - // (get) Token: 0x060062F9 RID: 25337 RVA: 0x0024B7A4 File Offset: 0x00249BA4 - public override JSONArray AsArray - { - get - { - JSONArray jsonarray = new JSONArray(); - this.Set(jsonarray); - return jsonarray; - } - } - - // Token: 0x17000EA0 RID: 3744 - // (get) Token: 0x060062FA RID: 25338 RVA: 0x0024B7C0 File Offset: 0x00249BC0 - public override JSONClass AsObject - { - get - { - JSONClass jsonclass = new JSONClass(); - this.Set(jsonclass); - return jsonclass; - } - } - - // Token: 0x040051D1 RID: 20945 - private JSONNode m_Node; - - // Token: 0x040051D2 RID: 20946 - private string m_Key; - } -} diff --git a/_archived/varManager/SimpleJSON/JSONNode.cs b/_archived/varManager/SimpleJSON/JSONNode.cs deleted file mode 100644 index 50c53f7..0000000 --- a/_archived/varManager/SimpleJSON/JSONNode.cs +++ /dev/null @@ -1,695 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Text; - -namespace SimpleJSON -{ - // Token: 0x02000CC8 RID: 3272 - public class JSONNode - { - // Token: 0x06006284 RID: 25220 RVA: 0x002495C2 File Offset: 0x002479C2 - public virtual void Add(string aKey, JSONNode aItem) - { - } - - // Token: 0x17000E83 RID: 3715 - public virtual JSONNode this[int aIndex] - { - get - { - return null; - } - set - { - } - } - - // Token: 0x17000E84 RID: 3716 - public virtual JSONNode this[string aKey] - { - get - { - return null; - } - set - { - } - } - - // Token: 0x17000E85 RID: 3717 - // (get) Token: 0x06006289 RID: 25225 RVA: 0x002495CE File Offset: 0x002479CE - // (set) Token: 0x0600628A RID: 25226 RVA: 0x002495D5 File Offset: 0x002479D5 - public virtual string Value - { - get - { - return string.Empty; - } - set - { - } - } - - // Token: 0x17000E86 RID: 3718 - // (get) Token: 0x0600628B RID: 25227 RVA: 0x002495D7 File Offset: 0x002479D7 - public virtual int Count - { - get - { - return 0; - } - } - - // Token: 0x0600628C RID: 25228 RVA: 0x002495DA File Offset: 0x002479DA - public virtual void Add(JSONNode aItem) - { - this.Add(string.Empty, aItem); - } - - // Token: 0x0600628D RID: 25229 RVA: 0x002495E8 File Offset: 0x002479E8 - public virtual JSONNode Remove(string aKey) - { - return null; - } - - // Token: 0x0600628E RID: 25230 RVA: 0x002495EB File Offset: 0x002479EB - public virtual JSONNode Remove(int aIndex) - { - return null; - } - - // Token: 0x0600628F RID: 25231 RVA: 0x002495EE File Offset: 0x002479EE - public virtual JSONNode Remove(JSONNode aNode) - { - return aNode; - } - - // Token: 0x17000E87 RID: 3719 - // (get) Token: 0x06006290 RID: 25232 RVA: 0x002495F4 File Offset: 0x002479F4 - public virtual IEnumerable Childs - { - get - { - yield break; - } - } - - // Token: 0x17000E88 RID: 3720 - // (get) Token: 0x06006291 RID: 25233 RVA: 0x00249610 File Offset: 0x00247A10 - public IEnumerable DeepChilds - { - get - { - foreach (JSONNode C in this.Childs) - { - foreach (JSONNode D in C.DeepChilds) - { - yield return D; - } - } - yield break; - } - } - - // Token: 0x06006292 RID: 25234 RVA: 0x00249633 File Offset: 0x00247A33 - public override string ToString() - { - return "JSONNode"; - } - - // Token: 0x06006293 RID: 25235 RVA: 0x0024963A File Offset: 0x00247A3A - public virtual string ToString(string aPrefix) - { - return "JSONNode"; - } - - // Token: 0x06006294 RID: 25236 RVA: 0x00249641 File Offset: 0x00247A41 - public virtual void ToString(string aPrefix, StringBuilder sb) - { - } - - // Token: 0x17000E89 RID: 3721 - // (get) Token: 0x06006295 RID: 25237 RVA: 0x00249644 File Offset: 0x00247A44 - // (set) Token: 0x06006296 RID: 25238 RVA: 0x00249668 File Offset: 0x00247A68 - public virtual int AsInt - { - get - { - int result = 0; - if (int.TryParse(this.Value, out result)) - { - return result; - } - return 0; - } - set - { - this.Value = value.ToString(); - } - } - - // Token: 0x17000E8A RID: 3722 - // (get) Token: 0x06006297 RID: 25239 RVA: 0x00249680 File Offset: 0x00247A80 - // (set) Token: 0x06006298 RID: 25240 RVA: 0x002496AC File Offset: 0x00247AAC - public virtual float AsFloat - { - get - { - float result = 0f; - if (float.TryParse(this.Value, out result)) - { - return result; - } - return 0f; - } - set - { - this.Value = value.ToString(); - } - } - - // Token: 0x17000E8B RID: 3723 - // (get) Token: 0x06006299 RID: 25241 RVA: 0x002496C4 File Offset: 0x00247AC4 - // (set) Token: 0x0600629A RID: 25242 RVA: 0x002496F8 File Offset: 0x00247AF8 - public virtual double AsDouble - { - get - { - double result = 0.0; - if (double.TryParse(this.Value, out result)) - { - return result; - } - return 0.0; - } - set - { - this.Value = value.ToString(); - } - } - - // Token: 0x17000E8C RID: 3724 - // (get) Token: 0x0600629B RID: 25243 RVA: 0x00249710 File Offset: 0x00247B10 - // (set) Token: 0x0600629C RID: 25244 RVA: 0x00249741 File Offset: 0x00247B41 - public virtual bool AsBool - { - get - { - bool result = false; - if (bool.TryParse(this.Value, out result)) - { - return result; - } - return !string.IsNullOrEmpty(this.Value); - } - set - { - this.Value = ((!value) ? "false" : "true"); - } - } - - // Token: 0x17000E8D RID: 3725 - // (get) Token: 0x0600629D RID: 25245 RVA: 0x0024975E File Offset: 0x00247B5E - public virtual JSONArray AsArray - { - get - { - return this as JSONArray; - } - } - - // Token: 0x17000E8E RID: 3726 - // (get) Token: 0x0600629E RID: 25246 RVA: 0x00249766 File Offset: 0x00247B66 - public virtual JSONClass AsObject - { - get - { - return this as JSONClass; - } - } - - // Token: 0x0600629F RID: 25247 RVA: 0x0024976E File Offset: 0x00247B6E - public static implicit operator JSONNode(string s) - { - return new JSONData(s); - } - - // Token: 0x060062A0 RID: 25248 RVA: 0x00249776 File Offset: 0x00247B76 - public static implicit operator string(JSONNode d) - { - return (!(d == null)) ? d.Value : null; - } - - // Token: 0x060062A1 RID: 25249 RVA: 0x00249790 File Offset: 0x00247B90 - public static bool operator ==(JSONNode a, object b) - { - return (b == null && a is JSONLazyCreator) || object.ReferenceEquals(a, b); - } - - // Token: 0x060062A2 RID: 25250 RVA: 0x002497AC File Offset: 0x00247BAC - public static bool operator !=(JSONNode a, object b) - { - return !(a == b); - } - - // Token: 0x060062A3 RID: 25251 RVA: 0x002497B8 File Offset: 0x00247BB8 - public override bool Equals(object obj) - { - return object.ReferenceEquals(this, obj); - } - - // Token: 0x060062A4 RID: 25252 RVA: 0x002497C1 File Offset: 0x00247BC1 - public override int GetHashCode() - { - return base.GetHashCode(); - } - - // Token: 0x060062A5 RID: 25253 RVA: 0x002497CC File Offset: 0x00247BCC - internal static string Escape(string aText) - { - string text = string.Empty; - if (aText != null) - { - foreach (char c in aText) - { - switch (c) - { - case '\b': - text += "\\b"; - break; - case '\t': - text += "\\t"; - break; - case '\n': - text += "\\n"; - break; - default: - if (c != '"') - { - if (c != '\\') - { - text += c; - } - else - { - text += "\\\\"; - } - } - else - { - text += "\\\""; - } - break; - case '\f': - text += "\\f"; - break; - case '\r': - text += "\\r"; - break; - } - } - } - return text; - } - - // Token: 0x060062A6 RID: 25254 RVA: 0x002498C8 File Offset: 0x00247CC8 - public static JSONNode Parse(string aJSON) - { - Stack stack = new Stack(); - JSONNode jsonnode = null; - int i = 0; - bool flag = false; - string text = string.Empty; - string text2 = string.Empty; - bool flag2 = false; - while (i < aJSON.Length) - { - char c = aJSON[i]; - switch (c) - { - case '\t': - goto IL_342; - case '\n': - case '\r': - break; - default: - switch (c) - { - case '[': - if (flag2) - { - text += aJSON[i]; - goto IL_47F; - } - stack.Push(new JSONArray()); - if (jsonnode != null) - { - text2 = text2.Trim(); - if (jsonnode is JSONArray) - { - jsonnode.Add(stack.Peek()); - } - else if (text2 != string.Empty) - { - jsonnode.Add(text2, stack.Peek()); - } - } - text2 = string.Empty; - text = string.Empty; - flag = false; - jsonnode = stack.Peek(); - goto IL_47F; - case '\\': - i++; - if (flag2) - { - char c2 = aJSON[i]; - switch (c2) - { - case 'r': - text += '\r'; - break; - default: - if (c2 != 'b') - { - if (c2 != 'f') - { - if (c2 != 'n') - { - text += c2; - } - else - { - text += '\n'; - } - } - else - { - text += '\f'; - } - } - else - { - text += '\b'; - } - break; - case 't': - text += '\t'; - break; - case 'u': - { - string s = aJSON.Substring(i + 1, 4); - text += (char)int.Parse(s, NumberStyles.AllowHexSpecifier); - i += 4; - break; - } - } - } - goto IL_47F; - case ']': - break; - default: - switch (c) - { - case ' ': - goto IL_342; - default: - switch (c) - { - case '{': - if (flag2) - { - text += aJSON[i]; - goto IL_47F; - } - stack.Push(new JSONClass()); - if (jsonnode != null) - { - text2 = text2.Trim(); - if (jsonnode is JSONArray) - { - jsonnode.Add(stack.Peek()); - } - else if (text2 != string.Empty) - { - jsonnode.Add(text2, stack.Peek()); - } - } - text2 = string.Empty; - text = string.Empty; - flag = false; - jsonnode = stack.Peek(); - goto IL_47F; - default: - if (c != ',') - { - if (c != ':') - { - text += aJSON[i]; - flag = true; - goto IL_47F; - } - if (flag2) - { - text += aJSON[i]; - goto IL_47F; - } - text2 = text; - text = string.Empty; - flag = false; - goto IL_47F; - } - else - { - if (flag2) - { - text += aJSON[i]; - goto IL_47F; - } - if (flag) - { - if (jsonnode is JSONArray) - { - jsonnode.Add(text); - } - else if (text2 != string.Empty) - { - jsonnode.Add(text2, text); - } - } - text2 = string.Empty; - text = string.Empty; - flag = false; - goto IL_47F; - } - break; - case '}': - break; - } - break; - case '"': - flag2 ^= true; - flag = true; - goto IL_47F; - } - break; - } - if (flag2) - { - text += aJSON[i]; - } - else - { - if (stack.Count == 0) - { - throw new Exception("JSON Parse: Too many closing brackets"); - } - stack.Pop(); - if (flag) - { - text2 = text2.Trim(); - if (jsonnode is JSONArray) - { - jsonnode.Add(text); - } - else if (text2 != string.Empty) - { - jsonnode.Add(text2, text); - } - } - text2 = string.Empty; - text = string.Empty; - flag = false; - if (stack.Count > 0) - { - jsonnode = stack.Peek(); - } - } - break; - } - IL_47F: - i++; - continue; - IL_342: - if (flag2) - { - text += aJSON[i]; - } - goto IL_47F; - } - if (flag2) - { - throw new Exception("JSON Parse: Quotation marks seems to be messed up."); - } - return jsonnode; - } - - // Token: 0x060062A7 RID: 25255 RVA: 0x00249D77 File Offset: 0x00248177 - public virtual void Serialize(BinaryWriter aWriter) - { - } - - // Token: 0x060062A8 RID: 25256 RVA: 0x00249D7C File Offset: 0x0024817C - public void SaveToStream(Stream aData) - { - BinaryWriter aWriter = new BinaryWriter(aData); - this.Serialize(aWriter); - } - - // Token: 0x060062A9 RID: 25257 RVA: 0x00249D97 File Offset: 0x00248197 - public void SaveToCompressedStream(Stream aData) - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062AA RID: 25258 RVA: 0x00249DA3 File Offset: 0x002481A3 - public void SaveToCompressedFile(string aFileName) - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062AB RID: 25259 RVA: 0x00249DAF File Offset: 0x002481AF - public string SaveToCompressedBase64() - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062AC RID: 25260 RVA: 0x00249DBC File Offset: 0x002481BC - public void SaveToFile(string aFileName) - { - Directory.CreateDirectory(new FileInfo(aFileName).Directory.FullName); - using (FileStream fileStream = File.OpenWrite(aFileName)) - { - this.SaveToStream(fileStream); - } - } - - // Token: 0x060062AD RID: 25261 RVA: 0x00249E10 File Offset: 0x00248210 - public string SaveToBase64() - { - string result; - using (MemoryStream memoryStream = new MemoryStream()) - { - this.SaveToStream(memoryStream); - memoryStream.Position = 0L; - result = Convert.ToBase64String(memoryStream.ToArray()); - } - return result; - } - - // Token: 0x060062AE RID: 25262 RVA: 0x00249E64 File Offset: 0x00248264 - public static JSONNode Deserialize(BinaryReader aReader) - { - JSONBinaryTag jsonbinaryTag = (JSONBinaryTag)aReader.ReadByte(); - switch (jsonbinaryTag) - { - case JSONBinaryTag.Array: - { - int num = aReader.ReadInt32(); - JSONArray jsonarray = new JSONArray(); - for (int i = 0; i < num; i++) - { - jsonarray.Add(JSONNode.Deserialize(aReader)); - } - return jsonarray; - } - case JSONBinaryTag.Class: - { - int num2 = aReader.ReadInt32(); - JSONClass jsonclass = new JSONClass(); - for (int j = 0; j < num2; j++) - { - string aKey = aReader.ReadString(); - JSONNode aItem = JSONNode.Deserialize(aReader); - jsonclass.Add(aKey, aItem); - } - return jsonclass; - } - case JSONBinaryTag.Value: - return new JSONData(aReader.ReadString()); - case JSONBinaryTag.IntValue: - return new JSONData(aReader.ReadInt32()); - case JSONBinaryTag.DoubleValue: - return new JSONData(aReader.ReadDouble()); - case JSONBinaryTag.BoolValue: - return new JSONData(aReader.ReadBoolean()); - case JSONBinaryTag.FloatValue: - return new JSONData(aReader.ReadSingle()); - default: - throw new Exception("Error deserializing JSON. Unknown tag: " + jsonbinaryTag); - } - } - - // Token: 0x060062AF RID: 25263 RVA: 0x00249F63 File Offset: 0x00248363 - public static JSONNode LoadFromCompressedFile(string aFileName) - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062B0 RID: 25264 RVA: 0x00249F6F File Offset: 0x0024836F - public static JSONNode LoadFromCompressedStream(Stream aData) - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062B1 RID: 25265 RVA: 0x00249F7B File Offset: 0x0024837B - public static JSONNode LoadFromCompressedBase64(string aBase64) - { - throw new Exception("Can't use compressed functions. You need include the SharpZipLib and uncomment the define at the top of SimpleJSON"); - } - - // Token: 0x060062B2 RID: 25266 RVA: 0x00249F88 File Offset: 0x00248388 - public static JSONNode LoadFromStream(Stream aData) - { - JSONNode result; - using (BinaryReader binaryReader = new BinaryReader(aData)) - { - result = JSONNode.Deserialize(binaryReader); - } - return result; - } - - // Token: 0x060062B3 RID: 25267 RVA: 0x00249FC8 File Offset: 0x002483C8 - public static JSONNode LoadFromFile(string aFileName) - { - JSONNode result; - using (FileStream fileStream = File.OpenRead(aFileName)) - { - result = JSONNode.LoadFromStream(fileStream); - } - return result; - } - - // Token: 0x060062B4 RID: 25268 RVA: 0x0024A008 File Offset: 0x00248408 - public static JSONNode LoadFromBase64(string aBase64) - { - byte[] buffer = Convert.FromBase64String(aBase64); - return JSONNode.LoadFromStream(new MemoryStream(buffer) - { - Position = 0L - }); - } - } -} diff --git a/_archived/varManager/SimpleLogger.cs b/_archived/varManager/SimpleLogger.cs deleted file mode 100644 index 42362fc..0000000 --- a/_archived/varManager/SimpleLogger.cs +++ /dev/null @@ -1,167 +0,0 @@ -锘/* -MIT License - -Copyright (c) 2016 Heiswayi Nrird - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -public class SimpleLogger -{ - private const string FILE_EXT = ".log"; - private readonly object fileLock = new object(); - private readonly string datetimeFormat; - private readonly string logFilename; - - ///

- /// Initiate an instance of SimpleLogger class constructor. - /// If log file does not exist, it will be created automatically. - /// - public SimpleLogger() - { - datetimeFormat = "yyyy-MM-dd HH:mm:ss.fff"; - logFilename = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name + FILE_EXT; - - // Log file header line - string logHeader = logFilename + " is created."; - if (!System.IO.File.Exists(logFilename)) - { - WriteLine(System.DateTime.Now.ToString(datetimeFormat) + " " + logHeader); - } - } - - /// - /// Log a DEBUG message - /// - /// Message - public void Debug(string text) - { - WriteFormattedLog(LogLevel.DEBUG, text); - } - - /// - /// Log an ERROR message - /// - /// Message - public void Error(string text) - { - WriteFormattedLog(LogLevel.ERROR, text); - } - - /// - /// Log a FATAL ERROR message - /// - /// Message - public void Fatal(string text) - { - WriteFormattedLog(LogLevel.FATAL, text); - } - - /// - /// Log an INFO message - /// - /// Message - public void Info(string text) - { - WriteFormattedLog(LogLevel.INFO, text); - } - - /// - /// Log a TRACE message - /// - /// Message - public void Trace(string text) - { - WriteFormattedLog(LogLevel.TRACE, text); - } - - /// - /// Log a WARNING message - /// - /// Message - public void Warning(string text) - { - WriteFormattedLog(LogLevel.WARNING, text); - } - - private void WriteLine(string text, bool append = false) - { - try - { - if (string.IsNullOrEmpty(text)) - { - return; - } - lock (fileLock) - { - using (System.IO.StreamWriter writer = new System.IO.StreamWriter(logFilename, append, System.Text.Encoding.UTF8)) - { - writer.WriteLine(text); - } - } - } - catch - { - throw; - } - } - - public string WriteFormattedLog(LogLevel level, string text) - { - string pretext; - switch (level) - { - case LogLevel.TRACE: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [TRACE] "; - break; - case LogLevel.INFO: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [INFO] "; - break; - case LogLevel.DEBUG: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [DEBUG] "; - break; - case LogLevel.WARNING: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [WARNING] "; - break; - case LogLevel.ERROR: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [ERROR] "; - break; - case LogLevel.FATAL: - pretext = System.DateTime.Now.ToString(datetimeFormat) + " [FATAL] "; - break; - default: - pretext = ""; - break; - } - - WriteLine(pretext + text, true); - return pretext + text; - } - - [System.Flags] - public enum LogLevel - { - TRACE, - INFO, - DEBUG, - WARNING, - ERROR, - FATAL - } -} \ No newline at end of file diff --git a/_archived/varManager/ThreeStateTreeview.cs b/_archived/varManager/ThreeStateTreeview.cs deleted file mode 100644 index c013bcf..0000000 --- a/_archived/varManager/ThreeStateTreeview.cs +++ /dev/null @@ -1,279 +0,0 @@ -锘縰sing System; -using System.Drawing; -using System.Windows.Forms; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; - - -namespace nsThreeStateTreeview { - - // - // A Tri-State TreeView designed for on-demand populating of the tree - // - // - // 'Mixed' nodes retain their checked state, meaning they can be checked or unchecked according to their current state - // Tree can be navigated by keyboard (cursor keys & space) - // No need to do anything special in calling code - // - public class TriStateTreeView : System.Windows.Forms.TreeView - { - // - // CheckedState is an enum of all allowable nodes states - // - public enum CheckedState : int { UnInitialised = -1, UnChecked, Checked, Mixed }; - - // - // IgnoreClickAction is used to ingore messages generated by setting the node.Checked flag in code - // Do not set e.Cancel = true in OnBeforeCheck otherwise the Checked state will be lost - // - int IgnoreClickAction = 0; - // - - // TriStateStyles is an enum of all allowable tree styles - // All styles check children when parent is checked - // Installer automatically checks parent if all children are checked, and unchecks parent if at least one child is unchecked - // Standard never changes the checked status of a parent - // - public enum TriStateStyles : int { Standard = 0, Installer }; - - // Create a private member for the tree style, and allow it to be set on the property sheer - private TriStateStyles TriStateStyle = TriStateStyles.Standard; - - [System.ComponentModel.Category("Tri-State Tree View")] - [System.ComponentModel.DisplayName("Style")] - [System.ComponentModel.Description("Style of the Tri-State Tree View")] - public TriStateStyles TriStateStyleProperty - { - get { return TriStateStyle; } - set { TriStateStyle = value; } - } - - // - // Constructor. Create and populate an image list - // - public TriStateTreeView() : base() - { - StateImageList = new System.Windows.Forms.ImageList(); - - // populate the image list, using images from the System.Windows.Forms.CheckBoxRenderer class - for (int i = 0; i < 3; i++) - { - // Create a bitmap which holds the relevent check box style - // see http://msdn.microsoft.com/en-us/library/ms404307.aspx and http://msdn.microsoft.com/en-us/library/system.windows.forms.checkboxrenderer.aspx - - System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(16, 16); - System.Drawing.Graphics chkGraphics = System.Drawing.Graphics.FromImage(bmp); - switch (i) - { - // 0,1 - offset the checkbox slightly so it positions in the correct place - case 0: - System.Windows.Forms.CheckBoxRenderer.DrawCheckBox(chkGraphics, new System.Drawing.Point(0, 1), System.Windows.Forms.VisualStyles.CheckBoxState.UncheckedNormal); - break; - case 1: - System.Windows.Forms.CheckBoxRenderer.DrawCheckBox(chkGraphics, new System.Drawing.Point(0, 1), System.Windows.Forms.VisualStyles.CheckBoxState.CheckedNormal); - break; - case 2: - System.Windows.Forms.CheckBoxRenderer.DrawCheckBox(chkGraphics, new System.Drawing.Point(0, 1), System.Windows.Forms.VisualStyles.CheckBoxState.MixedNormal); - break; - } - - StateImageList.Images.Add(bmp); - } - } - - // - // Called once before window displayed. Disables default Checkbox functionality and ensures all nodes display an 'unchecked' image. - // - protected override void OnCreateControl() - { - base.OnCreateControl(); - CheckBoxes = false; // Disable default CheckBox functionality if it's been enabled - - // Give every node an initial 'unchecked' image - IgnoreClickAction++; // we're making changes to the tree, ignore any other change requests - UpdateChildState(this.Nodes, (int)CheckedState.UnChecked, false, true); - IgnoreClickAction--; - } - - // - // Called after a node is checked. Forces all children to inherit current state, and notifies parents they may need to become 'mixed' - // - protected override void OnAfterCheck(System.Windows.Forms.TreeViewEventArgs e) - { - base.OnAfterCheck(e); - - if (IgnoreClickAction > 0) - { - return; - } - - IgnoreClickAction++; // we're making changes to the tree, ignore any other change requests - - // the checked state has already been changed, we just need to update the state index - - // node is either ticked or unticked. ignore mixed state, as the node is still only ticked or unticked regardless of state of children - System.Windows.Forms.TreeNode tn = e.Node; - tn.StateImageIndex = tn.Checked ? (int)CheckedState.Checked : (int)CheckedState.UnChecked; - - // force all children to inherit the same state as the current node - UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, false); - - // populate state up the tree, possibly resulting in parents with mixed state - UpdateParentState(e.Node.Parent); - - IgnoreClickAction--; - } - - // - // Called after a node is expanded. Ensures any new nodes display an 'unchecked' image - // - protected override void OnAfterExpand(System.Windows.Forms.TreeViewEventArgs e) - { - // If any child node is new, give it the same check state as the current node - // So if current node is ticked, child nodes will also be ticked - base.OnAfterExpand(e); - - IgnoreClickAction++; // we're making changes to the tree, ignore any other change requests - UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, true); - IgnoreClickAction--; - } - - // - // Helper function to replace child state with that of the parent - // - protected void UpdateChildState(System.Windows.Forms.TreeNodeCollection Nodes, int StateImageIndex, bool Checked, bool ChangeUninitialisedNodesOnly) - { - foreach (System.Windows.Forms.TreeNode tnChild in Nodes) - { - if (!ChangeUninitialisedNodesOnly || tnChild.StateImageIndex == -1) - { - tnChild.StateImageIndex = StateImageIndex; - tnChild.Checked = Checked; // override 'checked' state of child with that of parent - - if (tnChild.Nodes.Count > 0) - { - UpdateChildState(tnChild.Nodes, StateImageIndex, Checked, ChangeUninitialisedNodesOnly); - } - } - } - } - - // - // Helper function to notify parent it may need to use 'mixed' state - // - protected void UpdateParentState(System.Windows.Forms.TreeNode tn) - { - // Node needs to check all of it's children to see if any of them are ticked or mixed - if (tn == null) - return; - - int OrigStateImageIndex = tn.StateImageIndex; - - int UnCheckedNodes = 0, CheckedNodes = 0, MixedNodes = 0; - - // The parent needs to know how many of it's children are Checked or Mixed - foreach (System.Windows.Forms.TreeNode tnChild in tn.Nodes) - { - if (tnChild.StateImageIndex == (int)CheckedState.Checked) - CheckedNodes++; - else if (tnChild.StateImageIndex == (int)CheckedState.Mixed) - { - MixedNodes++; - break; - } - else - UnCheckedNodes++; - } - - if (TriStateStyle == TriStateStyles.Installer) - { - // In Installer mode, if all child nodes are checked then parent is checked - // If at least one child is unchecked, then parent is unchecked - if (MixedNodes == 0) - { - if (UnCheckedNodes == 0) - { - // all children are checked, so parent must be checked - tn.Checked = true; - } - else - { - // at least one child is unchecked, so parent must be unchecked - tn.Checked = false; - } - } - } - - // Determine the parent's new Image State - if (MixedNodes > 0) - { - // at least one child is mixed, so parent must be mixed - tn.StateImageIndex = (int)CheckedState.Mixed; - } - else if (CheckedNodes > 0 && UnCheckedNodes == 0) - { - // all children are checked - if (tn.Checked) - tn.StateImageIndex = (int)CheckedState.Checked; - else - tn.StateImageIndex = (int)CheckedState.Mixed; - } - else if (CheckedNodes > 0) - { - // some children are checked, the rest are unchecked - tn.StateImageIndex = (int)CheckedState.Mixed; - } - else - { - // all children are unchecked - if (tn.Checked) - tn.StateImageIndex = (int)CheckedState.Mixed; - else - tn.StateImageIndex = (int)CheckedState.UnChecked; - } - - if (OrigStateImageIndex != tn.StateImageIndex && tn.Parent != null) - { - // Parent's state has changed, notify the parent's parent - UpdateParentState(tn.Parent); - } - } - - // - // Called on keypress. Used to change node state when Space key is pressed - // Invokes OnAfterCheck to do the real work - // - protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e) - { - base.OnKeyDown(e); - - // is the keypress a space? If not, discard it - if (e.KeyCode == System.Windows.Forms.Keys.Space) - { - // toggle the node's checked status. This will then fire OnAfterCheck - SelectedNode.Checked = !SelectedNode.Checked; - } - } - - // - // Called when node is clicked by the mouse. Does nothing unless the image was clicked - // Invokes OnAfterCheck to do the real work - // - protected override void OnNodeMouseClick(System.Windows.Forms.TreeNodeMouseClickEventArgs e) - { - base.OnNodeMouseClick(e); - - // is the click on the checkbox? If not, discard it - System.Windows.Forms.TreeViewHitTestInfo info = HitTest(e.X, e.Y); - if (info == null || info.Location != System.Windows.Forms.TreeViewHitTestLocations.StateImage) - { - return; - } - - // toggle the node's checked status. This will then fire OnAfterCheck - System.Windows.Forms.TreeNode tn = e.Node; - tn.Checked = !tn.Checked; - } - } -} diff --git a/_archived/varManager/VarManager.ico b/_archived/varManager/VarManager.ico deleted file mode 100644 index f2b26eab57cc53f4d6b734aa7574b37e78f885b9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9662 zcmeHNdr(x@8D~LQP~;)SXrqB-Vkfqph@$M>_wtZ^@KDrAOk$$eHdAAhnrS;`93Qlu z%-EPVW7=uPwrR_27bK0^DycP&Yom=?M1#CEHG_afgK;i+^Uk z&YAC=?|$d|e&6rA=iGA_BO(;|myr>HD?OrmQAEUC^qxW^s!eDL=;@U*DGE7FReR8O``a$JRlDp#^6ao`XZPlF+uV5pU&QCDy%u%igZQgno&9u`mD^QiQSJ7( zJ$9Sg%=!Y>R}n*yG&6V9U8tYQ+J)-ZC%X5c9VG43w5C&yi;s<6Uwlj;?Td^*k~Vhr zvBuNXCWy=o=DT)XZmhjPa|pNvwgLZ-SbKMoalXsUHAwL1t9Z9rUBudj>I07us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vA@<6W6O-3X@Pp?BB5w*l<2#W52Sqc6M*si- diff --git a/_archived/varManager/app.manifest b/_archived/varManager/app.manifest deleted file mode 100644 index 603d39f..0000000 --- a/_archived/varManager/app.manifest +++ /dev/null @@ -1,78 +0,0 @@ -锘 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_archived/varManager/icoVarManager.ico b/_archived/varManager/icoVarManager.ico deleted file mode 100644 index 11819c1644463d3f1f13894405e005a0eed42298..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9662 zcmeHNeNa@_72gG6L6HwBMjH(z6Faf(L=<)3e(wVA7axi`iAhY<+Gc8OQZsGGjN=Dw zCo?vt&6swYv2EG{vJ09MTJ6%|MK${_=D|?bcLE2aC z@;UXz-bL!IXj{TXulZu61ymYwhYS z;kMP~)Yw>G!1^j;2$E*w4){t96Ir`h{j(Xq?P$A5`!u)tXw&S2BUff06iE9b|Bs}N zTzstQ7`2Ha3!?enySymHRifPk+ydKx|3|F7ugo;vYvURv_^oQ*XVa9icCq@vBgATr zU%MXj9y6ynn(w-Dy$#&=v)D1d=qlCCklUjM>wtfV&B15o8hj=CG`X#OOmVo&^sC^1 zupWH1nO~6LZh8E4$ZONQOy^?G#_+tWRL9EtilT|&dA|g^T|Erl2G)-DQG=;oyXFjw z-)mJ5pax5+O)N?A!}q5o-fpyGg;M-onl}X0_$+vOg!sXntKoT(oLK+hq7+>468sMC zyt`C4owZ~8@Vyq82iY7@gCkhq>8zc+Pw^w(5RLa2%RT%pkDt1`wyf%5@bLrK7l-Hg zAhYED_ADz*0~d#=udp0)m1tg(+p=R{xj7qnPqO%tPY^Lzuy*o(1V6LR_7tuRP<_Y3 zH}CBYR_;P$cK6@H_qNM@kukWh02c!i{0{C6xF@fNQ7_csC1AcI$-%~Xunsa~O{6&4 zcpq3^K1%fGAGyY}zHXXc7^e1+Psn}lS!PKG_y1shp+5xOcjdOx#=gatOz`btW0HKJ zdnuZI-D1<%D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2^`lk{6;Bm%X8B8Pi!E-v1*MyMi9mxL!YUhSX diff --git a/_archived/varManager/meta.json b/_archived/varManager/meta.json deleted file mode 100644 index 921553e..0000000 --- a/_archived/varManager/meta.json +++ /dev/null @@ -1,456 +0,0 @@ -{ - "licenseType" : "CC BY", - "creatorName" : "Ruthven2000", - "packageName" : "LittleRed", - "standardReferenceVersionOption" : "Latest", - "scriptReferenceVersionOption" : "Exact", - "description" : "", - "credits" : "", - "instructions" : "", - "promotionalLink" : "", - "programVersion" : "1.20.77.9", - "contentList" : [ - "Saves/scene/Current/RedHood", - "Custom/Sounds/DarkGift.mp3", - "Custom/Sounds/Horror/werewolf/Howls/Howl01.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/untitled.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl02.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl03.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl04.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl05.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl06.wav", - "Custom/Sounds/Horror/werewolf/Low Growls/growl07.wav", - "Custom/Sounds/BDSM/clothrip.wav", - "Custom/Sounds/BDSM/Gasps/Gasp15.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp14.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp13.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp12.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp11.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp10.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp7.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp8.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp9.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp6.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp5.mp3", - "Custom/Sounds/BDSM/Gasps/Gasp4.mp3", - "Custom/Scripts/MeshedVR/FloatParamRandomizer.cs", - "Custom/Clothing/Female/Ruthven2000/Gipsydressopen/Gipsydressopen.vam", - "Custom/Clothing/Female/Ruthven2000/Gipsydressopen/Gipsydressopen.jpg", - "Custom/Clothing/Female/Ruthven2000/Gipsydressopen/Gipsydressopen.vaj", - "Custom/Clothing/Female/Ruthven2000/Gipsydressopen/Gipsydressopen.vab", - "Custom/Atom/Person/Morphs/female_genitalia/!Custom/Gens Young.vmi", - "Custom/Atom/Person/Morphs/female_genitalia/!Custom/Gens Young.vmb", - "Custom/Atom/Person/Textures/Cassie/CassieTorsoN.png", - "Custom/Images/fullmoon.jpg", - "Custom/Atom/Person/Morphs/male/_Alien_Face/PHMNoseHag.vmi", - "Custom/Atom/Person/Morphs/male/_Alien_Face/PHMNoseHag.vmb", - "Custom/Atom/Person/Morphs/male/Face_Reloaded-Lite/Forehead back.vmi", - "Custom/Atom/Person/Morphs/male/Face_Reloaded-Lite/Forehead back.vmb", - "Custom/Atom/Person/Morphs/male/Mouth_Reloaded-Lite/Mouth big X.vmi", - "Custom/Atom/Person/Morphs/male/Mouth_Reloaded-Lite/Mouth big X.vmb", - "Custom/Atom/Person/Morphs/female/AUTO/Face flat.vmi", - "Custom/Atom/Person/Morphs/female/AUTO/Face flat.vmb", - "Custom/Atom/Person/Morphs/female/Body Diversity/Face Weight Gaunt.vmi", - "Custom/Atom/Person/Morphs/female/Body Diversity/Face Weight Gaunt.vmb", - "Custom/Atom/Person/Textures/JackarooFreeGenNormals.png", - "Custom/Sounds/Horror/werewolf/Howls/Howl02.wav", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/GypsyDressDown.vam", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/GypsyDressDown.jpg", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/GypsyDressDown.vaj", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/GypsyDressDown.vab", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/Dress 4.png", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/Dressalpha.png", - "Custom/Clothing/Female/Ruthven2000/GypsyDressDown/Dress 2.png" - ], - "dependencies" : { - "via5.Synergy.1" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "AcidBubbles.Timeline.217" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "bvctr.SoundRandomizer.1" : { - "licenseType" : "CC BY-NC", - "dependencies" : { - } - }, - "YameteOuji.YameteOuji_Shoes_MidHeelA.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "cotyounoyume.ExpressionBlushingAndTears.10" : { - "licenseType" : "CC BY-NC-SA", - "dependencies" : { - } - }, - "Skippy.Skippys_CumClothing.latest" : { - "licenseType" : "CC BY-NC", - "dependencies" : { - } - }, - "SupaRioAmateur.Sub_Demi_Eyes.1" : { - "licenseType" : "CC BY-NC-SA", - "dependencies" : { - } - }, - "noheadnoleg.t014_wearable_tattoo_eye.latest" : { - "licenseType" : "PC", - "dependencies" : { - } - }, - "NoStage3.Hair_Long_Side_2_Bangs_3.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "Spacedog.Import_Reloaded_Lite.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "Xstatic.Denise.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "Roac.Slayer_hair.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "kemenate.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - } - } - }, - "Dragontales.She's_Alive.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "via5.Synergy.1" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "MacGruber.Life.10" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "Dragontales.RealGaze.1" : { - "licenseType" : "Questionable", - "dependencies" : { - } - } - } - }, - "Alter3go.Skin_A1_3.latest" : { - "licenseType" : "CC BY-NC-ND", - "dependencies" : { - } - }, - "Alter3go.Body_Freckles.latest" : { - "licenseType" : "CC BY-NC-ND", - "dependencies" : { - } - }, - "JoyBoy.Old_Big_Tree.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "xstatic.Xstatic_particle_pack_#8_Fog.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "hazmhox.rocksandplants101.1" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - "MeshedVR.3PointLightSetup.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "NoStage3.Hair_Long_Upswept_Top_Bun.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "kemenate.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "MeshedVR.PresetsPack.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "Damarmau.Forest.1" : { - "licenseType" : "CC BY", - "dependencies" : { - "MacGruber.PostMagic.3" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "BooMoon.BooMoon_Lut_Pack.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "xstatic.Xstatic_particle_pack_#8_Fog.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "MR.Trees.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "hazmhox.rocksandplants101.1" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - "MeshedVR.3PointLightSetup.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "NoStage3.Hair_Long_Upswept_Top_Bun.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "kemenate.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "MeshedVR.PresetsPack.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "NoStage3.UnityAssetVamifier.20" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "MR.Campfire.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "hazmhox.vamafx.2" : { - "licenseType" : "CC BY-NC-SA", - "dependencies" : { - } - } - } - }, - "MR.Trees.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "NoStage3.UnityAssetVamifier.20" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "AcidBubbles.ImprovedPoV.1" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "Hunting-Succubus.Male&Futa_Enhanced_Eyes.latest" : { - "licenseType" : "PC EA", - "dependencies" : { - } - }, - "kemenate.Male_Body_Hair.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "kemenate.Male_Hairstyles.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "kemenate.Male_Beard.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "WeebU.My_morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "MacGruber.Life.10" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "Vamtastic.Penis_Grip_V3.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "kemenate.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "Spacedog.Wet_Bits.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "MacGruber.Life.13" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - }, - "Romolas.Eye_Saccades.2" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "VaMChan.Hair_Headband_Hairstyles.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "kemenate.Clothing.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "JayJayWon.BJSFX.1" : { - "licenseType" : "CC BY-NC-SA", - "dependencies" : { - } - }, - "AshAuryn.Sexpressions.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "geesp0t.EasyMoan.10" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - "AshAuryn.Sexpressions.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "TenStrip.Expressions.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - } - } - }, - "KdollMASTA.KDoll_Mk10.1" : { - "licenseType" : "CC BY-NC", - "dependencies" : { - "cotyounoyume.ExpressionBlushingAndTearsFullVer.3" : { - "missing" : "true", - "licenseType" : "MISSING", - "dependencies" : { - } - }, - "MeshedVR.3PointLightSetup.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "NoStage3.Hair_Long_Upswept_Top_Bun.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "LFE.AutoPupil0.8" : { - "missing" : "true", - "licenseType" : "MISSING", - "dependencies" : { - } - }, - "Hunting-Succubus.FemaleBodySmootherTessellation.1" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "Hunting-Succubus.Enhanced_Eyes.latest" : { - "licenseType" : "PC", - "dependencies" : { - } - }, - "Roac.Arty_alt_hairs.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - } - }, - "KdollMASTA.KDoll_Mk2.latest" : { - "missing" : "true", - "licenseType" : "MISSING", - "dependencies" : { - } - }, - "KdollMASTA.K_Doll_Mk_5.2" : { - "missing" : "true", - "licenseType" : "MISSING", - "dependencies" : { - } - }, - "kemenate.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "TenStrip.Morphs.latest" : { - "licenseType" : "FC", - "dependencies" : { - } - }, - "VamXFan.Neutral-Environment-Color.latest" : { - "licenseType" : "CC BY", - "dependencies" : { - "Blazedust.Script_ColorScale.1" : { - "licenseType" : "CC BY", - "dependencies" : { - } - } - } - }, - "MacGruber.PostMagic.3" : { - "licenseType" : "CC BY-SA", - "dependencies" : { - } - } - } - } - }, - "customOptions" : { - "preloadMorphs" : "false" - }, - "hadReferenceIssues" : "true", - "referenceIssues" : [ - { - "reference" : "Saves/scene/Current/RedHood/Gasp15.mp3|Gasp14.mp3|Gasp13.mp3|Gasp12.mp3|Gasp11.mp3|Gasp10.mp3|Gasp7.mp3|Gasp8.mp3|Gasp9.mp3|Gasp6.mp3|Gasp5.mp3|Gasp4.mp3", - "issue" : "BROKEN: References local relative file Gasp15.mp3|Gasp14.mp3|Gasp13.mp3|Gasp12.mp3|Gasp11.mp3|Gasp10.mp3|Gasp7.mp3|Gasp8.mp3|Gasp9.mp3|Gasp6.mp3|Gasp5.mp3|Gasp4.mp3 not included in package. File is missing" - } - ] -} \ No newline at end of file diff --git a/_archived/varManager/vam.png b/_archived/varManager/vam.png deleted file mode 100644 index 5e9b20b14acfae25c11099769b75cb41454d087e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19715 zcmeF1<8vj>)3;A-CmY+&#*4`{F&vgp|SccdalpgujCIKq*~N=&mdsYKix>mGzZ^= z4hofnvzfdU5<^Ndk3v>uG-N@AN=vdC9b2ObjtZXcJD!vVle6?nd_!ID^W7czpw9WK z^|=dt**B+$3rMSC&CZ5ZfJm9bx(OF7IKxO)^|%CtK#-V(&;t~;q`Qrq{Nd3jr~gD2 zlDk0~Lqpv7>GVRnEX{L-D8YRdmFu1bgr4RAF!EdZ@R=}hV|b|*Qdm0X;&KSGnXK@r zt@`Q2Fs5VqOjA*W!Avb>Icqh79Wi5kRjul4X4g2k9g5^KqcM#!NE}@SOc*M?pT;G z9>iHJTg&TtV$X*b6)w<_BLEu4+)3*t!$q~F++HHUH_*E-`~Lc(lvD?2dq*25CkOk- zFO@IPduRF04JkkTmo97c`mgw_#`i@6fXPg(UF&^3a|2??EHhwY3v9N;3kWH%b|zjO z=tlb?$QlbN)}7ews-=~Mkv+nWiTi-|p&UI>(%5fJC48NHH*d&yt7sY*!qPy<$V~lX zqRP6QLzk#~uPFM36zxFC z^(}Vs1w+L=A!ON;K{V(Jjt&unYymuG_*LfI|H4KVmKSC=Tw#}>6T&GRY=W&AVr}xR7ZwQ}+LWAKGW3uf zM;2=_dWHJU6iiDq_hoEB+ zl*ZvvAdkY_%9N(~L?qYA#HApXL)c1nrwSj^u*c1iIjiDf!$`^CmpZ5xR;yqmwZpcP zXomfgCYJUr_EY6iHLuoPmf^&&k6Dq~DDIobIED83){Sl$>LmWVjJ4FcjCQ{9J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fuDVRrFR`N?P=0`VChMT-?`wbz3AUH9dexMh?|XUQ|wz_W+mOrfX<~qs=!g#T2Z1 z$<|ptT_h9pU*pr`q1~8hQ$m<0XWSptXfl`QTbA*7{_5XBPTR-CE4Ru0tu8VKF!BSa zvyx8W#^_MBZqfscNwX5Yp@<&ruC`NtvYNCMMg6Vo*;Xzfi!)%;+D?hGCfdz91Euvm z^fYz(PtwEO-o&;$NM?akhhx@`Z95hV{&kFn@Yh`3$3~QCY0$XyIf{(=M}2wB{H+ai zr^<{ZImD%6;7k|Dvuy0o6#ebKMQ=iYsy-^Ui0z$l5z}%jATX-V>r^PjuYlNzJ6X&F z5{hM+*HqZN0%e}%yClfh6OXq)7}i5+${@^m*W$-w`oTo5{dh~ty<^8w;r RTL)4JfTh_rQ=&0C>R%R5!Q}t| diff --git a/_archived/varManager/varManager.csproj b/_archived/varManager/varManager.csproj deleted file mode 100644 index 5938af0..0000000 --- a/_archived/varManager/varManager.csproj +++ /dev/null @@ -1,305 +0,0 @@ -锘 - - - WinExe - net9.0-windows - false - true - enable - enable - varManager - varManager - 512 - true - true - false - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 2 - 1.0.0.%2a - false - true - Relative - false - true - false - false - WFO1000 - - FolderProfile - - - x64 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - true - - - x64 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - false - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - - - - - Form - - - Form1.cs - - - Form - - - FormAnalysis.cs - - - Form - - - FormHub.cs - - - Form - - - FormMissingVars.cs - - - Form - - - FormScenes.cs - - - Form - - - FormSettings.cs - - - Form - - - FormStaleVars.cs - - - Form - - - FormSwitchRename.cs - - - Form - - - FormSwitchAdd.cs - - - Form - - - FormUninstallVars.cs - - - Form - - - FormVarDetail.cs - - - Form - - - FormVarsMove.cs - - - UserControl - - - HubItem.cs - - - Form - - - PrepareSaves.cs - - - - - - - - - - - - - Component - - - Form1.cs - - - FormAnalysis.cs - - - FormHub.cs - - - FormMissingVars.cs - - - FormScenes.cs - - - FormSettings.cs - - - FormStaleVars.cs - - - FormSwitchRename.cs - - - FormSwitchAdd.cs - - - FormUninstallVars.cs - - - FormVarDetail.cs - - - FormVarsMove.cs - - - HubItem.cs - - - PrepareSaves.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - - - {4b9be5fd-303e-4270-9c4d-fa3bde6c34eb} - DgvFilterPopup - - - {c7e21f05-c166-4dcc-8429-ec8a4c1a67b6} - DragNDrop - - - - diff --git a/_archived/varManager/varManager.mdb b/_archived/varManager/varManager.mdb deleted file mode 100644 index 0c911132d8ab1079d057c4dc40ab5cde3ecb4429..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 413696 zcmeI531C#!z5mahne53-0*Dj=!=fSu8Wvd;H6#R*KoTH`f)+_gfIv1g0YzJhOIxk& z)2g*%-TP`?>Q`E5Vr44 z?%XqH{hiM__sl)Z{T<~fRohwD+ECZgP*~a6S-7A?!Ad>S8mwQN^~`C1zH38A@u}*@ z3van<_h)XH_Wf;-zgzUg>p!|_-LK#J-plj<@%bmJD^Gi8_Lu(S#=mF(*Tg@*KH~Fh zuRrmES#y8;`h(wDJ+w6FJUHXSm$sd`=BQ6i`q~?x+L1Q&`j0l<)G_(}w?DJ~>@R=# zlglT3X2WwwAGhFVe|f3#-Q5|_FTCx%;kobrc}o4ySEMU7b7~PJ;XwiEbZQ3V(xkYNHG@ao`{!v^u1 zb0w}U6@*h{1rVs6qspCj=$dnKvz4kyHhHBs0DpP5PG@ru|ID{lbMl325VkF|o z7KdyY5)Y#EG@rvRCnyfVSQ>_v6hl~*sy5Y%zecrAb*g-| zK-J+|r|NM=V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~&TDdq3aC0jA!?+coc{ay9cUoGn<)%YiV(37mxkR2u+ zJftMs8o;h%vX2*XTcq-D*HL)=Pu208l?!G~m#91UjyQOIPu9N8e(!PL@fAQ`zjAv! z_$f);kH9|(?hPR~u2sJtkG=bBuQyEc{3gzAdi^KQuXpW$*LU*R6Nfvz{^#f%9E;CF zS7p4=Ounk3_i)Kql6b=7kyAu+9wa~l zBtQZrKmsH{0wh2JBtQZrkU$_)sRHTlnxhJnirdiXO`P6aq$k<7V5}sHE^=xgD=^_! zgXzaj=ti%@WMqFr#M2Y?9KEF&#iVG1`hj{@-L9@h%3+Mu?cTF&CC*UFo_)QG-4`G6 ej3lP84I=lRvBWS&D#_|^)hp^>)n{SSS^fY0QmvH$ diff --git a/varmanager_flutter/lib/app/app.dart b/varmanager_flutter/lib/app/app.dart index 64fde42..7054d2f 100644 --- a/varmanager_flutter/lib/app/app.dart +++ b/varmanager_flutter/lib/app/app.dart @@ -55,10 +55,26 @@ class _AppShellState extends ConsumerState { List<_NavEntry> _buildPages(AppLocalizations l10n) { return [ - _NavEntry(label: l10n.navHome, icon: Icons.dashboard, page: const HomePage()), - _NavEntry(label: l10n.navScenes, icon: Icons.photo_library, page: const ScenesPage()), - _NavEntry(label: l10n.navHub, icon: Icons.cloud_download, page: const HubPage()), - _NavEntry(label: l10n.navSettings, icon: Icons.tune, page: const SettingsPage()), + _NavEntry( + label: l10n.navHome, + icon: Icons.dashboard, + page: const HomePage(), + ), + _NavEntry( + label: l10n.navScenes, + icon: Icons.photo_library, + page: const ScenesPage(), + ), + _NavEntry( + label: l10n.navHub, + icon: Icons.cloud_download, + page: const HubPage(), + ), + _NavEntry( + label: l10n.navSettings, + icon: Icons.tune, + page: const SettingsPage(), + ), ]; } @@ -119,7 +135,9 @@ class _AppShellState extends ConsumerState { return Scaffold( appBar: AppBar( - title: Text(_appVersion.isNotEmpty ? 'varManager $_appVersion' : 'varManager'), + title: Text( + _appVersion.isNotEmpty ? 'varManager $_appVersion' : 'varManager', + ), actions: [ Padding( padding: const EdgeInsets.symmetric(horizontal: 12), @@ -128,14 +146,14 @@ class _AppShellState extends ConsumerState { _ready ? l10n.backendReady : _error != null - ? l10n.backendError - : l10n.backendStarting, + ? l10n.backendError + : l10n.backendStarting, style: TextStyle( color: _ready ? Colors.green.shade700 : _error != null - ? Colors.red.shade700 - : Colors.orange.shade700, + ? Colors.red.shade700 + : Colors.orange.shade700, ), ), ), @@ -158,9 +176,9 @@ class _AppShellState extends ConsumerState { ] : [ Theme.of(context).scaffoldBackgroundColor, - HSLColor.fromColor(Theme.of(context).scaffoldBackgroundColor) - .withLightness(0.88) - .toColor(), + HSLColor.fromColor( + Theme.of(context).scaffoldBackgroundColor, + ).withLightness(0.88).toColor(), ], begin: Alignment.topLeft, end: Alignment.bottomRight, @@ -175,15 +193,17 @@ class _AppShellState extends ConsumerState { child: _error != null ? _ErrorPane(message: _error!) : !_ready - ? const _LoadingPane() - : pages[index].page, + ? const _LoadingPane() + : pages[index].page, ), ), const JobLogPanel(), NavigationBar( selectedIndex: index, onDestinationSelected: (value) { - ref.read(navIndexProvider.notifier).setIndex(value); + ref + .read(navIndexProvider.notifier) + .setIndex(value); }, destinations: pages .map( @@ -207,7 +227,8 @@ class _AppShellState extends ConsumerState { selectedIndex: index, labelType: NavigationRailLabelType.all, onDestinationSelected: (value) { - ref.read(navIndexProvider.notifier) + ref + .read(navIndexProvider.notifier) .setIndex(value); }, destinations: pages @@ -238,8 +259,8 @@ class _AppShellState extends ConsumerState { child: _error != null ? _ErrorPane(message: _error!) : !_ready - ? const _LoadingPane() - : pages[index].page, + ? const _LoadingPane() + : pages[index].page, ), ), const JobLogPanel(), @@ -259,7 +280,11 @@ class _AppShellState extends ConsumerState { } class _NavEntry { - const _NavEntry({required this.label, required this.icon, required this.page}); + const _NavEntry({ + required this.label, + required this.icon, + required this.page, + }); final String label; final IconData icon; @@ -293,8 +318,6 @@ class _ErrorPane extends StatelessWidget { @override Widget build(BuildContext context) { final l10n = context.l10n; - return Center( - child: Text(l10n.backendStartFailed(message)), - ); + return Center(child: Text(l10n.backendStartFailed(message))); } } diff --git a/varmanager_flutter/lib/app/providers.dart b/varmanager_flutter/lib/app/providers.dart index 892fa9a..b6610b1 100644 --- a/varmanager_flutter/lib/app/providers.dart +++ b/varmanager_flutter/lib/app/providers.dart @@ -22,17 +22,17 @@ final initialThemeProvider = Provider((ref) { }); class InitialLocaleConfig { - const InitialLocaleConfig({ - required this.tag, - required this.persistOnStart, - }); + const InitialLocaleConfig({required this.tag, required this.persistOnStart}); final String tag; final bool persistOnStart; } final initialLocaleConfigProvider = Provider((ref) { - return const InitialLocaleConfig(tag: kFallbackLocaleTag, persistOnStart: false); + return const InitialLocaleConfig( + tag: kFallbackLocaleTag, + persistOnStart: false, + ); }); class NavIndexNotifier extends Notifier { @@ -150,7 +150,10 @@ final backendClientProvider = Provider((ref) { final backendProcessManagerProvider = Provider((ref) { final client = ref.watch(backendClientProvider); - final manager = BackendProcessManager(client: client, workDir: Directory.current); + final manager = BackendProcessManager( + client: client, + workDir: Directory.current, + ); ref.onDispose(manager.shutdown); return manager; }); @@ -164,11 +167,9 @@ final jobRunnerProvider = Provider((ref) { final message = (job.error == null || job.error!.isEmpty) ? 'Unknown error' : job.error!; - errors.report(JobErrorNotice( - jobId: job.id, - kind: job.kind, - message: message, - )); + errors.report( + JobErrorNotice(jobId: job.id, kind: job.kind, message: message), + ); }, ); }); diff --git a/varmanager_flutter/lib/app/theme.dart b/varmanager_flutter/lib/app/theme.dart index 97167b3..59b1cd0 100644 --- a/varmanager_flutter/lib/app/theme.dart +++ b/varmanager_flutter/lib/app/theme.dart @@ -124,15 +124,11 @@ class AppTheme { final primaryContainer = isDark ? const Color(0xFF004D47) : primary.withValues(alpha: 0.12); - final onPrimaryContainer = isDark - ? const Color(0xFFA4F3EC) - : primary; + final onPrimaryContainer = isDark ? const Color(0xFFA4F3EC) : primary; final secondaryContainer = isDark ? const Color(0xFF5D4037) : secondary.withValues(alpha: 0.12); - final onSecondaryContainer = isDark - ? const Color(0xFFFFDBCF) - : secondary; + final onSecondaryContainer = isDark ? const Color(0xFFFFDBCF) : secondary; // Surface鍙樹綋 final surfaceContainerHighest = isDark @@ -162,8 +158,12 @@ class AppTheme { outlineVariant: outlineVariant, error: isDark ? const Color(0xFFFFB4AB) : const Color(0xFFB3261E), onError: isDark ? const Color(0xFF690005) : Colors.white, - errorContainer: isDark ? const Color(0xFF93000A) : const Color(0xFFF9DEDC), - onErrorContainer: isDark ? const Color(0xFFFFDAD6) : const Color(0xFF410E0B), + errorContainer: isDark + ? const Color(0xFF93000A) + : const Color(0xFFF9DEDC), + onErrorContainer: isDark + ? const Color(0xFFFFDAD6) + : const Color(0xFF410E0B), ); final base = ThemeData( @@ -180,7 +180,9 @@ class AppTheme { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(12), side: BorderSide( - color: isDark ? outlineVariant : scheme.onSurface.withValues(alpha: 0.08), + color: isDark + ? outlineVariant + : scheme.onSurface.withValues(alpha: 0.08), ), ), ); @@ -196,14 +198,14 @@ class AppTheme { final outlinedButtonTheme = OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: isDark ? primary : primary, - side: BorderSide(color: isDark ? outline : primary.withValues(alpha: 0.5)), + side: BorderSide( + color: isDark ? outline : primary.withValues(alpha: 0.5), + ), ), ); final textButtonTheme = TextButtonThemeData( - style: TextButton.styleFrom( - foregroundColor: primary, - ), + style: TextButton.styleFrom(foregroundColor: primary), ); // Chip涓婚 @@ -226,9 +228,7 @@ class AppTheme { filled: isDark, fillColor: isDark ? surfaceContainerHighest : null, border: const OutlineInputBorder(), - enabledBorder: OutlineInputBorder( - borderSide: BorderSide(color: outline), - ), + enabledBorder: OutlineInputBorder(borderSide: BorderSide(color: outline)), focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: primary, width: 2), ), diff --git a/varmanager_flutter/lib/core/app_version.dart b/varmanager_flutter/lib/core/app_version.dart index e47f91a..18014eb 100644 --- a/varmanager_flutter/lib/core/app_version.dart +++ b/varmanager_flutter/lib/core/app_version.dart @@ -2,8 +2,10 @@ import 'dart:io'; import 'package:path/path.dart' as path; -const String _buildVersion = - String.fromEnvironment('APP_VERSION', defaultValue: ''); +const String _buildVersion = String.fromEnvironment( + 'APP_VERSION', + defaultValue: '', +); Future loadAppVersion() async { if (_buildVersion.isNotEmpty) { diff --git a/varmanager_flutter/lib/core/backend/backend_client.dart b/varmanager_flutter/lib/core/backend/backend_client.dart index d2d47f0..bfed86d 100644 --- a/varmanager_flutter/lib/core/backend/backend_client.dart +++ b/varmanager_flutter/lib/core/backend/backend_client.dart @@ -12,7 +12,7 @@ import 'query_params.dart'; class BackendClient { BackendClient({required this.baseUrl, http.Client? httpClient}) - : _client = httpClient ?? http.Client(); + : _client = httpClient ?? http.Client(); String baseUrl; final http.Client _client; @@ -21,8 +21,10 @@ class BackendClient { return Uri.parse(baseUrl).replace(path: path, queryParameters: query); } - Future> _getJson(String path, - [Map? query]) async { + Future> _getJson( + String path, [ + Map? query, + ]) async { final resp = await _client.get(_uri(path, query)); if (resp.statusCode >= 400) { throw Exception('GET $path failed: ${resp.body}'); @@ -30,8 +32,10 @@ class BackendClient { return jsonDecode(resp.body) as Map; } - Future> _postJson(String path, - [Map? body]) async { + Future> _postJson( + String path, [ + Map? body, + ]) async { final resp = await _client.post( _uri(path), headers: {'Content-Type': 'application/json'}, @@ -43,8 +47,10 @@ class BackendClient { return jsonDecode(resp.body) as Map; } - Future> _putJson(String path, - Map body) async { + Future> _putJson( + String path, + Map body, + ) async { final resp = await _client.put( _uri(path), headers: {'Content-Type': 'application/json'}, @@ -96,8 +102,7 @@ class BackendClient { if (limit != null) { params['limit'] = limit.toString(); } - final json = - await _getJson('/creators', params.isEmpty ? null : params); + final json = await _getJson('/creators', params.isEmpty ? null : params); final creators = json['creators'] as List? ?? []; return creators.map((item) => item.toString()).toList(); } @@ -108,9 +113,7 @@ class BackendClient { int? offset, int? limit, }) async { - final params = { - 'kind': kind, - }; + final params = {'kind': kind}; if (query != null) { params['q'] = query; } @@ -131,7 +134,9 @@ class BackendClient { } Future listAnalysisAtoms( - String varName, String entryName) async { + String varName, + String entryName, + ) async { final json = await _getJson('/analysis/atoms', { 'var_name': varName, 'entry_name': entryName, @@ -140,7 +145,9 @@ class BackendClient { } Future getAnalysisSummary( - String varName, String entryName) async { + String varName, + String entryName, + ) async { final json = await _getJson('/analysis/summary', { 'var_name': varName, 'entry_name': entryName, @@ -159,7 +166,9 @@ class BackendClient { } Future saveMissingMap( - String path, List links) async { + String path, + List links, + ) async { final json = await _postJson('/missing/map/save', { 'path': path, 'links': links.map((item) => item.toJson()).toList(), @@ -188,7 +197,8 @@ class BackendClient { } Future listVarDependencies( - List varNames) async { + List varNames, + ) async { final json = await _postJson('/vars/dependencies', {'var_names': varNames}); return VarDependenciesResponse.fromJson(json); } @@ -198,8 +208,10 @@ class BackendClient { return VarPreviewsResponse.fromJson(json); } - Future startJob(String kind, - [Map? args]) async { + Future startJob( + String kind, [ + Map? args, + ]) async { final json = await _postJson('/jobs', { 'kind': kind, if (args != null) 'args': args, @@ -232,10 +244,7 @@ class BackendClient { } Future downloadAction(String action, List ids) async { - await _postJson('/downloads/actions', { - 'action': action, - 'ids': ids, - }); + await _postJson('/downloads/actions', {'action': action, 'ids': ids}); } Future shutdown() async { @@ -246,12 +255,7 @@ class BackendClient { return _getJson('/health'); } - String previewUrl({ - String? root, - String? path, - String? source, - String? url, - }) { + String previewUrl({String? root, String? path, String? source, String? url}) { final query = {}; if (source != null) { query['source'] = source; diff --git a/varmanager_flutter/lib/core/backend/backend_process_manager.dart b/varmanager_flutter/lib/core/backend/backend_process_manager.dart index 69daa99..7cd8fe3 100644 --- a/varmanager_flutter/lib/core/backend/backend_process_manager.dart +++ b/varmanager_flutter/lib/core/backend/backend_process_manager.dart @@ -143,7 +143,9 @@ class BackendProcessManager { } (String exePath, String workingDir)? _resolveBackendExe() { - final name = Platform.isWindows ? 'varManager_backend.exe' : 'varManager_backend'; + final name = Platform.isWindows + ? 'varManager_backend.exe' + : 'varManager_backend'; final exeDir = p.dirname(Platform.resolvedExecutable); diff --git a/varmanager_flutter/lib/core/backend/download_controller.dart b/varmanager_flutter/lib/core/backend/download_controller.dart index 61c4066..7f28f6a 100644 --- a/varmanager_flutter/lib/core/backend/download_controller.dart +++ b/varmanager_flutter/lib/core/backend/download_controller.dart @@ -5,8 +5,9 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../app/providers.dart'; import '../models/download_models.dart'; -final downloadListProvider = - StreamProvider.autoDispose((ref) async* { +final downloadListProvider = StreamProvider.autoDispose(( + ref, +) async* { final client = ref.read(backendClientProvider); DownloadListResponse last; diff --git a/varmanager_flutter/lib/core/backend/job_runner.dart b/varmanager_flutter/lib/core/backend/job_runner.dart index fc5df78..dd4895c 100644 --- a/varmanager_flutter/lib/core/backend/job_runner.dart +++ b/varmanager_flutter/lib/core/backend/job_runner.dart @@ -34,7 +34,8 @@ class JobRunner { JobView job; while (true) { job = await client.getJob(start.id); - final hasLogChanges = onLog != null && + final hasLogChanges = + onLog != null && (job.logOffset != lastLogOffset || job.logCount != lastLogCount); if (hasLogChanges) { final logs = await client.getJobLogs(start.id, from: logOffset); @@ -49,7 +50,9 @@ class JobRunner { break; } final stateChanged = - hasLogChanges || job.progress != lastProgress || job.status != lastStatus; + hasLogChanges || + job.progress != lastProgress || + job.status != lastStatus; if (stateChanged) { idleTicks = 0; } else { diff --git a/varmanager_flutter/lib/core/models/config.dart b/varmanager_flutter/lib/core/models/config.dart index 2abe895..6282752 100644 --- a/varmanager_flutter/lib/core/models/config.dart +++ b/varmanager_flutter/lib/core/models/config.dart @@ -6,8 +6,12 @@ class ProxyConfig { this.password, }); - static const ProxyConfig empty = - ProxyConfig(host: '', port: 0, username: null, password: null); + static const ProxyConfig empty = ProxyConfig( + host: '', + port: 0, + username: null, + password: null, + ); final String host; final int port; diff --git a/varmanager_flutter/lib/core/models/download_models.dart b/varmanager_flutter/lib/core/models/download_models.dart index 56b2313..3ae9283 100644 --- a/varmanager_flutter/lib/core/models/download_models.dart +++ b/varmanager_flutter/lib/core/models/download_models.dart @@ -94,10 +94,7 @@ class DownloadSummary { } class DownloadListResponse { - DownloadListResponse({ - required this.items, - required this.summary, - }); + DownloadListResponse({required this.items, required this.summary}); final List items; final DownloadSummary summary; @@ -107,9 +104,9 @@ class DownloadListResponse { return DownloadListResponse( items: itemsRaw .whereType() - .map((entry) => DownloadItem.fromJson( - Map.from(entry), - )) + .map( + (entry) => DownloadItem.fromJson(Map.from(entry)), + ) .toList(), summary: DownloadSummary.fromJson( Map.from(json['summary'] as Map? ?? {}), diff --git a/varmanager_flutter/lib/core/models/extra_models.dart b/varmanager_flutter/lib/core/models/extra_models.dart index 376b430..9da48f0 100644 --- a/varmanager_flutter/lib/core/models/extra_models.dart +++ b/varmanager_flutter/lib/core/models/extra_models.dart @@ -21,10 +21,7 @@ class AtomTreeNode { } class AnalysisAtomsResponse { - AnalysisAtomsResponse({ - required this.atoms, - required this.personAtoms, - }); + AnalysisAtomsResponse({required this.atoms, required this.personAtoms}); final List atoms; final List personAtoms; @@ -137,13 +134,19 @@ class AnalysisSummaryResponse { .map((item) => AtomTreeNode.fromJson(item as Map)) .toList(), personAtoms: (json['person_atoms'] as List? ?? []) - .map((item) => AnalysisPersonInfo.fromJson(item as Map)) + .map( + (item) => AnalysisPersonInfo.fromJson(item as Map), + ) .toList(), dependencies: (json['dependencies'] as List? ?? []) - .map((item) => AnalysisDependency.fromJson(item as Map)) + .map( + (item) => AnalysisDependency.fromJson(item as Map), + ) .toList(), parentLinks: (json['parent_links'] as List? ?? []) - .map((item) => AnalysisParentLink.fromJson(item as Map)) + .map( + (item) => AnalysisParentLink.fromJson(item as Map), + ) .toList(), ); } @@ -173,11 +176,7 @@ class SavesTreeItem { } class SavesTreeGroup { - SavesTreeGroup({ - required this.id, - required this.title, - required this.items, - }); + SavesTreeGroup({required this.id, required this.title, required this.items}); final String id; final String title; @@ -236,10 +235,7 @@ class MissingMapItem { } Map toJson() { - return { - 'missing_var': missingVar, - 'dest_var': destVar, - }; + return {'missing_var': missingVar, 'dest_var': destVar}; } } @@ -265,8 +261,9 @@ class ResolveVarsResponse { factory ResolveVarsResponse.fromJson(Map json) { final raw = json['resolved'] as Map? ?? {}; return ResolveVarsResponse( - resolved: - raw.map((key, value) => MapEntry(key, value?.toString() ?? 'missing')), + resolved: raw.map( + (key, value) => MapEntry(key, value?.toString() ?? 'missing'), + ), ); } } @@ -327,7 +324,9 @@ class VarDependenciesResponse { factory VarDependenciesResponse.fromJson(Map json) { return VarDependenciesResponse( items: (json['items'] as List? ?? []) - .map((item) => VarDependencyItem.fromJson(item as Map)) + .map( + (item) => VarDependencyItem.fromJson(item as Map), + ) .toList(), ); } diff --git a/varmanager_flutter/lib/core/models/job_models.dart b/varmanager_flutter/lib/core/models/job_models.dart index 7db61d8..9c1839d 100644 --- a/varmanager_flutter/lib/core/models/job_models.dart +++ b/varmanager_flutter/lib/core/models/job_models.dart @@ -12,13 +12,7 @@ class StartJobResponse { } } -enum JobLogLevel { - info, - warn, - error, - debug, - unknown, -} +enum JobLogLevel { info, warn, error, debug, unknown } JobLogLevel _parseJobLogLevel(String? raw) { switch (raw?.toLowerCase()) { @@ -163,12 +157,15 @@ class JobLogsResponse { final linesRaw = json['lines'] as List?; final entries = entriesRaw != null ? entriesRaw - .whereType() - .map((entry) => JobLogEntry.fromJson( - Map.from(entry), - )) - .toList() - : (linesRaw ?? []).map((line) => JobLogEntry.fromLine('$line')).toList(); + .whereType() + .map( + (entry) => + JobLogEntry.fromJson(Map.from(entry)), + ) + .toList() + : (linesRaw ?? []) + .map((line) => JobLogEntry.fromLine('$line')) + .toList(); return JobLogsResponse( id: (json['id'] as num).toInt(), from: (json['from'] as num?)?.toInt() ?? 0, @@ -180,10 +177,7 @@ class JobLogsResponse { } class JobResult { - JobResult({ - required this.job, - required this.result, - }); + JobResult({required this.job, required this.result}); final JobView job; final T? result; diff --git a/varmanager_flutter/lib/core/models/var_models.dart b/varmanager_flutter/lib/core/models/var_models.dart index a3f4e03..c8829ee 100644 --- a/varmanager_flutter/lib/core/models/var_models.dart +++ b/varmanager_flutter/lib/core/models/var_models.dart @@ -175,7 +175,9 @@ class VarDetailResponse { return VarDetailResponse( varInfo: VarListItem.fromJson(json['var_info'] as Map), dependencies: (json['dependencies'] as List? ?? []) - .map((item) => DependencyStatus.fromJson(item as Map)) + .map( + (item) => DependencyStatus.fromJson(item as Map), + ) .toList(), dependents: (json['dependents'] as List? ?? []) .map((item) => item as String) @@ -184,7 +186,9 @@ class VarDetailResponse { .map((item) => item as String) .toList(), scenes: (json['scenes'] as List? ?? []) - .map((item) => ScenePreviewItem.fromJson(item as Map)) + .map( + (item) => ScenePreviewItem.fromJson(item as Map), + ) .toList(), ); } diff --git a/varmanager_flutter/lib/features/analysis/analysis_page.dart b/varmanager_flutter/lib/features/analysis/analysis_page.dart index 0d456cc..c6ab0ce 100644 --- a/varmanager_flutter/lib/features/analysis/analysis_page.dart +++ b/varmanager_flutter/lib/features/analysis/analysis_page.dart @@ -58,7 +58,9 @@ class _AnalysisPageState extends ConsumerState { }); _dependencySearchController.addListener(() { setState(() { - _dependencyQuery = _dependencySearchController.text.trim().toLowerCase(); + _dependencyQuery = _dependencySearchController.text + .trim() + .toLowerCase(); }); }); Future.microtask(_loadSummary); @@ -106,7 +108,8 @@ class _AnalysisPageState extends ConsumerState { } Future _clearCache() async { - final varName = _summary?.varName ?? widget.payload['var_name']?.toString() ?? ''; + final varName = + _summary?.varName ?? widget.payload['var_name']?.toString() ?? ''; final entryName = _summary?.entryName ?? widget.payload['entry_name']?.toString() ?? ''; await _runJob('cache_clear', { @@ -254,16 +257,16 @@ class _AnalysisPageState extends ConsumerState { body: _loading && summary == null ? const Center(child: CircularProgressIndicator()) : summary == null - ? _buildErrorState() - : Column( - children: [ - Padding( - padding: const EdgeInsets.all(16), - child: _buildHeader(summary), - ), - Expanded(child: _buildTabs(summary)), - ], + ? _buildErrorState() + : Column( + children: [ + Padding( + padding: const EdgeInsets.all(16), + child: _buildHeader(summary), ), + Expanded(child: _buildTabs(summary)), + ], + ), ); } @@ -333,11 +336,17 @@ class _AnalysisPageState extends ConsumerState { _chip(l10n.atomsLabel, atomCount.toString()), _chip(l10n.depsLabel, depsCount.toString()), if (missingCount > 0) - _chip(l10n.missingLabel, missingCount.toString(), - color: Colors.redAccent), + _chip( + l10n.missingLabel, + missingCount.toString(), + color: Colors.redAccent, + ), if (mismatchCount > 0) - _chip(l10n.mismatchLabel, mismatchCount.toString(), - color: Colors.orangeAccent), + _chip( + l10n.mismatchLabel, + mismatchCount.toString(), + color: Colors.orangeAccent, + ), ], ), ], @@ -358,8 +367,10 @@ class _AnalysisPageState extends ConsumerState { borderRadius: BorderRadius.circular(20), border: Border.all(color: fg.withValues(alpha: 0.2)), ), - child: Text(context.l10n.labelValue(label, value), - style: TextStyle(color: fg)), + child: Text( + context.l10n.labelValue(label, value), + style: TextStyle(color: fg), + ), ); } @@ -380,9 +391,7 @@ class _AnalysisPageState extends ConsumerState { child: Column( children: [ TabBar(tabs: tabs), - Expanded( - child: TabBarView(children: views), - ), + Expanded(child: TabBarView(children: views)), ], ), ); @@ -398,11 +407,7 @@ class _AnalysisPageState extends ConsumerState { final actions = _buildPersonActions(summary); if (isNarrow) { return ListView( - children: [ - personList, - const SizedBox(height: 12), - actions, - ], + children: [personList, const SizedBox(height: 12), actions], ); } return Row( @@ -447,8 +452,9 @@ class _AnalysisPageState extends ConsumerState { if (person.hasPlugin) _tag(l10n.pluginTag), ], ), - trailing: - selected ? const Icon(Icons.check_circle, size: 20) : null, + trailing: selected + ? const Icon(Icons.check_circle, size: 20) + : null, selected: selected, onTap: () { setState(() { @@ -486,8 +492,10 @@ class _AnalysisPageState extends ConsumerState { children: [ _buildTargetOptions(), const SizedBox(height: 12), - Text(l10n.lookOptionsTitle, - style: Theme.of(context).textTheme.titleSmall), + Text( + l10n.lookOptionsTitle, + style: Theme.of(context).textTheme.titleSmall, + ), const SizedBox(height: 8), Wrap( spacing: 8, @@ -526,8 +534,10 @@ class _AnalysisPageState extends ConsumerState { ], ), const SizedBox(height: 16), - Text(l10n.actionsTitle, - style: Theme.of(context).textTheme.titleSmall), + Text( + l10n.actionsTitle, + style: Theme.of(context).textTheme.titleSmall, + ), const SizedBox(height: 8), Wrap( spacing: 8, @@ -675,15 +685,20 @@ class _AnalysisPageState extends ConsumerState { (type) => PopupMenuItem( value: type, child: Text( - l10n.selectTypeWithCount( - type, _typeToPaths[type]!.length)), + l10n.selectTypeWithCount( + type, + _typeToPaths[type]!.length, + ), + ), ), ) .toList(); }, child: Container( padding: const EdgeInsets.symmetric( - horizontal: 12, vertical: 10), + horizontal: 12, + vertical: 10, + ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(20), border: Border.all( @@ -809,11 +824,7 @@ class _AnalysisPageState extends ConsumerState { return false; } - Widget _buildAtomNode( - AtomTreeNode node, - String key, - List children, - ) { + Widget _buildAtomNode(AtomTreeNode node, String key, List children) { final state = _nodeState(key); final hasChildren = node.children.isNotEmpty; final title = Row( @@ -827,10 +838,7 @@ class _AnalysisPageState extends ConsumerState { ], ); if (!hasChildren) { - return Padding( - padding: const EdgeInsets.only(left: 16), - child: title, - ); + return Padding(padding: const EdgeInsets.only(left: 16), child: title); } return ExpansionTile( key: PageStorageKey(key), @@ -845,8 +853,9 @@ class _AnalysisPageState extends ConsumerState { if (leaves == null || leaves.isEmpty) { return false; } - final selectedCount = - leaves.where((path) => _selectedAtomPaths.contains(path)).length; + final selectedCount = leaves + .where((path) => _selectedAtomPaths.contains(path)) + .length; if (selectedCount == 0) { return false; } @@ -1055,8 +1064,8 @@ class _AnalysisPageState extends ConsumerState { Text( context.l10n.ignoreGenderHint, style: Theme.of(context).textTheme.bodySmall?.copyWith( - color: Theme.of(context).colorScheme.onSurfaceVariant, - ), + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), ), ], ), diff --git a/varmanager_flutter/lib/features/bootstrap/bootstrap_controller.dart b/varmanager_flutter/lib/features/bootstrap/bootstrap_controller.dart index 93b7a59..de22561 100644 --- a/varmanager_flutter/lib/features/bootstrap/bootstrap_controller.dart +++ b/varmanager_flutter/lib/features/bootstrap/bootstrap_controller.dart @@ -8,8 +8,9 @@ import '../../core/backend/backend_client.dart'; import '../../core/models/config.dart'; import 'bootstrap_state.dart'; -final bootstrapProvider = - NotifierProvider(BootstrapController.new); +final bootstrapProvider = NotifierProvider( + BootstrapController.new, +); class BootstrapController extends Notifier { static const String _installMarkerName = 'INSTALL.txt'; @@ -91,10 +92,7 @@ class BootstrapController extends Notifier { state = state.copyWith(config: config, savingConfig: false); return true; } catch (err) { - state = state.copyWith( - savingConfig: false, - errorMessage: err.toString(), - ); + state = state.copyWith(savingConfig: false, errorMessage: err.toString()); return false; } } @@ -112,7 +110,11 @@ class BootstrapController extends Notifier { required String symlinkHint, required String vamExecHint, }) async { - state = state.copyWith(checksRunning: true, checksRan: true, errorMessage: null); + state = state.copyWith( + checksRunning: true, + checksRan: true, + errorMessage: null, + ); final checks = []; checks.add(_pending('backend', backendLabel)); @@ -129,23 +131,27 @@ class BootstrapController extends Notifier { _setCheck(backendCheck); final config = state.config; - final varspathCheck = await _checkVarspath(config, varspathLabel, varspathHint); + final varspathCheck = await _checkVarspath( + config, + varspathLabel, + varspathHint, + ); _setCheck(varspathCheck); - final downloaderCheck = - await _checkDownloaderPath(config, downloaderLabel, downloaderHint); + final downloaderCheck = await _checkDownloaderPath( + config, + downloaderLabel, + downloaderHint, + ); _setCheck(downloaderCheck); - final fileOpsCheck = - await _checkFileOps(config, fileOpsLabel, fileOpsHint); + final fileOpsCheck = await _checkFileOps(config, fileOpsLabel, fileOpsHint); _setCheck(fileOpsCheck); - final symlinkCheck = - await _checkSymlink(config, symlinkLabel, symlinkHint); + final symlinkCheck = await _checkSymlink(config, symlinkLabel, symlinkHint); _setCheck(symlinkCheck); - final vamExecCheck = - await _checkVamExec(config, vamExecLabel, vamExecHint); + final vamExecCheck = await _checkVamExec(config, vamExecLabel, vamExecHint); _setCheck(vamExecCheck); state = state.copyWith(checksRunning: false); @@ -492,8 +498,9 @@ class BootstrapController extends Notifier { ); } final vampath = config.vampath.trim(); - final resolvedPath = - p.isAbsolute(path) ? path : (vampath.isEmpty ? path : p.join(vampath, path)); + final resolvedPath = p.isAbsolute(path) + ? path + : (vampath.isEmpty ? path : p.join(vampath, path)); final file = File(resolvedPath); if (await file.exists()) { return BootstrapCheckItem( @@ -530,7 +537,9 @@ class BootstrapController extends Notifier { if (await exeCandidate.exists()) { return exeCandidate.path; } - final workCandidate = File(p.join(Directory.current.path, _installMarkerName)); + final workCandidate = File( + p.join(Directory.current.path, _installMarkerName), + ); if (await workCandidate.exists()) { return workCandidate.path; } diff --git a/varmanager_flutter/lib/features/bootstrap/bootstrap_gate.dart b/varmanager_flutter/lib/features/bootstrap/bootstrap_gate.dart index edaf707..60ee3ca 100644 --- a/varmanager_flutter/lib/features/bootstrap/bootstrap_gate.dart +++ b/varmanager_flutter/lib/features/bootstrap/bootstrap_gate.dart @@ -27,17 +27,13 @@ class _BootstrapGateState extends ConsumerState { } final l10n = context.l10n; if (state.isTourStep) { - return Positioned.fill( - child: BootstrapTourCoach(step: state.step), - ); + return Positioned.fill(child: BootstrapTourCoach(step: state.step)); } return Positioned.fill( child: Stack( fit: StackFit.expand, children: [ - Container( - color: Colors.black.withValues(alpha: 0.35), - ), + Container(color: Colors.black.withValues(alpha: 0.35)), Positioned.fill( child: AnimatedSwitcher( duration: const Duration(milliseconds: 200), @@ -91,8 +87,6 @@ class _BootstrapGateState extends ConsumerState { return const SizedBox.shrink(); } } - - } class BootstrapTourData { @@ -192,9 +186,9 @@ Future confirmBootstrapSkip( if (result != true) return false; final ok = await ref.read(bootstrapProvider.notifier).skip(); if (!ok && context.mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(l10n.bootstrapFinishDeleteFailed)), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(l10n.bootstrapFinishDeleteFailed))); } return true; } @@ -223,7 +217,9 @@ class _BootstrapTourCoachState extends ConsumerState { @override void initState() { super.initState(); - WidgetsBinding.instance.addPostFrameCallback((_) => _showForStep(widget.step)); + WidgetsBinding.instance.addPostFrameCallback( + (_) => _showForStep(widget.step), + ); } @override @@ -304,13 +300,12 @@ class _BootstrapTourCoachState extends ConsumerState { TargetFocus _buildTarget( BootstrapStep step, BootstrapTourData data, - ContentAlign align, - {GlobalKey? keyTarget, TargetPosition? targetPosition} - ) { + ContentAlign align, { + GlobalKey? keyTarget, + TargetPosition? targetPosition, + }) { final l10n = context.l10n; - final onBack = hasPreviousBootstrapStep(step) - ? () => _handleBack() - : null; + final onBack = hasPreviousBootstrapStep(step) ? () => _handleBack() : null; return TargetFocus( identify: step.name, keyTarget: keyTarget, @@ -428,7 +423,9 @@ class _BootstrapTourCoachState extends ConsumerState { Rect? _resolveTargetRect(GlobalKey key) { final targetContext = key.currentContext; final renderObject = targetContext?.findRenderObject(); - if (renderObject is RenderBox && renderObject.hasSize && renderObject.attached) { + if (renderObject is RenderBox && + renderObject.hasSize && + renderObject.attached) { final offset = renderObject.localToGlobal(Offset.zero); return offset & renderObject.size; } @@ -496,10 +493,7 @@ class _CoachBubble extends StatelessWidget { const SizedBox(height: 12), Row( children: [ - TextButton( - onPressed: onSkip, - child: Text(skipLabel), - ), + TextButton(onPressed: onSkip, child: Text(skipLabel)), const Spacer(), if (onBack != null) OutlinedButton( @@ -507,10 +501,7 @@ class _CoachBubble extends StatelessWidget { child: Text(backLabel ?? ''), ), const SizedBox(width: 8), - FilledButton( - onPressed: onNext, - child: Text(nextLabel), - ), + FilledButton(onPressed: onNext, child: Text(nextLabel)), ], ), ], @@ -521,10 +512,7 @@ class _CoachBubble extends StatelessWidget { } class _WelcomeStep extends ConsumerStatefulWidget { - const _WelcomeStep({ - required this.onSkip, - required this.onNext, - }); + const _WelcomeStep({required this.onSkip, required this.onNext}); final VoidCallback onSkip; final VoidCallback onNext; @@ -543,8 +531,9 @@ class _WelcomeStepState extends ConsumerState<_WelcomeStep> { future: _versionFuture, builder: (context, snapshot) { final version = snapshot.data?.trim() ?? ''; - final appLabel = - version.isEmpty || version == 'unknown' ? 'varManager' : 'varManager $version'; + final appLabel = version.isEmpty || version == 'unknown' + ? 'varManager' + : 'varManager $version'; return BootstrapDialogFrame( key: const ValueKey('welcome'), title: l10n.bootstrapWelcomeTitle(appLabel), @@ -565,7 +554,9 @@ class _WelcomeStepState extends ConsumerState<_WelcomeStep> { const SizedBox(height: 16), Text( l10n.bootstrapWelcomeHint, - style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant), + style: TextStyle( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), ), ], ), @@ -576,10 +567,7 @@ class _WelcomeStepState extends ConsumerState<_WelcomeStep> { } class _FeaturesStep extends ConsumerWidget { - const _FeaturesStep({ - required this.onBack, - required this.onNext, - }); + const _FeaturesStep({required this.onBack, required this.onNext}); final VoidCallback onBack; final VoidCallback onNext; @@ -591,21 +579,17 @@ class _FeaturesStep extends ConsumerWidget { _FeatureItem(Icons.inventory_2_outlined, l10n.bootstrapFeatureVars), _FeatureItem(Icons.photo_library_outlined, l10n.bootstrapFeatureScenes), _FeatureItem(Icons.cloud_download_outlined, l10n.bootstrapFeatureHub), - _FeatureItem(Icons.switch_access_shortcut_outlined, - l10n.bootstrapFeaturePacks), + _FeatureItem( + Icons.switch_access_shortcut_outlined, + l10n.bootstrapFeaturePacks, + ), ]; return BootstrapDialogFrame( key: const ValueKey('features'), title: l10n.bootstrapFeaturesTitle, actions: [ - TextButton( - onPressed: onBack, - child: Text(l10n.commonBack), - ), - FilledButton( - onPressed: onNext, - child: Text(l10n.commonNext), - ), + TextButton(onPressed: onBack, child: Text(l10n.commonBack)), + FilledButton(onPressed: onNext, child: Text(l10n.commonNext)), ], child: Column( children: [ @@ -695,7 +679,8 @@ class _ConfigStepState extends ConsumerState<_ConfigStep> { if (_downloaderSavePath.text.trim().isEmpty) { _downloaderSavePath.text = p.join(path.trim(), 'AddonPackages'); } - if (_vamExec.text.trim().isEmpty || _vamExec.text.trim() == 'VaM (Desktop Mode).bat') { + if (_vamExec.text.trim().isEmpty || + _vamExec.text.trim() == 'VaM (Desktop Mode).bat') { _vamExec.text = 'VaM (Desktop Mode).bat'; } } @@ -807,8 +792,10 @@ class _ConfigStepState extends ConsumerState<_ConfigStep> { onBrowse: () => _pickDirectory(_downloaderSavePath), ), const SizedBox(height: 4), - Text(l10n.proxySectionLabel, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.proxySectionLabel, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), DropdownButtonFormField( initialValue: _proxyMode, @@ -835,10 +822,7 @@ class _ConfigStepState extends ConsumerState<_ConfigStep> { ), const SizedBox(height: 12), if (manualProxy) ...[ - _textField( - controller: _proxyHost, - label: l10n.proxyHostLabel, - ), + _textField(controller: _proxyHost, label: l10n.proxyHostLabel), _textField( controller: _proxyPort, label: l10n.proxyPortLabel, @@ -896,10 +880,7 @@ class _ConfigStepState extends ConsumerState<_ConfigStep> { ), ), const SizedBox(width: 8), - OutlinedButton( - onPressed: onBrowse, - child: Text(l10n.commonBrowse), - ), + OutlinedButton(onPressed: onBrowse, child: Text(l10n.commonBrowse)), ], ), ); @@ -1008,19 +989,21 @@ class _ChecksStep extends ConsumerWidget { child: FilledButton.icon( onPressed: state.checksRunning ? null - : () => ref.read(bootstrapProvider.notifier).runChecks( - l10n.bootstrapCheckBackendLabel, - l10n.bootstrapCheckVarspathLabel, - l10n.bootstrapCheckDownloaderLabel, - l10n.bootstrapCheckFileOpsLabel, - l10n.bootstrapCheckSymlinkLabel, - l10n.bootstrapCheckVamExecLabel, - varspathHint: l10n.bootstrapCheckVarspathHint, - downloaderHint: l10n.bootstrapCheckDownloaderHint, - fileOpsHint: l10n.bootstrapCheckFileOpsHint, - symlinkHint: l10n.bootstrapCheckSymlinkHint, - vamExecHint: l10n.bootstrapCheckVamExecHint, - ), + : () => ref + .read(bootstrapProvider.notifier) + .runChecks( + l10n.bootstrapCheckBackendLabel, + l10n.bootstrapCheckVarspathLabel, + l10n.bootstrapCheckDownloaderLabel, + l10n.bootstrapCheckFileOpsLabel, + l10n.bootstrapCheckSymlinkLabel, + l10n.bootstrapCheckVamExecLabel, + varspathHint: l10n.bootstrapCheckVarspathHint, + downloaderHint: l10n.bootstrapCheckDownloaderHint, + fileOpsHint: l10n.bootstrapCheckFileOpsHint, + symlinkHint: l10n.bootstrapCheckSymlinkHint, + vamExecHint: l10n.bootstrapCheckVamExecHint, + ), icon: state.checksRunning ? const SizedBox( width: 18, @@ -1093,24 +1076,35 @@ class _CheckTile extends StatelessWidget { ) { switch (status) { case BootstrapCheckStatus.pass: - return (Icons.check_circle, Colors.green.shade700, l10n.bootstrapCheckStatusPass); + return ( + Icons.check_circle, + Colors.green.shade700, + l10n.bootstrapCheckStatusPass, + ); case BootstrapCheckStatus.warn: - return (Icons.warning_amber_rounded, Colors.orange.shade700, - l10n.bootstrapCheckStatusWarn); + return ( + Icons.warning_amber_rounded, + Colors.orange.shade700, + l10n.bootstrapCheckStatusWarn, + ); case BootstrapCheckStatus.fail: - return (Icons.error_outline, Colors.red.shade700, l10n.bootstrapCheckStatusFail); + return ( + Icons.error_outline, + Colors.red.shade700, + l10n.bootstrapCheckStatusFail, + ); case BootstrapCheckStatus.pending: - return (Icons.hourglass_empty, Colors.blueGrey.shade400, - l10n.bootstrapCheckStatusPending); + return ( + Icons.hourglass_empty, + Colors.blueGrey.shade400, + l10n.bootstrapCheckStatusPending, + ); } } } class _FinishStep extends ConsumerWidget { - const _FinishStep({ - required this.onBack, - required this.onFinish, - }); + const _FinishStep({required this.onBack, required this.onFinish}); final VoidCallback onBack; final VoidCallback onFinish; @@ -1122,10 +1116,7 @@ class _FinishStep extends ConsumerWidget { key: const ValueKey('finish'), title: l10n.bootstrapFinishTitle, actions: [ - TextButton( - onPressed: onBack, - child: Text(l10n.commonBack), - ), + TextButton(onPressed: onBack, child: Text(l10n.commonBack)), FilledButton( onPressed: onFinish, child: Text(l10n.bootstrapFinishStart), @@ -1138,7 +1129,9 @@ class _FinishStep extends ConsumerWidget { const SizedBox(height: 12), Text( l10n.bootstrapFinishHint, - style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant), + style: TextStyle( + color: Theme.of(context).colorScheme.onSurfaceVariant, + ), ), ], ), @@ -1173,7 +1166,13 @@ class BootstrapDialogFrame extends StatelessWidget { mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(title, style: const TextStyle(fontSize: 18, fontWeight: FontWeight.w700)), + Text( + title, + style: const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w700, + ), + ), const SizedBox(height: 12), child, const SizedBox(height: 16), diff --git a/varmanager_flutter/lib/features/bootstrap/bootstrap_state.dart b/varmanager_flutter/lib/features/bootstrap/bootstrap_state.dart index c113115..9420310 100644 --- a/varmanager_flutter/lib/features/bootstrap/bootstrap_state.dart +++ b/varmanager_flutter/lib/features/bootstrap/bootstrap_state.dart @@ -12,12 +12,7 @@ enum BootstrapStep { finish, } -enum BootstrapCheckStatus { - pending, - pass, - warn, - fail, -} +enum BootstrapCheckStatus { pending, pass, warn, fail } class BootstrapConfig { const BootstrapConfig({ diff --git a/varmanager_flutter/lib/features/home/home_page.dart b/varmanager_flutter/lib/features/home/home_page.dart index 9cf0af1..c23e6e1 100644 --- a/varmanager_flutter/lib/features/home/home_page.dart +++ b/varmanager_flutter/lib/features/home/home_page.dart @@ -65,8 +65,10 @@ class _HomePageState extends ConsumerState { super.dispose(); } - Future> _runJob(String kind, - {Map? args}) async { + Future> _runJob( + String kind, { + Map? args, + }) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); final busy = ref.read(jobBusyProvider.notifier); @@ -99,10 +101,10 @@ class _HomePageState extends ConsumerState { case 'filtered': final names = await _fetchFilteredVarNames(query); if (names.isEmpty) return; - result = await _runJob('missing_deps', args: { - 'scope': 'filtered', - 'var_names': names, - }); + result = await _runJob( + 'missing_deps', + args: {'scope': 'filtered', 'var_names': names}, + ); break; case 'saves': result = await _runJob('saves_deps'); @@ -207,11 +209,17 @@ class _HomePageState extends ConsumerState { value: query.installed, items: [ DropdownMenuItem( - value: 'all', child: Text(l10n.statusAllLabel)), + value: 'all', + child: Text(l10n.statusAllLabel), + ), DropdownMenuItem( - value: 'true', child: Text(l10n.statusInstalled)), + value: 'true', + child: Text(l10n.statusInstalled), + ), DropdownMenuItem( - value: 'false', child: Text(l10n.statusNotInstalled)), + value: 'false', + child: Text(l10n.statusNotInstalled), + ), ], onChanged: (value) { if (value == null) return; @@ -224,16 +232,29 @@ class _HomePageState extends ConsumerState { value: query.sort, items: [ DropdownMenuItem( - value: 'meta_date', child: Text(l10n.sortMetaDate)), + value: 'meta_date', + child: Text(l10n.sortMetaDate), + ), DropdownMenuItem( - value: 'var_date', child: Text(l10n.sortVarDate)), + value: 'var_date', + child: Text(l10n.sortVarDate), + ), DropdownMenuItem( - value: 'var_name', child: Text(l10n.sortVarName)), + value: 'var_name', + child: Text(l10n.sortVarName), + ), DropdownMenuItem( - value: 'creator', child: Text(l10n.sortCreator)), + value: 'creator', + child: Text(l10n.sortCreator), + ), + DropdownMenuItem( + value: 'package', + child: Text(l10n.sortPackage), + ), DropdownMenuItem( - value: 'package', child: Text(l10n.sortPackage)), - DropdownMenuItem(value: 'size', child: Text(l10n.sortSize)), + value: 'size', + child: Text(l10n.sortSize), + ), ], onChanged: (value) { if (value == null) return; @@ -245,7 +266,10 @@ class _HomePageState extends ConsumerState { DropdownButton( value: query.order, items: [ - DropdownMenuItem(value: 'desc', child: Text(l10n.sortDesc)), + DropdownMenuItem( + value: 'desc', + child: Text(l10n.sortDesc), + ), DropdownMenuItem(value: 'asc', child: Text(l10n.sortAsc)), ], onChanged: (value) { @@ -258,10 +282,12 @@ class _HomePageState extends ConsumerState { DropdownButton( value: query.perPage, items: const [25, 50, 100, 200] - .map((value) => DropdownMenuItem( - value: value, - child: Text(l10n.perPageLabel(value)), - )) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text(l10n.perPageLabel(value)), + ), + ) .toList(), onChanged: (value) { if (value == null) return; @@ -279,7 +305,9 @@ class _HomePageState extends ConsumerState { if (items.isEmpty) return; final pageNames = items.map((e) => e.varName).toSet(); final next = {...selected, ...pageNames}; - ref.read(selectedVarsProvider.notifier).setSelection(next); + ref + .read(selectedVarsProvider.notifier) + .setSelection(next); }, child: Text(l10n.selectPageLabel), ), @@ -415,11 +443,17 @@ class _HomePageState extends ConsumerState { value: query.disabled, items: [ DropdownMenuItem( - value: 'all', child: Text(l10n.enabledAllLabel)), + value: 'all', + child: Text(l10n.enabledAllLabel), + ), DropdownMenuItem( - value: 'false', child: Text(l10n.enabledOnlyLabel)), + value: 'false', + child: Text(l10n.enabledOnlyLabel), + ), DropdownMenuItem( - value: 'true', child: Text(l10n.disabledOnlyLabel)), + value: 'true', + child: Text(l10n.disabledOnlyLabel), + ), ], onChanged: (value) { if (value == null) return; @@ -512,45 +546,98 @@ class _HomePageState extends ConsumerState { }, ), ), - _presenceFilter(l10n.categoryScenes, query.hasScene, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasScene: value))), - _presenceFilter(l10n.categoryLooks, query.hasLook, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasLook: value))), - _presenceFilter(l10n.categoryClothing, query.hasCloth, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasCloth: value))), - _presenceFilter(l10n.categoryHair, query.hasHair, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasHair: value))), - _presenceFilter(l10n.categorySkin, query.hasSkin, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasSkin: value))), - _presenceFilter(l10n.categoryPose, query.hasPose, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasPose: value))), - _presenceFilter(l10n.categoryMorphs, query.hasMorph, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasMorph: value))), - _presenceFilter(l10n.categoryPlugins, query.hasPlugin, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasPlugin: value))), - _presenceFilter(l10n.categoryScripts, query.hasScript, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasScript: value))), - _presenceFilter(l10n.categoryAssets, query.hasAsset, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasAsset: value))), - _presenceFilter(l10n.categoryTextures, query.hasTexture, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasTexture: value))), - _presenceFilter(l10n.categorySubScene, query.hasSubScene, - (value) => _updateQuery( - (state) => state.copyWith(page: 1, hasSubScene: value))), - _presenceFilter(l10n.categoryAppearance, query.hasAppearance, - (value) => _updateQuery((state) => - state.copyWith(page: 1, hasAppearance: value))), + _presenceFilter( + l10n.categoryScenes, + query.hasScene, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasScene: value), + ), + ), + _presenceFilter( + l10n.categoryLooks, + query.hasLook, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasLook: value), + ), + ), + _presenceFilter( + l10n.categoryClothing, + query.hasCloth, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasCloth: value), + ), + ), + _presenceFilter( + l10n.categoryHair, + query.hasHair, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasHair: value), + ), + ), + _presenceFilter( + l10n.categorySkin, + query.hasSkin, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasSkin: value), + ), + ), + _presenceFilter( + l10n.categoryPose, + query.hasPose, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasPose: value), + ), + ), + _presenceFilter( + l10n.categoryMorphs, + query.hasMorph, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasMorph: value), + ), + ), + _presenceFilter( + l10n.categoryPlugins, + query.hasPlugin, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasPlugin: value), + ), + ), + _presenceFilter( + l10n.categoryScripts, + query.hasScript, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasScript: value), + ), + ), + _presenceFilter( + l10n.categoryAssets, + query.hasAsset, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasAsset: value), + ), + ), + _presenceFilter( + l10n.categoryTextures, + query.hasTexture, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasTexture: value), + ), + ), + _presenceFilter( + l10n.categorySubScene, + query.hasSubScene, + (value) => _updateQuery( + (state) => state.copyWith(page: 1, hasSubScene: value), + ), + ), + _presenceFilter( + l10n.categoryAppearance, + query.hasAppearance, + (value) => _updateQuery( + (state) => + state.copyWith(page: 1, hasAppearance: value), + ), + ), ], ), ), @@ -564,7 +651,13 @@ class _HomePageState extends ConsumerState { builder: (context, constraints) { final wide = constraints.maxWidth >= 1200; final tall = constraints.maxHeight >= 600; - final list = _buildList(context, data, selected, query, focusedVar); + final list = _buildList( + context, + data, + selected, + query, + focusedVar, + ); const preview = PreviewPanel(); final packSwitch = _buildPackSwitchPanel(context); if (wide) { @@ -599,9 +692,8 @@ class _HomePageState extends ConsumerState { ); }, loading: () => const Center(child: CircularProgressIndicator()), - error: (err, _) => Center( - child: Text(l10n.loadFailed(err.toString())), - ), + error: (err, _) => + Center(child: Text(l10n.loadFailed(err.toString()))), ), ), ], @@ -616,8 +708,10 @@ class _HomePageState extends ConsumerState { ) { final l10n = context.l10n; final isBusy = ref.watch(jobBusyProvider); - final compactPadding = - const EdgeInsets.symmetric(horizontal: 12, vertical: 8); + final compactPadding = const EdgeInsets.symmetric( + horizontal: 12, + vertical: 8, + ); return Card( child: Padding( @@ -727,7 +821,7 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - await _runJob('update_db'); + await _runJob('update_db'); ref.invalidate(varsListProvider); }, icon: const Icon(Icons.sync), @@ -759,9 +853,7 @@ class _HomePageState extends ConsumerState { OutlinedButton.icon( onPressed: () { Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => const PrepareSavesPage(), - ), + MaterialPageRoute(builder: (_) => const PrepareSavesPage()), ); }, icon: const Icon(Icons.build_circle), @@ -844,8 +936,10 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - await _runJob('rebuild_links', - args: {'include_missing': true}); + await _runJob( + 'rebuild_links', + args: {'include_missing': true}, + ); }, icon: const Icon(Icons.link), label: Text(l10n.rebuildLinksLabel), @@ -909,15 +1003,17 @@ class _HomePageState extends ConsumerState { } Widget _buildList( - BuildContext context, - VarsListResponse data, - Set selected, - VarsQueryParams query, - String? focusedVar) { + BuildContext context, + VarsListResponse data, + Set selected, + VarsQueryParams query, + String? focusedVar, + ) { final l10n = context.l10n; final isBusy = ref.watch(jobBusyProvider); - final totalPages = - data.total == 0 ? 1 : (data.total + query.perPage - 1) ~/ query.perPage; + final totalPages = data.total == 0 + ? 1 + : (data.total + query.perPage - 1) ~/ query.perPage; if (data.total > 0 && data.page > totalPages) { WidgetsBinding.instance.addPostFrameCallback((_) { _updateQuery((state) => state.copyWith(page: totalPages)); @@ -967,7 +1063,9 @@ class _HomePageState extends ConsumerState { IconButton( onPressed: data.page < totalPages ? () { - _updateQuery((state) => state.copyWith(page: totalPages)); + _updateQuery( + (state) => state.copyWith(page: totalPages), + ); } : null, icon: const Icon(Icons.last_page), @@ -1003,11 +1101,15 @@ class _HomePageState extends ConsumerState { } else { next.remove(item.varName); } - ref.read(selectedVarsProvider.notifier).setSelection(next); + ref + .read(selectedVarsProvider.notifier) + .setSelection(next); }, ), onTap: () { - ref.read(focusedVarProvider.notifier).setFocused(item.varName); + ref + .read(focusedVarProvider.notifier) + .setFocused(item.varName); }, title: Text(item.varName), subtitle: Text( @@ -1018,7 +1120,8 @@ class _HomePageState extends ConsumerState { children: [ Builder( builder: (context) { - final isDark = Theme.of(context).brightness == Brightness.dark; + final isDark = + Theme.of(context).brightness == Brightness.dark; return Chip( label: Text( item.installed @@ -1027,20 +1130,20 @@ class _HomePageState extends ConsumerState { style: TextStyle( color: isDark ? (item.installed - ? Colors.green.shade200 - : Colors.grey.shade300) + ? Colors.green.shade200 + : Colors.grey.shade300) : (item.installed - ? Colors.green.shade800 - : Colors.grey.shade700), + ? Colors.green.shade800 + : Colors.grey.shade700), ), ), backgroundColor: isDark ? (item.installed - ? Colors.green.shade900 - : Colors.grey.shade800) + ? Colors.green.shade900 + : Colors.grey.shade800) : (item.installed - ? Colors.green.shade100 - : Colors.grey.shade200), + ? Colors.green.shade100 + : Colors.grey.shade200), ); }, ), @@ -1048,7 +1151,8 @@ class _HomePageState extends ConsumerState { onPressed: () { Navigator.of(context).push( MaterialPageRoute( - builder: (_) => VarDetailPage(varName: item.varName), + builder: (_) => + VarDetailPage(varName: item.varName), ), ); }, @@ -1074,10 +1178,13 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - await _runJob('install_vars', args: { - 'var_names': selected.toList(), - 'include_dependencies': true, - }); + await _runJob( + 'install_vars', + args: { + 'var_names': selected.toList(), + 'include_dependencies': true, + }, + ); ref.invalidate(varsListProvider); }, child: Text(l10n.installSelectedLabel), @@ -1089,27 +1196,32 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - final preview = - await _runJob('preview_uninstall', args: { - 'var_names': selected.toList(), - 'include_implicated': true, - }); + final preview = await _runJob( + 'preview_uninstall', + args: { + 'var_names': selected.toList(), + 'include_implicated': true, + }, + ); if (!context.mounted) return; final result = preview.result as Map?; if (result == null) return; - final confirmed = - await Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => - UninstallVarsPage(payload: result), - ), - ); + final confirmed = await Navigator.of(context) + .push( + MaterialPageRoute( + builder: (_) => + UninstallVarsPage(payload: result), + ), + ); if (confirmed == true) { - await _runJob('uninstall_vars', args: { - 'var_names': selected.toList(), - 'include_implicated': true, - }); + await _runJob( + 'uninstall_vars', + args: { + 'var_names': selected.toList(), + 'include_implicated': true, + }, + ); ref.invalidate(varsListProvider); } }, @@ -1122,10 +1234,13 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - await _runJob('delete_vars', args: { - 'var_names': selected.toList(), - 'include_implicated': true, - }); + await _runJob( + 'delete_vars', + args: { + 'var_names': selected.toList(), + 'include_implicated': true, + }, + ); ref.invalidate(varsListProvider); }, child: Text(l10n.deleteSelectedLabel), @@ -1137,15 +1252,20 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - final target = - await _askText(context, l10n.targetDirLabel); + final target = await _askText( + context, + l10n.targetDirLabel, + ); if (target == null || target.trim().isEmpty) { return; } - await _runJob('links_move', args: { - 'var_names': selected.toList(), - 'target_dir': target.trim(), - }); + await _runJob( + 'links_move', + args: { + 'var_names': selected.toList(), + 'target_dir': target.trim(), + }, + ); }, child: Text(l10n.moveLinksLabel), ), @@ -1162,9 +1282,10 @@ class _HomePageState extends ConsumerState { hint: 'installed_vars.txt', ); if (path == null || path.trim().isEmpty) return; - await _runJob('vars_export_installed', args: { - 'path': path.trim(), - }); + await _runJob( + 'vars_export_installed', + args: {'path': path.trim()}, + ); }, child: Text(l10n.exportInstalledLabel), ), @@ -1181,9 +1302,10 @@ class _HomePageState extends ConsumerState { hint: 'install_list.txt', ); if (path == null || path.trim().isEmpty) return; - await _runJob('vars_install_batch', args: { - 'path': path.trim(), - }); + await _runJob( + 'vars_install_batch', + args: {'path': path.trim()}, + ); ref.invalidate(varsListProvider); }, child: Text(l10n.installFromListLabel), @@ -1198,7 +1320,10 @@ class _HomePageState extends ConsumerState { } Future _confirmAction( - BuildContext context, String title, String message) async { + BuildContext context, + String title, + String message, + ) async { final result = await showDialog( context: context, builder: (context) { @@ -1226,14 +1351,17 @@ class _HomePageState extends ConsumerState { final client = ref.read(backendClientProvider); const perPage = 200; final names = []; - final first = - await client.listVars(query.copyWith(page: 1, perPage: perPage)); + final first = await client.listVars( + query.copyWith(page: 1, perPage: perPage), + ); names.addAll(first.items.map((e) => e.varName)); - final totalPages = - first.total == 0 ? 1 : (first.total + perPage - 1) ~/ perPage; + final totalPages = first.total == 0 + ? 1 + : (first.total + perPage - 1) ~/ perPage; for (var page = 2; page <= totalPages; page += 1) { - final resp = - await client.listVars(query.copyWith(page: page, perPage: perPage)); + final resp = await client.listVars( + query.copyWith(page: page, perPage: perPage), + ); names.addAll(resp.items.map((e) => e.varName)); } return names.toSet().toList(); @@ -1249,14 +1377,15 @@ class _HomePageState extends ConsumerState { .toList(); if (!mounted) return; await Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => MissingVarsPage(missing: missing), - ), + MaterialPageRoute(builder: (_) => MissingVarsPage(missing: missing)), ); } - Future _askText(BuildContext context, String title, - {String hint = ''}) { + Future _askText( + BuildContext context, + String title, { + String hint = '', + }) { final controller = TextEditingController(text: hint); return showDialog( context: context, @@ -1307,35 +1436,37 @@ class _HomePageState extends ConsumerState { value: selectedSwitch, isExpanded: true, items: switches - .map((name) => DropdownMenuItem( - value: name, - child: Row( - children: [ - Expanded( + .map( + (name) => DropdownMenuItem( + value: name, + child: Row( + children: [ + Expanded( + child: Text( + name, + overflow: TextOverflow.ellipsis, + ), + ), + if (name == current) + Container( + margin: const EdgeInsets.only(left: 4), + padding: const EdgeInsets.symmetric( + horizontal: 6, + vertical: 2, + ), + decoration: BoxDecoration( + color: Colors.green.shade100, + borderRadius: BorderRadius.circular(8), + ), child: Text( - name, - overflow: TextOverflow.ellipsis, + l10n.activeLabel, + style: const TextStyle(fontSize: 10), ), ), - if (name == current) - Container( - margin: const EdgeInsets.only(left: 4), - padding: const EdgeInsets.symmetric( - horizontal: 6, - vertical: 2, - ), - decoration: BoxDecoration( - color: Colors.green.shade100, - borderRadius: BorderRadius.circular(8), - ), - child: Text( - l10n.activeLabel, - style: const TextStyle(fontSize: 10), - ), - ), - ], - ), - )) + ], + ), + ), + ) .toList(), onChanged: (value) { if (value != null) { @@ -1346,8 +1477,10 @@ class _HomePageState extends ConsumerState { }, ) else - Text(l10n.noSwitchesAvailable, - style: const TextStyle(fontSize: 12)), + Text( + l10n.noSwitchesAvailable, + style: const TextStyle(fontSize: 12), + ), const SizedBox(height: 12), FilledButton.icon( onPressed: () => _addPackSwitch(context), @@ -1387,7 +1520,8 @@ class _HomePageState extends ConsumerState { ), const SizedBox(height: 8), OutlinedButton.icon( - onPressed: selectedSwitch != null && + onPressed: + selectedSwitch != null && selectedSwitch != current && selectedSwitch.toLowerCase() != 'default' ? () => _deletePackSwitch(selectedSwitch) @@ -1406,15 +1540,19 @@ class _HomePageState extends ConsumerState { } Future _addPackSwitch(BuildContext context) async { - final name = await _askText(context, context.l10n.newSwitchNameTitle, hint: ''); + final name = await _askText( + context, + context.l10n.newSwitchNameTitle, + hint: '', + ); if (name == null || name.trim().isEmpty) return; final trimmed = name.trim(); final switches = _packSwitchData?.switches ?? []; if (switches.any((s) => s.toLowerCase() == trimmed.toLowerCase())) { if (!context.mounted) return; - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(context.l10n.switchAlreadyExists)), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(context.l10n.switchAlreadyExists))); return; } await _runJob('packswitch_add', args: {'name': trimmed}); @@ -1422,8 +1560,11 @@ class _HomePageState extends ConsumerState { } Future _renamePackSwitch(BuildContext context, String oldName) async { - final newName = - await _askText(context, context.l10n.renameSwitchTitle, hint: oldName); + final newName = await _askText( + context, + context.l10n.renameSwitchTitle, + hint: oldName, + ); if (newName == null || newName.trim().isEmpty) return; final trimmed = newName.trim(); if (trimmed.toLowerCase() == oldName.toLowerCase()) { @@ -1441,10 +1582,10 @@ class _HomePageState extends ConsumerState { ); return; } - await _runJob('packswitch_rename', args: { - 'old_name': oldName, - 'new_name': trimmed, - }); + await _runJob( + 'packswitch_rename', + args: {'old_name': oldName, 'new_name': trimmed}, + ); await _loadPackSwitches(); } @@ -1505,7 +1646,10 @@ class _HomePageState extends ConsumerState { } Widget _presenceFilter( - String label, String value, ValueChanged onChanged) { + String label, + String value, + ValueChanged onChanged, + ) { final l10n = context.l10n; return Row( mainAxisSize: MainAxisSize.min, @@ -1519,7 +1663,10 @@ class _HomePageState extends ConsumerState { items: [ DropdownMenuItem(value: 'all', child: Text(l10n.presenceAllLabel)), DropdownMenuItem(value: 'true', child: Text(l10n.presenceHasLabel)), - DropdownMenuItem(value: 'false', child: Text(l10n.presenceNoneLabel)), + DropdownMenuItem( + value: 'false', + child: Text(l10n.presenceNoneLabel), + ), ], onChanged: (next) { if (next == null) return; @@ -1561,4 +1708,3 @@ class _HomePageState extends ConsumerState { ); } } - diff --git a/varmanager_flutter/lib/features/home/providers.dart b/varmanager_flutter/lib/features/home/providers.dart index 491ff23..48aef32 100644 --- a/varmanager_flutter/lib/features/home/providers.dart +++ b/varmanager_flutter/lib/features/home/providers.dart @@ -47,9 +47,10 @@ class SelectedVarsNotifier extends Notifier> { } } -final selectedVarsProvider = NotifierProvider>( - SelectedVarsNotifier.new, -); +final selectedVarsProvider = + NotifierProvider>( + SelectedVarsNotifier.new, + ); class FocusedVarNotifier extends Notifier { @override @@ -68,27 +69,28 @@ final focusedVarProvider = NotifierProvider( FocusedVarNotifier.new, ); -final previewItemsProvider = - FutureProvider.autoDispose.family, String>( - (ref, varName) async { - final link = ref.keepAlive(); - final timer = Timer(const Duration(minutes: 3), link.close); - ref.onDispose(timer.cancel); - final client = ref.watch(backendClientProvider); - try { - final previews = await client.listVarPreviews([varName]); - return previews.items - .map((item) => PreviewItem( - varName: item.varName, - atomType: item.atomType, - previewPic: item.previewPic, - scenePath: item.scenePath, - isPreset: item.isPreset, - isLoadable: item.isLoadable, - installed: item.installed, - )) - .toList(); - } catch (_) { - return []; - } -}); +final previewItemsProvider = FutureProvider.autoDispose + .family, String>((ref, varName) async { + final link = ref.keepAlive(); + final timer = Timer(const Duration(minutes: 3), link.close); + ref.onDispose(timer.cancel); + final client = ref.watch(backendClientProvider); + try { + final previews = await client.listVarPreviews([varName]); + return previews.items + .map( + (item) => PreviewItem( + varName: item.varName, + atomType: item.atomType, + previewPic: item.previewPic, + scenePath: item.scenePath, + isPreset: item.isPreset, + isLoadable: item.isLoadable, + installed: item.installed, + ), + ) + .toList(); + } catch (_) { + return []; + } + }); diff --git a/varmanager_flutter/lib/features/home/widgets/preview_panel.dart b/varmanager_flutter/lib/features/home/widgets/preview_panel.dart index 0d7ba10..14ddece 100644 --- a/varmanager_flutter/lib/features/home/widgets/preview_panel.dart +++ b/varmanager_flutter/lib/features/home/widgets/preview_panel.dart @@ -44,8 +44,10 @@ class _PreviewPanelState extends ConsumerState { }); } - Future> _runJob(String kind, - {Map? args}) async { + Future> _runJob( + String kind, { + Map? args, + }) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); final busy = ref.read(jobBusyProvider.notifier); @@ -137,7 +139,8 @@ class _PreviewPanelState extends ConsumerState { ) { if (totalItems <= 0) return; final nowMs = DateTime.now().millisecondsSinceEpoch; - final isDoubleTap = _previewTapLastIndex == index && + final isDoubleTap = + _previewTapLastIndex == index && nowMs - _previewTapLastMs <= _previewTapDoubleMs; if (isDoubleTap) { _previewTapLastMs = 0; @@ -169,7 +172,10 @@ class _PreviewPanelState extends ConsumerState { } final totalPages = (totalItems + _previewPerPage - 1) ~/ _previewPerPage; final nextPage = page.clamp(1, totalPages); - final nextIndex = ((nextPage - 1) * _previewPerPage).clamp(0, totalItems - 1); + final nextIndex = ((nextPage - 1) * _previewPerPage).clamp( + 0, + totalItems - 1, + ); setState(() { _previewPage = nextPage; _previewSelectedIndex = nextIndex; @@ -177,25 +183,31 @@ class _PreviewPanelState extends ConsumerState { } Future _togglePreviewInstall( - BuildContext context, PreviewItem item) async { + BuildContext context, + PreviewItem item, + ) async { if (item.installed) { - final preview = await _runJob('preview_uninstall', args: { - 'var_names': [item.varName], - 'include_implicated': true, - }); + final preview = await _runJob( + 'preview_uninstall', + args: { + 'var_names': [item.varName], + 'include_implicated': true, + }, + ); if (!context.mounted) return; final payload = preview.result as Map?; if (payload == null) return; final confirmed = await Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => UninstallVarsPage(payload: payload), - ), + MaterialPageRoute(builder: (_) => UninstallVarsPage(payload: payload)), ); if (confirmed == true) { - await _runJob('uninstall_vars', args: { - 'var_names': [item.varName], - 'include_implicated': true, - }); + await _runJob( + 'uninstall_vars', + args: { + 'var_names': [item.varName], + 'include_implicated': true, + }, + ); } else { return; } @@ -207,11 +219,14 @@ class _PreviewPanelState extends ConsumerState { l10n.installVarConfirm(item.varName), ); if (!confirmed) return; - await _runJob('vars_toggle_install', args: { - 'var_name': item.varName, - 'include_dependencies': true, - 'include_implicated': true, - }); + await _runJob( + 'vars_toggle_install', + args: { + 'var_name': item.varName, + 'include_dependencies': true, + 'include_implicated': true, + }, + ); } ref.invalidate(varsListProvider); final focusedVar = ref.read(focusedVarProvider); @@ -221,7 +236,10 @@ class _PreviewPanelState extends ConsumerState { } Future _confirmAction( - BuildContext context, String title, String message) async { + BuildContext context, + String title, + String message, + ) async { final result = await showDialog( context: context, builder: (context) { @@ -297,9 +315,9 @@ class _PreviewPanelState extends ConsumerState { final selectedIndex = totalItems == 0 ? null : (_previewSelectedIndex != null && - _previewSelectedIndex! < totalItems) - ? _previewSelectedIndex - : 0; + _previewSelectedIndex! < totalItems) + ? _previewSelectedIndex + : 0; if (_previewPage != currentPage) { WidgetsBinding.instance.addPostFrameCallback((_) { if (!mounted) return; @@ -335,7 +353,12 @@ class _PreviewPanelState extends ConsumerState { children: [ _buildControls(totalItems), const SizedBox(height: 8), - _buildNavigation(selectedIndex, totalItems, currentPage, totalPages), + _buildNavigation( + selectedIndex, + totalItems, + currentPage, + totalPages, + ), const Divider(height: 16), Expanded( child: NotificationListener( @@ -391,9 +414,14 @@ class _PreviewPanelState extends ConsumerState { DropdownMenuItem(value: 'all', child: Text(l10n.allTypesLabel)), DropdownMenuItem(value: 'scenes', child: Text(l10n.categoryScenes)), DropdownMenuItem(value: 'looks', child: Text(l10n.categoryLooks)), - DropdownMenuItem(value: 'clothing', child: Text(l10n.categoryClothing)), DropdownMenuItem( - value: 'hairstyle', child: Text(l10n.categoryHairstyle)), + value: 'clothing', + child: Text(l10n.categoryClothing), + ), + DropdownMenuItem( + value: 'hairstyle', + child: Text(l10n.categoryHairstyle), + ), DropdownMenuItem(value: 'assets', child: Text(l10n.categoryAssets)), DropdownMenuItem(value: 'morphs', child: Text(l10n.categoryMorphs)), DropdownMenuItem(value: 'pose', child: Text(l10n.categoryPose)), @@ -422,10 +450,12 @@ class _PreviewPanelState extends ConsumerState { DropdownButton( value: _previewPerPage, items: const [12, 24, 36, 48] - .map((value) => DropdownMenuItem( - value: value, - child: Text(l10n.perPageLabel(value)), - )) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text(l10n.perPageLabel(value)), + ), + ) .toList(), onChanged: (value) { if (value == null) return; @@ -442,7 +472,12 @@ class _PreviewPanelState extends ConsumerState { ); } - Widget _buildNavigation(int? selectedIndex, int totalItems, int currentPage, int totalPages) { + Widget _buildNavigation( + int? selectedIndex, + int totalItems, + int currentPage, + int totalPages, + ) { final l10n = context.l10n; return Row( children: [ @@ -526,11 +561,13 @@ class _PreviewPanelState extends ConsumerState { } return LayoutBuilder( builder: (context, constraints) { - final crossAxisCount = - (constraints.maxWidth / 140).floor().clamp(2, 6).toInt(); + final crossAxisCount = (constraints.maxWidth / 140) + .floor() + .clamp(2, 6) + .toInt(); final tileWidth = constraints.maxWidth / crossAxisCount; - final cacheWidth = - (tileWidth * MediaQuery.of(context).devicePixelRatio).round(); + final cacheWidth = (tileWidth * MediaQuery.of(context).devicePixelRatio) + .round(); return GridView.builder( itemCount: items.length, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( @@ -548,11 +585,8 @@ class _PreviewPanelState extends ConsumerState { message: context.l10n.previewSelectOrOpenTooltip, child: InkWell( key: ValueKey('preview_${item.varName}_${item.scenePath}'), - onTap: () => _handlePreviewTap( - globalIndex, - totalItems, - onOpenPreview, - ), + onTap: () => + _handlePreviewTap(globalIndex, totalItems, onOpenPreview), child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -581,8 +615,8 @@ class _PreviewPanelState extends ConsumerState { filterQuality: FilterQuality.low, errorBuilder: (_, _, _) => const PreviewPlaceholder( - icon: Icons.broken_image, - ), + icon: Icons.broken_image, + ), ), ), ), @@ -615,8 +649,8 @@ class _PreviewPanelState extends ConsumerState { if (item == null) { return Center(child: Text(l10n.selectPreviewHint)); } - final detailCacheWidth = - (360 * MediaQuery.of(context).devicePixelRatio).round(); + final detailCacheWidth = (360 * MediaQuery.of(context).devicePixelRatio) + .round(); final previewPath = _previewPath(item); return Row( children: [ @@ -671,7 +705,8 @@ class _PreviewPanelState extends ConsumerState { item.installed ? Icons.delete_outline : Icons.download, ), label: Text( - item.installed ? l10n.uninstallLabel : l10n.installLabel), + item.installed ? l10n.uninstallLabel : l10n.installLabel, + ), ), OutlinedButton( onPressed: isBusy @@ -691,4 +726,3 @@ class _PreviewPanelState extends ConsumerState { ); } } - diff --git a/varmanager_flutter/lib/features/hub/hub_page.dart b/varmanager_flutter/lib/features/hub/hub_page.dart index c15063c..f84da50 100644 --- a/varmanager_flutter/lib/features/hub/hub_page.dart +++ b/varmanager_flutter/lib/features/hub/hub_page.dart @@ -77,25 +77,21 @@ enum HubRepoStatusType { } class HubRepoStatus { - const HubRepoStatus._( - this.type, { - this.installedVersion, - this.hubVersion, - }); + const HubRepoStatus._(this.type, {this.installedVersion, this.hubVersion}); const HubRepoStatus.unknown() : this._(HubRepoStatusType.unknown); const HubRepoStatus.inRepository() : this._(HubRepoStatusType.inRepository); const HubRepoStatus.goToDownload() : this._(HubRepoStatusType.goToDownload); const HubRepoStatus.generateDownloadList() - : this._(HubRepoStatusType.generateDownloadList); + : this._(HubRepoStatusType.generateDownloadList); const HubRepoStatus.upgrade({ required int installedVersion, required int hubVersion, }) : this._( - HubRepoStatusType.upgradeAvailable, - installedVersion: installedVersion, - hubVersion: hubVersion, - ); + HubRepoStatusType.upgradeAvailable, + installedVersion: installedVersion, + hubVersion: hubVersion, + ); final HubRepoStatusType type; final int? installedVersion; @@ -219,9 +215,7 @@ class _HubPageState extends ConsumerState { super.initState(); final restored = _restoreSnapshotIfFresh(); if (!restored) { - Future.microtask( - () => _loadInfo(autoSearch: true, applyDefaults: true), - ); + Future.microtask(() => _loadInfo(autoSearch: true, applyDefaults: true)); } else if (_info == null) { Future.microtask( () => _loadInfo(autoSearch: false, applyDefaults: false), @@ -253,10 +247,8 @@ class _HubPageState extends ConsumerState { final client = ref.read(backendClientProvider); final previewItems = imageUrls .map( - (url) => ImagePreviewItem( - title: '', - imageUrl: client.hubImageUrl(url), - ), + (url) => + ImagePreviewItem(title: '', imageUrl: client.hubImageUrl(url)), ) .toList(); await showDialog( @@ -381,7 +373,11 @@ class _HubPageState extends ConsumerState { try { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - final result = await runner.runJob('hub_info', args: {}, onLog: log.addEntry); + final result = await runner.runJob( + 'hub_info', + args: {}, + onLog: log.addEntry, + ); final payload = result.result as Map?; if (payload == null) return; final info = HubInfo.fromPayload(payload); @@ -492,7 +488,8 @@ class _HubPageState extends ConsumerState { .map((item) => (item as Map).cast()) .toList(); final pagination = payload['pagination'] as Map? ?? {}; - final total = int.tryParse(pagination['total_found']?.toString() ?? '') ?? + final total = + int.tryParse(pagination['total_found']?.toString() ?? '') ?? resources.length; final totalPages = int.tryParse(pagination['total_pages']?.toString() ?? '') ?? 1; @@ -585,7 +582,8 @@ class _HubPageState extends ConsumerState { for (final entry in packageByResource.entries) { final resourceId = entry.key; final info = entry.value; - final resolvedName = resolved.resolved['${info.packageKey}.latest'] ?? 'missing'; + final resolvedName = + resolved.resolved['${info.packageKey}.latest'] ?? 'missing'; if (resolvedName == 'missing') { nextStatus[resourceId] = const HubRepoStatus.generateDownloadList(); nextPackage[resourceId] = info.displayVarName; @@ -595,8 +593,9 @@ class _HubPageState extends ConsumerState { ? resolvedName.substring(0, resolvedName.length - 1) : resolvedName; final parts = resolvedClean.split('.'); - final installedVersion = - parts.isNotEmpty ? int.tryParse(parts.last) ?? 0 : 0; + final installedVersion = parts.isNotEmpty + ? int.tryParse(parts.last) ?? 0 + : 0; if (installedVersion >= info.hubVersion) { nextStatus[resourceId] = const HubRepoStatus.inRepository(); } else { @@ -618,7 +617,11 @@ class _HubPageState extends ConsumerState { Future _scanMissing() async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - final result = await runner.runJob('hub_missing_scan', args: {}, onLog: log.addEntry); + final result = await runner.runJob( + 'hub_missing_scan', + args: {}, + onLog: log.addEntry, + ); final payload = result.result as Map?; if (payload == null) return; _mergeDownloads(payload); @@ -627,7 +630,11 @@ class _HubPageState extends ConsumerState { Future _scanUpdates() async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - final result = await runner.runJob('hub_updates_scan', args: {}, onLog: log.addEntry); + final result = await runner.runJob( + 'hub_updates_scan', + args: {}, + onLog: log.addEntry, + ); final payload = result.result as Map?; if (payload == null) return; _mergeDownloads(payload); @@ -635,7 +642,8 @@ class _HubPageState extends ConsumerState { void _mergeDownloads(Map payload) { final direct = payload['download_urls'] as Map? ?? {}; - final noVersion = payload['download_urls_no_version'] as Map? ?? {}; + final noVersion = + payload['download_urls_no_version'] as Map? ?? {}; final sizesRaw = payload['download_sizes'] as Map? ?? {}; final sizes = {}; for (final entry in sizesRaw.entries) { @@ -677,12 +685,14 @@ class _HubPageState extends ConsumerState { final cleanUrl = url.trim(); if (cleanVar.isEmpty || cleanUrl.isEmpty || cleanUrl == 'null') return; final existingUrl = _downloadByVar[cleanVar]; - if (existingUrl != null && existingUrl.toLowerCase() != cleanUrl.toLowerCase()) { + if (existingUrl != null && + existingUrl.toLowerCase() != cleanUrl.toLowerCase()) { _downloadByUrl.remove(existingUrl); _downloadSizeByUrl.remove(existingUrl); } final existingName = _downloadByUrl[cleanUrl]; - if (existingName != null && existingName.toLowerCase() != cleanVar.toLowerCase()) { + if (existingName != null && + existingName.toLowerCase() != cleanVar.toLowerCase()) { final existingVersioned = _isVersionedName(existingName); final newVersioned = _isVersionedName(cleanVar); if (newVersioned && !existingVersioned) { @@ -707,7 +717,9 @@ class _HubPageState extends ConsumerState { } String _resourceId(Map resource) { - return resource['resource_id']?.toString() ?? resource['id']?.toString() ?? ''; + return resource['resource_id']?.toString() ?? + resource['id']?.toString() ?? + ''; } List _parseResourceTags(Map resource) { @@ -782,8 +794,9 @@ class _HubPageState extends ConsumerState { final version = resource['version_string']?.toString(); addDetail('Version', version); - final dependencyCount = - int.tryParse(resource['dependency_count']?.toString() ?? ''); + final dependencyCount = int.tryParse( + resource['dependency_count']?.toString() ?? '', + ); if (dependencyCount != null) { addDetail('Dependencies', dependencyCount.toString()); } @@ -792,12 +805,15 @@ class _HubPageState extends ConsumerState { if (viewCount != null) { addDetail('Views', viewCount.toString()); } - final reviewCount = int.tryParse(resource['review_count']?.toString() ?? ''); + final reviewCount = int.tryParse( + resource['review_count']?.toString() ?? '', + ); if (reviewCount != null) { addDetail('Reviews', reviewCount.toString()); } - final ratingWeighted = - double.tryParse(resource['rating_weighted']?.toString() ?? ''); + final ratingWeighted = double.tryParse( + resource['rating_weighted']?.toString() ?? '', + ); if (ratingWeighted != null) { addDetail('Rating (weighted)', ratingWeighted.toStringAsFixed(2)); } @@ -805,8 +821,7 @@ class _HubPageState extends ConsumerState { final hubFile = _selectLatestHubFile(resource); if (hubFile != null) { addDetail('License', hubFile['licenseType']?.toString()); - final fileSize = - int.tryParse(hubFile['file_size']?.toString() ?? ''); + final fileSize = int.tryParse(hubFile['file_size']?.toString() ?? ''); if (fileSize != null) { addDetail('File Size', _formatBytes(fileSize)); } @@ -871,9 +886,9 @@ class _HubPageState extends ConsumerState { if (status.type == HubRepoStatusType.inRepository) { final name = _repoPackageById[resourceId]; if (name == null || name.isEmpty) return; - ref.read(varsQueryProvider.notifier).update( - (state) => state.copyWith(page: 1, search: name), - ); + ref + .read(varsQueryProvider.notifier) + .update((state) => state.copyWith(page: 1, search: name)); ref.read(navIndexProvider.notifier).setIndex(0); return; } @@ -961,7 +976,8 @@ class _HubPageState extends ConsumerState { } List> _filterResourcesByTags( - List> resources) { + List> resources, + ) { if (_appliedTags.isEmpty) return resources; final required = _appliedTags .map((tag) => tag.toLowerCase()) @@ -971,8 +987,7 @@ class _HubPageState extends ConsumerState { return resources.where((resource) { final tags = _parseResourceTags(resource); if (tags.isEmpty) return false; - final tagSet = - tags.map((tag) => tag.toLowerCase()).toSet(); + final tagSet = tags.map((tag) => tag.toLowerCase()).toSet(); for (final tag in required) { if (tagSet.contains(tag)) { return true; @@ -986,11 +1001,15 @@ class _HubPageState extends ConsumerState { final info = _info; setState(() { _location = 'All'; - _payType = info != null && info.payTypes.contains('Free') ? 'Free' : 'All'; + _payType = info != null && info.payTypes.contains('Free') + ? 'Free' + : 'All'; _category = 'All'; _creator = 'All'; _selectedTags.clear(); - _sortPrimary = info != null && info.sorts.isNotEmpty ? info.sorts.first : ''; + _sortPrimary = info != null && info.sorts.isNotEmpty + ? info.sorts.first + : ''; _sortSecondary = ''; _searchController.clear(); }); @@ -1014,7 +1033,10 @@ class _HubPageState extends ConsumerState { if (unixSeconds == null) return '-'; final raw = int.tryParse(unixSeconds.toString()); if (raw == null) return '-'; - final date = DateTime.fromMillisecondsSinceEpoch(raw * 1000, isUtc: true).toLocal(); + final date = DateTime.fromMillisecondsSinceEpoch( + raw * 1000, + isUtc: true, + ).toLocal(); return '${date.year}-${date.month.toString().padLeft(2, '0')}-${date.day.toString().padLeft(2, '0')}'; } @@ -1062,421 +1084,471 @@ class _HubPageState extends ConsumerState { onKeyEvent: _handleFilterKeyEvent, child: ListView( children: [ - Text(l10n.filtersActionsTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), - const SizedBox(height: 12), - - // Search - 濮嬬粓鏄剧ず - TextField( - controller: _searchController, - decoration: InputDecoration( - labelText: l10n.commonSearch, - border: const OutlineInputBorder(), + Text( + l10n.filtersActionsTitle, + style: const TextStyle(fontWeight: FontWeight.w600), ), - onSubmitted: (_) { - _triggerSearch(); - }, - ), - const SizedBox(height: 12), - - // 鍩虹绛涳拷?- 鍙姌锟? - ExpansionTile( - title: Text(l10n.basicFiltersTitle), - initiallyExpanded: true, - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), - child: Column( - children: [ - DropdownButtonFormField( - key: ValueKey(_location), - initialValue: _location, - items: _optionsWithAll(options?.locations ?? []) - .map((value) => DropdownMenuItem( - value: value, - child: Text(value == 'All' - ? l10n.allLocationsLabel - : value), - )) - .toList(), - onChanged: (value) { - if (value == null) return; - _updateFilters(() { - _location = value; - }); - }, - decoration: InputDecoration( - labelText: l10n.locationLabel, - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 8), - DropdownButtonFormField( - key: ValueKey(_payType), - initialValue: _payType, - items: _optionsWithAll(options?.payTypes ?? []) - .map((value) => DropdownMenuItem( - value: value, - child: Text(value == 'All' - ? l10n.allPayTypesLabel - : value), - )) - .toList(), - onChanged: (value) { - if (value == null) return; - _updateFilters(() { - _payType = value; - }); - }, - decoration: InputDecoration( - labelText: l10n.payTypeLabel, - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 8), - ], - ), + const SizedBox(height: 12), + + // Search - 濮嬬粓鏄剧ず + TextField( + controller: _searchController, + decoration: InputDecoration( + labelText: l10n.commonSearch, + border: const OutlineInputBorder(), ), - ], - ), + onSubmitted: (_) { + _triggerSearch(); + }, + ), + const SizedBox(height: 12), - // 楂樼骇绛涳拷?- 鍙姌锟? - ExpansionTile( - title: Text(l10n.advancedFiltersTitle), - initiallyExpanded: false, - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), - child: Column( - children: [ - DropdownButtonFormField( - key: ValueKey(_category), - initialValue: _category, - items: _optionsWithAll(options?.categories ?? []) - .map((value) => DropdownMenuItem( - value: value, - child: Text(value == 'All' - ? l10n.allTypesLabel - : value), - )) - .toList(), - onChanged: (value) { - if (value == null) return; - _updateFilters(() { - _category = value; - }); - }, - decoration: InputDecoration( - labelText: l10n.categoryLabel, - border: const OutlineInputBorder(), - ), - ), - const SizedBox(height: 8), - LazyDropdownField( - label: l10n.creatorLabel, - value: _creator.isEmpty ? 'All' : _creator, - allValue: 'All', - allLabel: l10n.allCreators, - optionsLoader: (queryText, offset, limit) async { - final client = ref.read(backendClientProvider); - return client.listHubOptions( - kind: 'creator', - query: queryText, - offset: offset, - limit: limit, - ); - }, - onChanged: (value) { - _updateFilters(() { - _creator = value; - }); - }, - ), - const SizedBox(height: 8), - LazyDropdownField( - key: BootstrapKeys.hubTagFilter, - label: l10n.tagLabel, - value: 'All', - allValue: 'All', - allLabel: l10n.allTagsLabel, - clearOnSelect: true, - optionsLoader: (queryText, offset, limit) async { - final client = ref.read(backendClientProvider); - return client.listHubOptions( - kind: 'tag', - query: queryText, - offset: offset, - limit: limit, - ); - }, - onChanged: (value) { - if (value == 'All') { - _clearTagFilters(); - return; - } - _addTagFilter(value); - }, - ), - if (_selectedTags.isNotEmpty) ...[ - const SizedBox(height: 8), - Align( - alignment: Alignment.centerLeft, - child: Wrap( - spacing: 6, - runSpacing: 6, - children: [ - for (final tag in _selectedTags) - InputChip( - label: Text(tag), - onDeleted: () => _removeTagFilter(tag), - ), - ], + // 鍩虹绛涳拷?- 鍙姌锟? + ExpansionTile( + title: Text(l10n.basicFiltersTitle), + initiallyExpanded: true, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), + child: Column( + children: [ + DropdownButtonFormField( + key: ValueKey(_location), + initialValue: _location, + items: + _optionsWithAll(options?.locations ?? []) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text( + value == 'All' + ? l10n.allLocationsLabel + : value, + ), + ), + ) + .toList(), + onChanged: (value) { + if (value == null) return; + _updateFilters(() { + _location = value; + }); + }, + decoration: InputDecoration( + labelText: l10n.locationLabel, + border: const OutlineInputBorder(), ), ), - ], - const SizedBox(height: 8), - ], - ), - ), - ], - ), - - // 鎺掑簭閫夐」 - 鍙姌鍙狅紝淇绌哄垪琛ㄩ棶锟? - ExpansionTile( - title: Text(l10n.sortOptionsTitle), - initiallyExpanded: false, - children: [ - Padding( - padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), - child: Column( - children: [ - if (options?.sorts != null && options!.sorts.isNotEmpty) + const SizedBox(height: 8), DropdownButtonFormField( - key: ValueKey(sortPrimaryValue ?? ''), - initialValue: sortPrimaryValue, - items: options.sorts - .map((value) => DropdownMenuItem( - value: value, - child: Text(value), - )) - .toList(), + key: ValueKey(_payType), + initialValue: _payType, + items: + _optionsWithAll(options?.payTypes ?? []) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text( + value == 'All' + ? l10n.allPayTypesLabel + : value, + ), + ), + ) + .toList(), onChanged: (value) { if (value == null) return; _updateFilters(() { - _sortPrimary = value; + _payType = value; }); }, decoration: InputDecoration( - labelText: l10n.primarySortLabel, + labelText: l10n.payTypeLabel, border: const OutlineInputBorder(), ), - ) - else - ListTile( - title: Text(l10n.noSortOptions), - subtitle: Text(l10n.loadingLabel), ), - const SizedBox(height: 8), - if (options?.sorts != null && options!.sorts.isNotEmpty) + const SizedBox(height: 8), + ], + ), + ), + ], + ), + + // 楂樼骇绛涳拷?- 鍙姌锟? + ExpansionTile( + title: Text(l10n.advancedFiltersTitle), + initiallyExpanded: false, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), + child: Column( + children: [ DropdownButtonFormField( - key: ValueKey(_sortSecondary), - initialValue: _sortSecondary, - items: [''] - .followedBy(options.sorts) - .map((value) => DropdownMenuItem( - value: value, - child: Text(value.isEmpty - ? l10n.noSecondarySort - : value), - )) - .toList(), + key: ValueKey(_category), + initialValue: _category, + items: + _optionsWithAll(options?.categories ?? []) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text( + value == 'All' + ? l10n.allTypesLabel + : value, + ), + ), + ) + .toList(), onChanged: (value) { if (value == null) return; _updateFilters(() { - _sortSecondary = value; + _category = value; }); }, decoration: InputDecoration( - labelText: l10n.secondarySortLabel, + labelText: l10n.categoryLabel, border: const OutlineInputBorder(), ), ), - const SizedBox(height: 8), - ], + const SizedBox(height: 8), + LazyDropdownField( + label: l10n.creatorLabel, + value: _creator.isEmpty ? 'All' : _creator, + allValue: 'All', + allLabel: l10n.allCreators, + optionsLoader: + (queryText, offset, limit) async { + final client = ref.read( + backendClientProvider, + ); + return client.listHubOptions( + kind: 'creator', + query: queryText, + offset: offset, + limit: limit, + ); + }, + onChanged: (value) { + _updateFilters(() { + _creator = value; + }); + }, + ), + const SizedBox(height: 8), + LazyDropdownField( + key: BootstrapKeys.hubTagFilter, + label: l10n.tagLabel, + value: 'All', + allValue: 'All', + allLabel: l10n.allTagsLabel, + clearOnSelect: true, + optionsLoader: + (queryText, offset, limit) async { + final client = ref.read( + backendClientProvider, + ); + return client.listHubOptions( + kind: 'tag', + query: queryText, + offset: offset, + limit: limit, + ); + }, + onChanged: (value) { + if (value == 'All') { + _clearTagFilters(); + return; + } + _addTagFilter(value); + }, + ), + if (_selectedTags.isNotEmpty) ...[ + const SizedBox(height: 8), + Align( + alignment: Alignment.centerLeft, + child: Wrap( + spacing: 6, + runSpacing: 6, + children: [ + for (final tag in _selectedTags) + InputChip( + label: Text(tag), + onDeleted: () => + _removeTagFilter(tag), + ), + ], + ), + ), + ], + const SizedBox(height: 8), + ], + ), ), - ), - ], - ), - const SizedBox(height: 12), - OutlinedButton( - onPressed: _resetFilters, - child: Text(l10n.resetFiltersLabel), - ), - const SizedBox(height: 4), - Row( - children: [ - Expanded( - child: DropdownButton( - value: _perPage, - items: const [12, 24, 48] - .map((value) => DropdownMenuItem( + ], + ), + + // 鎺掑簭閫夐」 - 鍙姌鍙狅紝淇绌哄垪琛ㄩ棶锟? + ExpansionTile( + title: Text(l10n.sortOptionsTitle), + initiallyExpanded: false, + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(8, 6, 8, 0), + child: Column( + children: [ + if (options?.sorts != null && + options!.sorts.isNotEmpty) + DropdownButtonFormField( + key: ValueKey(sortPrimaryValue ?? ''), + initialValue: sortPrimaryValue, + items: options.sorts + .map( + (value) => DropdownMenuItem( + value: value, + child: Text(value), + ), + ) + .toList(), + onChanged: (value) { + if (value == null) return; + _updateFilters(() { + _sortPrimary = value; + }); + }, + decoration: InputDecoration( + labelText: l10n.primarySortLabel, + border: const OutlineInputBorder(), + ), + ) + else + ListTile( + title: Text(l10n.noSortOptions), + subtitle: Text(l10n.loadingLabel), + ), + const SizedBox(height: 8), + if (options?.sorts != null && + options!.sorts.isNotEmpty) + DropdownButtonFormField( + key: ValueKey(_sortSecondary), + initialValue: _sortSecondary, + items: [''] + .followedBy(options.sorts) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text( + value.isEmpty + ? l10n.noSecondarySort + : value, + ), + ), + ) + .toList(), + onChanged: (value) { + if (value == null) return; + _updateFilters(() { + _sortSecondary = value; + }); + }, + decoration: InputDecoration( + labelText: l10n.secondarySortLabel, + border: const OutlineInputBorder(), + ), + ), + const SizedBox(height: 8), + ], + ), + ), + ], + ), + const SizedBox(height: 12), + OutlinedButton( + onPressed: _resetFilters, + child: Text(l10n.resetFiltersLabel), + ), + const SizedBox(height: 4), + Row( + children: [ + Expanded( + child: DropdownButton( + value: _perPage, + items: const [12, 24, 48] + .map( + (value) => DropdownMenuItem( value: value, child: Text(l10n.perPageLabel(value)), - )) - .toList(), - onChanged: (value) { - if (value == null) return; - _updateFilters(() { - _perPage = value; - }); - }, + ), + ) + .toList(), + onChanged: (value) { + if (value == null) return; + _updateFilters(() { + _perPage = value; + }); + }, + ), ), + Text(l10n.pageOf(_page, _totalPages)), + ], + ), + Row( + children: [ + IconButton( + onPressed: _page <= 1 + ? null + : () { + setState(() { + _page = 1; + }); + _triggerSearch(resetPage: false); + }, + icon: const Icon(Icons.first_page), + tooltip: l10n.paginationFirstPageTooltip, + ), + IconButton( + onPressed: _page <= 1 + ? null + : () { + setState(() { + _page -= 1; + }); + _triggerSearch(resetPage: false); + }, + icon: const Icon(Icons.chevron_left), + tooltip: l10n.paginationPreviousPageTooltip, + ), + IconButton( + onPressed: _page >= _totalPages + ? null + : () { + setState(() { + _page += 1; + }); + _triggerSearch(resetPage: false); + }, + icon: const Icon(Icons.chevron_right), + tooltip: l10n.paginationNextPageTooltip, + ), + IconButton( + onPressed: _page >= _totalPages + ? null + : () { + setState(() { + _page = _totalPages; + }); + _triggerSearch(resetPage: false); + }, + icon: const Icon(Icons.last_page), + tooltip: l10n.paginationLastPageTooltip, + ), + ], + ), + const SizedBox(height: 8), + FilledButton( + onPressed: _loadingResources + ? null + : () => _triggerSearch(), + child: Text(l10n.commonSearch), + ), + const SizedBox(height: 8), + OutlinedButton( + onPressed: _scanMissing, + child: Text(l10n.scanMissingLabel), + ), + const SizedBox(height: 8), + OutlinedButton( + onPressed: _scanUpdates, + child: Text(l10n.scanUpdatesLabel), + ), + const Divider(height: 24), + Text( + l10n.downloadListTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), + const SizedBox(height: 8), + Text( + l10n.totalLinksSize( + downloadUrls.length, + totalSizeLabel, ), - Text(l10n.pageOf(_page, _totalPages)), - ], - ), - Row( - children: [ - IconButton( - onPressed: _page <= 1 + ), + const SizedBox(height: 8), + Tooltip( + message: l10n.downloadAllTooltip, + child: OutlinedButton( + key: BootstrapKeys.hubDownloadAllButton, + onPressed: downloadUrls.isEmpty ? null - : () { - setState(() { - _page = 1; + : () async { + final items = downloadUrls + .map( + (url) => { + 'url': url, + 'name': _downloadByUrl[url], + 'size': _downloadSizeByUrl[url], + }, + ) + .toList(); + final messenger = ScaffoldMessenger.of( + context, + ); + await _runJob('hub_download_all', { + 'items': items, }); - _triggerSearch(resetPage: false); - }, - icon: const Icon(Icons.first_page), - tooltip: l10n.paginationFirstPageTooltip, - ), - IconButton( - onPressed: _page <= 1 - ? null - : () { + if (!mounted) return; setState(() { - _page -= 1; + _downloadByVar.clear(); + _downloadByUrl.clear(); + _downloadSizeByUrl.clear(); }); - _triggerSearch(resetPage: false); + messenger.showSnackBar( + SnackBar( + content: Text( + l10n.addedDownloads(items.length), + ), + ), + ); }, - icon: const Icon(Icons.chevron_left), - tooltip: l10n.paginationPreviousPageTooltip, + child: Text(l10n.downloadAllLabel), ), - IconButton( - onPressed: _page >= _totalPages + ), + const SizedBox(height: 8), + Tooltip( + message: l10n.copyLinksTooltip, + child: OutlinedButton( + onPressed: downloadUrls.isEmpty ? null - : () { - setState(() { - _page += 1; - }); - _triggerSearch(resetPage: false); + : () async { + final lines = downloadUrls + .map( + (url) => '${_downloadByUrl[url]} $url', + ) + .join('\n'); + await Clipboard.setData( + ClipboardData(text: lines), + ); }, - icon: const Icon(Icons.chevron_right), - tooltip: l10n.paginationNextPageTooltip, + child: Text(l10n.copyLinksLabel), ), - IconButton( - onPressed: _page >= _totalPages + ), + const SizedBox(height: 8), + Tooltip( + message: l10n.clearListTooltip, + child: OutlinedButton( + onPressed: downloadUrls.isEmpty ? null : () { setState(() { - _page = _totalPages; + _downloadByVar.clear(); + _downloadByUrl.clear(); + _downloadSizeByUrl.clear(); }); - _triggerSearch(resetPage: false); }, - icon: const Icon(Icons.last_page), - tooltip: l10n.paginationLastPageTooltip, + child: Text(l10n.clearListLabel), ), - ], - ), - const SizedBox(height: 8), - FilledButton( - onPressed: _loadingResources - ? null - : () => _triggerSearch(), - child: Text(l10n.commonSearch), - ), - const SizedBox(height: 8), - OutlinedButton( - onPressed: _scanMissing, - child: Text(l10n.scanMissingLabel), - ), - const SizedBox(height: 8), - OutlinedButton( - onPressed: _scanUpdates, - child: Text(l10n.scanUpdatesLabel), - ), - const Divider(height: 24), - Text(l10n.downloadListTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), - const SizedBox(height: 8), - Text(l10n.totalLinksSize(downloadUrls.length, totalSizeLabel)), - const SizedBox(height: 8), - Tooltip( - message: l10n.downloadAllTooltip, - child: OutlinedButton( - key: BootstrapKeys.hubDownloadAllButton, - onPressed: downloadUrls.isEmpty - ? null - : () async { - final items = downloadUrls - .map((url) => { - 'url': url, - 'name': _downloadByUrl[url], - 'size': _downloadSizeByUrl[url], - }) - .toList(); - final messenger = ScaffoldMessenger.of(context); - await _runJob('hub_download_all', {'items': items}); - if (!mounted) return; - setState(() { - _downloadByVar.clear(); - _downloadByUrl.clear(); - _downloadSizeByUrl.clear(); - }); - messenger.showSnackBar( - SnackBar( - content: - Text(l10n.addedDownloads(items.length)), - ), - ); - }, - child: Text(l10n.downloadAllLabel), ), - ), - const SizedBox(height: 8), - Tooltip( - message: l10n.copyLinksTooltip, - child: OutlinedButton( - onPressed: downloadUrls.isEmpty - ? null - : () async { - final lines = downloadUrls - .map((url) => '${_downloadByUrl[url]} $url') - .join('\n'); - await Clipboard.setData( - ClipboardData(text: lines), - ); - }, - child: Text(l10n.copyLinksLabel), - ), - ), - const SizedBox(height: 8), - Tooltip( - message: l10n.clearListTooltip, - child: OutlinedButton( - onPressed: downloadUrls.isEmpty - ? null - : () { - setState(() { - _downloadByVar.clear(); - _downloadByUrl.clear(); - _downloadSizeByUrl.clear(); - }); - }, - child: Text(l10n.clearListLabel), - ), - ), - ], - ), + ], + ), ), ), ), @@ -1500,8 +1572,9 @@ class _HubPageState extends ConsumerState { ), const SizedBox(width: 8), TextButton( - onPressed: - _loadingResources ? null : () => _triggerSearch(), + onPressed: _loadingResources + ? null + : () => _triggerSearch(), child: Text(l10n.commonSearch), ), ], @@ -1515,16 +1588,17 @@ class _HubPageState extends ConsumerState { final columns = width > 1400 ? 3 : width > 900 - ? 2 - : 1; + ? 2 + : 1; return GridView.builder( padding: const EdgeInsets.all(12), - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: columns, - crossAxisSpacing: 12, - mainAxisSpacing: 24, - childAspectRatio: 1.6, - ), + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: columns, + crossAxisSpacing: 12, + mainAxisSpacing: 24, + childAspectRatio: 1.6, + ), itemCount: visibleResources.length, itemBuilder: (context, index) { final resource = visibleResources[index]; @@ -1553,23 +1627,29 @@ class _HubPageState extends ConsumerState { final payType = resource['category']?.toString() ?? '-'; final tagLine = resource['tag_line']?.toString() ?? ''; final imageUrl = resource['image_url']?.toString(); - final ratingAvg = double.tryParse(resource['rating_avg']?.toString() ?? '') ?? 0; - final ratingCount = int.tryParse(resource['rating_count']?.toString() ?? '') ?? 0; - final downloads = int.tryParse(resource['download_count']?.toString() ?? '') ?? 0; + final ratingAvg = + double.tryParse(resource['rating_avg']?.toString() ?? '') ?? 0; + final ratingCount = + int.tryParse(resource['rating_count']?.toString() ?? '') ?? 0; + final downloads = + int.tryParse(resource['download_count']?.toString() ?? '') ?? 0; final lastUpdated = _formatDate(resource['last_update']); final version = resource['version_string']?.toString() ?? ''; - final dependencyCount = - int.tryParse(resource['dependency_count']?.toString() ?? ''); + final dependencyCount = int.tryParse( + resource['dependency_count']?.toString() ?? '', + ); final tags = _parseResourceTags(resource); final displayTags = tags.take(_tagChipLimit).toList(); - final extraTagCount = - tags.length > _tagChipLimit ? tags.length - _tagChipLimit : 0; + final extraTagCount = tags.length > _tagChipLimit + ? tags.length - _tagChipLimit + : 0; final hasHubFiles = - resource['hubFiles'] is List && (resource['hubFiles'] as List).isNotEmpty; - final repoStatus = _repoStatusById[resourceId] ?? const HubRepoStatus.unknown(); + resource['hubFiles'] is List && + (resource['hubFiles'] as List).isNotEmpty; + final repoStatus = + _repoStatusById[resourceId] ?? const HubRepoStatus.unknown(); final repoStatusLabel = _repoStatusLabel(l10n, repoStatus); - final cacheSize = - (96 * MediaQuery.of(context).devicePixelRatio).round(); + final cacheSize = (96 * MediaQuery.of(context).devicePixelRatio).round(); final canPreview = imageUrl != null && imageUrl.isNotEmpty; final previewImage = ClipRRect( @@ -1624,7 +1704,9 @@ class _HubPageState extends ConsumerState { title, maxLines: 2, overflow: TextOverflow.ellipsis, - style: const TextStyle(fontWeight: FontWeight.w600), + style: const TextStyle( + fontWeight: FontWeight.w600, + ), ), if (tagLine.isNotEmpty) ...[ const SizedBox(height: 4), @@ -1641,38 +1723,61 @@ class _HubPageState extends ConsumerState { runSpacing: 4, children: [ ActionChip( - label: Text(payType, style: const TextStyle(fontSize: 12)), + label: Text( + payType, + style: const TextStyle(fontSize: 12), + ), avatar: const Icon(Icons.paid, size: 14), backgroundColor: Theme.of(context) .colorScheme .tertiaryContainer .withValues(alpha: 0.6), visualDensity: VisualDensity.compact, - onPressed: payType == '-' ? null : () => _applyQuickFilter(payType: payType), + onPressed: payType == '-' + ? null + : () => + _applyQuickFilter(payType: payType), ), ActionChip( - label: Text(type, style: const TextStyle(fontSize: 12)), + label: Text( + type, + style: const TextStyle(fontSize: 12), + ), avatar: const Icon(Icons.category, size: 14), side: BorderSide( - color: Theme.of(context).colorScheme.outlineVariant, + color: Theme.of( + context, + ).colorScheme.outlineVariant, ), visualDensity: VisualDensity.compact, - onPressed: type == '-' ? null : () => _applyQuickFilter(category: type), + onPressed: type == '-' + ? null + : () => _applyQuickFilter(category: type), ), ActionChip( - label: Text(username, style: const TextStyle(fontSize: 12)), + label: Text( + username, + style: const TextStyle(fontSize: 12), + ), avatar: const Icon(Icons.person, size: 14), backgroundColor: Theme.of(context) .colorScheme .surfaceContainerHighest .withValues(alpha: 0.6), visualDensity: VisualDensity.compact, - onPressed: () => _applyQuickFilter(creator: username), + onPressed: () => + _applyQuickFilter(creator: username), ), ], ), const SizedBox(height: 6), - Text(l10n.ratingDownloads(ratingAvg, ratingCount, downloads)), + Text( + l10n.ratingDownloads( + ratingAvg, + ratingCount, + downloads, + ), + ), Text(l10n.updatedLabel(lastUpdated)), if (version.isNotEmpty && version != 'null' || dependencyCount != null) ...[ @@ -1718,8 +1823,11 @@ class _HubPageState extends ConsumerState { onPressed: repoStatus.type == HubRepoStatusType.unknown ? null : () => _handleRepositoryAction(resource), - child: Text(repoStatusLabel, - maxLines: 1, overflow: TextOverflow.ellipsis), + child: Text( + repoStatusLabel, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ), const SizedBox(width: 8), @@ -1755,7 +1863,8 @@ class _HubPageState extends ConsumerState { ? null : () async { await _runJob('open_url', { - 'url': 'https://hub.virtamate.com/resources/$resourceId/', + 'url': + 'https://hub.virtamate.com/resources/$resourceId/', }); }, child: Text(l10n.openPageLabel), @@ -1823,7 +1932,8 @@ class _EnhancedResourceDetailDialogState if (payload != null && mounted) { setState(() { _description = payload['description']?.toString() ?? ''; - _images = (payload['images'] as List?) + _images = + (payload['images'] as List?) ?.map((e) => e.toString()) .where((url) => url.isNotEmpty) .toList() ?? @@ -1852,10 +1962,8 @@ class _EnhancedResourceDetailDialogState final client = widget.client; final previewItems = imageUrls .map( - (url) => ImagePreviewItem( - title: '', - imageUrl: client.hubImageUrl(url), - ), + (url) => + ImagePreviewItem(title: '', imageUrl: client.hubImageUrl(url)), ) .toList(); await showDialog( @@ -1879,10 +1987,7 @@ class _EnhancedResourceDetailDialogState final l10n = context.l10n; return Dialog( child: ConstrainedBox( - constraints: const BoxConstraints( - maxWidth: 800, - maxHeight: 600, - ), + constraints: const BoxConstraints(maxWidth: 800, maxHeight: 600), child: Column( children: [ Padding( @@ -1969,7 +2074,10 @@ class _EnhancedResourceDetailDialogState ), child: Row( children: [ - Icon(Icons.error_outline, color: Colors.red.shade700), + Icon( + Icons.error_outline, + color: Colors.red.shade700, + ), const SizedBox(width: 8), Expanded( child: Text( @@ -1983,7 +2091,9 @@ class _EnhancedResourceDetailDialogState ], // 鎻忚堪 - if (!_loading && _error == null && _description.isNotEmpty) ...[ + if (!_loading && + _error == null && + _description.isNotEmpty) ...[ Text( l10n.descriptionTitle, style: TextStyle( @@ -1998,7 +2108,7 @@ class _EnhancedResourceDetailDialogState color: Colors.grey.shade100, borderRadius: BorderRadius.circular(8), ), - child: SelectableText( + child: SelectableText( _description, style: const TextStyle(fontSize: 14), ), @@ -2007,7 +2117,9 @@ class _EnhancedResourceDetailDialogState ], // 鍥剧墖 - if (!_loading && _error == null && _images.isNotEmpty) ...[ + if (!_loading && + _error == null && + _images.isNotEmpty) ...[ Text( l10n.imagesTitle, style: TextStyle( @@ -2025,13 +2137,16 @@ class _EnhancedResourceDetailDialogState return Tooltip( message: l10n.previewOpenTooltip, child: GestureDetector( - onTap: () => _openImagePreview(context, _images, index), + onTap: () => + _openImagePreview(context, _images, index), child: Container( width: 200, height: 200, decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey.shade300), + border: Border.all( + color: Colors.grey.shade300, + ), ), child: ClipRRect( borderRadius: BorderRadius.circular(8), diff --git a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart index 8a090a7..900d474 100644 --- a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart +++ b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:file_selector/file_selector.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -22,11 +24,7 @@ class MissingEntry { final bool versionMismatch; } -enum _DownloadStatus { - direct, - noVersion, - none, -} +enum _DownloadStatus { direct, noVersion, none } class MissingVarsPage extends ConsumerStatefulWidget { const MissingVarsPage({super.key, required this.missing}); @@ -71,8 +69,9 @@ class _MissingVarsPageState extends ConsumerState { void initState() { super.initState(); _missingEntries = widget.missing.map(_parseEntry).toList(); - _missingKeySet = - _missingEntries.map((entry) => _nameKey(entry.displayName)).toSet(); + _missingKeySet = _missingEntries + .map((entry) => _nameKey(entry.displayName)) + .toSet(); _entries = List.of(_missingEntries); Future.microtask(() async { await _loadExistingLinks(); @@ -98,7 +97,11 @@ class _MissingVarsPageState extends ConsumerState { if (slashIndex >= 0 && slashIndex + 1 < name.length) { name = name.substring(slashIndex + 1); } - return MissingEntry(rawName: raw, displayName: name, versionMismatch: mismatch); + return MissingEntry( + rawName: raw, + displayName: name, + versionMismatch: mismatch, + ); } String _nameKey(String name) { @@ -108,9 +111,11 @@ class _MissingVarsPageState extends ConsumerState { List get _viewEntries { if (!_includeLinked) { return _entries - .where((entry) => - _missingKeySet.contains(_nameKey(entry.displayName)) && - !_hasAppliedLink(entry.displayName)) + .where( + (entry) => + _missingKeySet.contains(_nameKey(entry.displayName)) && + !_hasAppliedLink(entry.displayName), + ) .toList(); } return _entries; @@ -122,7 +127,8 @@ class _MissingVarsPageState extends ConsumerState { if (_versionFilter == 'ignore' && entry.versionMismatch) { return false; } - if (_creatorFilter != 'ALL' && !entry.displayName.startsWith('$_creatorFilter.')) { + if (_creatorFilter != 'ALL' && + !entry.displayName.startsWith('$_creatorFilter.')) { return false; } if (search.isEmpty) return true; @@ -341,7 +347,10 @@ class _MissingVarsPageState extends ConsumerState { } Future> _loadLinkOptions( - String queryText, int offset, int limit) async { + String queryText, + int offset, + int limit, + ) async { final client = ref.read(backendClientProvider); final selected = _selectedVar; var creator = ''; @@ -489,16 +498,16 @@ class _MissingVarsPageState extends ConsumerState { } Future _fetchDownload() async { - final packages = - _missingEntries.map((entry) => entry.displayName).toSet().toList(); + final packages = _missingEntries + .map((entry) => entry.displayName) + .toSet() + .toList(); if (packages.isEmpty) return; final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); final result = await runner.runJob( 'hub_find_packages', - args: { - 'packages': packages, - }, + args: {'packages': packages}, onLog: log.addEntry, ); final payload = result.result as Map?; @@ -527,12 +536,13 @@ class _MissingVarsPageState extends ConsumerState { }); } - bool get _hasHubLinks => _downloadUrls.isNotEmpty || _downloadUrlsNoVersion.isNotEmpty; + bool get _hasHubLinks => + _downloadUrls.isNotEmpty || _downloadUrlsNoVersion.isNotEmpty; void _showSnackBar(String message) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(message)), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(message))); } Future _downloadSelected() async { @@ -546,7 +556,8 @@ class _MissingVarsPageState extends ConsumerState { _showSnackBar(l10n.missingFetchHubLinksFirst); return; } - final url = _downloadUrls[name] ?? _downloadUrlsNoVersion[_noVersionKey(name)]; + final url = + _downloadUrls[name] ?? _downloadUrlsNoVersion[_noVersionKey(name)]; if (url == null || url.isEmpty) { _showSnackBar(l10n.missingNoDownloadUrlForSelected); return; @@ -721,10 +732,10 @@ class _MissingVarsPageState extends ConsumerState { final path = location.path; final effective = _buildEffectiveMap(); final links = effective.entries - .map((entry) => MissingMapItem( - missingVar: entry.key, - destVar: entry.value, - )) + .map( + (entry) => + MissingMapItem(missingVar: entry.key, destVar: entry.value), + ) .toList(); final client = ref.read(backendClientProvider); await client.saveMissingMap(path, links); @@ -732,9 +743,11 @@ class _MissingVarsPageState extends ConsumerState { Future _loadMap() async { final l10n = context.l10n; - final file = await openFile(acceptedTypeGroups: [ - XTypeGroup(label: l10n.textFileTypeLabel, extensions: const ['txt']) - ]); + final file = await openFile( + acceptedTypeGroups: [ + XTypeGroup(label: l10n.textFileTypeLabel, extensions: const ['txt']), + ], + ); if (file == null) return; final client = ref.read(backendClientProvider); final response = await client.loadMissingMap(file.path); @@ -743,7 +756,8 @@ class _MissingVarsPageState extends ConsumerState { final allowed = _entries.map((entry) => entry.displayName).toSet(); _draftLinkMap = { for (final link in response.links) - if (allowed.contains(link.missingVar) && link.destVar.trim().isNotEmpty) + if (allowed.contains(link.missingVar) && + link.destVar.trim().isNotEmpty) link.missingVar: link.destVar.trim(), }; if (_selectedVar != null) { @@ -753,7 +767,36 @@ class _MissingVarsPageState extends ConsumerState { }); } - Future _askText(BuildContext context, String title, {String hint = ''}) { + Future _exportMissing() async { + final l10n = context.l10n; + final path = await _askText( + context, + l10n.exportPathTitle, + hint: 'missing_vars.txt', + ); + if (path == null || path.trim().isEmpty) return; + final file = File(path.trim()); + final parent = file.parent; + if (parent.path.isNotEmpty && !await parent.exists()) { + await parent.create(recursive: true); + } + final seen = {}; + final lines = []; + for (final entry in _missingEntries) { + final name = entry.displayName.trim(); + if (name.isEmpty) continue; + if (seen.add(name)) { + lines.add(name); + } + } + await file.writeAsString(lines.join('\n')); + } + + Future _askText( + BuildContext context, + String title, { + String hint = '', + }) { final controller = TextEditingController(text: hint); return showDialog( context: context, @@ -783,17 +826,21 @@ class _MissingVarsPageState extends ConsumerState { Widget build(BuildContext context) { final l10n = context.l10n; final filtered = _filteredEntries; - final creators = _viewEntries - .map((entry) => entry.displayName.split('.').first) - .toSet() - .toList() - ..sort(); - final appliedCount = - _entries.where((entry) => _appliedLink(entry.displayName).isNotEmpty).length; - final pendingCount = - _entries.where((entry) => _isPendingChange(entry.displayName)).length; - final brokenCount = - _entries.where((entry) => _isBroken(entry.displayName)).length; + final creators = + _viewEntries + .map((entry) => entry.displayName.split('.').first) + .toSet() + .toList() + ..sort(); + final appliedCount = _entries + .where((entry) => _appliedLink(entry.displayName).isNotEmpty) + .length; + final pendingCount = _entries + .where((entry) => _isPendingChange(entry.displayName)) + .length; + final brokenCount = _entries + .where((entry) => _isBroken(entry.displayName)) + .length; final selectedVar = _selectedVar; final appliedLink = selectedVar == null ? '' : _appliedLink(selectedVar); final draftLink = selectedVar == null ? '' : _draftLink(selectedVar); @@ -803,24 +850,26 @@ class _MissingVarsPageState extends ConsumerState { final suggestionLabel = suggestion == null ? '-' : _suggestedIsClosest(selectedVar!) - ? l10n.closestMatch(suggestion) - : suggestion; - final linkStatusLabel = - selectedVar == null ? '-' : _linkStatusLabel(selectedVar); - final linkStatusColor = - selectedVar == null ? Colors.grey : _linkStatusColor(selectedVar); + ? l10n.closestMatch(suggestion) + : suggestion; + final linkStatusLabel = selectedVar == null + ? '-' + : _linkStatusLabel(selectedVar); + final linkStatusColor = selectedVar == null + ? Colors.grey + : _linkStatusColor(selectedVar); final hasPendingChanges = pendingCount > 0; final hasDrafts = _draftLinkMap.isNotEmpty; final appliedDisplay = selectedVar == null ? '-' : isBroken - ? l10n.linkStatusBroken - : (appliedLink.isEmpty ? '-' : appliedLink); + ? l10n.linkStatusBroken + : (appliedLink.isEmpty ? '-' : appliedLink); final draftDisplay = selectedVar == null ? '-' : hasDraft - ? (draftLink.isEmpty ? l10n.draftClearLabel : draftLink) - : '-'; + ? (draftLink.isEmpty ? l10n.draftClearLabel : draftLink) + : '-'; return Scaffold( appBar: AppBar(title: Text(l10n.missingDependenciesTitle)), @@ -851,14 +900,18 @@ class _MissingVarsPageState extends ConsumerState { width: 220, child: LazyDropdownField( label: l10n.creatorLabel, - value: _creatorFilter.isEmpty ? 'ALL' : _creatorFilter, + value: _creatorFilter.isEmpty + ? 'ALL' + : _creatorFilter, allValue: 'ALL', allLabel: l10n.allCreators, optionsLoader: (queryText, offset, limit) async { final needle = queryText.trim().toLowerCase(); final matches = creators - .where((item) => - item.toLowerCase().contains(needle)) + .where( + (item) => + item.toLowerCase().contains(needle), + ) .toList(); matches.sort((a, b) { final aLower = a.toLowerCase(); @@ -873,7 +926,10 @@ class _MissingVarsPageState extends ConsumerState { return aLower.compareTo(bLower); }); final start = offset.clamp(0, matches.length); - final end = (start + limit).clamp(0, matches.length); + final end = (start + limit).clamp( + 0, + matches.length, + ); return matches.sublist(start, end); }, onChanged: (value) { @@ -889,10 +945,13 @@ class _MissingVarsPageState extends ConsumerState { value: _versionFilter, items: [ DropdownMenuItem( - value: 'ignore', - child: Text(l10n.ignoreVersionMismatch)), + value: 'ignore', + child: Text(l10n.ignoreVersionMismatch), + ), DropdownMenuItem( - value: 'all', child: Text(l10n.allMissingVars)), + value: 'all', + child: Text(l10n.allMissingVars), + ), ], onChanged: (value) { if (value == null) return; @@ -926,12 +985,18 @@ class _MissingVarsPageState extends ConsumerState { ), const Divider(height: 1), Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 8, + ), child: Row( children: [ - Text(l10n.rowPosition( + Text( + l10n.rowPosition( filtered.isEmpty ? 0 : _selectedIndex + 1, - filtered.length)), + filtered.length, + ), + ), const Spacer(), IconButton( onPressed: filtered.isEmpty || _selectedIndex <= 0 @@ -943,21 +1008,34 @@ class _MissingVarsPageState extends ConsumerState { IconButton( onPressed: filtered.isEmpty || _selectedIndex <= 0 ? null - : () => _selectIndex(_selectedIndex - 1, filtered), + : () => _selectIndex( + _selectedIndex - 1, + filtered, + ), icon: const Icon(Icons.chevron_left), tooltip: l10n.paginationPreviousPageTooltip, ), IconButton( - onPressed: filtered.isEmpty || _selectedIndex >= filtered.length - 1 + onPressed: + filtered.isEmpty || + _selectedIndex >= filtered.length - 1 ? null - : () => _selectIndex(_selectedIndex + 1, filtered), + : () => _selectIndex( + _selectedIndex + 1, + filtered, + ), icon: const Icon(Icons.chevron_right), tooltip: l10n.paginationNextPageTooltip, ), IconButton( - onPressed: filtered.isEmpty || _selectedIndex >= filtered.length - 1 + onPressed: + filtered.isEmpty || + _selectedIndex >= filtered.length - 1 ? null - : () => _selectIndex(filtered.length - 1, filtered), + : () => _selectIndex( + filtered.length - 1, + filtered, + ), icon: const Icon(Icons.last_page), tooltip: l10n.paginationLastPageTooltip, ), @@ -965,7 +1043,10 @@ class _MissingVarsPageState extends ConsumerState { ), ), Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 6, + ), child: Row( children: [ Text(l10n.appliedCount(appliedCount)), @@ -987,21 +1068,39 @@ class _MissingVarsPageState extends ConsumerState { const Divider(height: 1), Container( color: Colors.grey.shade100, - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 6, + ), child: Row( children: [ Expanded( - flex: 3, - child: Text(l10n.missingVarHeader, - style: const TextStyle(fontWeight: FontWeight.w600))), + flex: 3, + child: Text( + l10n.missingVarHeader, + style: const TextStyle( + fontWeight: FontWeight.w600, + ), + ), + ), Expanded( - flex: 3, - child: Text(l10n.substituteHeader, - style: const TextStyle(fontWeight: FontWeight.w600))), + flex: 3, + child: Text( + l10n.substituteHeader, + style: const TextStyle( + fontWeight: FontWeight.w600, + ), + ), + ), SizedBox( - width: 32, - child: Text(l10n.downloadHeaderShort, - style: const TextStyle(fontWeight: FontWeight.w600))), + width: 32, + child: Text( + l10n.downloadHeaderShort, + style: const TextStyle( + fontWeight: FontWeight.w600, + ), + ), + ), ], ), ), @@ -1021,18 +1120,27 @@ class _MissingVarsPageState extends ConsumerState { onTap: () => _selectIndex(index, filtered), child: Container( color: selected ? Colors.blue.shade50 : null, - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + padding: const EdgeInsets.symmetric( + horizontal: 12, + vertical: 8, + ), child: Row( children: [ Expanded( flex: 3, child: Row( children: [ - Expanded(child: Text(entry.displayName)), + Expanded( + child: Text(entry.displayName), + ), if (entry.versionMismatch) const Padding( padding: EdgeInsets.only(left: 6), - child: Icon(Icons.warning_amber, size: 16, color: Colors.orange), + child: Icon( + Icons.warning_amber, + size: 16, + color: Colors.orange, + ), ), ], ), @@ -1041,24 +1149,41 @@ class _MissingVarsPageState extends ConsumerState { flex: 3, child: Row( children: [ - Expanded(child: Text(link.isEmpty ? '-' : link)), + Expanded( + child: Text( + link.isEmpty ? '-' : link, + ), + ), if (pending) const Padding( padding: EdgeInsets.only(left: 6), - child: Icon(Icons.edit, size: 14, color: Colors.blueGrey), + child: Icon( + Icons.edit, + size: 14, + color: Colors.blueGrey, + ), ), if (broken && !pending) const Padding( padding: EdgeInsets.only(left: 6), - child: Icon(Icons.link_off, size: 14, color: Colors.orange), + child: Icon( + Icons.link_off, + size: 14, + color: Colors.orange, + ), ), ], ), ), SizedBox( width: 32, - child: Icon(_downloadIcon(entry.displayName), - color: _downloadColor(entry.displayName), size: 18), + child: Icon( + _downloadIcon(entry.displayName), + color: _downloadColor( + entry.displayName, + ), + size: 18, + ), ), ], ), @@ -1083,50 +1208,71 @@ class _MissingVarsPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text(l10n.detailsTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.detailsTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), Text(l10n.selectedLabel(selectedVar ?? '-')), const SizedBox(height: 4), - Text(l10n.resolvedLabel( - selectedVar == null ? '-' : _resolvedDisplay(selectedVar))), + Text( + l10n.resolvedLabel( + selectedVar == null + ? '-' + : _resolvedDisplay(selectedVar), + ), + ), const SizedBox(height: 4), - Text(l10n.downloadLabel( + Text( + l10n.downloadLabel( selectedVar == null ? '-' - : _downloadStatusLabel(_downloadStatus(selectedVar)))), + : _downloadStatusLabel( + _downloadStatus(selectedVar), + ), + ), + ), const SizedBox(height: 4), - Text(l10n.linkStatusLabel(linkStatusLabel), - style: TextStyle(color: linkStatusColor)), + Text( + l10n.linkStatusLabel(linkStatusLabel), + style: TextStyle(color: linkStatusColor), + ), if (_loadingLinks) const Padding( padding: EdgeInsets.only(top: 8), child: LinearProgressIndicator(minHeight: 2), ), const Divider(height: 16), - Text(l10n.linkSubstitutionTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.linkSubstitutionTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 6), Text( l10n.linkSubstitutionDescription, - style: TextStyle(fontSize: 12, color: Colors.grey.shade700), + style: TextStyle( + fontSize: 12, + color: Colors.grey.shade700, + ), ), const SizedBox(height: 8), - Text( - l10n.appliedLinkLabel(appliedDisplay), - ), + Text(l10n.appliedLinkLabel(appliedDisplay)), const SizedBox(height: 4), - Text( - l10n.draftLinkLabel(draftDisplay), - ), + Text(l10n.draftLinkLabel(draftDisplay)), const SizedBox(height: 4), Row( children: [ - Expanded(child: Text(l10n.suggestionLabel(suggestionLabel))), + Expanded( + child: Text( + l10n.suggestionLabel(suggestionLabel), + ), + ), Tooltip( message: l10n.useSuggestionTooltip, child: TextButton( - onPressed: suggestion == null ? null : _applySuggestedForSelected, + onPressed: suggestion == null + ? null + : _applySuggestedForSelected, child: Text(l10n.commonUse), ), ), @@ -1161,9 +1307,7 @@ class _MissingVarsPageState extends ConsumerState { }, ), ), - Expanded( - child: Text(l10n.limitSamePackageLabel), - ), + Expanded(child: Text(l10n.limitSamePackageLabel)), ], ), const SizedBox(height: 4), @@ -1184,9 +1328,14 @@ class _MissingVarsPageState extends ConsumerState { onPressed: selectedVar == null ? null : () { - _setDraftLink(selectedVar, _linkController.text); + _setDraftLink( + selectedVar, + _linkController.text, + ); setState(() { - _pickerValue = _linkController.text.trim(); + _pickerValue = _linkController + .text + .trim(); }); }, child: Text(l10n.setDraftLabel), @@ -1232,7 +1381,8 @@ class _MissingVarsPageState extends ConsumerState { child: Tooltip( message: l10n.applyToPackageTooltip, child: OutlinedButton( - onPressed: selectedVar == null || + onPressed: + selectedVar == null || _linkController.text.trim().isEmpty ? null : _applyDraftToPackage, @@ -1259,8 +1409,9 @@ class _MissingVarsPageState extends ConsumerState { child: Tooltip( message: l10n.applyLinkChangesTooltip, child: FilledButton( - onPressed: - hasPendingChanges ? _applyLinkChanges : null, + onPressed: hasPendingChanges + ? _applyLinkChanges + : null, child: Text(l10n.applyLinkChangesLabel), ), ), @@ -1306,11 +1457,13 @@ class _MissingVarsPageState extends ConsumerState { onPressed: selectedVar == null ? null : () async { - final search = - selectedVar.replaceAll('.latest', '.1'); + final search = selectedVar.replaceAll( + '.latest', + '.1', + ); await _runJob('open_url', { 'url': - 'https://www.google.com/search?q=$search var', + 'https://www.google.com/search?q=$search var', }); }, child: Text(l10n.googleSearchLabel), @@ -1345,8 +1498,11 @@ class _MissingVarsPageState extends ConsumerState { message: l10n.exportInstalledTooltip, child: OutlinedButton( onPressed: () async { - final path = await _askText(context, l10n.exportPathTitle, - hint: 'installed_vars.txt'); + final path = await _askText( + context, + l10n.exportPathTitle, + hint: 'installed_vars.txt', + ); if (path == null || path.trim().isEmpty) return; await _runJob('vars_export_installed', { 'path': path.trim(), @@ -1355,6 +1511,14 @@ class _MissingVarsPageState extends ConsumerState { child: Text(l10n.exportInstalledLabel), ), ), + const SizedBox(height: 8), + Tooltip( + message: l10n.exportMissingTooltip, + child: OutlinedButton( + onPressed: _exportMissing, + child: Text(l10n.exportMissingLabel), + ), + ), ], ), ), @@ -1366,18 +1530,26 @@ class _MissingVarsPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(l10n.dependentsTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.dependentsTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), - if (_loadingDependents) const LinearProgressIndicator(minHeight: 2), + if (_loadingDependents) + const LinearProgressIndicator(minHeight: 2), ..._dependents.map( (name) => ListTile( dense: true, title: Text(name), trailing: TextButton( onPressed: () { - ref.read(varsQueryProvider.notifier).update( - (state) => state.copyWith(page: 1, search: name), + ref + .read(varsQueryProvider.notifier) + .update( + (state) => state.copyWith( + page: 1, + search: name, + ), ); ref .read(navIndexProvider.notifier) @@ -1403,8 +1575,10 @@ class _MissingVarsPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(l10n.dependentSavesTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.dependentSavesTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), ..._dependentSaves.map( (path) => ListTile( @@ -1441,4 +1615,3 @@ class _MissingVarsPageState extends ConsumerState { ); } } - diff --git a/varmanager_flutter/lib/features/prepare_saves/prepare_saves_page.dart b/varmanager_flutter/lib/features/prepare_saves/prepare_saves_page.dart index 7fb8362..17fe1a8 100644 --- a/varmanager_flutter/lib/features/prepare_saves/prepare_saves_page.dart +++ b/varmanager_flutter/lib/features/prepare_saves/prepare_saves_page.dart @@ -68,7 +68,11 @@ class _PrepareSavesPageState extends ConsumerState { Future _analyze() async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - final result = await runner.runJob('saves_deps', args: {}, onLog: log.addEntry); + final result = await runner.runJob( + 'saves_deps', + args: {}, + onLog: log.addEntry, + ); final payload = result.result as Map?; if (payload == null) return; setState(() { @@ -90,9 +94,11 @@ class _PrepareSavesPageState extends ConsumerState { final l10n = context.l10n; ScaffoldMessenger.of(context).showSnackBar( SnackBar( - content: Text(response.ok - ? l10n.outputFolderReady - : response.reason ?? l10n.outputFolderValidationFailed), + content: Text( + response.ok + ? l10n.outputFolderReady + : response.reason ?? l10n.outputFolderValidationFailed, + ), ), ); } @@ -161,18 +167,13 @@ class _PrepareSavesPageState extends ConsumerState { Expanded( child: Row( children: [ - SizedBox( - width: 360, - child: _buildTreePanel(), - ), + SizedBox(width: 360, child: _buildTreePanel()), const SizedBox(width: 12), Expanded( child: _listPanel(l10n.missingDependenciesTitle, _missing), ), const SizedBox(width: 12), - Expanded( - child: _listPanel(l10n.statusInstalled, _installed), - ), + Expanded(child: _listPanel(l10n.statusInstalled, _installed)), ], ), ), @@ -190,17 +191,17 @@ class _PrepareSavesPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(l10n.savesTreeTitle, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.savesTreeTitle, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), if (_loadingTree) const LinearProgressIndicator(minHeight: 2), const SizedBox(height: 8), Expanded( child: _groups.isEmpty ? Center(child: Text(l10n.noSavesFound)) - : ListView( - children: _groups.map(_buildGroupNode).toList(), - ), + : ListView(children: _groups.map(_buildGroupNode).toList()), ), const SizedBox(height: 8), Text(l10n.selectedFilesCount(_selectedPaths.length)), @@ -229,7 +230,11 @@ class _PrepareSavesPageState extends ConsumerState { value: _selectedPaths.contains(item.path), onChanged: (value) => _toggleItem(item.path, value ?? false), title: Text(item.name), - subtitle: Text(item.path, maxLines: 1, overflow: TextOverflow.ellipsis), + subtitle: Text( + item.path, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ) .toList(), @@ -238,7 +243,9 @@ class _PrepareSavesPageState extends ConsumerState { bool? _groupState(SavesTreeGroup group) { if (group.items.isEmpty) return false; - final selected = group.items.where((item) => _selectedPaths.contains(item.path)); + final selected = group.items.where( + (item) => _selectedPaths.contains(item.path), + ); if (selected.length == group.items.length) return true; if (selected.isEmpty) return false; return null; @@ -286,9 +293,8 @@ class _PrepareSavesPageState extends ConsumerState { Expanded( child: ListView.builder( itemCount: items.length, - itemBuilder: (context, index) => ListTile( - title: Text(items[index]), - ), + itemBuilder: (context, index) => + ListTile(title: Text(items[index])), ), ), ], diff --git a/varmanager_flutter/lib/features/scenes/scenes_page.dart b/varmanager_flutter/lib/features/scenes/scenes_page.dart index f9c0303..cb3414a 100644 --- a/varmanager_flutter/lib/features/scenes/scenes_page.dart +++ b/varmanager_flutter/lib/features/scenes/scenes_page.dart @@ -29,8 +29,8 @@ class ScenesQueryNotifier extends Notifier { final scenesQueryProvider = NotifierProvider( - ScenesQueryNotifier.new, -); + ScenesQueryNotifier.new, + ); final scenesListProvider = FutureProvider((ref) async { final client = ref.watch(backendClientProvider); @@ -51,11 +51,7 @@ class _ScenesPageState extends ConsumerState { bool _ignoreGender = false; bool _forMale = false; int _personOrder = 1; - final Set _locationFilter = { - 'installed', - 'not_installed', - 'save', - }; + final Set _locationFilter = {'installed', 'not_installed', 'save'}; final Set _hideFavFilter = {-1, 0, 1}; @override @@ -124,9 +120,7 @@ class _ScenesPageState extends ConsumerState { ..clear() ..addAll([-1, 0, 1]); }); - _updateQuery( - (state) => ScenesQueryParams(location: _locationQueryValue()), - ); + _updateQuery((state) => ScenesQueryParams(location: _locationQueryValue())); } @override @@ -149,21 +143,24 @@ class _ScenesPageState extends ConsumerState { children: [ DropdownButton( value: query.category, - items: [ - 'scenes', - 'looks', - 'clothing', - 'hairstyle', - 'assets', - 'morphs', - 'pose', - 'skin', - ] - .map((item) => DropdownMenuItem( - value: item, - child: Text(_categoryLabel(l10n, item)), - )) - .toList(), + items: + [ + 'scenes', + 'looks', + 'clothing', + 'hairstyle', + 'assets', + 'morphs', + 'pose', + 'skin', + ] + .map( + (item) => DropdownMenuItem( + value: item, + child: Text(_categoryLabel(l10n, item)), + ), + ) + .toList(), onChanged: (value) { if (value == null) return; _updateQuery( @@ -213,13 +210,21 @@ class _ScenesPageState extends ConsumerState { value: query.sort, items: [ DropdownMenuItem( - value: 'var_date', child: Text(l10n.sortNewToOld)), + value: 'var_date', + child: Text(l10n.sortNewToOld), + ), DropdownMenuItem( - value: 'meta_date', child: Text(l10n.sortMetaDate)), + value: 'meta_date', + child: Text(l10n.sortMetaDate), + ), DropdownMenuItem( - value: 'var_name', child: Text(l10n.sortVarName)), + value: 'var_name', + child: Text(l10n.sortVarName), + ), DropdownMenuItem( - value: 'scene_name', child: Text(l10n.sortSceneName)), + value: 'scene_name', + child: Text(l10n.sortSceneName), + ), ], onChanged: (value) { if (value == null) return; @@ -231,10 +236,12 @@ class _ScenesPageState extends ConsumerState { DropdownButton( value: query.perPage, items: const [24, 48, 96, 200] - .map((value) => DropdownMenuItem( - value: value, - child: Text(l10n.perPageLabel(value)), - )) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text(l10n.perPageLabel(value)), + ), + ) .toList(), onChanged: (value) { if (value == null) return; @@ -257,12 +264,14 @@ class _ScenesPageState extends ConsumerState { FilterChip( label: Text(l10n.locationNotInstalled), selected: _locationFilter.contains('not_installed'), - onSelected: (value) => _toggleLocation('not_installed', value), + onSelected: (value) => + _toggleLocation('not_installed', value), ), FilterChip( label: Text(l10n.locationMissingLink), selected: _locationFilter.contains('missinglink'), - onSelected: (value) => _toggleLocation('missinglink', value), + onSelected: (value) => + _toggleLocation('missinglink', value), ), FilterChip( label: Text(l10n.locationSave), @@ -317,10 +326,12 @@ class _ScenesPageState extends ConsumerState { DropdownButton( value: _personOrder, items: [1, 2, 3, 4, 5, 6, 7, 8] - .map((value) => DropdownMenuItem( - value: value, - child: Text(l10n.personLabel(value)), - )) + .map( + (value) => DropdownMenuItem( + value: value, + child: Text(l10n.personLabel(value)), + ), + ) .toList(), onChanged: (value) { if (value == null) return; @@ -348,7 +359,10 @@ class _ScenesPageState extends ConsumerState { } Widget _buildColumns( - BuildContext context, ScenesListResponse data, ScenesQueryParams query) { + BuildContext context, + ScenesListResponse data, + ScenesQueryParams query, + ) { final l10n = context.l10n; final totalPages = data.total == 0 ? 1 @@ -402,8 +416,8 @@ class _ScenesPageState extends ConsumerState { IconButton( onPressed: data.page > 1 ? () => _updateQuery( - (state) => state.copyWith(page: data.page - 1), - ) + (state) => state.copyWith(page: data.page - 1), + ) : null, icon: const Icon(Icons.chevron_left), tooltip: l10n.paginationPreviousPageTooltip, @@ -411,8 +425,8 @@ class _ScenesPageState extends ConsumerState { IconButton( onPressed: data.page < totalPages ? () => _updateQuery( - (state) => state.copyWith(page: data.page + 1), - ) + (state) => state.copyWith(page: data.page + 1), + ) : null, icon: const Icon(Icons.chevron_right), tooltip: l10n.paginationNextPageTooltip, @@ -420,8 +434,8 @@ class _ScenesPageState extends ConsumerState { IconButton( onPressed: data.page < totalPages ? () => _updateQuery( - (state) => state.copyWith(page: totalPages), - ) + (state) => state.copyWith(page: totalPages), + ) : null, icon: const Icon(Icons.last_page), tooltip: l10n.paginationLastPageTooltip, @@ -457,27 +471,32 @@ class _ScenesPageState extends ConsumerState { }) { return DragTarget( onAcceptWithDetails: (details) => _moveScene(details.data, targetHideFav), - builder: (context, candidate, rejected) { - final l10n = context.l10n; - final titleWidget = Text(l10n.columnTitleWithCount(title, items.length)); - final headerTitle = targetHideFav == 0 - ? KeyedSubtree(key: BootstrapKeys.scenesColumnHeader, child: titleWidget) - : titleWidget; - return Card( - child: Column( - children: [ - Padding( - padding: const EdgeInsets.all(12), - child: Row( - children: [ - headerTitle, - if (candidate.isNotEmpty) ...[ - const Spacer(), - const Icon(Icons.arrow_downward, size: 18), - ], + builder: (context, candidate, rejected) { + final l10n = context.l10n; + final titleWidget = Text( + l10n.columnTitleWithCount(title, items.length), + ); + final headerTitle = targetHideFav == 0 + ? KeyedSubtree( + key: BootstrapKeys.scenesColumnHeader, + child: titleWidget, + ) + : titleWidget; + return Card( + child: Column( + children: [ + Padding( + padding: const EdgeInsets.all(12), + child: Row( + children: [ + headerTitle, + if (candidate.isNotEmpty) ...[ + const Spacer(), + const Icon(Icons.arrow_downward, size: 18), ], - ), + ], ), + ), const Divider(height: 1), Expanded( child: ListView.builder( @@ -538,8 +557,7 @@ class _ScenesPageState extends ConsumerState { final previewUrl = _previewUrl(client, item); final canPreview = previewUrl != null && previewUrl.isNotEmpty; final title = p.basenameWithoutExtension(item.scenePath); - final cacheSize = - (72 * MediaQuery.of(context).devicePixelRatio).round(); + final cacheSize = (72 * MediaQuery.of(context).devicePixelRatio).round(); final previewImage = ClipRRect( borderRadius: BorderRadius.circular(6), child: previewUrl == null @@ -563,8 +581,9 @@ class _ScenesPageState extends ConsumerState { Tooltip( message: l10n.previewOpenDoubleClickTooltip, child: GestureDetector( - onDoubleTap: - canPreview ? () => _openScenePreview(context, item) : null, + onDoubleTap: canPreview + ? () => _openScenePreview(context, item) + : null, child: previewImage, ), ), @@ -580,11 +599,7 @@ class _ScenesPageState extends ConsumerState { style: const TextStyle(fontWeight: FontWeight.w600), ), const SizedBox(height: 2), - Text( - item.varName, - maxLines: 1, - overflow: TextOverflow.ellipsis, - ), + Text(item.varName, maxLines: 1, overflow: TextOverflow.ellipsis), const SizedBox(height: 4), Wrap( spacing: 6, @@ -664,7 +679,10 @@ class _ScenesPageState extends ConsumerState { } Widget _sceneCardContent( - BuildContext context, SceneListItem item, Widget header) { + BuildContext context, + SceneListItem item, + Widget header, + ) { final l10n = context.l10n; return Card( margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 6), @@ -773,8 +791,9 @@ class _ScenesPageState extends ConsumerState { 'resources': [ { 'type': item.atomType, - 'saveName': '${item.varName}:/${item.scenePath.replaceAll('\\', '/')}', - } + 'saveName': + '${item.varName}:/${item.scenePath.replaceAll('\\', '/')}', + }, ], }, 'merge': _merge, @@ -787,19 +806,19 @@ class _ScenesPageState extends ConsumerState { Future _analyzeScene(BuildContext context, SceneListItem item) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - final result = await runner.runJob('scene_analyze', - args: { - 'save_name': '${item.varName}:/${item.scenePath.replaceAll('\\', '/')}', - 'character_gender': _forMale ? 'male' : 'female', - }, - onLog: log.addEntry); + final result = await runner.runJob( + 'scene_analyze', + args: { + 'save_name': '${item.varName}:/${item.scenePath.replaceAll('\\', '/')}', + 'character_gender': _forMale ? 'male' : 'female', + }, + onLog: log.addEntry, + ); final payload = result.result as Map?; if (payload == null || !context.mounted) return; - Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => AnalysisPage(payload: payload), - ), - ); + Navigator.of( + context, + ).push(MaterialPageRoute(builder: (_) => AnalysisPage(payload: payload))); } Future _locateScene(SceneListItem item) async { @@ -865,4 +884,3 @@ class _ScenesPageState extends ConsumerState { ref.invalidate(scenesListProvider); } } - diff --git a/varmanager_flutter/lib/features/settings/settings_page.dart b/varmanager_flutter/lib/features/settings/settings_page.dart index 3b9ecac..f36dd96 100644 --- a/varmanager_flutter/lib/features/settings/settings_page.dart +++ b/varmanager_flutter/lib/features/settings/settings_page.dart @@ -117,7 +117,8 @@ class _SettingsPageState extends ConsumerState { final proxyPort = int.tryParse(_proxyPort.text.trim()) ?? 0; final proxyUsername = _proxyUsername.text.trim(); final proxyPassword = _proxyPassword.text.trim(); - final needsRestartHint = previous.listenHost != listenHost || + final needsRestartHint = + previous.listenHost != listenHost || previous.listenPort != listenPort || previous.proxyMode != proxyMode || previous.proxy.host != proxyHost || @@ -149,9 +150,11 @@ class _SettingsPageState extends ConsumerState { }); ScaffoldMessenger.of(context).showSnackBar( SnackBar( - content: Text(needsRestartHint - ? context.l10n.configSavedRestartHint - : context.l10n.configSaved), + content: Text( + needsRestartHint + ? context.l10n.configSavedRestartHint + : context.l10n.configSaved, + ), ), ); } @@ -219,14 +222,22 @@ class _SettingsPageState extends ConsumerState { child: Column( children: [ _field(_listenHost, l10n.listenHostLabel), - _field(_listenPort, l10n.listenPortLabel, - keyboard: TextInputType.number), + _field( + _listenPort, + l10n.listenPortLabel, + keyboard: TextInputType.number, + ), _field(_logLevel, l10n.logLevelLabel), - _field(_jobConcurrency, l10n.jobConcurrencyLabel, - keyboard: TextInputType.number), + _field( + _jobConcurrency, + l10n.jobConcurrencyLabel, + keyboard: TextInputType.number, + ), const SizedBox(height: 4), - Text(l10n.proxySectionLabel, - style: const TextStyle(fontWeight: FontWeight.w600)), + Text( + l10n.proxySectionLabel, + style: const TextStyle(fontWeight: FontWeight.w600), + ), const SizedBox(height: 8), DropdownButtonFormField( initialValue: _proxyMode, @@ -254,8 +265,11 @@ class _SettingsPageState extends ConsumerState { const SizedBox(height: 12), if (manualProxy) ...[ _field(_proxyHost, l10n.proxyHostLabel), - _field(_proxyPort, l10n.proxyPortLabel, - keyboard: TextInputType.number), + _field( + _proxyPort, + l10n.proxyPortLabel, + keyboard: TextInputType.number, + ), _field(_proxyUsername, l10n.proxyUserLabel), _field( _proxyPassword, @@ -339,12 +353,15 @@ class _SettingsPageState extends ConsumerState { ); } - Widget _field(TextEditingController controller, String label, - {TextInputType keyboard = TextInputType.text, - bool obscureText = false, - bool enableSuggestions = true, - bool autocorrect = true, - bool enabled = true}) { + Widget _field( + TextEditingController controller, + String label, { + TextInputType keyboard = TextInputType.text, + bool obscureText = false, + bool enableSuggestions = true, + bool autocorrect = true, + bool enabled = true, + }) { return Padding( padding: const EdgeInsets.only(bottom: 12), child: TextFormField( @@ -392,10 +409,7 @@ class _SettingsPageState extends ConsumerState { ), if (onBrowse != null) ...[ const SizedBox(width: 8), - OutlinedButton( - onPressed: onBrowse, - child: Text(l10n.commonBrowse), - ), + OutlinedButton(onPressed: onBrowse, child: Text(l10n.commonBrowse)), ], ], ), @@ -557,7 +571,9 @@ class _ThemeCard extends StatelessWidget { border: Border.all( color: isSelected ? Theme.of(context).colorScheme.primary - : Theme.of(context).colorScheme.outline.withValues(alpha: 0.3), + : Theme.of( + context, + ).colorScheme.outline.withValues(alpha: 0.3), width: isSelected ? 2 : 1, ), ), @@ -567,7 +583,9 @@ class _ThemeCard extends StatelessWidget { width: 48, height: 48, decoration: BoxDecoration( - color: isDarkTheme ? _previewColor : _previewColor.withValues(alpha: 0.1), + color: isDarkTheme + ? _previewColor + : _previewColor.withValues(alpha: 0.1), borderRadius: BorderRadius.circular(24), border: Border.all(color: _previewColor, width: 3), ), @@ -595,7 +613,9 @@ class _ThemeCard extends StatelessWidget { label, style: TextStyle( fontSize: 12, - fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal, + fontWeight: isSelected + ? FontWeight.w600 + : FontWeight.normal, color: isSelected ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.onSurface, diff --git a/varmanager_flutter/lib/features/uninstall_vars/uninstall_vars_page.dart b/varmanager_flutter/lib/features/uninstall_vars/uninstall_vars_page.dart index 906dc22..90ec317 100644 --- a/varmanager_flutter/lib/features/uninstall_vars/uninstall_vars_page.dart +++ b/varmanager_flutter/lib/features/uninstall_vars/uninstall_vars_page.dart @@ -179,11 +179,8 @@ class _UninstallVarsPageState extends ConsumerState { @override Widget build(BuildContext context) { final l10n = context.l10n; - final dependencies = _dependencies - .map((item) => item.dependency) - .toSet() - .toList() - ..sort(); + final dependencies = + _dependencies.map((item) => item.dependency).toSet().toList()..sort(); return Scaffold( appBar: AppBar(title: Text(l10n.uninstallPreviewTitle)), @@ -204,7 +201,9 @@ class _UninstallVarsPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(l10n.uninstallPackageCount(_varList.length)), + Text( + l10n.uninstallPackageCount(_varList.length), + ), const SizedBox(height: 8), Row( children: [ @@ -225,7 +224,8 @@ class _UninstallVarsPageState extends ConsumerState { Expanded( child: ListView.separated( itemCount: _varList.length, - separatorBuilder: (_, _) => const Divider(height: 1), + separatorBuilder: (_, _) => + const Divider(height: 1), itemBuilder: (context, index) { final name = _varList[index]; final tags = []; @@ -238,9 +238,12 @@ class _UninstallVarsPageState extends ConsumerState { final selected = _selectedVars.contains(name); return CheckboxListTile( value: selected, - onChanged: (value) => _toggleVar(name, value ?? false), + onChanged: (value) => + _toggleVar(name, value ?? false), title: Text(name), - subtitle: tags.isEmpty ? null : Text(tags.join(' - ')), + subtitle: tags.isEmpty + ? null + : Text(tags.join(' - ')), ); }, ), @@ -263,13 +266,19 @@ class _UninstallVarsPageState extends ConsumerState { children: [ Row( children: [ - Text(l10n.previewsCount(_filteredPreviews.length)), + Text( + l10n.previewsCount( + _filteredPreviews.length, + ), + ), const Spacer(), if (_loadingDetails) const SizedBox( width: 18, height: 18, - child: CircularProgressIndicator(strokeWidth: 2), + child: CircularProgressIndicator( + strokeWidth: 2, + ), ), ], ), @@ -280,23 +289,29 @@ class _UninstallVarsPageState extends ConsumerState { value: _previewType, items: [ DropdownMenuItem( - value: 'all', - child: Text(l10n.allTypesLabel)), + value: 'all', + child: Text(l10n.allTypesLabel), + ), DropdownMenuItem( - value: 'scenes', - child: Text(l10n.categoryScenes)), + value: 'scenes', + child: Text(l10n.categoryScenes), + ), DropdownMenuItem( - value: 'looks', - child: Text(l10n.categoryLooks)), + value: 'looks', + child: Text(l10n.categoryLooks), + ), DropdownMenuItem( - value: 'clothing', - child: Text(l10n.categoryClothing)), + value: 'clothing', + child: Text(l10n.categoryClothing), + ), DropdownMenuItem( - value: 'hairstyle', - child: Text(l10n.categoryHairstyle)), + value: 'hairstyle', + child: Text(l10n.categoryHairstyle), + ), DropdownMenuItem( - value: 'assets', - child: Text(l10n.categoryAssets)), + value: 'assets', + child: Text(l10n.categoryAssets), + ), ], onChanged: (value) { if (value == null) return; @@ -307,7 +322,12 @@ class _UninstallVarsPageState extends ConsumerState { }, ), const Spacer(), - Text(l10n.pageOf(_previewPage, _previewTotalPages)), + Text( + l10n.pageOf( + _previewPage, + _previewTotalPages, + ), + ), IconButton( onPressed: _previewPage <= 1 ? null @@ -317,7 +337,8 @@ class _UninstallVarsPageState extends ConsumerState { }); }, icon: const Icon(Icons.first_page), - tooltip: l10n.paginationFirstPageTooltip, + tooltip: + l10n.paginationFirstPageTooltip, ), IconButton( onPressed: _previewPage <= 1 @@ -328,10 +349,12 @@ class _UninstallVarsPageState extends ConsumerState { }); }, icon: const Icon(Icons.chevron_left), - tooltip: l10n.paginationPreviousPageTooltip, + tooltip: + l10n.paginationPreviousPageTooltip, ), IconButton( - onPressed: _previewPage >= _previewTotalPages + onPressed: + _previewPage >= _previewTotalPages ? null : () { setState(() { @@ -342,11 +365,13 @@ class _UninstallVarsPageState extends ConsumerState { tooltip: l10n.paginationNextPageTooltip, ), IconButton( - onPressed: _previewPage >= _previewTotalPages + onPressed: + _previewPage >= _previewTotalPages ? null : () { setState(() { - _previewPage = _previewTotalPages; + _previewPage = + _previewTotalPages; }); }, icon: const Icon(Icons.last_page), @@ -360,52 +385,78 @@ class _UninstallVarsPageState extends ConsumerState { ? Center(child: Text(l10n.noPreviews)) : LayoutBuilder( builder: (context, constraints) { - final columns = constraints.maxWidth > 1200 + final columns = + constraints.maxWidth > 1200 ? 6 : constraints.maxWidth > 900 - ? 5 - : constraints.maxWidth > 700 - ? 4 - : 3; + ? 5 + : constraints.maxWidth > 700 + ? 4 + : 3; final spacing = 8.0; - final tileSize = (constraints.maxWidth - + final tileSize = + (constraints.maxWidth - (columns - 1) * spacing) / columns; - final cacheSize = (tileSize * - MediaQuery.of(context) - .devicePixelRatio) - .round(); + final cacheSize = + (tileSize * + MediaQuery.of( + context, + ).devicePixelRatio) + .round(); return GridView.builder( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: columns, - crossAxisSpacing: 8, - mainAxisSpacing: 8, - childAspectRatio: 1, - ), - itemCount: _pagedPreviews.length, + crossAxisCount: columns, + crossAxisSpacing: 8, + mainAxisSpacing: 8, + childAspectRatio: 1, + ), + itemCount: + _pagedPreviews.length, itemBuilder: (context, index) { - final item = _pagedPreviews[index]; - final client = ref.read(backendClientProvider); - final path = _previewPath(item); + final item = + _pagedPreviews[index]; + final client = ref.read( + backendClientProvider, + ); + final path = _previewPath( + item, + ); return Tooltip( - message: l10n.previewOpenTooltip, + message: + l10n.previewOpenTooltip, child: InkWell( - onTap: () => _showPreview(item), + onTap: () => + _showPreview(item), child: ClipRRect( - borderRadius: BorderRadius.circular(8), + borderRadius: + BorderRadius.circular( + 8, + ), child: path == null ? const PreviewPlaceholder() : Image.network( client.previewUrl( - root: 'varspath', path: path), - fit: BoxFit.cover, - cacheWidth: cacheSize, - cacheHeight: cacheSize, - errorBuilder: (_, _, _) => - const PreviewPlaceholder( - icon: Icons.broken_image, + root: + 'varspath', + path: path, ), + fit: BoxFit + .cover, + cacheWidth: + cacheSize, + cacheHeight: + cacheSize, + errorBuilder: + ( + _, + _, + _, + ) => const PreviewPlaceholder( + icon: Icons + .broken_image, + ), ), ), ), @@ -428,17 +479,23 @@ class _UninstallVarsPageState extends ConsumerState { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(l10n.dependenciesCount(dependencies.length)), + Text( + l10n.dependenciesCount(dependencies.length), + ), const SizedBox(height: 8), Expanded( child: dependencies.isEmpty - ? Center(child: Text(l10n.noDependencies)) + ? Center( + child: Text(l10n.noDependencies), + ) : ListView.builder( itemCount: dependencies.length, itemBuilder: (context, index) { return ListTile( dense: true, - title: Text(dependencies[index]), + title: Text( + dependencies[index], + ), ); }, ), diff --git a/varmanager_flutter/lib/features/var_detail/var_detail_page.dart b/varmanager_flutter/lib/features/var_detail/var_detail_page.dart index df3e9c6..496c9d2 100644 --- a/varmanager_flutter/lib/features/var_detail/var_detail_page.dart +++ b/varmanager_flutter/lib/features/var_detail/var_detail_page.dart @@ -12,10 +12,11 @@ import '../../l10n/l10n.dart'; import '../missing_vars/missing_vars_page.dart'; import '../home/providers.dart'; -final varDetailProvider = FutureProvider.autoDispose.family((ref, name) async { - final client = ref.watch(backendClientProvider); - return client.getVarDetail(name); -}); +final varDetailProvider = FutureProvider.autoDispose + .family((ref, name) async { + final client = ref.watch(backendClientProvider); + return client.getVarDetail(name); + }); class VarDetailPage extends ConsumerWidget { const VarDetailPage({super.key, required this.varName}); @@ -25,20 +26,24 @@ class VarDetailPage extends ConsumerWidget { Future _runLocate(WidgetRef ref) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - await runner.runJob('vars_locate', - args: {'var_name': varName}, onLog: log.addEntry); + await runner.runJob( + 'vars_locate', + args: {'var_name': varName}, + onLog: log.addEntry, + ); } - Future _runJob(WidgetRef ref, String kind, Map args) async { + Future _runJob( + WidgetRef ref, + String kind, + Map args, + ) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); await runner.runJob(kind, args: args, onLog: log.addEntry); } - Future _runMissingDeps( - BuildContext context, - WidgetRef ref, - ) async { + Future _runMissingDeps(BuildContext context, WidgetRef ref) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); final result = await runner.runJob( @@ -58,9 +63,7 @@ class VarDetailPage extends ConsumerWidget { .toList(); if (!context.mounted) return; await Navigator.of(context).push( - MaterialPageRoute( - builder: (_) => MissingVarsPage(missing: missing), - ), + MaterialPageRoute(builder: (_) => MissingVarsPage(missing: missing)), ); } @@ -79,7 +82,10 @@ class VarDetailPage extends ConsumerWidget { } Widget _buildDetail( - BuildContext context, WidgetRef ref, VarDetailResponse detail) { + BuildContext context, + WidgetRef ref, + VarDetailResponse detail, + ) { final l10n = context.l10n; final client = ref.read(backendClientProvider); return Padding( @@ -125,8 +131,7 @@ class VarDetailPage extends ConsumerWidget { _buildSection( title: l10n.dependenciesTitle, child: Column( - children: detail.dependencies - .map((dep) { + children: detail.dependencies.map((dep) { final resolved = dep.resolved; return ListTile( title: Text(dep.name), @@ -134,15 +139,18 @@ class VarDetailPage extends ConsumerWidget { tileColor: dep.missing ? Colors.red.shade50 : dep.closest - ? Colors.orange.shade50 - : null, + ? Colors.orange.shade50 + : null, trailing: Wrap( spacing: 8, children: [ if (dep.missing) TextButton( onPressed: () { - final search = dep.name.replaceAll('.latest', '.1'); + final search = dep.name.replaceAll( + '.latest', + '.1', + ); _runJob(ref, 'open_url', { 'url': 'https://www.google.com/search?q=$search var', @@ -153,7 +161,9 @@ class VarDetailPage extends ConsumerWidget { else TextButton( onPressed: () { - ref.read(varsQueryProvider.notifier).update( + ref + .read(varsQueryProvider.notifier) + .update( (state) => state.copyWith( page: 1, search: resolved, @@ -166,8 +176,7 @@ class VarDetailPage extends ConsumerWidget { ], ), ); - }) - .toList(), + }).toList(), ), ), const SizedBox(height: 12), @@ -180,11 +189,11 @@ class VarDetailPage extends ConsumerWidget { title: Text(name), trailing: TextButton( onPressed: () { - ref.read(varsQueryProvider.notifier).update( - (state) => state.copyWith( - page: 1, - search: name, - ), + ref + .read(varsQueryProvider.notifier) + .update( + (state) => + state.copyWith(page: 1, search: name), ); Navigator.pop(context); }, @@ -332,7 +341,9 @@ class _VarPreviewGridState extends State<_VarPreviewGrid> { Widget build(BuildContext context) { final l10n = context.l10n; final items = widget.scenes - .where((scene) => scene.previewPic != null && scene.previewPic!.isNotEmpty) + .where( + (scene) => scene.previewPic != null && scene.previewPic!.isNotEmpty, + ) .toList(); if (items.isEmpty) { return Text(l10n.noPreviews); @@ -407,11 +418,13 @@ class _VarPreviewGridState extends State<_VarPreviewGrid> { const SizedBox(height: 8), LayoutBuilder( builder: (context, constraints) { - final crossAxisCount = - (constraints.maxWidth / 140).floor().clamp(2, 6).toInt(); + final crossAxisCount = (constraints.maxWidth / 140) + .floor() + .clamp(2, 6) + .toInt(); const spacing = 8.0; - final tileSize = (constraints.maxWidth - - (crossAxisCount - 1) * spacing) / + final tileSize = + (constraints.maxWidth - (crossAxisCount - 1) * spacing) / crossAxisCount; final cacheSize = (tileSize * MediaQuery.of(context).devicePixelRatio).round(); @@ -434,8 +447,10 @@ class _VarPreviewGridState extends State<_VarPreviewGrid> { child: previewPath == null ? const PreviewPlaceholder() : Image.network( - widget.client - .previewUrl(root: 'varspath', path: previewPath), + widget.client.previewUrl( + root: 'varspath', + path: previewPath, + ), fit: BoxFit.cover, cacheWidth: cacheSize, cacheHeight: cacheSize, @@ -449,10 +464,10 @@ class _VarPreviewGridState extends State<_VarPreviewGrid> { child: GestureDetector( onDoubleTap: canPreview ? () => _openPreviewDialog( - context, - items, - startIndex + index, - ) + context, + items, + startIndex + index, + ) : null, child: previewImage, ), @@ -465,4 +480,3 @@ class _VarPreviewGridState extends State<_VarPreviewGrid> { ); } } - diff --git a/varmanager_flutter/lib/l10n/app_en.arb b/varmanager_flutter/lib/l10n/app_en.arb index 15eb44b..5b4a430 100644 --- a/varmanager_flutter/lib/l10n/app_en.arb +++ b/varmanager_flutter/lib/l10n/app_en.arb @@ -183,6 +183,8 @@ "targetDirLabel": "Target dir", "exportInstalledLabel": "Export Installed", "exportInstalledTooltip": "Export installed vars to a text file.", + "exportMissingLabel": "Export Missing", + "exportMissingTooltip": "Export missing vars to a text file.", "exportPathTitle": "Export path", "installFromListLabel": "Install from List", "installFromListTooltip": "Install vars from a text list.", diff --git a/varmanager_flutter/lib/l10n/app_localizations.dart b/varmanager_flutter/lib/l10n/app_localizations.dart index 4ae9026..39f9e5f 100644 --- a/varmanager_flutter/lib/l10n/app_localizations.dart +++ b/varmanager_flutter/lib/l10n/app_localizations.dart @@ -1196,6 +1196,18 @@ abstract class AppLocalizations { /// **'Export installed vars to a text file.'** String get exportInstalledTooltip; + /// No description provided for @exportMissingLabel. + /// + /// In en, this message translates to: + /// **'Export Missing'** + String get exportMissingLabel; + + /// No description provided for @exportMissingTooltip. + /// + /// In en, this message translates to: + /// **'Export missing vars to a text file.'** + String get exportMissingTooltip; + /// No description provided for @exportPathTitle. /// /// In en, this message translates to: diff --git a/varmanager_flutter/lib/l10n/app_localizations_en.dart b/varmanager_flutter/lib/l10n/app_localizations_en.dart index d1763e7..7041f26 100644 --- a/varmanager_flutter/lib/l10n/app_localizations_en.dart +++ b/varmanager_flutter/lib/l10n/app_localizations_en.dart @@ -591,6 +591,12 @@ class AppLocalizationsEn extends AppLocalizations { @override String get exportInstalledTooltip => 'Export installed vars to a text file.'; + @override + String get exportMissingLabel => 'Export Missing'; + + @override + String get exportMissingTooltip => 'Export missing vars to a text file.'; + @override String get exportPathTitle => 'Export path'; diff --git a/varmanager_flutter/lib/l10n/app_localizations_zh.dart b/varmanager_flutter/lib/l10n/app_localizations_zh.dart index 453e76f..a02609d 100644 --- a/varmanager_flutter/lib/l10n/app_localizations_zh.dart +++ b/varmanager_flutter/lib/l10n/app_localizations_zh.dart @@ -577,6 +577,12 @@ class AppLocalizationsZh extends AppLocalizations { @override String get exportInstalledTooltip => '瀵煎嚭宸插畨瑁 Vars 鍒版枃鏈枃浠躲'; + @override + String get exportMissingLabel => '瀵煎嚭缂哄け'; + + @override + String get exportMissingTooltip => '瀵煎嚭缂哄け Vars 鍒版枃鏈枃浠躲'; + @override String get exportPathTitle => '瀵煎嚭璺緞'; diff --git a/varmanager_flutter/lib/l10n/app_zh.arb b/varmanager_flutter/lib/l10n/app_zh.arb index 44f2c73..065c2b0 100644 --- a/varmanager_flutter/lib/l10n/app_zh.arb +++ b/varmanager_flutter/lib/l10n/app_zh.arb @@ -183,6 +183,8 @@ "targetDirLabel": "鐩爣鐩綍", "exportInstalledLabel": "瀵煎嚭宸插畨瑁", "exportInstalledTooltip": "瀵煎嚭宸插畨瑁 Vars 鍒版枃鏈枃浠躲", + "exportMissingLabel": "瀵煎嚭缂哄け", + "exportMissingTooltip": "瀵煎嚭缂哄け Vars 鍒版枃鏈枃浠躲", "exportPathTitle": "瀵煎嚭璺緞", "installFromListLabel": "浠庡垪琛ㄥ畨瑁", "installFromListTooltip": "浠庢枃鏈垪琛ㄥ畨瑁 Vars銆", diff --git a/varmanager_flutter/lib/l10n/locale_config.dart b/varmanager_flutter/lib/l10n/locale_config.dart index bf49acb..959227c 100644 --- a/varmanager_flutter/lib/l10n/locale_config.dart +++ b/varmanager_flutter/lib/l10n/locale_config.dart @@ -4,10 +4,7 @@ const String kFallbackLocaleTag = 'en'; const String kChineseLocaleTag = 'zh'; const String kEnglishLocaleTag = 'en'; -const List kSupportedLocales = [ - Locale('en'), - Locale('zh'), -]; +const List kSupportedLocales = [Locale('en'), Locale('zh')]; class LocaleInitResult { const LocaleInitResult(this.tag, this.persistOnStart); diff --git a/varmanager_flutter/lib/main.dart b/varmanager_flutter/lib/main.dart index 51f2e40..08c67bd 100644 --- a/varmanager_flutter/lib/main.dart +++ b/varmanager_flutter/lib/main.dart @@ -56,10 +56,7 @@ Future _configureDesktopWindow() async { final screenSize = display.size; final targetSize = Size(screenSize.width * 0.8, screenSize.height * 0.8); - final windowOptions = WindowOptions( - size: targetSize, - center: true, - ); + final windowOptions = WindowOptions(size: targetSize, center: true); unawaited( windowManager.waitUntilReadyToShow(windowOptions, () async { diff --git a/varmanager_flutter/lib/widgets/download_manager.dart b/varmanager_flutter/lib/widgets/download_manager.dart index b58162a..d7bf5ee 100644 --- a/varmanager_flutter/lib/widgets/download_manager.dart +++ b/varmanager_flutter/lib/widgets/download_manager.dart @@ -13,7 +13,8 @@ class DownloadManagerBubble extends ConsumerStatefulWidget { const DownloadManagerBubble({super.key}); @override - ConsumerState createState() => _DownloadManagerBubbleState(); + ConsumerState createState() => + _DownloadManagerBubbleState(); } class _DownloadManagerBubbleState extends ConsumerState { @@ -83,8 +84,9 @@ class _DownloadManagerBubbleState extends ConsumerState { final downloads = ref.watch(downloadListProvider); final data = downloads.value ?? DownloadListResponse.empty(); final total = data.items.length; - final completed = - data.items.where((item) => item.status == 'completed').length; + final completed = data.items + .where((item) => item.status == 'completed') + .length; final progress = total == 0 || completed >= total ? 1.0 : (completed / total).clamp(0.0, 1.0); @@ -132,8 +134,9 @@ class _DownloadManagerBubbleState extends ConsumerState { child: CircularProgressIndicator( value: progress, strokeWidth: 4, - backgroundColor: - colorScheme.primary.withValues(alpha: 0.15), + backgroundColor: colorScheme.primary.withValues( + alpha: 0.15, + ), valueColor: AlwaysStoppedAnimation(colorScheme.primary), ), ), @@ -292,8 +295,7 @@ class _DownloadManagerPanelState extends ConsumerState<_DownloadManagerPanel> { child: Text( l10n.downloadNoActive, style: TextStyle( - color: - colorScheme.onSurface.withValues(alpha: 0.6), + color: colorScheme.onSurface.withValues(alpha: 0.6), ), ), ) @@ -340,9 +342,11 @@ class _DownloadManagerPanelState extends ConsumerState<_DownloadManagerPanel> { Future _importFromFile() async { final l10n = context.l10n; - final file = await openFile(acceptedTypeGroups: [ - XTypeGroup(label: l10n.textFileTypeLabel, extensions: const ['txt']) - ]); + final file = await openFile( + acceptedTypeGroups: [ + XTypeGroup(label: l10n.textFileTypeLabel, extensions: const ['txt']), + ], + ); if (file == null) return; final content = await file.readAsString(); @@ -352,7 +356,8 @@ class _DownloadManagerPanelState extends ConsumerState<_DownloadManagerPanel> { if (trimmed.isEmpty) continue; // 鏍煎紡: "鍚嶅瓧 閾炬帴" 鎴栫函閾炬帴 final lastSpace = trimmed.lastIndexOf(' '); - if (lastSpace > 0 && trimmed.substring(lastSpace + 1).startsWith('http')) { + if (lastSpace > 0 && + trimmed.substring(lastSpace + 1).startsWith('http')) { items.add({ 'name': trimmed.substring(0, lastSpace), 'url': trimmed.substring(lastSpace + 1), @@ -365,15 +370,19 @@ class _DownloadManagerPanelState extends ConsumerState<_DownloadManagerPanel> { if (!mounted) return; if (items.isEmpty) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(l10n.downloadImportEmpty)), - ); + ScaffoldMessenger.of( + context, + ).showSnackBar(SnackBar(content: Text(l10n.downloadImportEmpty))); return; } final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - await runner.runJob('hub_download_all', args: {'items': items}, onLog: log.addEntry); + await runner.runJob( + 'hub_download_all', + args: {'items': items}, + onLog: log.addEntry, + ); if (!mounted) return; ScaffoldMessenger.of(context).showSnackBar( @@ -401,8 +410,10 @@ class _SummaryRow extends StatelessWidget { children: [ Row( children: [ - Text(l10n.downloadItemsProgress(completed, total), - style: const TextStyle(fontSize: 12)), + Text( + l10n.downloadItemsProgress(completed, total), + style: const TextStyle(fontSize: 12), + ), const Spacer(), Text(sizeLabel, style: const TextStyle(fontSize: 12)), ], @@ -434,7 +445,9 @@ class _ActionRow extends StatelessWidget { @override Widget build(BuildContext context) { final l10n = context.l10n; - final muted = Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.6); + final muted = Theme.of( + context, + ).colorScheme.onSurface.withValues(alpha: 0.6); return Row( children: [ Text(selectionLabel, style: TextStyle(fontSize: 11, color: muted)), @@ -521,8 +534,10 @@ class _DownloadRow extends StatelessWidget { Row( children: [ Container( - padding: - const EdgeInsets.symmetric(horizontal: 8, vertical: 2), + padding: const EdgeInsets.symmetric( + horizontal: 8, + vertical: 2, + ), decoration: BoxDecoration( color: statusColor.withValues(alpha: 0.12), borderRadius: BorderRadius.circular(12), @@ -538,17 +553,17 @@ class _DownloadRow extends StatelessWidget { ), if (speedLabel.isNotEmpty) ...[ const SizedBox(width: 8), - Text(speedLabel, - style: - TextStyle(fontSize: 11, color: statusColor)), + Text( + speedLabel, + style: TextStyle(fontSize: 11, color: statusColor), + ), ], ], ), const SizedBox(height: 6), Text(sizeLabel, style: const TextStyle(fontSize: 11)), const SizedBox(height: 6), - if (progress != null) - LinearProgressIndicator(value: progress), + if (progress != null) LinearProgressIndicator(value: progress), ], ), ), diff --git a/varmanager_flutter/lib/widgets/image_preview_dialog.dart b/varmanager_flutter/lib/widgets/image_preview_dialog.dart index 1363f1b..d0ea109 100644 --- a/varmanager_flutter/lib/widgets/image_preview_dialog.dart +++ b/varmanager_flutter/lib/widgets/image_preview_dialog.dart @@ -70,7 +70,8 @@ class _ImagePreviewDialogState extends State { } bool _handleKeyMessage(KeyEvent event) { - final isCtrl = event.logicalKey == LogicalKeyboardKey.controlLeft || + final isCtrl = + event.logicalKey == LogicalKeyboardKey.controlLeft || event.logicalKey == LogicalKeyboardKey.controlRight; if (!isCtrl) return false; @@ -92,10 +93,7 @@ class _ImagePreviewDialogState extends State { } } - void _handlePointerSignal( - BuildContext context, - PointerSignalEvent event, - ) { + void _handlePointerSignal(BuildContext context, PointerSignalEvent event) { if (event is! PointerScrollEvent) { return; } @@ -121,7 +119,10 @@ class _ImagePreviewDialogState extends State { final localFocal = renderBox.globalToLocal(event.position); final currentScale = transformationController.value.getMaxScaleOnAxis(); final delta = -event.scrollDelta.dy * 0.001; - final targetScale = (currentScale * (1 + delta)).clamp(_minScale, _maxScale); + final targetScale = (currentScale * (1 + delta)).clamp( + _minScale, + _maxScale, + ); if (targetScale == currentScale) { return; } @@ -179,15 +180,15 @@ class _ImagePreviewDialogState extends State { final canNavigate = widget.items.length > 1; final showSideNavigation = !widget.showFooter && canNavigate; final canGoPrev = widget.wrapNavigation || currentIndex > 0; - final canGoNext = widget.wrapNavigation || currentIndex < widget.items.length - 1; + final canGoNext = + widget.wrapNavigation || currentIndex < widget.items.length - 1; return Shortcuts( shortcuts: { LogicalKeySet(LogicalKeyboardKey.escape): const _DismissIntent(), LogicalKeySet(LogicalKeyboardKey.arrowLeft): const _PreviousImageIntent(), - LogicalKeySet(LogicalKeyboardKey.arrowRight): - const _NextImageIntent(), + LogicalKeySet(LogicalKeyboardKey.arrowRight): const _NextImageIntent(), }, child: Actions( actions: { @@ -265,9 +266,9 @@ class _ImagePreviewDialogState extends State { return Listener( onPointerSignal: (event) => _handlePointerSignal( - viewerContext, - event, - ), + viewerContext, + event, + ), child: InteractiveViewer( transformationController: transformationController, @@ -280,8 +281,8 @@ class _ImagePreviewDialogState extends State { fit: BoxFit.contain, errorBuilder: (_, _, _) => const PreviewPlaceholder( - icon: Icons.broken_image, - ), + icon: Icons.broken_image, + ), ), ), ); @@ -319,7 +320,9 @@ class _ImagePreviewDialogState extends State { tooltip: l10n.imagePreviewPrevious, ), Icon( - _ctrlPressed ? Icons.swap_vert : Icons.zoom_in, + _ctrlPressed + ? Icons.swap_vert + : Icons.zoom_in, color: Colors.white70, size: 20, ), @@ -327,7 +330,9 @@ class _ImagePreviewDialogState extends State { Text( '${currentZoom.toStringAsFixed(2)}x', style: TextStyle( - color: _ctrlPressed ? Colors.white38 : Colors.white, + color: _ctrlPressed + ? Colors.white38 + : Colors.white, fontWeight: FontWeight.w600, fontSize: 14, ), @@ -336,7 +341,9 @@ class _ImagePreviewDialogState extends State { Text( l10n.imagePreviewScroll, style: TextStyle( - color: _ctrlPressed ? Colors.white70 : Colors.white54, + color: _ctrlPressed + ? Colors.white70 + : Colors.white54, fontSize: 10, ), ), @@ -370,8 +377,9 @@ class _ImagePreviewDialogState extends State { child: Row( children: [ IconButton( - onPressed: - currentIndex > 0 ? () => _setIndex(0) : null, + onPressed: currentIndex > 0 + ? () => _setIndex(0) + : null, icon: const Icon(Icons.first_page), tooltip: l10n.paginationFirstPageTooltip, ), @@ -384,9 +392,7 @@ class _ImagePreviewDialogState extends State { ), Text( '${currentIndex + 1}/${widget.items.length}', - style: const TextStyle( - fontWeight: FontWeight.w600, - ), + style: const TextStyle(fontWeight: FontWeight.w600), ), IconButton( onPressed: currentIndex < widget.items.length - 1 @@ -397,8 +403,7 @@ class _ImagePreviewDialogState extends State { ), IconButton( onPressed: currentIndex < widget.items.length - 1 - ? () => - _setIndex(widget.items.length - 1) + ? () => _setIndex(widget.items.length - 1) : null, icon: const Icon(Icons.last_page), tooltip: l10n.paginationLastPageTooltip, diff --git a/varmanager_flutter/lib/widgets/job_log_panel.dart b/varmanager_flutter/lib/widgets/job_log_panel.dart index c55928a..2185765 100644 --- a/varmanager_flutter/lib/widgets/job_log_panel.dart +++ b/varmanager_flutter/lib/widgets/job_log_panel.dart @@ -48,7 +48,9 @@ class _JobLogPanelState extends ConsumerState { return IconButton( onPressed: _toggleExpanded, icon: Icon(_isExpanded ? Icons.expand_more : Icons.expand_less), - tooltip: _isExpanded ? l10n.jobLogCollapseTooltip : l10n.jobLogExpandTooltip, + tooltip: _isExpanded + ? l10n.jobLogCollapseTooltip + : l10n.jobLogExpandTooltip, padding: EdgeInsets.zero, constraints: const BoxConstraints.tightFor(width: 32, height: 32), visualDensity: VisualDensity.compact, @@ -102,7 +104,8 @@ class _JobLogPanelState extends ConsumerState { _buildToggleButton(), const SizedBox(width: 4), TextButton( - onPressed: () => ref.read(jobLogProvider.notifier).clear(), + onPressed: () => + ref.read(jobLogProvider.notifier).clear(), style: buttonStyle, child: Text(l10n.commonClear), ), diff --git a/varmanager_flutter/lib/widgets/lazy_dropdown_field.dart b/varmanager_flutter/lib/widgets/lazy_dropdown_field.dart index 3b0497e..60693fc 100644 --- a/varmanager_flutter/lib/widgets/lazy_dropdown_field.dart +++ b/varmanager_flutter/lib/widgets/lazy_dropdown_field.dart @@ -23,7 +23,7 @@ class LazyDropdownField extends StatefulWidget { final String value; final ValueChanged onChanged; final Future> Function(String query, int offset, int limit) - optionsLoader; + optionsLoader; final int pageSize; final int minQueryLength; final String allValue; @@ -176,8 +176,7 @@ class _LazyDropdownFieldState extends State { _offset = 0; }); _openOverlay(); - final items = - await widget.optionsLoader(_query, _offset, widget.pageSize); + final items = await widget.optionsLoader(_query, _offset, widget.pageSize); if (!mounted || requestId != _queryVersion) return; setState(() { _options = items; @@ -193,8 +192,7 @@ class _LazyDropdownFieldState extends State { _loading = true; _overlayEntry?.markNeedsBuild(); final requestId = _queryVersion; - final items = - await widget.optionsLoader(_query, _offset, widget.pageSize); + final items = await widget.optionsLoader(_query, _offset, widget.pageSize); if (!mounted || requestId != _queryVersion) return; setState(() { _options = [..._options, ...items]; @@ -261,9 +259,8 @@ class _LazyDropdownFieldState extends State { displayItems.add(widget.allValue); } displayItems.addAll(items); - final itemCount = displayItems.length + - (showEmpty ? 1 : 0) + - (_loading ? 1 : 0); + final itemCount = + displayItems.length + (showEmpty ? 1 : 0) + (_loading ? 1 : 0); return ListView.builder( controller: _scrollController, itemCount: itemCount, @@ -283,10 +280,7 @@ class _LazyDropdownFieldState extends State { ); } if (showEmpty && index == displayItems.length) { - return ListTile( - dense: true, - title: Text(context.l10n.noMatches), - ); + return ListTile(dense: true, title: Text(context.l10n.noMatches)); } return const Padding( padding: EdgeInsets.all(12), From 7bccde8cf77f397089bc164db06517db3e8d9d08 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Mon, 12 Jan 2026 15:07:01 +0500 Subject: [PATCH 03/10] clean docs --- Custom/Scripts/README.md | 1 - PROJECT_STRUCTURE.md | 11 +---------- README.md | 3 +-- README_CN.md | 3 +-- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Custom/Scripts/README.md b/Custom/Scripts/README.md index f22985d..e1b00bc 100644 --- a/Custom/Scripts/README.md +++ b/Custom/Scripts/README.md @@ -55,7 +55,6 @@ This directory contains C# scripts designed to run inside **Virt-A-Mate (VaM)** These scripts are maintained as part of the varManager project: - **Main Repository:** https://github.com/bustesoul/varManager - **LoadScene Library:** `../../LoadScene/src/` -- **Archived C# Project:** `../../_archived/varManager/Custom/Scripts/` ## Note diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md index bc5fd8c..f319288 100644 --- a/PROJECT_STRUCTURE.md +++ b/PROJECT_STRUCTURE.md @@ -49,12 +49,6 @@ varManager/ 鈹溾攢鈹 MMDLoader/ # Standalone WPF tool (optional) 鈹 鈹斺攢鈹 *.xaml, *.cs # WPF application 鈹 -鈹斺攢鈹 _archived/ # Legacy C# WinForms code (v1.0.4.x) - 鈹溾攢鈹 varManager/ # Old main program - 鈹溾攢鈹 DragNDrop/ # Old custom controls - 鈹溾攢鈹 StarRatingControl/ - 鈹溾攢鈹 ThreeStateTreeView/ - 鈹斺攢鈹 ... # For reference only ``` ## Technology Stack @@ -124,7 +118,6 @@ varManager_v2.0.0/ | `Custom/Scripts/` | 鉁 Active | Yes | VaM plugins | | `LoadScene/` | 鉁 Active | Yes | Plugin library source | | `MMDLoader/` | 鈿狅笍 Optional | Yes | Standalone tool | -| `_archived/` | 馃摝 Legacy | Yes | Old C# code | ## Documentation @@ -132,11 +125,9 @@ varManager_v2.0.0/ - **README_CN.md** - 涓枃鏂囨。 - **PROJECT_STRUCTURE.md** - This file - **Custom/Scripts/README.md** - VaM plugin guide -- **_archived/README.md** - Legacy code reference ## Notes 1. **VaM Plugins:** Source files committed to Git, no compilation needed 2. **config.json:** Generated on first run, not stored in the repository -3. **_archived/:** Historical reference, not part of active development -4. **LoadScene/MMDLoader:** Source available for manual building if needed +3. **LoadScene/MMDLoader:** Source available for manual building if needed diff --git a/README.md b/README.md index cd4cdcb..eafcd5e 100644 --- a/README.md +++ b/README.md @@ -126,10 +126,9 @@ The varManager backend has built-in support for downloading var packages directl #### What Happened to the C# Version? -The legacy C# WinForms application (v1.0.4.x) has been **archived** to the `_archived/` folder for reference. All functionality has been migrated to the new Flutter + Rust architecture with feature parity and improvements. +The legacy C# WinForms application (v1.0.4.x) has been retired. All functionality has been migrated to the new Flutter + Rust architecture with feature parity and improvements. **If you need the old C# version:** -- You can find it in the `_archived/varManager/` directory - Requires .NET 9.0 Runtime - No longer actively maintained diff --git a/README_CN.md b/README_CN.md index 8ab2f24..715db91 100644 --- a/README_CN.md +++ b/README_CN.md @@ -126,10 +126,9 @@ varManager 鍚庣鍐呯疆浜嗕粠 VaM Hub 涓嬭浇 var 鍖呯殑鏀寔锛 #### C# 鐗堟湰鍘诲摢浜嗭紵 -鏃х増 C# WinForms 搴旂敤绋嬪簭锛坴1.0.4.x锛夊凡琚**褰掓。**鍒 `_archived/` 鏂囦欢澶逛緵鍙傝冦傛墍鏈夊姛鑳藉凡杩佺Щ鍒版柊鐨 Flutter + Rust 鏋舵瀯锛屽苟淇濇寔鍔熻兘瀵圭瓑鍜屾敼杩涖 +鏃х増 C# WinForms 搴旂敤绋嬪簭锛坴1.0.4.x锛夊凡鍋滄缁存姢銆傛墍鏈夊姛鑳藉凡杩佺Щ鍒版柊鐨 Flutter + Rust 鏋舵瀯锛屽苟淇濇寔鍔熻兘瀵圭瓑鍜屾敼杩涖 **濡傛灉浣犻渶瑕佹棫鐗 C# 绋嬪簭锛** -- 鍙湪 `_archived/varManager/` 鐩綍涓壘鍒 - 闇瑕 .NET 9.0 Runtime - 涓嶅啀绉瀬缁存姢 From 8742f8cd1d4c76cd2819da7360f5606a6ae06c94 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Mon, 12 Jan 2026 22:56:19 +0500 Subject: [PATCH 04/10] add links support init --- .gitignore | 5 + PROJECT_STRUCTURE.md | 7 + README.md | 36 ++ README_CN.md | 36 ++ build.ps1 | 59 +++ varManager_backend/Cargo.lock | 11 + varManager_backend/Cargo.toml | 1 + .../src/infra/external_links.rs | 382 +++++++++++++ varManager_backend/src/infra/mod.rs | 1 + varManager_backend/src/jobs/hub.rs | 151 +++++- varManager_backend/src/jobs/mod.rs | 7 + varManager_backend/src/jobs/system_jobs.rs | 77 +++ varManager_backend/src/jobs/torrents.rs | 369 +++++++++++++ varManager_backend/tests/torrent_scan.rs | 38 ++ varmanager_flutter/lib/app/app.dart | 37 +- .../missing_vars/missing_vars_page.dart | 501 ++++++++++++++++-- 16 files changed, 1680 insertions(+), 38 deletions(-) create mode 100644 varManager_backend/src/infra/external_links.rs create mode 100644 varManager_backend/src/jobs/torrents.rs create mode 100644 varManager_backend/tests/torrent_scan.rs diff --git a/.gitignore b/.gitignore index 8fa320e..c5d0524 100644 --- a/.gitignore +++ b/.gitignore @@ -390,3 +390,8 @@ varmanager_flutter/android/app/profile varmanager_flutter/android/app/release CLAUDE.md AGENTS.md +SharpVaMTools/ + +# External link files (not distributed with build) +data/links/ +data/aria2c.exe diff --git a/PROJECT_STRUCTURE.md b/PROJECT_STRUCTURE.md index f319288..9209b1b 100644 --- a/PROJECT_STRUCTURE.md +++ b/PROJECT_STRUCTURE.md @@ -10,6 +10,11 @@ varManager/ 鈹溾攢鈹 README.md # Main documentation 鈹溾攢鈹 README_CN.md # 涓枃鏂囨。 鈹溾攢鈹 PROJECT_STRUCTURE.md # This file +鈹溾攢鈹 data/ +鈹 鈹斺攢鈹 links/ # External link files (gitignored) +鈹 鈹溾攢鈹 *.txt # Var package download links (537 files) +鈹 鈹溾攢鈹 torrents/ # Torrent files (78 files) +鈹 鈹斺攢鈹 README.md # Usage instructions 鈹溾攢鈹 varmanager_flutter/ # Flutter frontend (Dart) 鈹 鈹溾攢鈹 lib/ 鈹 鈹 鈹溾攢鈹 app/ # App shell, theme, routing @@ -115,6 +120,7 @@ varManager_v2.0.0/ |-----------|--------|-------------|---------| | `varmanager_flutter/` | 鉁 Active | Yes | Main UI | | `varManager_backend/` | 鉁 Active | Yes | Backend service | +| `data/links/` | 鉁 Active | No (gitignored) | External download link database | | `Custom/Scripts/` | 鉁 Active | Yes | VaM plugins | | `LoadScene/` | 鉁 Active | Yes | Plugin library source | | `MMDLoader/` | 鈿狅笍 Optional | Yes | Standalone tool | @@ -131,3 +137,4 @@ varManager_v2.0.0/ 1. **VaM Plugins:** Source files committed to Git, no compilation needed 2. **config.json:** Generated on first run, not stored in the repository 3. **LoadScene/MMDLoader:** Source available for manual building if needed +4. **data/links/:** Contains real link files for external download sources (Pixeldrain, Mediafire, torrents). Gitignored to avoid committing third-party URLs. Ready to use without copying. diff --git a/README.md b/README.md index eafcd5e..6ad2336 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ varManager_v2.0.0/ 鈹溾攢鈹 varManager.exe # Main application (Flutter) 鈹溾攢鈹 data/ # Runtime data and backend 鈹 鈹溾攢鈹 varManager_backend.exe # Backend service (Rust) +鈹 鈹溾攢鈹 aria2c.exe # Torrent downloader (required for torrent downloads) 鈹 鈹溾攢鈹 flutter_windows.dll # Flutter runtime 鈹 鈹溾攢鈹 *_plugin.dll # Plugin DLLs 鈹 鈹斺攢鈹 flutter_assets/ # Flutter assets @@ -105,6 +106,41 @@ The varManager backend has built-in support for downloading var packages directl - Handles authentication with VaM Hub automatically - Configure your VaM Hub credentials in Settings when first using the download feature +**External Download Sources (Advanced):** + +varManager can search for missing var packages from external sources (Pixeldrain, Mediafire) and local torrent files as a fallback when Hub doesn't have them: + +1. **Link Files Setup:** + - Create a `data/links/` folder in your varManager directory + - Add `.txt` files containing var package links (one per line) + - Format: `VarName.var [whitespace] URL` + - Example: `Creator.PackageName.1.var https://pixeldrain.com/u/ABC123` + +2. **Torrent Files Setup:** + - Create a `data/links/torrents/` subfolder + - Place `.torrent` files that contain var packages + - The scanner detects var names in torrent metadata and can download missing vars via aria2 + +3. **Pre-populated Link Files:** + - The repo includes working link files in `data/links/` folder (gitignored) + - These are real, curated link databases ready to use + - Files are included in the repository but not in public releases + +4. **Usage:** + - Go to Missing Vars page + - Enable "External Sources" checkbox + - Select desired sources (Pixeldrain, Mediafire) + - Click "Fetch Links (Hub + External)" + - Hub results always take priority; external sources fill gaps + +**Torrent Downloads (aria2):** +- Place `aria2c.exe` in `data/aria2c.exe` +- When a missing var has torrent hits and no direct URL, varManager uses aria2 to download only the required `.var` files +- Downloads go to `varspath\AddonPackages\tmp` and completed `.var` files are moved to `varspath` +- `.torrent` files in `data/links/torrents/` are never deleted + +**Note:** Link files in `data/links/` are gitignored and not included in public releases. Clone the full repository to access them. + **No Additional Runtime Required:** - 鉂 No .NET Runtime installation needed - 鉂 No administrator rights required (for normal operations) diff --git a/README_CN.md b/README_CN.md index 715db91..a3602e6 100644 --- a/README_CN.md +++ b/README_CN.md @@ -64,6 +64,7 @@ varManager_v2.0.0/ 鈹溾攢鈹 varManager.exe # 涓荤▼搴忥紙Flutter锛 鈹溾攢鈹 data/ # 杩愯鏃舵暟鎹拰鍚庣 鈹 鈹溾攢鈹 varManager_backend.exe # 鍚庣鏈嶅姟锛圧ust锛 +鈹 鈹溾攢鈹 aria2c.exe # Torrent downloader (required for torrent downloads) 鈹 鈹溾攢鈹 flutter_windows.dll # Flutter 杩愯鏃 鈹 鈹溾攢鈹 *_plugin.dll # 鎻掍欢 DLL 鈹 鈹斺攢鈹 flutter_assets/ # Flutter 璧勬簮 @@ -105,6 +106,41 @@ varManager 鍚庣鍐呯疆浜嗕粠 VaM Hub 涓嬭浇 var 鍖呯殑鏀寔锛 - 鑷姩澶勭悊 VaM Hub 韬唤楠岃瘉 - 棣栨浣跨敤涓嬭浇鍔熻兘鏃跺湪璁剧疆涓厤缃 VaM Hub 鍑嵁 +**澶栭儴涓嬭浇婧愶紙楂樼骇鍔熻兘锛夛細** + +varManager 鍙互浠庡閮ㄦ簮锛圥ixeldrain銆丮ediafire锛夊拰鏈湴绉嶅瓙鏂囦欢鎼滅储缂哄け鐨 var 鍖咃紝浣滀负 Hub 鐨勮ˉ鍏咃細 + +1. **閾炬帴鏂囦欢璁剧疆锛** + - 鍦 varManager 鐩綍涓嬪垱寤 `data/links/` 鏂囦欢澶 + - 娣诲姞鍖呭惈 var 鍖呴摼鎺ョ殑 `.txt` 鏂囦欢锛堟瘡琛屼竴涓級 + - 鏍煎紡锛歚VarName.var [绌烘牸鎴栧埗琛ㄧ] URL` + - 绀轰緥锛歚Creator.PackageName.1.var https://pixeldrain.com/u/ABC123` + +2. **绉嶅瓙鏂囦欢璁剧疆锛** + - 鍒涘缓 `data/links/torrents/` 瀛愭枃浠跺す + - 鏀剧疆鍖呭惈 var 鍖呯殑 `.torrent` 鏂囦欢 + - 鎵弿鍣ㄤ細妫娴嬬瀛愬厓鏁版嵁涓殑 var 鍚嶇О锛堜粎渚涘弬鑰冿級 + +3. **棰勭疆閾炬帴鏂囦欢锛** + - 浠撳簱涓寘鍚彲鐢ㄧ殑閾炬帴鏂囦欢锛屼綅浜 `data/links/` 鏂囦欢澶癸紙宸插姞鍏 gitignore锛 + - 杩欎簺鏄湡瀹炵殑銆佺粡杩囨暣鐞嗙殑閾炬帴鏁版嵁搴擄紝鍙洿鎺ヤ娇鐢 + - 鏂囦欢鍖呭惈鍦ㄤ粨搴撲腑锛屼絾涓嶅寘鍚湪鍏紑鍙戝竷鐗堟湰涓 + +4. **浣跨敤鏂规硶锛** + - 杩涘叆缂哄け Var 椤甸潰 + - 鍕鹃 "Enable External Sources"锛堝惎鐢ㄥ閮ㄦ簮锛 + - 閫夋嫨鎵闇鐨勬簮锛圥ixeldrain銆丮ediafire锛 + - 鐐瑰嚮 "Fetch Links (Hub + External)"锛堣幏鍙栭摼鎺ワ級 + - Hub 缁撴灉濮嬬粓浼樺厛锛屽閮ㄦ簮鐢ㄤ簬琛ュ厖 + +**Torrent Downloads (aria2):** +- 忙聰戮莽陆庐 `aria2c.exe` 氓聢掳 `data/aria2c.exe` +- 氓陆聯忙虏隆忙聹聣莽聸麓茅聯戮盲陆聠忙聹聣 torrent 氓聭陆盲赂颅忙聴露茂录聦盲陆驴莽聰篓 aria2 氓聫陋盲赂聥猫陆陆忙聣聙茅聹聙 `.var` +- 盲赂聥猫陆陆猫路炉氓戮聞 `varspath\AddonPackages\tmp`茂录聦氓庐聦忙聢聬氓聬聨莽搂禄氓聤篓氓聢掳 `varspath` +- `data/links/torrents/` 盲赂聥莽職聞 `.torrent` 盲赂聧盲录職猫垄芦氓聢聽茅聶陇 + +**娉ㄦ剰锛** `data/links/` 涓殑閾炬帴鏂囦欢宸插姞鍏 gitignore锛屼笉浼氬寘鍚湪鍏紑鍙戝竷鐗堟湰涓傞渶瑕佸厠闅嗗畬鏁翠粨搴撴墠鑳借闂 + **鏃犻渶棰濆杩愯鏃讹細** - 鉂 鏃犻渶瀹夎 .NET Runtime - 鉂 鏃犻渶绠$悊鍛樻潈闄愶紙姝e父鎿嶄綔锛 diff --git a/build.ps1 b/build.ps1 index d96cfdf..b69e0eb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -235,6 +235,14 @@ function Stage-BackendRelease { Copy-Item -LiteralPath $pdb -Destination $dest -Force } } + + $aria2 = Join-Path $root "data\\aria2c.exe" + if (Test-Path -LiteralPath $aria2) { + Copy-Item -LiteralPath $aria2 -Destination $dest -Force + } + else { + Write-Warning "aria2c.exe not found: $aria2" + } } function Stage-VaMPlugins { @@ -288,6 +296,43 @@ Full source code with LibMMD library is available in the ``LoadScene/`` director Set-Content -Path (Join-Path $dest "README.txt") -Value $readmeContent -Encoding UTF8 } +function Stage-ExternalLinks { + # Copy external download link files to release + $linksSrc = Join-Path $root "data\\links" + if (-not (Test-Path -LiteralPath $linksSrc)) { + Write-Warning "External links folder not found: $linksSrc" + return + } + + $dest = Join-Path $releaseRoot "links" + Ensure-EmptyDir $dest + + # Copy all .txt files + $txtFiles = Get-ChildItem -Path $linksSrc -File -Filter "*.txt" + foreach ($file in $txtFiles) { + Copy-Item -LiteralPath $file.FullName -Destination $dest -Force + } + Write-Host "Copied $($txtFiles.Count) link files" + + # Copy torrents folder if it exists + $torrentsSrc = Join-Path $linksSrc "torrents" + if (Test-Path -LiteralPath $torrentsSrc) { + $torrentsDest = Join-Path $dest "torrents" + New-Item -ItemType Directory -Path $torrentsDest -Force | Out-Null + $torrentFiles = Get-ChildItem -Path $torrentsSrc -File -Filter "*.torrent" + foreach ($file in $torrentFiles) { + Copy-Item -LiteralPath $file.FullName -Destination $torrentsDest -Force + } + Write-Host "Copied $($torrentFiles.Count) torrent files" + } + + # Copy README.md + $readmeSrc = Join-Path $linksSrc "README.md" + if (Test-Path -LiteralPath $readmeSrc) { + Copy-Item -LiteralPath $readmeSrc -Destination $dest -Force + } +} + function Assemble-ReleasePackage { if (-not $script:ProjectVersion) { $script:ProjectVersion = Get-ProjectVersion @@ -330,6 +375,18 @@ function Assemble-ReleasePackage { Write-Warning "VaM plugins folder not found: $vamPluginsSrc" } + # Copy external links to data/links/ + $linksSrc = Join-Path $releaseRoot "links" + if (Test-Path -LiteralPath $linksSrc) { + $linksDest = Join-Path $dataDir "links" + New-Item -ItemType Directory -Path $linksDest -Force | Out-Null + Copy-Item -Path (Join-Path $linksSrc "*") -Destination $linksDest -Recurse -Force + Write-Host "External links staged to: data\links\" + } + else { + Write-Warning "External links folder not found: $linksSrc" + } + # Copy documentation files $docFiles = @("VERSION", "README.md", "README_CN.md") foreach ($doc in $docFiles) { @@ -401,12 +458,14 @@ switch ($Action) { if ($doFlutter) { Stage-FlutterRelease } if ($doBackend) { Stage-BackendRelease } Stage-VaMPlugins + Stage-ExternalLinks Assemble-ReleasePackage Write-Host "`nRelease package created at: release\varManager_$script:ProjectVersion" Write-Host "Package contents:" Write-Host " - Flutter frontend (varManager.exe)" Write-Host " - Rust backend (varManager_backend.exe)" Write-Host " - VaM plugins (VaM_Plugins\*.cs)" + Write-Host " - External links (data\links\*.txt, torrents)" Write-Host " - Documentation (README.md, README_CN.md, INSTALL.txt)" } } diff --git a/varManager_backend/Cargo.lock b/varManager_backend/Cargo.lock index 6701661..c0cce4f 100644 --- a/varManager_backend/Cargo.lock +++ b/varManager_backend/Cargo.lock @@ -2564,6 +2564,16 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bencode" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70dfc7b7438b99896e7f8992363ab8e2c4ba26aa5ec675d32d1c3c2c33d413e" +dependencies = [ + "serde", + "serde_bytes", +] + [[package]] name = "serde_bytes" version = "0.11.19" @@ -3537,6 +3547,7 @@ dependencies = [ "reqwest 0.13.1", "scraper", "serde", + "serde_bencode", "serde_json", "sha2", "sqlx", diff --git a/varManager_backend/Cargo.toml b/varManager_backend/Cargo.toml index ced6bd1..d801659 100644 --- a/varManager_backend/Cargo.toml +++ b/varManager_backend/Cargo.toml @@ -36,6 +36,7 @@ percent-encoding = "2" url = "2" scraper = "0.25" headers = "0.3" +serde_bencode = "0.2" [profile.release] opt-level = 3 diff --git a/varManager_backend/src/infra/external_links.rs b/varManager_backend/src/infra/external_links.rs new file mode 100644 index 0000000..efc99f8 --- /dev/null +++ b/varManager_backend/src/infra/external_links.rs @@ -0,0 +1,382 @@ +use crate::app::data_dir; +use regex::Regex; +use std::collections::{HashMap, HashSet}; +use std::fs; +use std::path::{Path, PathBuf}; +use walkdir::WalkDir; + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] +pub enum ExternalSource { + Pixeldrain, + Mediafire, +} + +impl ExternalSource { + pub fn as_str(&self) -> &'static str { + match self { + ExternalSource::Pixeldrain => "pixeldrain", + ExternalSource::Mediafire => "mediafire", + } + } + + fn rank(&self) -> u8 { + match self { + ExternalSource::Pixeldrain => 2, + ExternalSource::Mediafire => 1, + } + } + + pub fn from_url(url: &str) -> Option { + let lower = url.to_ascii_lowercase(); + if lower.contains("pixeldrain.com") || lower.contains("pixeldrain.sriflix.my") { + return Some(ExternalSource::Pixeldrain); + } + if lower.contains("mediafire.com") { + return Some(ExternalSource::Mediafire); + } + None + } +} + +#[derive(Default)] +pub struct ExternalLinksResult { + pub download_urls: HashMap, + pub download_urls_no_version: HashMap, + pub download_sources: HashMap, + pub download_sources_no_version: HashMap, + pub torrent_hits: HashMap>, + pub torrent_hits_no_version: HashMap>, +} + +pub struct ExternalLinksOptions { + pub sources: HashSet, + pub pixeldrain_bypass: bool, + pub include_torrents: bool, +} + +pub fn scan_torrents_only(packages: &[String]) -> Result { + let matcher = PackageMatcher::new(packages); + let mut result = ExternalLinksResult::default(); + if matcher.is_empty() { + return Ok(result); + } + + let links_root = links_root(); + if !links_root.exists() { + return Ok(result); + } + + let var_re = Regex::new( + r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var", + ) + .map_err(|err| err.to_string())?; + + scan_torrents(&links_root, &var_re, &matcher, &mut result)?; + Ok(result) +} + +pub fn scan_external_links( + packages: &[String], + options: &ExternalLinksOptions, +) -> Result { + let matcher = PackageMatcher::new(packages); + let mut result = ExternalLinksResult::default(); + if matcher.is_empty() { + return Ok(result); + } + + let links_root = links_root(); + if !links_root.exists() { + return Ok(result); + } + + let var_re = Regex::new( + r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var", + ) + .map_err(|err| err.to_string())?; + let url_re = Regex::new(r##"(?i)https?://[^\s\]\)>"']+"##) + .map_err(|err| err.to_string())?; + + let mut allowed = options.sources.clone(); + if allowed.is_empty() { + allowed.insert(ExternalSource::Pixeldrain); + allowed.insert(ExternalSource::Mediafire); + } + + let mut rank_map: HashMap = HashMap::new(); + let mut base_rank_map: HashMap = HashMap::new(); + + let walker = WalkDir::new(&links_root).into_iter().filter_entry(|entry| { + if entry.file_type().is_dir() { + return !is_torrents_dir(entry.path()); + } + true + }); + + for entry in walker { + let entry = match entry { + Ok(value) => value, + Err(_) => continue, + }; + if !entry.file_type().is_file() { + continue; + } + if entry + .path() + .extension() + .and_then(|ext| ext.to_str()) + .map(|ext| !ext.eq_ignore_ascii_case("txt")) + .unwrap_or(true) + { + continue; + } + let data = match fs::read(entry.path()) { + Ok(value) => value, + Err(_) => continue, + }; + let content = String::from_utf8_lossy(&data); + for line in content.lines() { + let var_name = match var_re.captures(line).and_then(|caps| caps.get(1)) { + Some(m) => m.as_str(), + None => continue, + }; + let url_match = match url_re.find(line) { + Some(m) => m.as_str(), + None => continue, + }; + let mut url = trim_url(url_match); + let source = match ExternalSource::from_url(&url) { + Some(value) => value, + None => continue, + }; + if !allowed.contains(&source) { + continue; + } + if source == ExternalSource::Pixeldrain && options.pixeldrain_bypass { + url = apply_pixeldrain_bypass(&url); + } + + if let Some(exact_key) = matcher.exact_key(var_name) { + insert_url( + &mut result.download_urls, + &mut result.download_sources, + &mut rank_map, + exact_key, + url.clone(), + source, + ); + } + + if let Some((base, version)) = split_var_version(var_name) { + if let Some(base_key) = matcher.base_key(base) { + if let Some(version_num) = parse_version(version) { + insert_base_url( + &mut result.download_urls_no_version, + &mut result.download_sources_no_version, + &mut base_rank_map, + base_key, + version_num, + url.clone(), + source, + ); + } + } + } + } + } + + if options.include_torrents { + scan_torrents(&links_root, &var_re, &matcher, &mut result)?; + } + + Ok(result) +} + +struct PackageMatcher { + exact: HashMap, + base: HashMap, +} + +impl PackageMatcher { + fn new(packages: &[String]) -> Self { + let mut exact = HashMap::new(); + let mut base = HashMap::new(); + for package in packages { + let trimmed = package.trim(); + if trimmed.is_empty() { + continue; + } + let lower = trimmed.to_ascii_lowercase(); + exact.entry(lower).or_insert_with(|| trimmed.to_string()); + if let Some((base_name, _)) = split_var_version(trimmed) { + let base_lower = base_name.to_ascii_lowercase(); + base.entry(base_lower) + .or_insert_with(|| base_name.to_string()); + } + } + Self { exact, base } + } + + fn is_empty(&self) -> bool { + self.exact.is_empty() && self.base.is_empty() + } + + fn exact_key(&self, name: &str) -> Option<&str> { + let key = name.to_ascii_lowercase(); + self.exact.get(&key).map(|value| value.as_str()) + } + + fn base_key(&self, base: &str) -> Option<&str> { + let key = base.to_ascii_lowercase(); + self.base.get(&key).map(|value| value.as_str()) + } +} + +fn links_root() -> PathBuf { + data_dir().join("links") +} + +fn split_var_version(name: &str) -> Option<(&str, &str)> { + name.rsplit_once('.') +} + +fn parse_version(value: &str) -> Option { + value.parse::().ok() +} + +fn is_torrents_dir(path: &Path) -> bool { + path.file_name() + .and_then(|name| name.to_str()) + .map(|name| name.eq_ignore_ascii_case("torrents")) + .unwrap_or(false) +} + +fn trim_url(value: &str) -> String { + let mut trimmed = value.trim().to_string(); + loop { + let last = trimmed.chars().last(); + if matches!(last, Some('.') | Some(',') | Some(')') | Some(']') | Some('>') | Some('"') | Some('\'')) { + trimmed.pop(); + continue; + } + break; + } + trimmed +} + +fn apply_pixeldrain_bypass(url: &str) -> String { + let replaced = url.replace("pixeldrain.com/u/", "pixeldrain.sriflix.my/"); + replaced.replace( + "pixeldrain.com/api/file/", + "pixeldrain.sriflix.my/", + ) +} + +fn insert_url( + urls: &mut HashMap, + sources: &mut HashMap, + ranks: &mut HashMap, + key: &str, + url: String, + source: ExternalSource, +) { + let rank = source.rank(); + if let Some(existing) = ranks.get(key) { + if *existing >= rank { + return; + } + } + urls.insert(key.to_string(), url); + sources.insert(key.to_string(), source.as_str().to_string()); + ranks.insert(key.to_string(), rank); +} + +fn insert_base_url( + urls: &mut HashMap, + sources: &mut HashMap, + ranks: &mut HashMap, + key: &str, + version: i64, + url: String, + source: ExternalSource, +) { + let rank = source.rank(); + if let Some((existing_version, existing_rank)) = ranks.get(key) { + if *existing_version > version { + return; + } + if *existing_version == version && *existing_rank >= rank { + return; + } + } + urls.insert(key.to_string(), url); + sources.insert(key.to_string(), source.as_str().to_string()); + ranks.insert(key.to_string(), (version, rank)); +} + +fn scan_torrents( + links_root: &Path, + var_re: &Regex, + matcher: &PackageMatcher, + result: &mut ExternalLinksResult, +) -> Result<(), String> { + let torrents_root = links_root.join("torrents"); + if !torrents_root.exists() { + return Ok(()); + } + for entry in WalkDir::new(&torrents_root).into_iter() { + let entry = match entry { + Ok(value) => value, + Err(_) => continue, + }; + if !entry.file_type().is_file() { + continue; + } + if entry + .path() + .extension() + .and_then(|ext| ext.to_str()) + .map(|ext| !ext.eq_ignore_ascii_case("torrent")) + .unwrap_or(true) + { + continue; + } + let data = match fs::read(entry.path()) { + Ok(value) => value, + Err(_) => continue, + }; + + let content = String::from_utf8_lossy(&data); + let torrent_name = entry + .path() + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or("unknown.torrent") + .to_string(); + + for captures in var_re.captures_iter(&content) { + if let Some(var_match) = captures.get(1) { + let var_name = var_match.as_str(); + + if let Some(exact_key) = matcher.exact_key(var_name) { + result + .torrent_hits + .entry(exact_key.to_string()) + .or_insert_with(Vec::new) + .push(torrent_name.clone()); + } + + if let Some((base, _)) = split_var_version(var_name) { + if let Some(base_key) = matcher.base_key(base) { + result + .torrent_hits_no_version + .entry(base_key.to_string()) + .or_insert_with(Vec::new) + .push(torrent_name.clone()); + } + } + } + } + } + Ok(()) +} diff --git a/varManager_backend/src/infra/mod.rs b/varManager_backend/src/infra/mod.rs index 04c273a..ed660f4 100644 --- a/varManager_backend/src/infra/mod.rs +++ b/varManager_backend/src/infra/mod.rs @@ -1,6 +1,7 @@ pub mod db; pub mod downloader; pub mod download_manager; +pub mod external_links; pub mod fs_util; pub mod paths; pub mod system_ops; diff --git a/varManager_backend/src/jobs/hub.rs b/varManager_backend/src/jobs/hub.rs index 33d8c9a..6ae2467 100644 --- a/varManager_backend/src/jobs/hub.rs +++ b/varManager_backend/src/jobs/hub.rs @@ -1,6 +1,13 @@ use crate::jobs::job_channel::JobReporter; use crate::domain::var_logic::resolve_var_exist_name; use crate::app::AppState; +use crate::infra::external_links::{ + scan_external_links, + scan_torrents_only, + ExternalLinksOptions, + ExternalLinksResult, + ExternalSource, +}; use reqwest::blocking::Client; use reqwest::header; use serde::{Deserialize, Serialize}; @@ -22,6 +29,14 @@ type DownloadUrlMapsWithSizes = #[derive(Deserialize)] pub struct HubFindPackagesArgs { pub packages: Vec, + #[serde(default)] + pub include_external: bool, + #[serde(default)] + pub external_sources: Vec, + #[serde(default)] + pub pixeldrain_bypass: bool, + #[serde(default)] + pub include_torrents: bool, } #[derive(Deserialize)] @@ -60,6 +75,10 @@ pub struct HubDownloadList { pub download_urls: HashMap, pub download_urls_no_version: HashMap, pub download_sizes: HashMap, + pub download_sources: HashMap, + pub download_sources_no_version: HashMap, + pub torrent_hits: HashMap>, + pub torrent_hits_no_version: HashMap>, } #[derive(Deserialize)] @@ -94,8 +113,19 @@ pub async fn run_hub_missing_scan_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args: HubFindPackagesArgs = - args.map_or_else(|| Ok(HubFindPackagesArgs { packages: Vec::new() }), serde_json::from_value) - .map_err(|err| err.to_string())?; + args.map_or_else( + || { + Ok(HubFindPackagesArgs { + packages: Vec::new(), + include_external: false, + external_sources: Vec::new(), + pixeldrain_bypass: false, + include_torrents: false, + }) + }, + serde_json::from_value, + ) + .map_err(|err| err.to_string())?; missing_scan_blocking(&state, &reporter, args) }) .await @@ -181,6 +211,10 @@ pub async fn run_hub_resource_detail_job( download_urls, download_urls_no_version, download_sizes, + download_sources: HashMap::new(), + download_sources_no_version: HashMap::new(), + torrent_hits: HashMap::new(), + torrent_hits_no_version: HashMap::new(), }) .map_err(|err| err.to_string())?, ); @@ -219,12 +253,100 @@ pub async fn run_hub_find_packages_job( let args = args.ok_or_else(|| "hub_find_packages args required".to_string())?; let args: HubFindPackagesArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; - let (download_urls, download_urls_no_version) = find_packages_maps(&args.packages)?; + + // Step 1: Fetch Hub results + let (hub_urls, hub_urls_no_version) = find_packages_maps(&args.packages)?; + + // Step 2: Initialize result with Hub data + let mut download_urls = hub_urls.clone(); + let mut download_urls_no_version = hub_urls_no_version.clone(); + let mut download_sources = HashMap::new(); + let mut download_sources_no_version = HashMap::new(); + let mut torrent_hits = HashMap::new(); + let mut torrent_hits_no_version = HashMap::new(); + + if args.include_torrents { + match scan_torrents_only(&args.packages) { + Ok(result) => { + merge_torrent_hits(&mut torrent_hits, result.torrent_hits); + merge_torrent_hits(&mut torrent_hits_no_version, result.torrent_hits_no_version); + } + Err(err) => { + reporter.log(format!("Torrent scan warning: {}", err)); + } + } + } + + // Mark Hub sources + for key in hub_urls.keys() { + download_sources.insert(key.clone(), "hub".to_string()); + } + for key in hub_urls_no_version.keys() { + download_sources_no_version.insert(key.clone(), "hub".to_string()); + } + + // Step 3: Fetch external sources if enabled + if args.include_external { + let mut external_sources = HashSet::new(); + for source_str in &args.external_sources { + match source_str.as_str() { + "pixeldrain" => { external_sources.insert(ExternalSource::Pixeldrain); } + "mediafire" => { external_sources.insert(ExternalSource::Mediafire); } + _ => { reporter.log(format!("Unknown external source: {}", source_str)); } + } + } + + let external_options = ExternalLinksOptions { + sources: external_sources, + pixeldrain_bypass: args.pixeldrain_bypass, + include_torrents: args.include_torrents, + }; + + let external_result = match scan_external_links(&args.packages, &external_options) { + Ok(result) => result, + Err(err) => { + reporter.log(format!("External scan warning: {}", err)); + ExternalLinksResult::default() + } + }; + + // Step 4: Merge with fallback-only logic (Hub takes priority) + + // Exact matches: only add if Hub doesn't have it + for (pkg, url) in external_result.download_urls { + if !download_urls.contains_key(&pkg) { + download_urls.insert(pkg.clone(), url); + if let Some(source) = external_result.download_sources.get(&pkg) { + download_sources.insert(pkg, source.clone()); + } + } + } + + // No-version matches: only add if Hub doesn't have it + for (pkg, url) in external_result.download_urls_no_version { + if !download_urls_no_version.contains_key(&pkg) { + download_urls_no_version.insert(pkg.clone(), url); + if let Some(source) = external_result.download_sources_no_version.get(&pkg) { + download_sources_no_version.insert(pkg, source.clone()); + } + } + } + + // Torrent hits: always include (informational only) + merge_torrent_hits(&mut torrent_hits, external_result.torrent_hits); + merge_torrent_hits(&mut torrent_hits_no_version, external_result.torrent_hits_no_version); + } + + // Step 5: Return merged result reporter.set_result( serde_json::to_value(HubDownloadList { download_urls, download_urls_no_version, download_sizes: HashMap::new(), + download_sources, + download_sources_no_version, + torrent_hits, + torrent_hits_no_version, }) .map_err(|err| err.to_string())?, ); @@ -234,6 +356,21 @@ pub async fn run_hub_find_packages_job( .map_err(|err| err.to_string())? } +fn merge_torrent_hits( + target: &mut HashMap>, + incoming: HashMap>, +) { + for (key, values) in incoming { + let entry = target.entry(key).or_insert_with(Vec::new); + for value in values { + if entry.iter().any(|existing| existing.eq_ignore_ascii_case(&value)) { + continue; + } + entry.push(value); + } + } +} + fn missing_scan_blocking( state: &AppState, reporter: &JobReporter, @@ -257,6 +394,10 @@ fn missing_scan_blocking( download_urls, download_urls_no_version, download_sizes: HashMap::new(), + download_sources: HashMap::new(), + download_sources_no_version: HashMap::new(), + torrent_hits: HashMap::new(), + torrent_hits_no_version: HashMap::new(), }) .map_err(|err| err.to_string())?, ); @@ -307,6 +448,10 @@ fn updates_scan_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), download_urls, download_urls_no_version, download_sizes: HashMap::new(), + download_sources: HashMap::new(), + download_sources_no_version: HashMap::new(), + torrent_hits: HashMap::new(), + torrent_hits_no_version: HashMap::new(), }) .map_err(|err| err.to_string())?, ); diff --git a/varManager_backend/src/jobs/mod.rs b/varManager_backend/src/jobs/mod.rs index 28f3469..b3964b5 100644 --- a/varManager_backend/src/jobs/mod.rs +++ b/varManager_backend/src/jobs/mod.rs @@ -7,6 +7,7 @@ pub mod packswitch; pub mod preview_jobs; pub mod stale_jobs; pub mod system_jobs; +pub mod torrents; pub mod update_db; pub mod vars_jobs; pub mod vars_misc; @@ -122,6 +123,9 @@ pub async fn dispatch( "hub_find_packages" => { hub::run_hub_find_packages_job(state.clone(), reporter.clone(), args).await } + "torrent_download" => { + torrents::run_torrent_download_job(state.clone(), reporter.clone(), args).await + } "scene_load" => scenes::run_scene_load_job(state.clone(), reporter.clone(), args).await, "scene_analyze" => scenes::run_scene_analyze_job(state.clone(), reporter.clone(), args).await, "scene_preset_look" => { @@ -153,6 +157,9 @@ pub async fn dispatch( system_jobs::run_rescan_packages_job(state.clone(), reporter.clone(), args).await } "open_url" => system_jobs::run_open_url_job(state.clone(), reporter.clone(), args).await, + "open_torrents" => { + system_jobs::run_open_torrents_job(state.clone(), reporter.clone(), args).await + } _ => Err(format!("job kind not implemented: {}", kind)), } } diff --git a/varManager_backend/src/jobs/system_jobs.rs b/varManager_backend/src/jobs/system_jobs.rs index 4a0082c..7e52ad3 100644 --- a/varManager_backend/src/jobs/system_jobs.rs +++ b/varManager_backend/src/jobs/system_jobs.rs @@ -1,15 +1,22 @@ use crate::jobs::job_channel::JobReporter; +use crate::app::data_dir; use crate::app::AppState; use crate::infra::system_ops; use crate::util; use serde::{Deserialize, Serialize}; use serde_json::Value; +use std::path::{Path, PathBuf}; #[derive(Deserialize)] struct OpenUrlArgs { url: String, } +#[derive(Deserialize)] +struct OpenTorrentsArgs { + torrents: Vec, +} + #[derive(Serialize)] struct RescanResult { rescan: bool, @@ -20,6 +27,12 @@ struct StartResult { started: bool, } +#[derive(Serialize)] +struct OpenTorrentsResult { + opened: usize, + missing: Vec, +} + pub async fn run_vam_start_job( state: AppState, reporter: JobReporter, @@ -68,6 +81,18 @@ pub async fn run_open_url_job( .map_err(|err| err.to_string())? } +pub async fn run_open_torrents_job( + _state: AppState, + reporter: JobReporter, + args: Option, +) -> Result<(), String> { + tokio::task::spawn_blocking(move || { + open_torrents_blocking(&reporter, args) + }) + .await + .map_err(|err| err.to_string())? +} + fn open_url_blocking(reporter: &JobReporter, args: Option) -> Result<(), String> { let args = args.ok_or_else(|| "open_url args required".to_string())?; let args: OpenUrlArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; @@ -75,3 +100,55 @@ fn open_url_blocking(reporter: &JobReporter, args: Option) -> Result<(), reporter.log("open_url completed"); Ok(()) } + +fn open_torrents_blocking(reporter: &JobReporter, args: Option) -> Result<(), String> { + let args = args.ok_or_else(|| "open_torrents args required".to_string())?; + let args: OpenTorrentsArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + if args.torrents.is_empty() { + return Err("torrents list required".to_string()); + } + + let torrents_root = data_dir().join("links").join("torrents"); + let mut opened = 0usize; + let mut missing = Vec::new(); + + for raw in args.torrents { + let trimmed = raw.trim(); + if trimmed.is_empty() { + continue; + } + let name = Path::new(trimmed) + .file_name() + .and_then(|value| value.to_str()) + .unwrap_or("") + .trim(); + if name.is_empty() { + continue; + } + let path = if Path::new(trimmed).is_absolute() { + PathBuf::from(trimmed) + } else { + torrents_root.join(name) + }; + if !path.exists() { + missing.push(name.to_string()); + continue; + } + util::open_url(&path.to_string_lossy())?; + opened += 1; + } + + if opened == 0 { + return Err("no torrents opened".to_string()); + } + + if !missing.is_empty() { + reporter.log(format!("missing torrents: {}", missing.join(", "))); + } + + reporter.set_result( + serde_json::to_value(OpenTorrentsResult { opened, missing }) + .map_err(|err| err.to_string())?, + ); + Ok(()) +} diff --git a/varManager_backend/src/jobs/torrents.rs b/varManager_backend/src/jobs/torrents.rs new file mode 100644 index 0000000..0d335df --- /dev/null +++ b/varManager_backend/src/jobs/torrents.rs @@ -0,0 +1,369 @@ +use crate::app::data_dir; +use crate::app::AppState; +use crate::infra::paths::config_paths; +use crate::jobs::job_channel::JobReporter; +use serde::{Deserialize, Serialize}; +use serde_bencode::value::Value as BencodeValue; +use serde_json::Value; +use std::collections::HashMap; +use std::fs; +use std::path::{Path, PathBuf}; +use std::process::{self, Command}; +use std::time::{SystemTime, UNIX_EPOCH}; + +#[derive(Deserialize)] +pub struct TorrentDownloadArgs { + pub items: Vec, +} + +#[derive(Deserialize)] +pub struct TorrentDownloadItem { + pub var_name: String, + pub torrents: Vec, +} + +#[derive(Serialize)] +pub struct TorrentDownloadResult { + pub downloaded: usize, + pub skipped: usize, + pub missing: Vec, + pub failed: Vec, +} + +#[derive(Clone, Debug)] +struct TorrentFileEntry { + index: usize, + relative_path: PathBuf, + file_name: String, +} + +#[derive(Clone, Debug)] +struct TorrentMeta { + files: Vec, +} + +#[derive(Clone, Debug)] +struct ResolvedEntry { + var_name: String, + torrent_name: String, + entry: TorrentFileEntry, +} + +pub async fn run_torrent_download_job( + state: AppState, + reporter: JobReporter, + args: Option, +) -> Result<(), String> { + tokio::task::spawn_blocking(move || { + torrent_download_blocking(&state, &reporter, args) + }) + .await + .map_err(|err| err.to_string())? +} + +fn torrent_download_blocking( + state: &AppState, + reporter: &JobReporter, + args: Option, +) -> Result<(), String> { + let args = args.ok_or_else(|| "torrent_download args required".to_string())?; + let args: TorrentDownloadArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + if args.items.is_empty() { + return Err("torrent_download items required".to_string()); + } + + let aria2_path = data_dir().join("aria2c.exe"); + if !aria2_path.exists() { + return Err(format!("aria2c.exe not found: {}", aria2_path.display())); + } + + let (varspath, _) = config_paths(state)?; + let temp_dir = torrent_download_dir(&varspath); + fs::create_dir_all(&temp_dir).map_err(|err| err.to_string())?; + + let torrents_root = data_dir().join("links").join("torrents"); + if !torrents_root.exists() { + return Err(format!("torrents directory missing: {}", torrents_root.display())); + } + + let mut requested: HashMap> = HashMap::new(); + for item in args.items { + let name = item.var_name.trim().to_string(); + if name.is_empty() { + continue; + } + let mut list = Vec::new(); + for torrent in item.torrents { + let trimmed = torrent.trim(); + if trimmed.is_empty() { + continue; + } + list.push(trimmed.to_string()); + } + if list.is_empty() { + continue; + } + requested.insert(name, list); + } + + if requested.is_empty() { + return Err("torrent_download items required".to_string()); + } + + let mut meta_cache: HashMap = HashMap::new(); + let mut resolved: Vec = Vec::new(); + let mut missing = Vec::new(); + + for (var_name, torrents) in &requested { + let target = format!("{}.var", var_name); + let mut found = None; + for torrent_name in torrents { + let meta = match meta_cache.get(torrent_name) { + Some(existing) => existing.clone(), + None => { + let path = torrents_root.join(torrent_name); + let meta = parse_torrent(&path)?; + meta_cache.insert(torrent_name.to_string(), meta.clone()); + meta + } + }; + + if let Some(entry) = meta.files.iter().find(|entry| { + entry.file_name.eq_ignore_ascii_case(&target) + }) { + found = Some(ResolvedEntry { + var_name: var_name.to_string(), + torrent_name: torrent_name.to_string(), + entry: entry.clone(), + }); + break; + } + } + if let Some(entry) = found { + resolved.push(entry); + } else { + missing.push(var_name.to_string()); + } + } + + if resolved.is_empty() { + return Err("no matching torrent files found".to_string()); + } + + let mut by_torrent: HashMap> = HashMap::new(); + for entry in resolved { + by_torrent + .entry(entry.torrent_name.clone()) + .or_insert_with(Vec::new) + .push(entry); + } + + let temp_torrent_dir = temp_dir.join(".torrents"); + fs::create_dir_all(&temp_torrent_dir).map_err(|err| err.to_string())?; + + let mut downloaded = 0usize; + let mut skipped = 0usize; + let mut failed = Vec::new(); + let total_targets: usize = by_torrent.values().map(|v| v.len()).sum(); + let mut completed_targets = 0usize; + + for (torrent_name, entries) in by_torrent { + let torrent_path = torrents_root.join(&torrent_name); + if !torrent_path.exists() { + failed.push(torrent_name); + continue; + } + + reporter.log(format!( + "aria2 start: {} target(s) from {}", + entries.len(), + torrent_name + )); + let indices = entries + .iter() + .map(|entry| entry.entry.index.to_string()) + .collect::>() + .join(","); + + let temp_torrent_path = + temp_torrent_dir.join(unique_torrent_name(&torrent_name)); + fs::copy(&torrent_path, &temp_torrent_path) + .map_err(|err| err.to_string())?; + + let status = Command::new(&aria2_path) + .arg("--continue=true") + .arg("--allow-overwrite=true") + .arg("--check-integrity=true") + .arg("--file-allocation=none") + .arg("--seed-time=0") + .arg("--seed-ratio=0.0") + .arg("--bt-stop-timeout=0") + .arg(format!( + "--stop-with-process={}", + process::id() + )) + .arg("--dir") + .arg(&temp_dir) + .arg(format!("--select-file={}", indices)) + .arg(&temp_torrent_path) + .status() + .map_err(|err| err.to_string())?; + + let _ = fs::remove_file(&temp_torrent_path); + + if !status.success() { + failed.push(torrent_name); + continue; + } + + let mut move_failed = false; + for entry in entries { + let src = temp_dir.join(&entry.entry.relative_path); + let dest = varspath.join(format!("{}.var", entry.var_name)); + if dest.exists() { + skipped += 1; + let _ = fs::remove_file(&src); + completed_targets += 1; + continue; + } + if let Some(parent) = dest.parent() { + fs::create_dir_all(parent).map_err(|err| err.to_string())?; + } + if !src.exists() { + failed.push(entry.var_name.clone()); + move_failed = true; + completed_targets += 1; + continue; + } + fs::rename(&src, &dest).map_err(|err| err.to_string())?; + downloaded += 1; + completed_targets += 1; + let progress = if total_targets == 0 { + 100 + } else { + ((completed_targets * 100) / total_targets).min(100) as u8 + }; + reporter.progress(progress); + } + + let _ = move_failed; + reporter.log(format!("aria2 done: {}", torrent_name)); + } + + if !failed.is_empty() { + reporter.log(format!( + "torrent download failures: {}", + failed.join(", ") + )); + } + + reporter.set_result( + serde_json::to_value(TorrentDownloadResult { + downloaded, + skipped, + missing, + failed, + }) + .map_err(|err| err.to_string())?, + ); + + Ok(()) +} + +fn parse_torrent(path: &Path) -> Result { + let data = fs::read(path).map_err(|err| err.to_string())?; + let value: BencodeValue = + serde_bencode::from_bytes(&data).map_err(|err| err.to_string())?; + let info = match value { + BencodeValue::Dict(map) => dict_get(&map, "info") + .ok_or_else(|| format!("torrent missing info: {}", path.display()))? + .clone(), + _ => return Err(format!("invalid torrent root: {}", path.display())), + }; + let info_map = match info { + BencodeValue::Dict(map) => map, + _ => return Err(format!("invalid torrent info: {}", path.display())), + }; + let name_value = dict_get(&info_map, "name.utf-8") + .or_else(|| dict_get(&info_map, "name")) + .ok_or_else(|| format!("torrent missing name: {}", path.display()))?; + let name = bencode_str(name_value) + .ok_or_else(|| format!("torrent name invalid: {}", path.display()))?; + + let mut files = Vec::new(); + if let Some(file_list) = dict_get(&info_map, "files") { + let file_list = match file_list { + BencodeValue::List(list) => list, + _ => return Err(format!("torrent files invalid: {}", path.display())), + }; + for (idx, file) in file_list.iter().enumerate() { + let file_map = match file { + BencodeValue::Dict(map) => map, + _ => return Err(format!("torrent file entry invalid: {}", path.display())), + }; + let parts = dict_get(file_map, "path.utf-8") + .or_else(|| dict_get(file_map, "path")) + .ok_or_else(|| format!("torrent file path missing: {}", path.display()))?; + let parts = match parts { + BencodeValue::List(list) => list, + _ => return Err(format!("torrent path invalid: {}", path.display())), + }; + let mut relative = PathBuf::from(&name); + let mut file_name = None; + for part in parts { + let text = bencode_str(part) + .ok_or_else(|| format!("torrent path part invalid: {}", path.display()))?; + relative.push(&text); + file_name = Some(text); + } + let file_name = file_name.ok_or_else(|| { + format!("torrent path empty: {}", path.display()) + })?; + files.push(TorrentFileEntry { + index: idx + 1, + relative_path: relative, + file_name, + }); + } + } else { + files.push(TorrentFileEntry { + index: 1, + relative_path: PathBuf::from(&name), + file_name: name.clone(), + }); + } + + Ok(TorrentMeta { files }) +} + +fn dict_get<'a>( + map: &'a HashMap, BencodeValue>, + key: &str, +) -> Option<&'a BencodeValue> { + map.get(key.as_bytes()) +} + +fn bencode_str(value: &BencodeValue) -> Option { + match value { + BencodeValue::Bytes(bytes) => { + Some(String::from_utf8_lossy(bytes).to_string()) + } + _ => None, + } +} + +fn unique_torrent_name(original: &str) -> String { + let now = SystemTime::now() + .duration_since(UNIX_EPOCH) + .map(|d| d.as_millis()) + .unwrap_or(0); + let base = Path::new(original) + .file_name() + .and_then(|name| name.to_str()) + .unwrap_or(original); + format!("{}_{}", now, base) +} + +fn torrent_download_dir(varspath: &Path) -> PathBuf { + varspath.join("down") +} diff --git a/varManager_backend/tests/torrent_scan.rs b/varManager_backend/tests/torrent_scan.rs new file mode 100644 index 0000000..6877063 --- /dev/null +++ b/varManager_backend/tests/torrent_scan.rs @@ -0,0 +1,38 @@ +use regex::Regex; +use std::path::Path; + +#[test] +fn finds_anonymously_vamraider_captured_in_torrent_metadata() { + let backend_root = Path::new(env!("CARGO_MANIFEST_DIR")); + let repo_root = backend_root + .parent() + .unwrap_or(backend_root); + let torrent_path = repo_root + .join("data") + .join("links") + .join("torrents") + .join("Virt-A-Mate_Patreon_Paywall_Pack.torrent"); + + let data = std::fs::read(&torrent_path) + .unwrap_or_else(|err| panic!("failed to read {}: {}", torrent_path.display(), err)); + let content = String::from_utf8_lossy(&data); + + let var_re = Regex::new( + r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var", + ) + .expect("failed to compile var regex"); + + let target = "Anonymously.vamraider_captured.1"; + let found = var_re.captures_iter(&content).any(|caps| { + caps.get(1) + .map(|m| m.as_str().eq_ignore_ascii_case(target)) + .unwrap_or(false) + }); + + assert!( + found, + "expected to find {}.var in torrent metadata at {}", + target, + torrent_path.display() + ); +} diff --git a/varmanager_flutter/lib/app/app.dart b/varmanager_flutter/lib/app/app.dart index 7054d2f..00874a2 100644 --- a/varmanager_flutter/lib/app/app.dart +++ b/varmanager_flutter/lib/app/app.dart @@ -1,7 +1,11 @@ +import 'dart:async'; +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:varmanager_flutter/l10n/app_localizations.dart'; +import 'package:window_manager/window_manager.dart'; import '../core/app_version.dart'; import '../core/backend/job_log_controller.dart'; @@ -48,10 +52,11 @@ class AppShell extends ConsumerStatefulWidget { ConsumerState createState() => _AppShellState(); } -class _AppShellState extends ConsumerState { +class _AppShellState extends ConsumerState with WindowListener { bool _ready = false; String? _error; String _appVersion = ''; + bool _closing = false; List<_NavEntry> _buildPages(AppLocalizations l10n) { return [ @@ -81,9 +86,39 @@ class _AppShellState extends ConsumerState { @override void initState() { super.initState(); + if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { + windowManager.addListener(this); + unawaited(windowManager.setPreventClose(true)); + } Future.microtask(_initBackend); } + @override + void dispose() { + if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { + windowManager.removeListener(this); + unawaited(windowManager.setPreventClose(false)); + } + super.dispose(); + } + + @override + void onWindowClose() { + if (_closing) return; + _closing = true; + () async { + try { + await ref.read(backendProcessManagerProvider).shutdown(); + } catch (_) {} + try { + await windowManager.setPreventClose(false); + await windowManager.destroy(); + } catch (_) { + exit(0); + } + }(); + } + Future _initBackend() async { try { // Load app version diff --git a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart index 900d474..cc15b7b 100644 --- a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart +++ b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart @@ -7,6 +7,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../../app/providers.dart'; import '../../core/backend/job_log_controller.dart'; import '../../core/backend/query_params.dart'; +import '../../core/models/job_models.dart'; import '../../core/models/extra_models.dart'; import '../home/providers.dart'; import '../../widgets/lazy_dropdown_field.dart'; @@ -24,7 +25,7 @@ class MissingEntry { final bool versionMismatch; } -enum _DownloadStatus { direct, noVersion, none } +enum _DownloadStatus { direct, noVersion, torrent, none } class MissingVarsPage extends ConsumerStatefulWidget { const MissingVarsPage({super.key, required this.missing}); @@ -59,8 +60,20 @@ class _MissingVarsPageState extends ConsumerState { String _pickerValue = ''; Map _downloadUrls = {}; Map _downloadUrlsNoVersion = {}; + Map _downloadSources = {}; + Map _downloadSourcesNoVersion = {}; + Map> _torrentHits = {}; + Map> _torrentHitsNoVersion = {}; Map _resolved = {}; + // External source options + bool _enableExternal = true; + bool _enablePixeldrain = true; + bool _enableMediafire = true; + bool _pixeldrainBypass = false; + bool _enableTorrents = true; + bool _fetchingDownloads = false; + List _dependents = []; List _dependentSaves = []; bool _loadingDependents = false; @@ -374,10 +387,43 @@ class _MissingVarsPageState extends ConsumerState { return response.items.map((item) => item.varName).toList(); } - Future _runJob(String kind, Map args) async { + Future> _runJob( + String kind, + Map args, { + void Function(JobLogEntry entry)? onLog, + }) async { final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); - await runner.runJob(kind, args: args, onLog: log.addEntry); + return runner.runJob( + kind, + args: args, + onLog: onLog ?? log.addEntry, + ); + } + + Future _openTorrentInExternalClient(String torrentFileName) async { + final trimmed = torrentFileName.trim(); + if (trimmed.isEmpty) return; + try { + final exeDir = File(Platform.resolvedExecutable).parent.path; + final torrentPath = '$exeDir\\data\\links\\torrents\\$trimmed'; + final file = File(torrentPath); + if (!file.existsSync()) { + _showSnackBar('Torrent file not found: $trimmed'); + return; + } + if (Platform.isWindows) { + await Process.start('explorer.exe', [torrentPath]); + return; + } + if (Platform.isMacOS) { + await Process.start('open', [torrentPath]); + return; + } + await Process.start('xdg-open', [torrentPath]); + } catch (e) { + _showSnackBar('Failed to open torrent: $e'); + } } Future _refreshResolved() async { @@ -448,6 +494,7 @@ class _MissingVarsPageState extends ConsumerState { if (_downloadUrlsNoVersion.containsKey(_noVersionKey(name))) { return _DownloadStatus.noVersion; } + if (_hasTorrentHit(name)) return _DownloadStatus.torrent; return _DownloadStatus.none; } @@ -458,6 +505,8 @@ class _MissingVarsPageState extends ConsumerState { return l10n.downloadStatusDirect; case _DownloadStatus.noVersion: return l10n.downloadStatusNoVersion; + case _DownloadStatus.torrent: + return 'Torrent'; case _DownloadStatus.none: return l10n.downloadStatusNone; } @@ -470,6 +519,8 @@ class _MissingVarsPageState extends ConsumerState { return Icons.cloud_done; case _DownloadStatus.noVersion: return Icons.cloud_download; + case _DownloadStatus.torrent: + return Icons.folder_zip; default: return Icons.block; } @@ -482,11 +533,116 @@ class _MissingVarsPageState extends ConsumerState { return Colors.green; case _DownloadStatus.noVersion: return Colors.orange; + case _DownloadStatus.torrent: + return Colors.blue; default: return Colors.grey; } } + String _downloadSource(String name) { + return _downloadSources[name] ?? + _downloadSourcesNoVersion[_noVersionKey(name)] ?? + 'none'; + } + + bool _hasTorrentHit(String name) { + return (_torrentHits[name]?.isNotEmpty ?? false) || + (_torrentHitsNoVersion[_noVersionKey(name)]?.isNotEmpty ?? false); + } + + List _torrentFilesFor(String name) { + final hits = {}; + hits.addAll(_torrentHits[name] ?? const []); + hits.addAll(_torrentHitsNoVersion[_noVersionKey(name)] ?? const []); + final list = hits.toList(); + list.sort(); + return list; + } + + Future _downloadTorrents(Map> items) async { + setState(() { + _fetchingDownloads = true; + }); + if (items.isEmpty) { + _showSnackBar('No torrent files available.'); + setState(() { + _fetchingDownloads = false; + }); + return; + } + final log = ref.read(jobLogProvider.notifier); + final payload = >[]; + for (final entry in items.entries) { + final name = entry.key.trim(); + if (name.isEmpty) continue; + final torrents = entry.value + .map((value) => value.trim()) + .where((value) => value.isNotEmpty) + .toSet() + .toList(); + if (torrents.isEmpty) continue; + payload.add({'var_name': name, 'torrents': torrents}); + } + if (payload.isEmpty) { + _showSnackBar('No torrent files available.'); + setState(() { + _fetchingDownloads = false; + }); + return; + } + final result = await _runJob( + 'torrent_download', + {'items': payload}, + onLog: log.addEntry, + ); + final resMap = result.result as Map? ?? {}; + final downloaded = resMap['downloaded'] ?? 0; + final skipped = resMap['skipped'] ?? 0; + final failed = (resMap['failed'] as List?)?.length ?? 0; + final missing = (resMap['missing'] as List?)?.length ?? 0; + setState(() { + _fetchingDownloads = false; + }); + _showSnackBar( + 'Torrent job: downloaded $downloaded, skipped $skipped, failed $failed, missing $missing', + ); + } + + String _downloadTooltip(String name) { + final status = _downloadStatus(name); + final source = _downloadSource(name); + final hasTorrent = _hasTorrentHit(name); + + String statusText = _downloadStatusLabel(status); + String sourceText = source != 'none' ? ' ($source)' : ''; + String torrentText = + hasTorrent && status != _DownloadStatus.torrent + ? '\nTorrent available' + : ''; + + return '$statusText$sourceText$torrentText'; + } + + Widget _torrentBadge() { + return Container( + padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), + decoration: BoxDecoration( + color: Colors.blue.shade50, + borderRadius: BorderRadius.circular(4), + border: Border.all(color: Colors.blue.shade200), + ), + child: Text( + 'TOR', + style: TextStyle( + fontSize: 9, + fontWeight: FontWeight.w600, + color: Colors.blue.shade700, + ), + ), + ); + } + String _resolvedDisplay(String name) { final l10n = context.l10n; final resolved = _resolved[name]; @@ -498,25 +654,59 @@ class _MissingVarsPageState extends ConsumerState { } Future _fetchDownload() async { + setState(() { + _fetchingDownloads = true; + }); final packages = _missingEntries .map((entry) => entry.displayName) .toSet() .toList(); if (packages.isEmpty) return; + final runner = ref.read(jobRunnerProvider); final log = ref.read(jobLogProvider.notifier); + + // Build external sources list + final externalSources = []; + if (_enablePixeldrain) externalSources.add('pixeldrain'); + if (_enableMediafire) externalSources.add('mediafire'); + final result = await runner.runJob( 'hub_find_packages', - args: {'packages': packages}, + args: { + 'packages': packages, + 'include_external': _enableExternal, + 'external_sources': externalSources, + 'pixeldrain_bypass': _pixeldrainBypass, + 'include_torrents': _enableTorrents, + }, onLog: log.addEntry, ); - final payload = result.result as Map?; - if (payload == null) return; + + final payload = result.result as Map? ?? {}; + setState(() { + _fetchingDownloads = false; + }); + if (payload.isEmpty) return; + final direct = payload['download_urls'] as Map? ?? {}; final noVersion = payload['download_urls_no_version'] as Map? ?? {}; + final sources = payload['download_sources'] as Map? ?? {}; + final sourcesNoVersion = + payload['download_sources_no_version'] as Map? ?? {}; + final torrents = payload['torrent_hits'] as Map? ?? {}; + final torrentsNoVersion = + payload['torrent_hits_no_version'] as Map? ?? {}; + + // Parse into typed maps final urls = {}; final urlsNoVersion = {}; + final downloadSources = {}; + final downloadSourcesNoVersion = {}; + final torrentHitsMap = >{}; + final torrentHitsNoVersionMap = >{}; + for (final entry in direct.entries) { final value = entry.value?.toString() ?? ''; if (value.isNotEmpty) { @@ -529,16 +719,44 @@ class _MissingVarsPageState extends ConsumerState { urlsNoVersion[entry.key] = value; } } + for (final entry in sources.entries) { + final value = entry.value?.toString() ?? ''; + if (value.isNotEmpty) { + downloadSources[entry.key] = value; + } + } + for (final entry in sourcesNoVersion.entries) { + final value = entry.value?.toString() ?? ''; + if (value.isNotEmpty) { + downloadSourcesNoVersion[entry.key] = value; + } + } + for (final entry in torrents.entries) { + if (entry.value is List) { + torrentHitsMap[entry.key] = (entry.value as List) + .map((e) => e.toString()) + .toList(); + } + } + for (final entry in torrentsNoVersion.entries) { + if (entry.value is List) { + torrentHitsNoVersionMap[entry.key] = (entry.value as List) + .map((e) => e.toString()) + .toList(); + } + } + if (!mounted) return; setState(() { _downloadUrls = urls; _downloadUrlsNoVersion = urlsNoVersion; + _downloadSources = downloadSources; + _downloadSourcesNoVersion = downloadSourcesNoVersion; + _torrentHits = torrentHitsMap; + _torrentHitsNoVersion = torrentHitsNoVersionMap; }); } - bool get _hasHubLinks => - _downloadUrls.isNotEmpty || _downloadUrlsNoVersion.isNotEmpty; - void _showSnackBar(String message) { ScaffoldMessenger.of( context, @@ -552,14 +770,15 @@ class _MissingVarsPageState extends ConsumerState { _showSnackBar(l10n.missingSelectFirst); return; } - if (!_hasHubLinks) { - _showSnackBar(l10n.missingFetchHubLinksFirst); - return; - } final url = _downloadUrls[name] ?? _downloadUrlsNoVersion[_noVersionKey(name)]; if (url == null || url.isEmpty) { - _showSnackBar(l10n.missingNoDownloadUrlForSelected); + final torrents = _torrentFilesFor(name); + if (torrents.isEmpty) { + _showSnackBar(l10n.missingNoDownloadUrlForSelected); + return; + } + await _downloadTorrents({name: torrents}); return; } await _runJob('hub_download_all', { @@ -572,10 +791,6 @@ class _MissingVarsPageState extends ConsumerState { Future _downloadAll() async { final l10n = context.l10n; - if (!_hasHubLinks) { - _showSnackBar(l10n.missingFetchHubLinksFirst); - return; - } final items = >[]; final seen = {}; for (final entry in _downloadUrls.entries) { @@ -590,12 +805,29 @@ class _MissingVarsPageState extends ConsumerState { seen.add(url); items.add({'url': url, 'name': entry.key}); } - if (items.isEmpty) { + final torrentItems = >{}; + for (final entry in _viewEntries) { + final name = entry.displayName; + final hasUrl = _downloadUrls.containsKey(name) || + _downloadUrlsNoVersion.containsKey(_noVersionKey(name)); + if (hasUrl) continue; + final torrents = _torrentFilesFor(name); + if (torrents.isNotEmpty) { + torrentItems[name] = torrents; + } + } + + if (items.isEmpty && torrentItems.isEmpty) { _showSnackBar(l10n.missingNoDownloadUrlsAvailable); return; } - await _runJob('hub_download_all', {'items': items}); - _showSnackBar(l10n.missingAddedDownloads(items.length)); + if (items.isNotEmpty) { + await _runJob('hub_download_all', {'items': items}); + _showSnackBar(l10n.missingAddedDownloads(items.length)); + } + if (torrentItems.isNotEmpty) { + await _downloadTorrents(torrentItems); + } } void _setDraftLink(String name, String value) { @@ -870,6 +1102,8 @@ class _MissingVarsPageState extends ConsumerState { : hasDraft ? (draftLink.isEmpty ? l10n.draftClearLabel : draftLink) : '-'; + final selectedTorrentFiles = + selectedVar == null ? const [] : _torrentFilesFor(selectedVar); return Scaffold( appBar: AppBar(title: Text(l10n.missingDependenciesTitle)), @@ -1093,12 +1327,27 @@ class _MissingVarsPageState extends ConsumerState { ), ), SizedBox( - width: 32, - child: Text( - l10n.downloadHeaderShort, - style: const TextStyle( - fontWeight: FontWeight.w600, - ), + width: 80, + child: Row( + children: [ + Text( + l10n.downloadHeaderShort, + style: const TextStyle( + fontWeight: FontWeight.w600, + ), + ), + if (_fetchingDownloads) + const Padding( + padding: EdgeInsets.only(left: 4), + child: SizedBox( + width: 14, + height: 14, + child: CircularProgressIndicator( + strokeWidth: 2, + ), + ), + ), + ], ), ), ], @@ -1176,13 +1425,32 @@ class _MissingVarsPageState extends ConsumerState { ), ), SizedBox( - width: 32, - child: Icon( - _downloadIcon(entry.displayName), - color: _downloadColor( + width: 72, + child: Tooltip( + message: _downloadTooltip( entry.displayName, ), - size: 18, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + _downloadIcon(entry.displayName), + color: _downloadColor( + entry.displayName, + ), + size: 18, + ), + if (_hasTorrentHit( + entry.displayName, + )) + Padding( + padding: const EdgeInsets.only( + left: 4, + ), + child: _torrentBadge(), + ), + ], + ), ), ), ], @@ -1471,10 +1739,126 @@ class _MissingVarsPageState extends ConsumerState { ), const SizedBox(height: 8), Tooltip( - message: l10n.fetchHubLinksTooltip, + message: 'Search for this var on F95Zone forum', + child: OutlinedButton( + onPressed: selectedVar == null + ? null + : () async { + final search = selectedVar.replaceAll( + '.latest', + '.1', + ); + final encodedSearch = Uri.encodeComponent( + search, + ); + await _runJob('open_url', { + 'url': + 'https://f95zone.to/search/?q=$encodedSearch&t=post&c[nodes][0]=72&o=date&c[child_nodes]=1', + }); + }, + child: const Text('Search in F95'), + ), + ), + const Divider(height: 16), + const Text( + 'External Sources', + style: TextStyle(fontWeight: FontWeight.w600), + ), + const SizedBox(height: 8), + Row( + children: [ + Checkbox( + value: _enableExternal, + onChanged: (value) { + setState(() { + _enableExternal = value ?? false; + }); + }, + ), + const Expanded( + child: Text('Enable External Sources'), + ), + ], + ), + if (_enableExternal) ...[ + const SizedBox(height: 4), + Padding( + padding: const EdgeInsets.only(left: 24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Checkbox( + value: _enablePixeldrain, + onChanged: (value) { + setState(() { + _enablePixeldrain = value ?? false; + }); + }, + ), + const Expanded(child: Text('Pixeldrain')), + ], + ), + Row( + children: [ + Checkbox( + value: _enableMediafire, + onChanged: (value) { + setState(() { + _enableMediafire = value ?? false; + }); + }, + ), + const Expanded(child: Text('Mediafire')), + ], + ), + Row( + children: [ + Checkbox( + value: _pixeldrainBypass, + onChanged: (value) { + setState(() { + _pixeldrainBypass = value ?? false; + }); + }, + ), + const Expanded( + child: Text('Pixeldrain Bypass'), + ), + ], + ), + Row( + children: [ + Checkbox( + value: _enableTorrents, + onChanged: (value) { + setState(() { + _enableTorrents = value ?? false; + }); + }, + ), + const Expanded( + child: Text('Local Torrents'), + ), + ], + ), + ], + ), + ), + ], + const Divider(height: 16), + Tooltip( + message: _enableExternal + ? 'Fetch download links from Hub with external fallback' + : l10n.fetchHubLinksTooltip, child: OutlinedButton( onPressed: _fetchDownload, - child: Text(l10n.fetchHubLinksLabel), + child: Text( + _enableExternal + ? 'Fetch Links (Hub + External)' + : l10n.fetchHubLinksLabel, + ), ), ), const SizedBox(height: 8), @@ -1524,6 +1908,55 @@ class _MissingVarsPageState extends ConsumerState { ), ), const SizedBox(height: 12), + Card( + child: Padding( + padding: const EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + const Text( + 'Torrents', + style: TextStyle(fontWeight: FontWeight.w600), + ), + const SizedBox(height: 8), + if (selectedVar == null) + const Text('Select a missing var to view torrents.') + else if (selectedTorrentFiles.isEmpty) + const Text('No torrents found for this var.') + else ...[ + Row( + children: [ + Text( + 'Found ${selectedTorrentFiles.length} torrent(s).', + ), + const Spacer(), + ], + ), + const SizedBox(height: 8), + ...selectedTorrentFiles.map( + (name) => Row( + children: [ + Expanded( + child: Text( + name, + overflow: TextOverflow.ellipsis, + ), + ), + IconButton( + tooltip: 'Open in external client', + onPressed: () => + _openTorrentInExternalClient(name), + icon: const Icon(Icons.open_in_new), + ), + ], + ), + ), + ], + ], + ), + ), + ), + const SizedBox(height: 12), Card( child: Padding( padding: const EdgeInsets.all(12), From bf58f6faf8b481534e1887993a1331d5bb157ac0 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 11:22:06 +0500 Subject: [PATCH 05/10] small ref --- varManager_backend/src/app/mod.rs | 28 ++- varManager_backend/src/infra/mod.rs | 1 + .../src/infra/torrent_tracker.rs | 52 ++++ varManager_backend/src/jobs/job_channel.rs | 18 +- varManager_backend/src/jobs/torrents.rs | 224 ++++++++++++------ varManager_backend/src/main.rs | 20 +- .../src/services/image_cache.rs | 16 +- varmanager_flutter/lib/app/app.dart | 24 +- .../core/backend/backend_process_manager.dart | 3 +- .../missing_vars/missing_vars_page.dart | 3 +- .../features/var_detail/var_detail_page.dart | 3 +- 11 files changed, 281 insertions(+), 111 deletions(-) create mode 100644 varManager_backend/src/infra/torrent_tracker.rs diff --git a/varManager_backend/src/app/mod.rs b/varManager_backend/src/app/mod.rs index 06e5e9f..9e36c8f 100644 --- a/varManager_backend/src/app/mod.rs +++ b/varManager_backend/src/app/mod.rs @@ -12,7 +12,7 @@ use std::{ }; use sysinfo::{Pid, ProcessesToUpdate, System}; use tokio::{ - sync::{oneshot, Semaphore}, + sync::{broadcast, oneshot, Semaphore}, time::{interval, Duration}, }; use tracing::{Event, Subscriber}; @@ -173,6 +173,7 @@ impl Default for Config { pub struct AppState { pub(crate) config: Arc>, pub(crate) shutdown_tx: Arc>>>, + pub(crate) shutdown_broadcast: broadcast::Sender<()>, pub(crate) jobs: JobMap, pub(crate) job_counter: Arc, pub(crate) job_semaphore: Arc>>, @@ -180,6 +181,7 @@ pub struct AppState { pub(crate) db_pool: SqlitePool, pub(crate) image_cache: Arc, pub(crate) download_manager: Arc, + pub(crate) torrent_tracker: Arc, } pub fn init_logging( @@ -406,22 +408,34 @@ pub async fn parent_watchdog(parent_pid: u32, state: AppState) { let target = Pid::from_u32(parent_pid); let mut system = System::new(); let mut ticker = interval(Duration::from_secs(3)); + let mut shutdown_rx = state.shutdown_broadcast.subscribe(); + loop { - ticker.tick().await; - system.refresh_processes(ProcessesToUpdate::Some(&[target]), true); - if system.process(target).is_none() { - tracing::info!(parent_pid, "parent process exited, shutting down backend"); - trigger_shutdown(&state).await; - break; + tokio::select! { + _ = ticker.tick() => { + system.refresh_processes(ProcessesToUpdate::Some(&[target]), true); + if system.process(target).is_none() { + tracing::info!(parent_pid, "parent process exited, shutting down backend"); + trigger_shutdown(&state).await; + break; + } + } + _ = shutdown_rx.recv() => { + tracing::info!("ParentWatchdog received shutdown signal"); + break; + } } } } pub async fn trigger_shutdown(state: &AppState) { + // Send oneshot signal for axum graceful shutdown let mut guard = state.shutdown_tx.lock().await; if let Some(tx) = guard.take() { let _ = tx.send(()); } + // Broadcast to all subscribers (JobManager, ParentWatchdog, ImageCache, etc.) + let _ = state.shutdown_broadcast.send(()); } pub async fn shutdown_signal(mut rx: oneshot::Receiver<()>) { diff --git a/varManager_backend/src/infra/mod.rs b/varManager_backend/src/infra/mod.rs index ed660f4..042240b 100644 --- a/varManager_backend/src/infra/mod.rs +++ b/varManager_backend/src/infra/mod.rs @@ -5,4 +5,5 @@ pub mod external_links; pub mod fs_util; pub mod paths; pub mod system_ops; +pub mod torrent_tracker; pub mod winfs; diff --git a/varManager_backend/src/infra/torrent_tracker.rs b/varManager_backend/src/infra/torrent_tracker.rs new file mode 100644 index 0000000..d3b966c --- /dev/null +++ b/varManager_backend/src/infra/torrent_tracker.rs @@ -0,0 +1,52 @@ +use dashmap::DashMap; +use std::sync::Arc; + +#[derive(Clone)] +pub struct TorrentTracker { + active: Arc>, +} + +#[derive(Clone, Debug)] +pub struct TorrentDownloadInfo { + pub torrent_name: String, + pub var_names: Vec, + pub started_at: std::time::Instant, +} + +impl TorrentTracker { + pub fn new() -> Self { + Self { + active: Arc::new(DashMap::new()), + } + } + + pub fn is_active(&self, torrent_name: &str) -> bool { + self.active.contains_key(torrent_name) + } + + pub fn register(&self, torrent_name: String, var_names: Vec) -> bool { + if self.is_active(&torrent_name) { + return false; // Already downloading + } + self.active.insert( + torrent_name.clone(), + TorrentDownloadInfo { + torrent_name, + var_names, + started_at: std::time::Instant::now(), + }, + ); + true + } + + pub fn unregister(&self, torrent_name: &str) { + self.active.remove(torrent_name); + } + + pub fn get_active(&self) -> Vec { + self.active + .iter() + .map(|entry| entry.value().clone()) + .collect() + } +} diff --git a/varManager_backend/src/jobs/job_channel.rs b/varManager_backend/src/jobs/job_channel.rs index b05fd48..3c2273e 100644 --- a/varManager_backend/src/jobs/job_channel.rs +++ b/varManager_backend/src/jobs/job_channel.rs @@ -290,18 +290,28 @@ pub fn create_job_map() -> JobMap { pub struct JobManager { rx: JobEventReceiver, jobs: JobMap, + state: crate::app::AppState, } impl JobManager { - pub fn new(rx: JobEventReceiver, jobs: JobMap) -> Self { - Self { rx, jobs } + pub fn new(rx: JobEventReceiver, jobs: JobMap, state: crate::app::AppState) -> Self { + Self { rx, jobs, state } } /// Run the job manager. Call this in a spawned task. pub async fn run(mut self) { tracing::info!("JobManager started"); - while let Some(event) = self.rx.recv().await { - self.handle_event(event).await; + let mut shutdown_rx = self.state.shutdown_broadcast.subscribe(); + loop { + tokio::select! { + Some(event) = self.rx.recv() => { + self.handle_event(event).await; + } + _ = shutdown_rx.recv() => { + tracing::info!("JobManager received shutdown signal"); + break; + } + } } tracing::info!("JobManager stopped"); } diff --git a/varManager_backend/src/jobs/torrents.rs b/varManager_backend/src/jobs/torrents.rs index 0d335df..b33644e 100644 --- a/varManager_backend/src/jobs/torrents.rs +++ b/varManager_backend/src/jobs/torrents.rs @@ -6,10 +6,10 @@ use serde::{Deserialize, Serialize}; use serde_bencode::value::Value as BencodeValue; use serde_json::Value; use std::collections::HashMap; -use std::fs; use std::path::{Path, PathBuf}; -use std::process::{self, Command}; use std::time::{SystemTime, UNIX_EPOCH}; +use tokio::fs; +use tokio::process::Command; #[derive(Deserialize)] pub struct TorrentDownloadArgs { @@ -54,14 +54,10 @@ pub async fn run_torrent_download_job( reporter: JobReporter, args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - torrent_download_blocking(&state, &reporter, args) - }) - .await - .map_err(|err| err.to_string())? + torrent_download_async(&state, &reporter, args).await } -fn torrent_download_blocking( +async fn torrent_download_async( state: &AppState, reporter: &JobReporter, args: Option, @@ -73,16 +69,16 @@ fn torrent_download_blocking( } let aria2_path = data_dir().join("aria2c.exe"); - if !aria2_path.exists() { + if !tokio::fs::try_exists(&aria2_path).await.unwrap_or(false) { return Err(format!("aria2c.exe not found: {}", aria2_path.display())); } let (varspath, _) = config_paths(state)?; let temp_dir = torrent_download_dir(&varspath); - fs::create_dir_all(&temp_dir).map_err(|err| err.to_string())?; + fs::create_dir_all(&temp_dir).await.map_err(|err| err.to_string())?; let torrents_root = data_dir().join("links").join("torrents"); - if !torrents_root.exists() { + if !tokio::fs::try_exists(&torrents_root).await.unwrap_or(false) { return Err(format!("torrents directory missing: {}", torrents_root.display())); } @@ -159,95 +155,165 @@ fn torrent_download_blocking( } let temp_torrent_dir = temp_dir.join(".torrents"); - fs::create_dir_all(&temp_torrent_dir).map_err(|err| err.to_string())?; + fs::create_dir_all(&temp_torrent_dir).await.map_err(|err| err.to_string())?; + let total_targets: usize = by_torrent.values().map(|v| v.len()).sum(); + let mut completed_targets = 0usize; let mut downloaded = 0usize; let mut skipped = 0usize; let mut failed = Vec::new(); - let total_targets: usize = by_torrent.values().map(|v| v.len()).sum(); - let mut completed_targets = 0usize; + + // Spawn parallel downloads + let mut handles = Vec::new(); for (torrent_name, entries) in by_torrent { + // Check if already downloading + if state.torrent_tracker.is_active(&torrent_name) { + reporter.log(format!( + "Skipping {}: already downloading in another job", + torrent_name + )); + skipped += entries.len(); + completed_targets += entries.len(); + continue; + } + let torrent_path = torrents_root.join(&torrent_name); - if !torrent_path.exists() { + if !tokio::fs::try_exists(&torrent_path).await.unwrap_or(false) { failed.push(torrent_name); continue; } + // Register torrent download + let var_names: Vec = entries.iter() + .map(|e| e.var_name.clone()) + .collect(); + state.torrent_tracker.register(torrent_name.clone(), var_names); + reporter.log(format!( "aria2 start: {} target(s) from {}", entries.len(), torrent_name )); - let indices = entries - .iter() - .map(|entry| entry.entry.index.to_string()) - .collect::>() - .join(","); - - let temp_torrent_path = - temp_torrent_dir.join(unique_torrent_name(&torrent_name)); - fs::copy(&torrent_path, &temp_torrent_path) - .map_err(|err| err.to_string())?; - - let status = Command::new(&aria2_path) - .arg("--continue=true") - .arg("--allow-overwrite=true") - .arg("--check-integrity=true") - .arg("--file-allocation=none") - .arg("--seed-time=0") - .arg("--seed-ratio=0.0") - .arg("--bt-stop-timeout=0") - .arg(format!( - "--stop-with-process={}", - process::id() - )) - .arg("--dir") - .arg(&temp_dir) - .arg(format!("--select-file={}", indices)) - .arg(&temp_torrent_path) - .status() - .map_err(|err| err.to_string())?; - - let _ = fs::remove_file(&temp_torrent_path); - - if !status.success() { - failed.push(torrent_name); - continue; - } - let mut move_failed = false; - for entry in entries { - let src = temp_dir.join(&entry.entry.relative_path); - let dest = varspath.join(format!("{}.var", entry.var_name)); - if dest.exists() { - skipped += 1; - let _ = fs::remove_file(&src); - completed_targets += 1; - continue; + // Clone all necessary data for the task + let aria2_path_clone = aria2_path.clone(); + let temp_dir_clone = temp_dir.clone(); + let temp_torrent_dir_clone = temp_torrent_dir.clone(); + let varspath_clone = varspath.clone(); + let state_clone = state.clone(); + + let handle = tokio::spawn(async move { + let indices = entries + .iter() + .map(|entry| entry.entry.index.to_string()) + .collect::>() + .join(","); + + let temp_torrent_path = + temp_torrent_dir_clone.join(unique_torrent_name(&torrent_name)); + + if let Err(e) = fs::copy(&torrent_path, &temp_torrent_path).await { + return Err((torrent_name, vec![], format!("Copy failed: {}", e))); } - if let Some(parent) = dest.parent() { - fs::create_dir_all(parent).map_err(|err| err.to_string())?; + + let status = Command::new(&aria2_path_clone) + .arg("--continue=true") + .arg("--allow-overwrite=true") + .arg("--check-integrity=true") + .arg("--file-allocation=none") + .arg("--seed-time=0") + .arg("--seed-ratio=0.0") + .arg("--bt-stop-timeout=0") + .arg(format!( + "--stop-with-process={}", + std::process::id() + )) + .arg("--dir") + .arg(&temp_dir_clone) + .arg(format!("--select-file={}", indices)) + .arg(&temp_torrent_path) + .status() + .await; + + let _ = fs::remove_file(&temp_torrent_path).await; + + let status = match status { + Ok(s) => s, + Err(e) => return Err((torrent_name, vec![], format!("aria2 failed: {}", e))), + }; + + if !status.success() { + return Err((torrent_name, vec![], "aria2 returned error".to_string())); } - if !src.exists() { - failed.push(entry.var_name.clone()); - move_failed = true; - completed_targets += 1; - continue; + + // Move files to final location + let mut moved = Vec::new(); + let mut move_errors = Vec::new(); + let mut skipped_count = 0usize; + + for entry in entries { + let src = temp_dir_clone.join(&entry.entry.relative_path); + let dest = varspath_clone.join(format!("{}.var", entry.var_name)); + + if tokio::fs::try_exists(&dest).await.unwrap_or(false) { + let _ = fs::remove_file(&src).await; + skipped_count += 1; + continue; + } + + if !tokio::fs::try_exists(&src).await.unwrap_or(false) { + move_errors.push(entry.var_name.clone()); + continue; + } + + if let Some(parent) = dest.parent() { + let _ = fs::create_dir_all(parent).await; + } + + if let Err(_) = fs::rename(&src, &dest).await { + move_errors.push(entry.var_name.clone()); + continue; + } + + moved.push(entry.var_name); + } + + // Unregister from tracker + state_clone.torrent_tracker.unregister(&torrent_name); + + Ok::<_, (String, Vec, String)>((torrent_name, moved, move_errors, skipped_count)) + }); + + handles.push(handle); + } + + // Wait for all downloads to complete + for handle in handles { + match handle.await { + Ok(Ok((torrent_name, moved, move_errors, skipped_count))) => { + downloaded += moved.len(); + skipped += skipped_count; + failed.extend(move_errors); + completed_targets += moved.len() + failed.len() + skipped_count; + reporter.log(format!("aria2 done: {}", torrent_name)); + } + Ok(Err((torrent_name, _, error))) => { + reporter.log(format!("aria2 failed for {}: {}", torrent_name, error)); + failed.push(torrent_name); + } + Err(e) => { + reporter.log(format!("Task join error: {}", e)); } - fs::rename(&src, &dest).map_err(|err| err.to_string())?; - downloaded += 1; - completed_targets += 1; - let progress = if total_targets == 0 { - 100 - } else { - ((completed_targets * 100) / total_targets).min(100) as u8 - }; - reporter.progress(progress); } - let _ = move_failed; - reporter.log(format!("aria2 done: {}", torrent_name)); + // Update progress after each torrent completes + let progress = if total_targets == 0 { + 100 + } else { + ((completed_targets * 100) / total_targets).min(100) as u8 + }; + reporter.progress(progress); } if !failed.is_empty() { @@ -271,7 +337,7 @@ fn torrent_download_blocking( } fn parse_torrent(path: &Path) -> Result { - let data = fs::read(path).map_err(|err| err.to_string())?; + let data = std::fs::read(path).map_err(|err| err.to_string())?; let value: BencodeValue = serde_bencode::from_bytes(&data).map_err(|err| err.to_string())?; let info = match value { diff --git a/varManager_backend/src/main.rs b/varManager_backend/src/main.rs index 1b6da2f..8ae07e0 100644 --- a/varManager_backend/src/main.rs +++ b/varManager_backend/src/main.rs @@ -37,6 +37,7 @@ async fn main() -> Result<(), Box> { .await .map_err(std::io::Error::other)?; let (shutdown_tx, shutdown_rx) = oneshot::channel(); + let (shutdown_broadcast, _) = tokio::sync::broadcast::channel(16); let (job_tx, job_rx) = create_job_channel(); let jobs = create_job_map(); let image_cache = Arc::new( @@ -44,16 +45,18 @@ async fn main() -> Result<(), Box> { .await .map_err(std::io::Error::other)?, ); - image_cache.clone().start_maintenance(); + image_cache.clone().start_maintenance(shutdown_broadcast.clone()); let config_state = Arc::new(RwLock::new(config.clone())); let download_manager = Arc::new(DownloadManager::new(db_pool.clone(), Arc::clone(&config_state))); download_manager .pause_incomplete() .await .map_err(std::io::Error::other)?; + let torrent_tracker = Arc::new(infra::torrent_tracker::TorrentTracker::new()); let state = AppState { config: Arc::clone(&config_state), shutdown_tx: Arc::new(tokio::sync::Mutex::new(Some(shutdown_tx))), + shutdown_broadcast: shutdown_broadcast.clone(), jobs: jobs.clone(), job_counter: Arc::new(AtomicU64::new(1)), job_semaphore: Arc::new(RwLock::new(Arc::new(Semaphore::new( @@ -62,15 +65,26 @@ async fn main() -> Result<(), Box> { job_tx, db_pool, image_cache, - download_manager, + download_manager: download_manager.clone(), + torrent_tracker, }; // Start JobManager to consume job events and update state - let job_manager = JobManager::new(job_rx, jobs); + let job_manager = JobManager::new(job_rx, jobs, state.clone()); tokio::spawn(async move { job_manager.run().await; }); + // Pause downloads on shutdown + let download_manager_clone = download_manager.clone(); + let shutdown_broadcast_clone = shutdown_broadcast.clone(); + tokio::spawn(async move { + let mut shutdown_rx = shutdown_broadcast_clone.subscribe(); + let _ = shutdown_rx.recv().await; + tracing::info!("Pausing downloads before shutdown"); + let _ = download_manager_clone.pause_incomplete().await; + }); + if let Some(parent_pid) = app::read_parent_pid() { tracing::info!(parent_pid, "parent watchdog enabled"); let state_clone = state.clone(); diff --git a/varManager_backend/src/services/image_cache.rs b/varManager_backend/src/services/image_cache.rs index fee4456..3173886 100644 --- a/varManager_backend/src/services/image_cache.rs +++ b/varManager_backend/src/services/image_cache.rs @@ -177,17 +177,25 @@ impl ImageCacheService { }) } - pub fn start_maintenance(self: Arc) { + pub fn start_maintenance(self: Arc, shutdown_broadcast: tokio::sync::broadcast::Sender<()>) { if !self.config.enabled { return; } let disk_cache = Arc::clone(&self.disk_cache); tokio::spawn(async move { let mut ticker = tokio::time::interval(Duration::from_secs(3600)); + let mut shutdown_rx = shutdown_broadcast.subscribe(); loop { - ticker.tick().await; - if let Err(err) = disk_cache.cleanup_expired().await { - tracing::warn!(error = %err, "image cache cleanup failed"); + tokio::select! { + _ = ticker.tick() => { + if let Err(err) = disk_cache.cleanup_expired().await { + tracing::warn!(error = %err, "image cache cleanup failed"); + } + } + _ = shutdown_rx.recv() => { + tracing::info!("ImageCache maintenance received shutdown signal"); + break; + } } } }); diff --git a/varmanager_flutter/lib/app/app.dart b/varmanager_flutter/lib/app/app.dart index 00874a2..c7dcf96 100644 --- a/varmanager_flutter/lib/app/app.dart +++ b/varmanager_flutter/lib/app/app.dart @@ -106,17 +106,19 @@ class _AppShellState extends ConsumerState with WindowListener { void onWindowClose() { if (_closing) return; _closing = true; - () async { - try { - await ref.read(backendProcessManagerProvider).shutdown(); - } catch (_) {} - try { - await windowManager.setPreventClose(false); - await windowManager.destroy(); - } catch (_) { - exit(0); - } - }(); + unawaited(_performShutdown()); + } + + Future _performShutdown() async { + try { + await ref.read(backendProcessManagerProvider).shutdown(); + } catch (_) {} + try { + await windowManager.setPreventClose(false); + await windowManager.destroy(); + } catch (_) { + exit(0); + } } Future _initBackend() async { diff --git a/varmanager_flutter/lib/core/backend/backend_process_manager.dart b/varmanager_flutter/lib/core/backend/backend_process_manager.dart index 7cd8fe3..29c7bf1 100644 --- a/varmanager_flutter/lib/core/backend/backend_process_manager.dart +++ b/varmanager_flutter/lib/core/backend/backend_process_manager.dart @@ -91,7 +91,8 @@ class BackendProcessManager { } catch (_) {} if (_process != null) { final process = _process!; - await Future.delayed(const Duration(seconds: 2)); + // Wait 8 seconds for graceful shutdown before force kill + await Future.delayed(const Duration(seconds: 8)); process.kill(ProcessSignal.sigkill); _process = null; } diff --git a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart index cc15b7b..73b5ad6 100644 --- a/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart +++ b/varmanager_flutter/lib/features/missing_vars/missing_vars_page.dart @@ -1729,9 +1729,10 @@ class _MissingVarsPageState extends ConsumerState { '.latest', '.1', ); + final encodedSearch = Uri.encodeQueryComponent(search); await _runJob('open_url', { 'url': - 'https://www.google.com/search?q=$search var', + 'https://www.google.com/search?q=$encodedSearch+var', }); }, child: Text(l10n.googleSearchLabel), diff --git a/varmanager_flutter/lib/features/var_detail/var_detail_page.dart b/varmanager_flutter/lib/features/var_detail/var_detail_page.dart index 496c9d2..bd5f831 100644 --- a/varmanager_flutter/lib/features/var_detail/var_detail_page.dart +++ b/varmanager_flutter/lib/features/var_detail/var_detail_page.dart @@ -151,9 +151,10 @@ class VarDetailPage extends ConsumerWidget { '.latest', '.1', ); + final encodedSearch = Uri.encodeQueryComponent(search); _runJob(ref, 'open_url', { 'url': - 'https://www.google.com/search?q=$search var', + 'https://www.google.com/search?q=$encodedSearch+var', }); }, child: Text(l10n.commonSearch), From e411322960b5b7f29758a9a13575252916f67540 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 14:16:51 +0500 Subject: [PATCH 06/10] cleanup dead code --- .../src/infra/torrent_tracker.rs | 27 +++---------------- varManager_backend/src/jobs/torrents.rs | 7 ++--- varManager_backend/src/jobs/update_db.rs | 15 ++++++++++- 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/varManager_backend/src/infra/torrent_tracker.rs b/varManager_backend/src/infra/torrent_tracker.rs index d3b966c..22c093d 100644 --- a/varManager_backend/src/infra/torrent_tracker.rs +++ b/varManager_backend/src/infra/torrent_tracker.rs @@ -3,14 +3,7 @@ use std::sync::Arc; #[derive(Clone)] pub struct TorrentTracker { - active: Arc>, -} - -#[derive(Clone, Debug)] -pub struct TorrentDownloadInfo { - pub torrent_name: String, - pub var_names: Vec, - pub started_at: std::time::Instant, + active: Arc>, } impl TorrentTracker { @@ -24,29 +17,15 @@ impl TorrentTracker { self.active.contains_key(torrent_name) } - pub fn register(&self, torrent_name: String, var_names: Vec) -> bool { + pub fn register(&self, torrent_name: String, _var_names: Vec) -> bool { if self.is_active(&torrent_name) { return false; // Already downloading } - self.active.insert( - torrent_name.clone(), - TorrentDownloadInfo { - torrent_name, - var_names, - started_at: std::time::Instant::now(), - }, - ); + self.active.insert(torrent_name, ()); true } pub fn unregister(&self, torrent_name: &str) { self.active.remove(torrent_name); } - - pub fn get_active(&self) -> Vec { - self.active - .iter() - .map(|entry| entry.value().clone()) - .collect() - } } diff --git a/varManager_backend/src/jobs/torrents.rs b/varManager_backend/src/jobs/torrents.rs index b33644e..5ae7afb 100644 --- a/varManager_backend/src/jobs/torrents.rs +++ b/varManager_backend/src/jobs/torrents.rs @@ -74,7 +74,7 @@ async fn torrent_download_async( } let (varspath, _) = config_paths(state)?; - let temp_dir = torrent_download_dir(&varspath); + let temp_dir = torrent_download_dir(); fs::create_dir_all(&temp_dir).await.map_err(|err| err.to_string())?; let torrents_root = data_dir().join("links").join("torrents"); @@ -430,6 +430,7 @@ fn unique_torrent_name(original: &str) -> String { format!("{}_{}", now, base) } -fn torrent_download_dir(varspath: &Path) -> PathBuf { - varspath.join("down") +fn torrent_download_dir() -> PathBuf { + use crate::app::app_root; + app_root().join("down") } diff --git a/varManager_backend/src/jobs/update_db.rs b/varManager_backend/src/jobs/update_db.rs index 750fbc5..6ad9470 100644 --- a/varManager_backend/src/jobs/update_db.rs +++ b/varManager_backend/src/jobs/update_db.rs @@ -122,6 +122,18 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St }; exist_vars.insert(basename.clone()); + // Check for zero-size files + if let Ok(metadata) = std::fs::metadata(var_file) { + if metadata.len() == 0 { + reporter_async.log(format!( + "Moving zero-size VAR file to non-compliant: {}", + var_file.display() + )); + move_to_not_comply(&varspath_async, var_file, &reporter_async)?; + continue; + } + } + let result = process_var_file(&dependency_regex, &varspath_async, var_file); match result { Ok(processed) => { @@ -157,10 +169,11 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St Err(ProcessError::Io(err)) => { if is_invalid_var_archive(&err) { reporter_async.log(format!( - "Skipping invalid VAR archive {} ({})", + "Moving invalid VAR archive to non-compliant: {} ({})", var_file.display(), err )); + move_to_not_comply(&varspath_async, var_file, &reporter_async)?; continue; } return Err(err); From 33d03764bc5486ec5f8f9f8706544ffc4e5921ed Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 14:23:45 +0500 Subject: [PATCH 07/10] shtdwn --- varmanager_flutter/lib/app/app.dart | 8 +++++--- .../lib/core/backend/backend_process_manager.dart | 8 +------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/varmanager_flutter/lib/app/app.dart b/varmanager_flutter/lib/app/app.dart index c7dcf96..3b93671 100644 --- a/varmanager_flutter/lib/app/app.dart +++ b/varmanager_flutter/lib/app/app.dart @@ -106,13 +106,15 @@ class _AppShellState extends ConsumerState with WindowListener { void onWindowClose() { if (_closing) return; _closing = true; + // Send shutdown signal to backend but don't wait + unawaited( + ref.read(backendProcessManagerProvider).shutdown().catchError((_) {}), + ); + // Close window immediately unawaited(_performShutdown()); } Future _performShutdown() async { - try { - await ref.read(backendProcessManagerProvider).shutdown(); - } catch (_) {} try { await windowManager.setPreventClose(false); await windowManager.destroy(); diff --git a/varmanager_flutter/lib/core/backend/backend_process_manager.dart b/varmanager_flutter/lib/core/backend/backend_process_manager.dart index 29c7bf1..c9b77e6 100644 --- a/varmanager_flutter/lib/core/backend/backend_process_manager.dart +++ b/varmanager_flutter/lib/core/backend/backend_process_manager.dart @@ -89,13 +89,7 @@ class BackendProcessManager { try { await client.shutdown(); } catch (_) {} - if (_process != null) { - final process = _process!; - // Wait 8 seconds for graceful shutdown before force kill - await Future.delayed(const Duration(seconds: 8)); - process.kill(ProcessSignal.sigkill); - _process = null; - } + // Don't wait for process to exit - backend will shutdown via parent watchdog } Future _shutdownExisting() async { From 07d8a87a1192fb75b14764954117ad1e60af95f7 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 14:36:46 +0500 Subject: [PATCH 08/10] more graceful shtdwn --- varmanager_flutter/lib/app/app.dart | 11 +++++++++-- .../lib/core/backend/backend_process_manager.dart | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/varmanager_flutter/lib/app/app.dart b/varmanager_flutter/lib/app/app.dart index 3b93671..3ce9a44 100644 --- a/varmanager_flutter/lib/app/app.dart +++ b/varmanager_flutter/lib/app/app.dart @@ -106,6 +106,8 @@ class _AppShellState extends ConsumerState with WindowListener { void onWindowClose() { if (_closing) return; _closing = true; + // Hide window immediately to avoid "hanging" close UX. + unawaited(windowManager.hide().catchError((_) {})); // Send shutdown signal to backend but don't wait unawaited( ref.read(backendProcessManagerProvider).shutdown().catchError((_) {}), @@ -116,8 +118,13 @@ class _AppShellState extends ConsumerState with WindowListener { Future _performShutdown() async { try { - await windowManager.setPreventClose(false); - await windowManager.destroy(); + // Fire-and-forget: plugin calls can occasionally take time; UI is already hidden. + unawaited(windowManager.setPreventClose(false).catchError((_) {})); + unawaited(windowManager.destroy().catchError((_) {})); + + // Hard fallback in case the window manager gets stuck. + await Future.delayed(const Duration(milliseconds: 900)); + exit(0); } catch (_) { exit(0); } diff --git a/varmanager_flutter/lib/core/backend/backend_process_manager.dart b/varmanager_flutter/lib/core/backend/backend_process_manager.dart index c9b77e6..bb1ce20 100644 --- a/varmanager_flutter/lib/core/backend/backend_process_manager.dart +++ b/varmanager_flutter/lib/core/backend/backend_process_manager.dart @@ -12,7 +12,6 @@ class BackendProcessManager { final BackendClient client; final Directory workDir; - Process? _process; bool _starting = false; static const String defaultHost = '127.0.0.1'; @@ -73,7 +72,7 @@ class BackendProcessManager { throw Exception('backend exe not found'); } final (exePath, backendWorkDir) = resolved; - _process = await Process.start( + await Process.start( exePath, [], workingDirectory: backendWorkDir, From 91acf57d5e8db095493b27567e8a2e701aaadba4 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 15:12:41 +0500 Subject: [PATCH 09/10] more buttons --- varManager_backend/src/jobs/mod.rs | 38 ++- varManager_backend/src/jobs/update_db.rs | 221 +++++++++++++----- .../lib/features/home/home_page.dart | 22 +- varmanager_flutter/lib/l10n/app_en.arb | 2 + .../lib/l10n/app_localizations.dart | 12 + .../lib/l10n/app_localizations_en.dart | 7 + .../lib/l10n/app_localizations_zh.dart | 6 + varmanager_flutter/lib/l10n/app_zh.arb | 2 + 8 files changed, 242 insertions(+), 68 deletions(-) diff --git a/varManager_backend/src/jobs/mod.rs b/varManager_backend/src/jobs/mod.rs index b3964b5..5bc8191 100644 --- a/varManager_backend/src/jobs/mod.rs +++ b/varManager_backend/src/jobs/mod.rs @@ -60,23 +60,29 @@ pub async fn dispatch( } Ok(()) } - "update_db" => update_db::run_update_db_job(state.clone(), reporter.clone()).await, + "update_db" => update_db::run_update_db_job(state.clone(), reporter.clone(), args).await, "missing_deps" => { missing_deps::run_missing_deps_job(state.clone(), reporter.clone(), args).await } - "rebuild_links" => links::run_rebuild_links_job(state.clone(), reporter.clone(), args).await, + "rebuild_links" => { + links::run_rebuild_links_job(state.clone(), reporter.clone(), args).await + } "links_move" => links::run_move_links_job(state.clone(), reporter.clone(), args).await, "links_missing_create" => { links::run_missing_links_create_job(state.clone(), reporter.clone(), args).await } - "install_vars" => vars_jobs::run_install_vars_job(state.clone(), reporter.clone(), args).await, + "install_vars" => { + vars_jobs::run_install_vars_job(state.clone(), reporter.clone(), args).await + } "preview_uninstall" => { vars_jobs::run_preview_uninstall_job(state.clone(), reporter.clone(), args).await } "uninstall_vars" => { vars_jobs::run_uninstall_vars_job(state.clone(), reporter.clone(), args).await } - "delete_vars" => vars_jobs::run_delete_vars_job(state.clone(), reporter.clone(), args).await, + "delete_vars" => { + vars_jobs::run_delete_vars_job(state.clone(), reporter.clone(), args).await + } "vars_export_installed" => { vars_misc::run_export_installed_job(state.clone(), reporter.clone(), args).await } @@ -92,7 +98,9 @@ pub async fn dispatch( } "saves_deps" => deps_jobs::run_saves_deps_job(state.clone(), reporter.clone(), args).await, "log_deps" => deps_jobs::run_log_deps_job(state.clone(), reporter.clone(), args).await, - "fix_previews" => preview_jobs::run_fix_previews_job(state.clone(), reporter.clone(), args).await, + "fix_previews" => { + preview_jobs::run_fix_previews_job(state.clone(), reporter.clone(), args).await + } "stale_vars" => stale_jobs::run_stale_vars_job(state.clone(), reporter.clone(), args).await, "old_version_vars" => { stale_jobs::run_old_version_vars_job(state.clone(), reporter.clone(), args).await @@ -109,9 +117,15 @@ pub async fn dispatch( "packswitch_set" => { packswitch::run_packswitch_set_job(state.clone(), reporter.clone(), args).await } - "hub_missing_scan" => hub::run_hub_missing_scan_job(state.clone(), reporter.clone(), args).await, - "hub_updates_scan" => hub::run_hub_updates_scan_job(state.clone(), reporter.clone(), args).await, - "hub_download_all" => hub::run_hub_download_all_job(state.clone(), reporter.clone(), args).await, + "hub_missing_scan" => { + hub::run_hub_missing_scan_job(state.clone(), reporter.clone(), args).await + } + "hub_updates_scan" => { + hub::run_hub_updates_scan_job(state.clone(), reporter.clone(), args).await + } + "hub_download_all" => { + hub::run_hub_download_all_job(state.clone(), reporter.clone(), args).await + } "hub_info" => hub::run_hub_info_job(state.clone(), reporter.clone()).await, "hub_resources" => hub::run_hub_resources_job(state.clone(), reporter.clone(), args).await, "hub_resource_detail" => { @@ -127,7 +141,9 @@ pub async fn dispatch( torrents::run_torrent_download_job(state.clone(), reporter.clone(), args).await } "scene_load" => scenes::run_scene_load_job(state.clone(), reporter.clone(), args).await, - "scene_analyze" => scenes::run_scene_analyze_job(state.clone(), reporter.clone(), args).await, + "scene_analyze" => { + scenes::run_scene_analyze_job(state.clone(), reporter.clone(), args).await + } "scene_preset_look" => { scenes::run_scene_preset_look_job(state.clone(), reporter.clone(), args).await } @@ -143,7 +159,9 @@ pub async fn dispatch( "scene_preset_scene" => { scenes::run_scene_preset_scene_job(state.clone(), reporter.clone(), args).await } - "scene_add_atoms" => scenes::run_scene_add_atoms_job(state.clone(), reporter.clone(), args).await, + "scene_add_atoms" => { + scenes::run_scene_add_atoms_job(state.clone(), reporter.clone(), args).await + } "scene_add_subscene" => { scenes::run_scene_add_subscene_job(state.clone(), reporter.clone(), args).await } diff --git a/varManager_backend/src/jobs/update_db.rs b/varManager_backend/src/jobs/update_db.rs index 6ad9470..f13b916 100644 --- a/varManager_backend/src/jobs/update_db.rs +++ b/varManager_backend/src/jobs/update_db.rs @@ -1,23 +1,24 @@ +use crate::app::AppState; +use crate::domain::var_logic::vars_dependencies; use crate::infra::db::{ delete_var_related, list_vars, replace_dependencies, replace_hide_fav, replace_scenes, upsert_install_status, upsert_var, var_exists_conn, HideFavRecord, SceneRecord, VarRecord, }; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::resolve_var_file_path; -use crate::domain::var_logic::vars_dependencies; -use crate::app::AppState; use crate::infra::{system_ops, winfs}; +use crate::jobs::job_channel::JobReporter; use chrono::{DateTime, Local}; use regex::Regex; -use std::collections::HashSet; +use serde_json::Value; +use sqlx::{Sqlite, SqlitePool, Transaction}; +use std::collections::{HashMap, HashSet}; use std::fs::{self, File}; use std::io::{BufReader, Read}; use std::path::{Path, PathBuf}; use std::time::SystemTime; use walkdir::WalkDir; use zip::ZipArchive; -use sqlx::{Sqlite, SqlitePool, Transaction}; const TIDIED_DIR: &str = "___VarTidied___"; const REDUNDANT_DIR: &str = "___VarRedundant___"; @@ -32,20 +33,35 @@ const MISSING_LINK_DIR: &str = "___MissingVarLink___"; const TEMP_LINK_DIR: &str = "___TempVarLink___"; const VARS_FOR_INSTALL_FILE: &str = "varsForInstall.txt"; -pub async fn run_update_db_job(state: AppState, reporter: JobReporter) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - update_db_blocking(&state, &reporter) - }) - .await - .map_err(|err| err.to_string())? +pub async fn run_update_db_job( + state: AppState, + reporter: JobReporter, + args: Option, +) -> Result<(), String> { + tokio::task::spawn_blocking(move || update_db_blocking(&state, &reporter, args)) + .await + .map_err(|err| err.to_string())? } -fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), String> { +fn update_db_blocking( + state: &AppState, + reporter: &JobReporter, + args: Option, +) -> Result<(), String> { let overall_start = std::time::Instant::now(); let (varspath, vampath) = config_paths(state)?; reporter.log(format!("UpdateDB started: varspath={}", varspath.display())); reporter.progress(1); + let full_rescan = args + .as_ref() + .and_then(|v| v.get("full_rescan")) + .and_then(Value::as_bool) + .unwrap_or(false); + if full_rescan { + reporter.log("UpdateDB: full_rescan=true (incremental skip disabled)".to_string()); + } + let addon_vars = match vampath.as_ref() { Some(vampath) => collect_addonpackages_vars(vampath), None => Vec::new(), @@ -68,7 +84,11 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St reporter.log("Phase 1/5: Tidying VAR files...".to_string()); tidy_vars( &varspath, - if vampath.is_some() { Some(&addon_vars) } else { None }, + if vampath.is_some() { + Some(&addon_vars) + } else { + None + }, reporter, )?; reporter.progress(10); @@ -96,7 +116,10 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St return Ok(()); } - reporter.log(format!("Phase 2/5: Processing {} VAR files into database...", var_files.len())); + reporter.log(format!( + "Phase 2/5: Processing {} VAR files into database...", + var_files.len() + )); let dependency_regex = Regex::new( r#"\x22(([^\r\n\x22\x3A\x2E]{1,60})\x2E([^\r\n\x22\x3A\x2E]{1,80})\x2E(\d+|latest))(\x22?\s*)\x3A"#, @@ -112,8 +135,25 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St handle.block_on(async move { let mut exist_vars: HashSet = HashSet::new(); let mut tx = pool_for_tx.begin().await.map_err(|err| err.to_string())?; + + let existing_signatures: HashMap, Option)> = if full_rescan { + HashMap::new() + } else { + let rows = sqlx::query_as::<_, (String, Option, Option)>( + "SELECT varName, varDate, fsize FROM vars", + ) + .fetch_all(tx.as_mut()) + .await + .map_err(|err| err.to_string())?; + rows.into_iter() + .map(|(name, date, size)| (name, (date, size))) + .collect() + }; + let total_vars = var_files.len(); let start_time = std::time::Instant::now(); + let mut skipped = 0usize; + let mut processed_count = 0usize; for (idx, var_file) in var_files.iter().enumerate() { let basename = match var_file.file_stem() { @@ -134,25 +174,76 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St } } + // Incremental: skip unchanged VARs to make "copy new release over old" fast. + if !full_rescan { + if let Ok(meta) = std::fs::metadata(var_file) { + let var_date = meta.modified().ok().map(format_system_time); + let fsize_mb = meta.len() as f64 / (1024.0 * 1024.0); + if let Some((db_var_date, db_fsize)) = existing_signatures.get(&basename) { + let date_matches = match (db_var_date.as_deref(), var_date.as_deref()) { + (Some(a), Some(b)) => a == b, + _ => false, + }; + let size_matches = match db_fsize { + Some(s) => (s - fsize_mb).abs() < 1e-9, + None => false, + }; + if date_matches && size_matches { + skipped += 1; + let progress = 10 + ((idx + 1) * 80 / total_vars) as u8; + if idx % 200 == 0 || idx + 1 == total_vars { + let elapsed = start_time.elapsed().as_secs_f64(); + let speed = + if elapsed > 0.0 { (idx + 1) as f64 / elapsed } else { 0.0 }; + let remaining = if speed > 0.0 { + (total_vars - idx - 1) as f64 / speed + } else { + 0.0 + }; + + reporter_async.progress(progress.min(90)); + reporter_async.log(format!( + "Scanning VARs: {}/{} ({:.1}%) | Processed: {} | Skipped: {} | Speed: {:.1} VAR/s | ETA: {:.0}s | Current: {}", + idx + 1, + total_vars, + (idx + 1) as f64 / total_vars as f64 * 100.0, + processed_count, + skipped, + speed, + remaining, + basename + )); + } + continue; + } + } + } + } + let result = process_var_file(&dependency_regex, &varspath_async, var_file); match result { - Ok(processed) => { - upsert_var(&mut tx, &processed.var_record).await?; + Ok(processed_var) => { + processed_count += 1; + upsert_var(&mut tx, &processed_var.var_record).await?; replace_dependencies( &mut tx, - &processed.var_record.var_name, - &processed.dependencies, + &processed_var.var_record.var_name, + &processed_var.dependencies, ) .await?; - replace_scenes(&mut tx, &processed.var_record.var_name, &processed.scenes) + replace_scenes( + &mut tx, + &processed_var.var_record.var_name, + &processed_var.scenes, + ) .await?; if let Some(vampath) = vampath_async.as_ref() { let entries = collect_hide_fav_records( vampath, - &processed.var_record.var_name, - &processed.scenes, + &processed_var.var_record.var_name, + &processed_var.scenes, ); - replace_hide_fav(&mut tx, &processed.var_record.var_name, &entries) + replace_hide_fav(&mut tx, &processed_var.var_record.var_name, &entries) .await?; } } @@ -189,9 +280,11 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St reporter_async.progress(progress.min(90)); reporter_async.log(format!( - "Processing VARs: {}/{} ({:.1}%) | Speed: {:.1} VAR/s | ETA: {:.0}s | Current: {}", + "Scanning VARs: {}/{} ({:.1}%) | Processed: {} | Skipped: {} | Speed: {:.1} VAR/s | ETA: {:.0}s | Current: {}", idx + 1, total_vars, (idx + 1) as f64 / total_vars as f64 * 100.0, + processed_count, + skipped, speed, remaining, basename @@ -231,13 +324,22 @@ fn update_db_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), St if total > 0 && (idx % 20 == 0 || idx + 1 == total) { let progress = 90 + ((idx + 1) * 5 / total) as u8; let elapsed = start_time.elapsed().as_secs_f64(); - let speed = if elapsed > 0.0 { (idx + 1) as f64 / elapsed } else { 0.0 }; - let remaining = if speed > 0.0 { (total - idx - 1) as f64 / speed } else { 0.0 }; + let speed = if elapsed > 0.0 { + (idx + 1) as f64 / elapsed + } else { + 0.0 + }; + let remaining = if speed > 0.0 { + (total - idx - 1) as f64 / speed + } else { + 0.0 + }; reporter.progress(progress.min(95)); reporter.log(format!( "Installing VARs: {}/{} ({:.1}%) | Speed: {:.1} VAR/s | ETA: {:.0}s", - idx + 1, total, + idx + 1, + total, (idx + 1) as f64 / total as f64 * 100.0, speed, remaining @@ -323,8 +425,7 @@ fn collect_hide_fav_records( scenes .iter() .filter_map(|scene| { - let (hide, fav) = - read_hide_fav_for_scene(vampath, var_name, &scene.scene_path); + let (hide, fav) = read_hide_fav_for_scene(vampath, var_name, &scene.scene_path); if hide || fav { Some(HideFavRecord { scene_path: scene.scene_path.clone(), @@ -414,11 +515,20 @@ fn tidy_vars( if idx % 200 == 0 && total > 0 { let elapsed = start_time.elapsed().as_secs_f64(); - let speed = if elapsed > 0.0 { (idx + 1) as f64 / elapsed } else { 0.0 }; - let remaining = if speed > 0.0 { (total - idx - 1) as f64 / speed } else { 0.0 }; + let speed = if elapsed > 0.0 { + (idx + 1) as f64 / elapsed + } else { + 0.0 + }; + let remaining = if speed > 0.0 { + (total - idx - 1) as f64 / speed + } else { + 0.0 + }; reporter.log(format!( "TidyVars: {}/{} ({:.1}%) | Speed: {:.1} VAR/s | ETA: {:.0}s", - idx + 1, total, + idx + 1, + total, (idx + 1) as f64 / total as f64 * 100.0, speed, remaining @@ -467,10 +577,7 @@ fn move_to_not_comply(varspath: &Path, src: &Path, reporter: &JobReporter) -> Re .map(|s| s.to_string_lossy().to_string()) .unwrap_or_else(|| "unknown.var".to_string()); let dest = unique_path(¬_comply_path, &filename); - reporter.log(format!( - "Move non-compliant var to {}", - dest.display() - )); + reporter.log(format!("Move non-compliant var to {}", dest.display())); move_file(src, &dest) } @@ -674,7 +781,6 @@ enum ProcessError { Io(String), } - fn is_invalid_var_archive(err: &str) -> bool { let err_lc = err.to_lowercase(); err_lc.contains("invalid local file header") @@ -710,10 +816,7 @@ fn process_var_file( let version = parts[2].to_string(); let meta = fs::metadata(var_file).map_err(|err| ProcessError::Io(err.to_string()))?; - let var_date = meta - .modified() - .ok() - .map(format_system_time); + let var_date = meta.modified().ok().map(format_system_time); // Calculate file size in MB let fsize_mb = meta.len() as f64 / (1024.0 * 1024.0); @@ -731,7 +834,9 @@ fn process_var_file( for i in 0..zip.len() { let entry_name = { - let entry = zip.by_index(i).map_err(|err| ProcessError::Io(err.to_string()))?; + let entry = zip + .by_index(i) + .map_err(|err| ProcessError::Io(err.to_string()))?; if entry.is_dir() { continue; } @@ -743,15 +848,8 @@ fn process_var_file( let (typename, is_preset) = entry_info; let count = counts.bump(typename); - let preview_pic = extract_preview( - &mut zip, - &entry_name, - varspath, - basename, - typename, - count, - ) - .ok(); + let preview_pic = + extract_preview(&mut zip, &entry_name, varspath, basename, typename, count).ok(); if is_scene_record_type(typename) { scenes.push(SceneRecord { @@ -820,10 +918,7 @@ async fn cleanup_missing_vars( if !exist_vars.contains(&var_name) { delete_var_related(tx, &var_name).await?; if let Err(err) = delete_preview_pics(varspath, &var_name) { - reporter.log(format!( - "delete preview pics failed {} ({})", - var_name, err - )); + reporter.log(format!("delete preview pics failed {} ({})", var_name, err)); } removed += 1; } @@ -836,7 +931,14 @@ async fn cleanup_missing_vars( fn delete_preview_pics(varspath: &Path, var_name: &str) -> Result<(), String> { let types = [ - "scenes", "looks", "hairstyle", "clothing", "assets", "morphs", "skin", "pose", + "scenes", + "looks", + "hairstyle", + "clothing", + "assets", + "morphs", + "skin", + "pose", ]; for typename in types { let dir = varspath.join(PREVIEW_DIR).join(typename).join(var_name); @@ -861,7 +963,10 @@ fn read_meta_json(zip: &mut ZipArchive>) -> Result Result { - let dot = entry_name.rfind('.').ok_or_else(|| "no extension".to_string())?; + let dot = entry_name + .rfind('.') + .ok_or_else(|| "no extension".to_string())?; let jpg_entry = format!("{}{}", &entry_name[..dot], ".jpg"); let mut jpg = zip .by_name(&jpg_entry) diff --git a/varmanager_flutter/lib/features/home/home_page.dart b/varmanager_flutter/lib/features/home/home_page.dart index c23e6e1..18a4947 100644 --- a/varmanager_flutter/lib/features/home/home_page.dart +++ b/varmanager_flutter/lib/features/home/home_page.dart @@ -39,6 +39,7 @@ class _HomePageState extends ConsumerState { bool _showAdvancedFilters = false; _ActionGroup _actionGroup = _ActionGroup.core; String _missingDepsScope = 'installed'; + bool _updateDbFullRescan = false; static const Duration _tooltipDelay = Duration(seconds: 1); @@ -821,7 +822,12 @@ class _HomePageState extends ConsumerState { onPressed: isBusy ? null : () async { - await _runJob('update_db'); + await _runJob( + 'update_db', + args: _updateDbFullRescan + ? const {'full_rescan': true} + : null, + ); ref.invalidate(varsListProvider); }, icon: const Icon(Icons.sync), @@ -832,6 +838,20 @@ class _HomePageState extends ConsumerState { ), ), ), + _withTooltip( + l10n.updateDbFullRescanTooltip, + FilterChip( + label: Text(l10n.updateDbFullRescanLabel), + selected: _updateDbFullRescan, + onSelected: isBusy + ? null + : (value) { + setState(() { + _updateDbFullRescan = value; + }); + }, + ), + ), _withTooltip( l10n.startVamTooltip, OutlinedButton.icon( diff --git a/varmanager_flutter/lib/l10n/app_en.arb b/varmanager_flutter/lib/l10n/app_en.arb index 5b4a430..631d1d0 100644 --- a/varmanager_flutter/lib/l10n/app_en.arb +++ b/varmanager_flutter/lib/l10n/app_en.arb @@ -149,6 +149,8 @@ "actionGroupMaintenanceTooltip": "Cleanup and maintenance jobs.", "updateDbLabel": "Update DB", "updateDbTooltip": "Scan vars, extract previews, and update the database.", + "updateDbFullRescanLabel": "Full rescan", + "updateDbFullRescanTooltip": "Force scanning all VARs (disable incremental skip).", "startVamLabel": "Start VaM", "startVamTooltip": "Launch the VaM application.", "prepareSavesLabel": "Prepare Saves", diff --git a/varmanager_flutter/lib/l10n/app_localizations.dart b/varmanager_flutter/lib/l10n/app_localizations.dart index 39f9e5f..ea04b2e 100644 --- a/varmanager_flutter/lib/l10n/app_localizations.dart +++ b/varmanager_flutter/lib/l10n/app_localizations.dart @@ -992,6 +992,18 @@ abstract class AppLocalizations { /// **'Scan vars, extract previews, and update the database.'** String get updateDbTooltip; + /// No description provided for @updateDbFullRescanLabel. + /// + /// In en, this message translates to: + /// **'Full rescan'** + String get updateDbFullRescanLabel; + + /// No description provided for @updateDbFullRescanTooltip. + /// + /// In en, this message translates to: + /// **'Force scanning all VARs (disable incremental skip).'** + String get updateDbFullRescanTooltip; + /// No description provided for @startVamLabel. /// /// In en, this message translates to: diff --git a/varmanager_flutter/lib/l10n/app_localizations_en.dart b/varmanager_flutter/lib/l10n/app_localizations_en.dart index 7041f26..6724bcd 100644 --- a/varmanager_flutter/lib/l10n/app_localizations_en.dart +++ b/varmanager_flutter/lib/l10n/app_localizations_en.dart @@ -476,6 +476,13 @@ class AppLocalizationsEn extends AppLocalizations { String get updateDbTooltip => 'Scan vars, extract previews, and update the database.'; + @override + String get updateDbFullRescanLabel => 'Full rescan'; + + @override + String get updateDbFullRescanTooltip => + 'Force scanning all VARs (disable incremental skip).'; + @override String get startVamLabel => 'Start VaM'; diff --git a/varmanager_flutter/lib/l10n/app_localizations_zh.dart b/varmanager_flutter/lib/l10n/app_localizations_zh.dart index a02609d..e5abd44 100644 --- a/varmanager_flutter/lib/l10n/app_localizations_zh.dart +++ b/varmanager_flutter/lib/l10n/app_localizations_zh.dart @@ -471,6 +471,12 @@ class AppLocalizationsZh extends AppLocalizations { @override String get updateDbTooltip => '鎵弿 Vars銆佹彁鍙栭瑙堝苟鏇存柊鏁版嵁搴撱'; + @override + String get updateDbFullRescanLabel => '鍏ㄩ噺閲嶆壂'; + + @override + String get updateDbFullRescanTooltip => '寮哄埗鎵弿鎵鏈 VAR锛堢鐢ㄥ閲忚烦杩囷級銆'; + @override String get startVamLabel => '鍚姩 VaM'; diff --git a/varmanager_flutter/lib/l10n/app_zh.arb b/varmanager_flutter/lib/l10n/app_zh.arb index 065c2b0..954c793 100644 --- a/varmanager_flutter/lib/l10n/app_zh.arb +++ b/varmanager_flutter/lib/l10n/app_zh.arb @@ -149,6 +149,8 @@ "actionGroupMaintenanceTooltip": "娓呯悊涓庣淮鎶や换鍔°", "updateDbLabel": "鏇存柊鏁版嵁搴", "updateDbTooltip": "鎵弿 Vars銆佹彁鍙栭瑙堝苟鏇存柊鏁版嵁搴撱", + "updateDbFullRescanLabel": "鍏ㄩ噺閲嶆壂", + "updateDbFullRescanTooltip": "寮哄埗鎵弿鎵鏈 VAR锛堢鐢ㄥ閲忚烦杩囷級銆", "startVamLabel": "鍚姩 VaM", "startVamTooltip": "鍚姩 VaM 搴旂敤銆", "prepareSavesLabel": "鍑嗗瀛樻。", From c90a471dfea5b0bfbedadbf5974cd8838be72175 Mon Sep 17 00:00:00 2001 From: DeniZz Date: Tue, 13 Jan 2026 15:13:21 +0500 Subject: [PATCH 10/10] fmt --- varManager_backend/src/api/mod.rs | 304 +++++++++++------- varManager_backend/src/app/mod.rs | 17 +- varManager_backend/src/domain/var_logic.rs | 17 +- varManager_backend/src/infra/db.rs | 44 +-- .../src/infra/download_manager.rs | 128 ++++---- varManager_backend/src/infra/downloader.rs | 72 ++--- .../src/infra/external_links.rs | 27 +- varManager_backend/src/infra/mod.rs | 2 +- varManager_backend/src/infra/system_ops.rs | 2 +- varManager_backend/src/infra/winfs.rs | 25 +- varManager_backend/src/jobs/deps_jobs.rs | 35 +- varManager_backend/src/jobs/hub.rs | 152 +++++---- varManager_backend/src/jobs/links.rs | 43 ++- varManager_backend/src/jobs/missing_deps.rs | 33 +- varManager_backend/src/jobs/packswitch.rs | 18 +- varManager_backend/src/jobs/preview_jobs.rs | 6 +- varManager_backend/src/jobs/stale_jobs.rs | 51 +-- varManager_backend/src/jobs/system_jobs.rs | 38 +-- varManager_backend/src/jobs/torrents.rs | 66 ++-- varManager_backend/src/jobs/vars_jobs.rs | 68 +++- varManager_backend/src/jobs/vars_misc.rs | 62 ++-- varManager_backend/src/main.rs | 24 +- varManager_backend/src/scenes/core.rs | 278 +++++++++++++--- varManager_backend/src/scenes/jobs.rs | 24 +- varManager_backend/src/scenes/mod.rs | 24 +- .../src/services/image_cache.rs | 134 ++++---- varManager_backend/src/util/mod.rs | 1 - varManager_backend/tests/torrent_scan.rs | 11 +- 28 files changed, 1013 insertions(+), 693 deletions(-) diff --git a/varManager_backend/src/api/mod.rs b/varManager_backend/src/api/mod.rs index 40945a7..fb2875a 100644 --- a/varManager_backend/src/api/mod.rs +++ b/varManager_backend/src/api/mod.rs @@ -5,9 +5,9 @@ use axum::{ response::{IntoResponse, Response}, Json, }; -use sqlx::{QueryBuilder, Row, SqlitePool}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; +use sqlx::{QueryBuilder, Row, SqlitePool}; use std::{ collections::HashMap, path::{Component, Path as StdPath, PathBuf}, @@ -17,15 +17,13 @@ use std::{ use tokio::sync::Semaphore; use walkdir::WalkDir; +use crate::app::{app_root, data_dir, AppState, Config, APP_VERSION}; +use crate::infra::db; +use crate::infra::download_manager::{DownloadAction, DownloadEnqueueItem, DownloadListResponse}; use crate::jobs::job_channel::{ min_job_log_level, JobLogsResponse, JobResultResponse, JobState, JobStatus, JobView, }; -use crate::infra::download_manager::{DownloadAction, DownloadEnqueueItem, DownloadListResponse}; -use crate::app::{app_root, data_dir, AppState, APP_VERSION, Config}; -use crate::infra::db; -use crate::services::image_cache::{ - CacheStats, ImageCacheError, ImageSource, ResolvedImageSource, -}; +use crate::services::image_cache::{CacheStats, ImageCacheError, ImageSource, ResolvedImageSource}; use crate::{jobs, scenes}; #[derive(Deserialize)] @@ -506,7 +504,11 @@ pub async fn get_job_logs( let request_from = query.from.unwrap_or(job.log_offset); let dropped = request_from < job.log_offset; - let from = if dropped { job.log_offset } else { request_from }; + let from = if dropped { + job.log_offset + } else { + request_from + }; let start = from.saturating_sub(job.log_offset); let entries = job .logs @@ -792,19 +794,39 @@ pub async fn list_vars( let mut conditions = Vec::new(); let mut params: Vec = Vec::new(); - if let Some(creator) = query.creator.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(creator) = query + .creator + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("v.creatorName = ?".to_string()); params.push(BindValue::Text(creator.to_string())); } - if let Some(package) = query.package.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(package) = query + .package + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("v.packageName LIKE ?".to_string()); params.push(BindValue::Text(format!("%{}%", package))); } - if let Some(version) = query.version.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(version) = query + .version + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("v.version LIKE ?".to_string()); params.push(BindValue::Text(format!("%{}%", version))); } - if let Some(search) = query.search.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(search) = query + .search + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("(v.varName LIKE ? OR v.packageName LIKE ?)".to_string()); let like = format!("%{}%", search); params.push(BindValue::Text(like.clone())); @@ -961,10 +983,7 @@ pub async fn list_vars( BindValue::Float(value) => count_query.bind(*value), }; } - let total: i64 = count_query - .fetch_one(pool) - .await - .map_err(internal_error)?; + let total: i64 = count_query.fetch_one(pool).await.map_err(internal_error)?; let total = total as u64; let sql = format!( @@ -1014,14 +1033,8 @@ pub async fn list_vars( appearance: row.try_get(19).map_err(internal_error)?, dependency_cnt: row.try_get(20).map_err(internal_error)?, fsize: row.try_get(21).map_err(internal_error)?, - installed: row - .try_get::(22) - .map_err(internal_error)? - != 0, - disabled: row - .try_get::(23) - .map_err(internal_error)? - != 0, + installed: row.try_get::(22).map_err(internal_error)? != 0, + disabled: row.try_get::(23).map_err(internal_error)? != 0, }); } @@ -1042,10 +1055,9 @@ pub async fn resolve_vars( let mut resolved = HashMap::new(); for name in req.names { - let value = - crate::domain::var_logic::resolve_var_exist_name(pool, &name) - .await - .unwrap_or_else(|_| "missing".to_string()); + let value = crate::domain::var_logic::resolve_var_exist_name(pool, &name) + .await + .unwrap_or_else(|_| "missing".to_string()); resolved.insert(name, value); } Ok(Json(ResolveVarsResponse { resolved })) @@ -1081,7 +1093,10 @@ pub async fn validate_output_dir( reason: Some("directory not empty".to_string()), })); } - Ok(Json(ValidateOutputResponse { ok: true, reason: None })) + Ok(Json(ValidateOutputResponse { + ok: true, + reason: None, + })) } pub async fn save_missing_map( @@ -1127,7 +1142,8 @@ pub async fn load_missing_map( if !path.is_absolute() { path = app_root().join(&path); } - let contents = std::fs::read_to_string(&path).map_err(|err| ApiError::not_found(err.to_string()))?; + let contents = + std::fs::read_to_string(&path).map_err(|err| ApiError::not_found(err.to_string()))?; let mut links = Vec::new(); for line in contents.lines() { let line = line.trim(); @@ -1243,22 +1259,19 @@ pub async fn get_var_detail( appearance: row.try_get(19).map_err(internal_error)?, dependency_cnt: row.try_get(20).map_err(internal_error)?, fsize: row.try_get(21).map_err(internal_error)?, - installed: row - .try_get::(22) - .map_err(internal_error)? - != 0, - disabled: row - .try_get::(23) - .map_err(internal_error)? - != 0, + installed: row.try_get::(22).map_err(internal_error)? != 0, + disabled: row.try_get::(23).map_err(internal_error)? != 0, }; - let dependencies = - list_dependencies_with_status(pool, &name).await.map_err(internal_error)?; - let dependents = - list_dependents_conn(pool, &name).await.map_err(internal_error)?; - let dependent_saves = - list_dependent_saves(pool, &name).await.map_err(internal_error)?; + let dependencies = list_dependencies_with_status(pool, &name) + .await + .map_err(internal_error)?; + let dependents = list_dependents_conn(pool, &name) + .await + .map_err(internal_error)?; + let dependent_saves = list_dependent_saves(pool, &name) + .await + .map_err(internal_error)?; let scenes = list_var_scenes(pool, &name).await.map_err(internal_error)?; Ok(Json(VarDetailResponse { @@ -1286,15 +1299,30 @@ pub async fn list_scenes( let mut conditions = Vec::new(); let mut params: Vec = Vec::new(); - if let Some(category) = query.category.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(category) = query + .category + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("s.atomType = ?".to_string()); params.push(BindValue::Text(category.to_string())); } - if let Some(creator) = query.creator.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(creator) = query + .creator + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("v.creatorName = ?".to_string()); params.push(BindValue::Text(creator.to_string())); } - if let Some(search) = query.search.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(search) = query + .search + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { conditions.push("(s.scenePath LIKE ? OR v.varName LIKE ?)".to_string()); let like = format!("%{}%", search); params.push(BindValue::Text(like.clone())); @@ -1357,7 +1385,13 @@ pub async fn list_scenes( for row in rows { let hide: i64 = row.try_get(13).map_err(internal_error)?; let fav: i64 = row.try_get(14).map_err(internal_error)?; - let hide_fav = if hide != 0 { -1 } else if fav != 0 { 1 } else { 0 }; + let hide_fav = if hide != 0 { + -1 + } else if fav != 0 { + 1 + } else { + 0 + }; let installed = row.try_get::(11).map_err(internal_error)? != 0; let location = if installed { "installed".to_string() @@ -1562,7 +1596,11 @@ fn load_save_scenes(vampath: &StdPath) -> Vec { let mut items = Vec::new(); let groups = vec![ ("scenes", vampath.join("Saves").join("scene"), "json"), - ("looks", vampath.join("Saves").join("Person").join("full"), "json"), + ( + "looks", + vampath.join("Saves").join("Person").join("full"), + "json", + ), ( "looks", vampath.join("Saves").join("Person").join("appearance"), @@ -1570,7 +1608,11 @@ fn load_save_scenes(vampath: &StdPath) -> Vec { ), ( "looks", - vampath.join("Custom").join("Atom").join("Person").join("Appearance"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Appearance"), "vap", ), ( @@ -1580,29 +1622,49 @@ fn load_save_scenes(vampath: &StdPath) -> Vec { ), ( "pose", - vampath.join("Custom").join("Atom").join("Person").join("Pose"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Pose"), "vap", ), ( "clothing", - vampath.join("Custom").join("Atom").join("Person").join("Clothing"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Clothing"), "vap", ), ("clothing", vampath.join("Custom").join("Clothing"), "vap"), ( "hairstyle", - vampath.join("Custom").join("Atom").join("Person").join("Hair"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Hair"), "vap", ), ("hairstyle", vampath.join("Custom").join("Hair"), "vap"), ( "morphs", - vampath.join("Custom").join("Atom").join("Person").join("Morphs"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Morphs"), "vap", ), ( "skin", - vampath.join("Custom").join("Atom").join("Person").join("Skin"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Skin"), "vap", ), ]; @@ -1664,10 +1726,7 @@ fn load_save_scenes(vampath: &StdPath) -> Vec { items } -async fn load_missing_link_scenes( - pool: &SqlitePool, - vampath: &StdPath, -) -> Vec { +async fn load_missing_link_scenes(pool: &SqlitePool, vampath: &StdPath) -> Vec { let mut items = Vec::new(); let root = crate::infra::paths::missing_links_dir(vampath); if !root.exists() { @@ -1700,7 +1759,7 @@ async fn load_missing_link_scenes( for var_name in vars { let rows = match sqlx::query( - "SELECT s.varName, s.atomType, s.previewPic, s.scenePath, s.isPreset, s.isLoadable, + "SELECT s.varName, s.atomType, s.previewPic, s.scenePath, s.isPreset, s.isLoadable, v.creatorName, v.packageName, v.metaDate, v.varDate, v.version, COALESCE(i.installed, 0), COALESCE(i.disabled, 0) FROM scenes s @@ -1724,8 +1783,7 @@ async fn load_missing_link_scenes( Ok(value) => value, Err(_) => continue, }; - let (hide, fav, hide_fav) = - read_hide_fav_for_var(vampath, &var_name, &scene_path); + let (hide, fav, hide_fav) = read_hide_fav_for_var(vampath, &var_name, &scene_path); items.push(SceneListItem { var_name, atom_type: row.try_get(1).unwrap_or_default(), @@ -1768,7 +1826,13 @@ fn read_hide_fav_for_var(vampath: &StdPath, var_name: &str, scene_path: &str) -> let pathfav = base.join(format!("{}.fav", scenename)); let hide = pathhide.exists(); let fav = pathfav.exists(); - let hide_fav = if hide { -1 } else if fav { 1 } else { 0 }; + let hide_fav = if hide { + -1 + } else if fav { + 1 + } else { + 0 + }; (hide, fav, hide_fav) } @@ -1783,7 +1847,13 @@ fn read_hide_fav_for_save(path: &StdPath) -> (bool, bool, i32) { )); let hide_exists = hide.exists(); let fav_exists = fav.exists(); - let hide_fav = if hide_exists { -1 } else if fav_exists { 1 } else { 0 }; + let hide_fav = if hide_exists { + -1 + } else if fav_exists { + 1 + } else { + 0 + }; (hide_exists, fav_exists, hide_fav) } @@ -1886,7 +1956,10 @@ pub async fn list_packswitch( } } } - if !switches.iter().any(|name| name.eq_ignore_ascii_case("default")) { + if !switches + .iter() + .any(|name| name.eq_ignore_ascii_case("default")) + { switches.push("default".to_string()); } switches.sort_by_key(|a| a.to_ascii_lowercase()); @@ -1923,9 +1996,8 @@ pub async fn list_var_dependencies( let pool = &state.db_pool; - let mut builder = QueryBuilder::new( - "SELECT varName, dependency FROM dependencies WHERE varName IN (", - ); + let mut builder = + QueryBuilder::new("SELECT varName, dependency FROM dependencies WHERE varName IN ("); let mut separated = builder.separated(", "); for name in &names { separated.push_bind(name); @@ -2066,15 +2138,18 @@ pub async fn get_analysis_summary( Ok(Json(summary)) } -pub async fn list_saves_tree( - State(state): State, -) -> ApiResult> { +pub async fn list_saves_tree(State(state): State) -> ApiResult> { let (_, vampath) = crate::infra::paths::config_paths(&state).map_err(internal_error)?; - let vampath = vampath - .ok_or_else(|| ApiError::bad_request("vampath is required in config.json"))?; + let vampath = + vampath.ok_or_else(|| ApiError::bad_request("vampath is required in config.json"))?; let groups = vec![ - ("scenes", "[Scenes]: ./Saves/scene", vampath.join("Saves").join("scene"), "json"), + ( + "scenes", + "[Scenes]: ./Saves/scene", + vampath.join("Saves").join("scene"), + "json", + ), ( "appearance", "[Appearance]: ./Saves/Person/appearance", @@ -2084,7 +2159,11 @@ pub async fn list_saves_tree( ( "presets", "[Appearance Presets]: ./Custom/Atom/Person/Appearance", - vampath.join("Custom").join("Atom").join("Person").join("Appearance"), + vampath + .join("Custom") + .join("Atom") + .join("Person") + .join("Appearance"), "vap", ), ]; @@ -2141,9 +2220,7 @@ pub async fn list_saves_tree( })) } -pub async fn get_stats( - State(state): State, -) -> ApiResult> { +pub async fn get_stats(State(state): State) -> ApiResult> { let _cfg = read_config(&state).map_err(internal_error)?; let pool = &state.db_pool; @@ -2151,18 +2228,16 @@ pub async fn get_stats( .fetch_one(pool) .await .map_err(internal_error)? as u64; - let vars_installed: u64 = sqlx::query_scalar::<_, i64>( - "SELECT COUNT(1) FROM installStatus WHERE installed = 1", - ) - .fetch_one(pool) - .await - .map_err(internal_error)? as u64; - let vars_disabled: u64 = sqlx::query_scalar::<_, i64>( - "SELECT COUNT(1) FROM installStatus WHERE disabled = 1", - ) - .fetch_one(pool) - .await - .map_err(internal_error)? as u64; + let vars_installed: u64 = + sqlx::query_scalar::<_, i64>("SELECT COUNT(1) FROM installStatus WHERE installed = 1") + .fetch_one(pool) + .await + .map_err(internal_error)? as u64; + let vars_disabled: u64 = + sqlx::query_scalar::<_, i64>("SELECT COUNT(1) FROM installStatus WHERE disabled = 1") + .fetch_one(pool) + .await + .map_err(internal_error)? as u64; let scenes_total: u64 = sqlx::query_scalar::<_, i64>("SELECT COUNT(1) FROM scenes") .fetch_one(pool) .await @@ -2218,7 +2293,10 @@ fn safe_join(base: &StdPath, relative: &str) -> Result { Ok(base.join(rel)) } -fn parse_image_source(state: &AppState, query: PreviewQuery) -> Result { +fn parse_image_source( + state: &AppState, + query: PreviewQuery, +) -> Result { if let Some(source) = query .source .as_ref() @@ -2310,9 +2388,7 @@ fn resolve_local_source( fn map_image_cache_error(err: ImageCacheError) -> ApiError { match err { ImageCacheError::NotFound(message) => ApiError::not_found(message), - ImageCacheError::Network(message) => { - ApiError::new(StatusCode::BAD_GATEWAY, message) - } + ImageCacheError::Network(message) => ApiError::new(StatusCode::BAD_GATEWAY, message), ImageCacheError::HttpStatus { status, url } => ApiError::new( StatusCode::BAD_GATEWAY, format!("upstream status {} for {}", status, url), @@ -2329,9 +2405,7 @@ fn map_image_cache_error(err: ImageCacheError) -> ApiError { } } -pub async fn get_cache_stats( - State(state): State, -) -> ApiResult> { +pub async fn get_cache_stats(State(state): State) -> ApiResult> { let stats = state.image_cache.stats().await.map_err(internal_error)?; Ok(Json(stats)) } @@ -2368,8 +2442,7 @@ async fn list_dependencies_with_status( .try_get::, _>(0) .map_err(|err| err.to_string())? { - let mut resolved = - crate::domain::var_logic::resolve_var_exist_name(pool, &dep).await?; + let mut resolved = crate::domain::var_logic::resolve_var_exist_name(pool, &dep).await?; let mut closest = false; if resolved.ends_with('$') { closest = true; @@ -2387,10 +2460,7 @@ async fn list_dependencies_with_status( Ok(result) } -async fn list_dependents_conn( - pool: &SqlitePool, - var_name: &str, -) -> Result, String> { +async fn list_dependents_conn(pool: &SqlitePool, var_name: &str) -> Result, String> { let mut names = Vec::new(); let targets = dependency_targets(pool, var_name).await?; for dep in targets { @@ -2413,10 +2483,7 @@ async fn list_dependents_conn( Ok(names) } -async fn list_dependent_saves( - pool: &SqlitePool, - var_name: &str, -) -> Result, String> { +async fn list_dependent_saves(pool: &SqlitePool, var_name: &str) -> Result, String> { let mut names = Vec::new(); let targets = dependency_targets(pool, var_name).await?; for dep in targets { @@ -2453,32 +2520,19 @@ async fn list_var_scenes( let mut items = Vec::new(); for row in rows { items.push(ScenePreviewItem { - atom_type: row - .try_get::(0) - .map_err(|err| err.to_string())?, + atom_type: row.try_get::(0).map_err(|err| err.to_string())?, preview_pic: row .try_get::, _>(1) .map_err(|err| err.to_string())?, - scene_path: row - .try_get::(2) - .map_err(|err| err.to_string())?, - is_preset: row - .try_get::(3) - .map_err(|err| err.to_string())? - != 0, - is_loadable: row - .try_get::(4) - .map_err(|err| err.to_string())? - != 0, + scene_path: row.try_get::(2).map_err(|err| err.to_string())?, + is_preset: row.try_get::(3).map_err(|err| err.to_string())? != 0, + is_loadable: row.try_get::(4).map_err(|err| err.to_string())? != 0, }); } Ok(items) } -async fn dependency_targets( - pool: &SqlitePool, - var_name: &str, -) -> Result, String> { +async fn dependency_targets(pool: &SqlitePool, var_name: &str) -> Result, String> { let parts: Vec<&str> = var_name.split('.').collect(); if parts.len() != 3 { return Ok(vec![var_name.to_string()]); diff --git a/varManager_backend/src/app/mod.rs b/varManager_backend/src/app/mod.rs index 9e36c8f..2579884 100644 --- a/varManager_backend/src/app/mod.rs +++ b/varManager_backend/src/app/mod.rs @@ -5,10 +5,7 @@ use sqlx::SqlitePool; use std::{ env, path::PathBuf, - sync::{ - atomic::AtomicU64, - Arc, RwLock, - }, + sync::{atomic::AtomicU64, Arc, RwLock}, }; use sysinfo::{Pid, ProcessesToUpdate, System}; use tokio::{ @@ -57,8 +54,16 @@ impl ProxyConfig { } else { host.to_string() }; - let username = self.username.as_ref().map(|v| v.trim()).filter(|v| !v.is_empty()); - let password = self.password.as_ref().map(|v| v.trim()).filter(|v| !v.is_empty()); + let username = self + .username + .as_ref() + .map(|v| v.trim()) + .filter(|v| !v.is_empty()); + let password = self + .password + .as_ref() + .map(|v| v.trim()) + .filter(|v| !v.is_empty()); let mut auth = String::new(); if let Some(user) = username { auth.push_str(user); diff --git a/varManager_backend/src/domain/var_logic.rs b/varManager_backend/src/domain/var_logic.rs index 9823235..c2006d7 100644 --- a/varManager_backend/src/domain/var_logic.rs +++ b/varManager_backend/src/domain/var_logic.rs @@ -2,10 +2,7 @@ use crate::infra::db::list_var_versions; use sqlx::{Row, SqlitePool}; use std::collections::HashSet; -pub async fn resolve_var_exist_name( - pool: &SqlitePool, - var_name: &str, -) -> Result { +pub async fn resolve_var_exist_name(pool: &SqlitePool, var_name: &str) -> Result { let parts: Vec<&str> = var_name.split('.').collect(); if parts.len() != 3 { return Ok("missing".to_string()); @@ -222,13 +219,11 @@ async fn list_dependencies_for_var( } async fn var_exists(pool: &SqlitePool, var_name: &str) -> Result { - let exists = sqlx::query_scalar::<_, i64>( - "SELECT 1 FROM vars WHERE varName = ?1 LIMIT 1", - ) - .bind(var_name) - .fetch_optional(pool) - .await - .map_err(|err| err.to_string())?; + let exists = sqlx::query_scalar::<_, i64>("SELECT 1 FROM vars WHERE varName = ?1 LIMIT 1") + .bind(var_name) + .fetch_optional(pool) + .await + .map_err(|err| err.to_string())?; Ok(exists.is_some()) } diff --git a/varManager_backend/src/infra/db.rs b/varManager_backend/src/infra/db.rs index aeab9e6..2502fe0 100644 --- a/varManager_backend/src/infra/db.rs +++ b/varManager_backend/src/infra/db.rs @@ -210,13 +210,11 @@ pub async fn ensure_schema(pool: &SqlitePool) -> Result<(), String> { } pub async fn var_exists_conn(pool: &SqlitePool, var_name: &str) -> Result { - let exists = sqlx::query_scalar::<_, i64>( - "SELECT 1 FROM vars WHERE varName = ?1 LIMIT 1", - ) - .bind(var_name) - .fetch_optional(pool) - .await - .map_err(|err| err.to_string())?; + let exists = sqlx::query_scalar::<_, i64>("SELECT 1 FROM vars WHERE varName = ?1 LIMIT 1") + .bind(var_name) + .fetch_optional(pool) + .await + .map_err(|err| err.to_string())?; Ok(exists.is_some()) } @@ -257,9 +255,7 @@ pub async fn list_dependencies_all(pool: &SqlitePool) -> Result, Str Ok(deps) } -pub async fn list_dependencies_for_installed( - pool: &SqlitePool, -) -> Result, String> { +pub async fn list_dependencies_for_installed(pool: &SqlitePool) -> Result, String> { let rows = sqlx::query( "SELECT d.dependency FROM dependencies d \ JOIN installStatus i ON d.varName = i.varName \ @@ -285,9 +281,8 @@ pub async fn list_dependencies_for_vars( if var_names.is_empty() { return Ok(Vec::new()); } - let mut builder = sqlx::QueryBuilder::new( - "SELECT dependency FROM dependencies WHERE varName IN (", - ); + let mut builder = + sqlx::QueryBuilder::new("SELECT dependency FROM dependencies WHERE varName IN ("); let mut separated = builder.separated(", "); for name in var_names { separated.push_bind(name); @@ -440,16 +435,14 @@ pub async fn replace_hide_fav( if !entry.hide && !entry.fav { continue; } - sqlx::query( - "INSERT INTO HideFav (varName, scenePath, hide, fav) VALUES (?1, ?2, ?3, ?4)", - ) - .bind(var_name) - .bind(&entry.scene_path) - .bind(if entry.hide { 1 } else { 0 }) - .bind(if entry.fav { 1 } else { 0 }) - .execute(tx.as_mut()) - .await - .map_err(|err| err.to_string())?; + sqlx::query("INSERT INTO HideFav (varName, scenePath, hide, fav) VALUES (?1, ?2, ?3, ?4)") + .bind(var_name) + .bind(&entry.scene_path) + .bind(if entry.hide { 1 } else { 0 }) + .bind(if entry.fav { 1 } else { 0 }) + .execute(tx.as_mut()) + .await + .map_err(|err| err.to_string())?; } Ok(()) } @@ -488,10 +481,7 @@ pub async fn delete_var_related( Ok(()) } -pub async fn delete_var_related_conn( - pool: &SqlitePool, - var_name: &str, -) -> Result<(), String> { +pub async fn delete_var_related_conn(pool: &SqlitePool, var_name: &str) -> Result<(), String> { sqlx::query("DELETE FROM dependencies WHERE varName = ?1") .bind(var_name) .execute(pool) diff --git a/varManager_backend/src/infra/download_manager.rs b/varManager_backend/src/infra/download_manager.rs index 75ac680..ba63b87 100644 --- a/varManager_backend/src/infra/download_manager.rs +++ b/varManager_backend/src/infra/download_manager.rs @@ -3,14 +3,12 @@ use crate::infra::downloader::{ ensure_dir, finalize_download, is_retryable_error, resolve_download_save_path_config, resolve_file_info, resolve_final_url_with_retry, }; -use http_downloader::{ - speed_limiter::DownloadSpeedLimiterExtension, - speed_tracker::DownloadSpeedTrackerExtension, - status_tracker::DownloadStatusTrackerExtension, - DownloadingEndCause, HttpDownloaderBuilder, -}; use dashmap::DashMap; use headers::{HeaderMap, HeaderName, HeaderValue}; +use http_downloader::{ + speed_limiter::DownloadSpeedLimiterExtension, speed_tracker::DownloadSpeedTrackerExtension, + status_tracker::DownloadStatusTrackerExtension, DownloadingEndCause, HttpDownloaderBuilder, +}; use reqwest::Client; use serde::Serialize; use sqlx::{Row, SqlitePool}; @@ -211,7 +209,9 @@ impl DownloadManager { }; for row in rows { - let status: String = row.try_get("status").unwrap_or_else(|_| "queued".to_string()); + let status: String = row + .try_get("status") + .unwrap_or_else(|_| "queued".to_string()); let downloaded_bytes: i64 = row.try_get("downloaded_bytes").unwrap_or(0); let total_bytes: Option = row.try_get("total_bytes").ok(); let speed_bytes: i64 = row.try_get("speed_bytes").unwrap_or(0); @@ -312,13 +312,11 @@ impl DownloadManager { async fn delete_ids(&self, ids: Vec) -> Result<(), String> { for id in ids { self.cancel_active(id).await; - let row = sqlx::query( - "SELECT save_path, temp_path FROM downloads WHERE id = ?1", - ) - .bind(id) - .fetch_optional(&self.db_pool) - .await - .map_err(|err| err.to_string())?; + let row = sqlx::query("SELECT save_path, temp_path FROM downloads WHERE id = ?1") + .bind(id) + .fetch_optional(&self.db_pool) + .await + .map_err(|err| err.to_string())?; if let Some(row) = row { let save_path: Option = row.try_get("save_path").ok(); let temp_path: Option = row.try_get("temp_path").ok(); @@ -360,13 +358,11 @@ impl DownloadManager { if self.active.contains_key(&id) { return Ok(()); } - let row = sqlx::query( - "SELECT url, name FROM downloads WHERE id = ?1", - ) - .bind(id) - .fetch_optional(&self.db_pool) - .await - .map_err(|err| err.to_string())?; + let row = sqlx::query("SELECT url, name FROM downloads WHERE id = ?1") + .bind(id) + .fetch_optional(&self.db_pool) + .await + .map_err(|err| err.to_string())?; let Some(row) = row else { return Ok(()); }; @@ -376,12 +372,7 @@ impl DownloadManager { return Ok(()); } let (cancel_tx, cancel_rx) = watch::channel(false); - self.active.insert( - id, - DownloadHandle { - cancel: cancel_tx, - }, - ); + self.active.insert(id, DownloadHandle { cancel: cancel_tx }); let db_pool = self.db_pool.clone(); let client = Arc::clone(&self.client); let config = Arc::clone(&self.config); @@ -392,7 +383,13 @@ impl DownloadManager { let _permit = match semaphore.acquire().await { Ok(permit) => permit, Err(_) => { - let _ = update_status(&db_pool, id, "failed", Some("failed to acquire download slot".to_string())).await; + let _ = update_status( + &db_pool, + id, + "failed", + Some("failed to acquire download slot".to_string()), + ) + .await; active.remove(&id); return; } @@ -441,7 +438,8 @@ async fn download_with_progress( // Priority: Content-Disposition filename > name_hint > URL filename // Content-Disposition from server is the most accurate source - let final_name = if filename != "default_filename" && filename.to_lowercase().ends_with(".var") { + let final_name = if filename != "default_filename" && filename.to_lowercase().ends_with(".var") + { // Server returned a valid .var filename, use it filename } else if let Some(hint) = name_hint { @@ -580,20 +578,29 @@ fn download_temp_path(url: &Url, save_dir: &Path) -> PathBuf { fn read_runtime_config(config: &Arc>) -> DownloadRuntimeConfig { let defaults = crate::app::DownloadConfig::default(); - let cfg = config.read().map(|guard| guard.download.clone()).unwrap_or(defaults.clone()); - let concurrency = if cfg.concurrency >= 1 { cfg.concurrency } else { defaults.concurrency }; - let connection_count = NonZeroU8::new(cfg.connection_count.max(1)).unwrap_or_else(|| { - NonZeroU8::new(defaults.connection_count.max(1)).unwrap() - }); - let chunk_mb = if cfg.chunk_size_mb >= 1 { cfg.chunk_size_mb } else { defaults.chunk_size_mb }; + let cfg = config + .read() + .map(|guard| guard.download.clone()) + .unwrap_or(defaults.clone()); + let concurrency = if cfg.concurrency >= 1 { + cfg.concurrency + } else { + defaults.concurrency + }; + let connection_count = NonZeroU8::new(cfg.connection_count.max(1)) + .unwrap_or_else(|| NonZeroU8::new(defaults.connection_count.max(1)).unwrap()); + let chunk_mb = if cfg.chunk_size_mb >= 1 { + cfg.chunk_size_mb + } else { + defaults.chunk_size_mb + }; let mut chunk_bytes = chunk_mb.saturating_mul(1024 * 1024); if chunk_bytes == 0 { chunk_bytes = 1024 * 1024; } let chunk_bytes = chunk_bytes.min(usize::MAX as u64) as usize; - let chunk_size = NonZeroUsize::new(chunk_bytes).unwrap_or_else(|| { - NonZeroUsize::new(1024 * 1024).unwrap() - }); + let chunk_size = + NonZeroUsize::new(chunk_bytes).unwrap_or_else(|| NonZeroUsize::new(1024 * 1024).unwrap()); let http_timeout_secs = if cfg.http_timeout_secs > 0 { cfg.http_timeout_secs } else { @@ -647,7 +654,10 @@ fn hub_headers_compat() -> HeaderMap { HeaderName::from_static("cookie"), HeaderValue::from_static("vamhubconsent=yes"), ); - headers.insert(HeaderName::from_static("dnt"), HeaderValue::from_static("1")); + headers.insert( + HeaderName::from_static("dnt"), + HeaderValue::from_static("1"), + ); headers.insert( HeaderName::from_static("sec-ch-ua"), HeaderValue::from_static( @@ -698,16 +708,14 @@ async fn update_status( error: Option, ) -> Result<(), String> { let now = now_ts(); - sqlx::query( - "UPDATE downloads SET status = ?1, error = ?2, updated_at = ?3 WHERE id = ?4", - ) - .bind(status) - .bind(error) - .bind(now) - .bind(id) - .execute(db_pool) - .await - .map_err(|err| err.to_string())?; + sqlx::query("UPDATE downloads SET status = ?1, error = ?2, updated_at = ?3 WHERE id = ?4") + .bind(status) + .bind(error) + .bind(now) + .bind(id) + .execute(db_pool) + .await + .map_err(|err| err.to_string())?; Ok(()) } @@ -733,21 +741,15 @@ async fn update_progress( Ok(()) } -async fn update_total_bytes( - db_pool: &SqlitePool, - id: i64, - total: u64, -) -> Result<(), String> { +async fn update_total_bytes(db_pool: &SqlitePool, id: i64, total: u64) -> Result<(), String> { let now = now_ts(); - sqlx::query( - "UPDATE downloads SET total_bytes = ?1, updated_at = ?2 WHERE id = ?3", - ) - .bind(total as i64) - .bind(now) - .bind(id) - .execute(db_pool) - .await - .map_err(|err| err.to_string())?; + sqlx::query("UPDATE downloads SET total_bytes = ?1, updated_at = ?2 WHERE id = ?3") + .bind(total as i64) + .bind(now) + .bind(id) + .execute(db_pool) + .await + .map_err(|err| err.to_string())?; Ok(()) } diff --git a/varManager_backend/src/infra/downloader.rs b/varManager_backend/src/infra/downloader.rs index 47cb69f..712d8a3 100644 --- a/varManager_backend/src/infra/downloader.rs +++ b/varManager_backend/src/infra/downloader.rs @@ -4,10 +4,8 @@ use crate::app::{app_root, AppState}; use crate::infra::paths::addon_packages_dir; use crate::jobs::job_channel::JobReporter; use http_downloader::{ - speed_limiter::DownloadSpeedLimiterExtension, - speed_tracker::DownloadSpeedTrackerExtension, - status_tracker::DownloadStatusTrackerExtension, - DownloadingEndCause, HttpDownloaderBuilder, + speed_limiter::DownloadSpeedLimiterExtension, speed_tracker::DownloadSpeedTrackerExtension, + status_tracker::DownloadStatusTrackerExtension, DownloadingEndCause, HttpDownloaderBuilder, }; use percent_encoding::percent_decode; use regex::Regex; @@ -150,7 +148,10 @@ pub async fn download_urls( )); if summary.failed > 0 && !failures.is_empty() { for failure in failures { - reporter.log(format!("Failure sample: {} -> {}", failure.url, failure.error)); + reporter.log(format!( + "Failure sample: {} -> {}", + failure.url, failure.error + )); } } @@ -180,7 +181,10 @@ pub(crate) fn ensure_dir(path: &Path) -> Result<(), String> { if path.is_dir() { return Ok(()); } - return Err(format!("save path exists but is not a directory: {}", path.display())); + return Err(format!( + "save path exists but is not a directory: {}", + path.display() + )); } fs::create_dir_all(path).map_err(|err| err.to_string()) } @@ -231,26 +235,23 @@ async fn download_one( let mut attempt: u8 = 0; loop { attempt += 1; - let result = timeout( - Duration::from_secs(PER_FILE_TIMEOUT_SECS), - async { - let (mut downloader, (_status_state, _speed_state, _speed_limiter, ..)) = - HttpDownloaderBuilder::new(download_url_obj.clone(), save_dir.clone()) - .chunk_size(NonZeroUsize::new(1024 * 1024 * 10).unwrap()) - .download_connection_count(NonZeroU8::new(4).unwrap()) - .build(( - DownloadStatusTrackerExtension { log: false }, - DownloadSpeedTrackerExtension { log: false }, - DownloadSpeedLimiterExtension::new(None), - )); - - let download_future = downloader - .prepare_download() - .map_err(|err| err.to_string())?; - let dec = download_future.await.map_err(|err| err.to_string())?; - Ok::(dec) - }, - ) + let result = timeout(Duration::from_secs(PER_FILE_TIMEOUT_SECS), async { + let (mut downloader, (_status_state, _speed_state, _speed_limiter, ..)) = + HttpDownloaderBuilder::new(download_url_obj.clone(), save_dir.clone()) + .chunk_size(NonZeroUsize::new(1024 * 1024 * 10).unwrap()) + .download_connection_count(NonZeroU8::new(4).unwrap()) + .build(( + DownloadStatusTrackerExtension { log: false }, + DownloadSpeedTrackerExtension { log: false }, + DownloadSpeedLimiterExtension::new(None), + )); + + let download_future = downloader + .prepare_download() + .map_err(|err| err.to_string())?; + let dec = download_future.await.map_err(|err| err.to_string())?; + Ok::(dec) + }) .await; match result { @@ -267,10 +268,7 @@ async fn download_one( tokio::time::sleep(Duration::from_secs(2)).await; continue; } - return Err(format!( - "download timed out after {} attempts", - attempt - )); + return Err(format!("download timed out after {} attempts", attempt)); } } } @@ -311,7 +309,10 @@ pub(crate) async fn resolve_final_url_with_retry( if !response.status().is_success() { let status = response.status(); let body = response.text().await.unwrap_or_default(); - return Err(format!("GET {} failed with status {}: {}", url, status, body)); + return Err(format!( + "GET {} failed with status {}: {}", + url, status, body + )); } Ok(url.to_string()) } @@ -448,10 +449,7 @@ pub(crate) fn hub_headers() -> header::HeaderMap { header::ACCEPT_ENCODING, "gzip, deflate, br, zstd".parse().unwrap(), ); - headers.insert( - header::ACCEPT_LANGUAGE, - "en-US,en;q=0.9".parse().unwrap(), - ); + headers.insert(header::ACCEPT_LANGUAGE, "en-US,en;q=0.9".parse().unwrap()); headers.insert(header::COOKIE, "vamhubconsent=yes".parse().unwrap()); headers.insert(header::DNT, "1".parse().unwrap()); headers.insert( @@ -502,7 +500,9 @@ pub(crate) fn resolve_download_save_path(state: &AppState) -> Result Result { +pub(crate) fn resolve_download_save_path_config( + cfg: &crate::app::Config, +) -> Result { if let Some(path) = cfg .downloader_save_path .as_ref() diff --git a/varManager_backend/src/infra/external_links.rs b/varManager_backend/src/infra/external_links.rs index efc99f8..4b9d503 100644 --- a/varManager_backend/src/infra/external_links.rs +++ b/varManager_backend/src/infra/external_links.rs @@ -66,10 +66,9 @@ pub fn scan_torrents_only(packages: &[String]) -> Result"']+"##) - .map_err(|err| err.to_string())?; + let var_re = + Regex::new(r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var") + .map_err(|err| err.to_string())?; + let url_re = Regex::new(r##"(?i)https?://[^\s\]\)>"']+"##).map_err(|err| err.to_string())?; let mut allowed = options.sources.clone(); if allowed.is_empty() { @@ -255,7 +252,10 @@ fn trim_url(value: &str) -> String { let mut trimmed = value.trim().to_string(); loop { let last = trimmed.chars().last(); - if matches!(last, Some('.') | Some(',') | Some(')') | Some(']') | Some('>') | Some('"') | Some('\'')) { + if matches!( + last, + Some('.') | Some(',') | Some(')') | Some(']') | Some('>') | Some('"') | Some('\'') + ) { trimmed.pop(); continue; } @@ -266,10 +266,7 @@ fn trim_url(value: &str) -> String { fn apply_pixeldrain_bypass(url: &str) -> String { let replaced = url.replace("pixeldrain.com/u/", "pixeldrain.sriflix.my/"); - replaced.replace( - "pixeldrain.com/api/file/", - "pixeldrain.sriflix.my/", - ) + replaced.replace("pixeldrain.com/api/file/", "pixeldrain.sriflix.my/") } fn insert_url( diff --git a/varManager_backend/src/infra/mod.rs b/varManager_backend/src/infra/mod.rs index 042240b..ef435fe 100644 --- a/varManager_backend/src/infra/mod.rs +++ b/varManager_backend/src/infra/mod.rs @@ -1,6 +1,6 @@ pub mod db; -pub mod downloader; pub mod download_manager; +pub mod downloader; pub mod external_links; pub mod fs_util; pub mod paths; diff --git a/varManager_backend/src/infra/system_ops.rs b/varManager_backend/src/infra/system_ops.rs index c972148..d56a776 100644 --- a/varManager_backend/src/infra/system_ops.rs +++ b/varManager_backend/src/infra/system_ops.rs @@ -1,5 +1,5 @@ -use crate::infra::paths::loadscene_path; use crate::app::AppState; +use crate::infra::paths::loadscene_path; use serde_json::json; use std::fs; use std::path::{Path, PathBuf}; diff --git a/varManager_backend/src/infra/winfs.rs b/varManager_backend/src/infra/winfs.rs index fae0b19..4ad1301 100644 --- a/varManager_backend/src/infra/winfs.rs +++ b/varManager_backend/src/infra/winfs.rs @@ -8,10 +8,10 @@ use windows::Win32::Foundation::{ WIN32_ERROR, }; use windows::Win32::Storage::FileSystem::{ - CreateFileW, CreateSymbolicLinkW, SetFileTime, FILE_ATTRIBUTE_NORMAL, FILE_FLAG_BACKUP_SEMANTICS, - FILE_FLAG_OPEN_REPARSE_POINT, FILE_SHARE_DELETE, FILE_SHARE_READ, FILE_SHARE_WRITE, - FILE_WRITE_ATTRIBUTES, OPEN_EXISTING, SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, - SYMBOLIC_LINK_FLAG_DIRECTORY, SYMBOLIC_LINK_FLAGS, + CreateFileW, CreateSymbolicLinkW, SetFileTime, FILE_ATTRIBUTE_NORMAL, + FILE_FLAG_BACKUP_SEMANTICS, FILE_FLAG_OPEN_REPARSE_POINT, FILE_SHARE_DELETE, FILE_SHARE_READ, + FILE_SHARE_WRITE, FILE_WRITE_ATTRIBUTES, OPEN_EXISTING, SYMBOLIC_LINK_FLAGS, + SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, SYMBOLIC_LINK_FLAG_DIRECTORY, }; const WINDOWS_EPOCH_OFFSET_SECS: u64 = 11_644_473_600; @@ -45,7 +45,12 @@ pub fn set_symlink_file_times( None, ) } - .map_err(|err| format!("CreateFileW for file time failed ({}).", format_hresult_error(err)))?; + .map_err(|err| { + format!( + "CreateFileW for file time failed ({}).", + format_hresult_error(err) + ) + })?; let creation = system_time_to_filetime(created); let last_write = system_time_to_filetime(modified); @@ -54,11 +59,17 @@ pub fn set_symlink_file_times( if let Err(err) = close_result { if set_result.is_ok() { - return Err(format!("CloseHandle failed ({}).", format_hresult_error(err))); + return Err(format!( + "CloseHandle failed ({}).", + format_hresult_error(err) + )); } } if let Err(err) = set_result { - return Err(format!("SetFileTime failed ({}).", format_hresult_error(err))); + return Err(format!( + "SetFileTime failed ({}).", + format_hresult_error(err) + )); } Ok(()) diff --git a/varManager_backend/src/jobs/deps_jobs.rs b/varManager_backend/src/jobs/deps_jobs.rs index bf0c7cc..cb0ae18 100644 --- a/varManager_backend/src/jobs/deps_jobs.rs +++ b/varManager_backend/src/jobs/deps_jobs.rs @@ -1,20 +1,20 @@ +use crate::app::AppState; +use crate::domain::var_logic::{resolve_var_exist_name, vars_dependencies}; use crate::infra::db::upsert_install_status; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{config_paths, resolve_var_file_path, INSTALL_LINK_DIR}; -use crate::domain::var_logic::{resolve_var_exist_name, vars_dependencies}; -use crate::app::AppState; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use chrono::{DateTime, Local}; use regex::Regex; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::{Row, SqlitePool}; use std::collections::HashSet; use std::fs; use std::io::Read; use std::path::{Path, PathBuf}; use walkdir::WalkDir; -use sqlx::{Row, SqlitePool}; #[derive(Deserialize)] struct SavesDepsArgs {} @@ -60,7 +60,11 @@ pub async fn run_log_deps_job( .map_err(|err| err.to_string())? } -fn saves_deps_blocking(state: &AppState, reporter: &JobReporter, _args: SavesDepsArgs) -> Result<(), String> { +fn saves_deps_blocking( + state: &AppState, + reporter: &JobReporter, + _args: SavesDepsArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; reporter.log("SavesDeps start".to_string()); @@ -116,14 +120,13 @@ fn saves_deps_blocking(state: &AppState, reporter: &JobReporter, _args: SavesDep let installed = collect_installed_names(&vampath); dependencies.retain(|dep| !installed.contains(dep)); - let (missing, installed_now) = - handle.block_on(install_missing_dependencies( - reporter, - pool, - &varspath, - &vampath, - &dependencies, - ))?; + let (missing, installed_now) = handle.block_on(install_missing_dependencies( + reporter, + pool, + &varspath, + &vampath, + &dependencies, + ))?; reporter.set_result( serde_json::to_value(DepsJobResult { @@ -139,7 +142,11 @@ fn saves_deps_blocking(state: &AppState, reporter: &JobReporter, _args: SavesDep Ok(()) } -fn log_deps_blocking(state: &AppState, reporter: &JobReporter, _args: LogDepsArgs) -> Result<(), String> { +fn log_deps_blocking( + state: &AppState, + reporter: &JobReporter, + _args: LogDepsArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; reporter.log("LogDeps start".to_string()); diff --git a/varManager_backend/src/jobs/hub.rs b/varManager_backend/src/jobs/hub.rs index 6ae2467..c5667c3 100644 --- a/varManager_backend/src/jobs/hub.rs +++ b/varManager_backend/src/jobs/hub.rs @@ -1,30 +1,30 @@ -use crate::jobs::job_channel::JobReporter; -use crate::domain::var_logic::resolve_var_exist_name; use crate::app::AppState; +use crate::domain::var_logic::resolve_var_exist_name; use crate::infra::external_links::{ - scan_external_links, - scan_torrents_only, - ExternalLinksOptions, - ExternalLinksResult, + scan_external_links, scan_torrents_only, ExternalLinksOptions, ExternalLinksResult, ExternalSource, }; +use crate::jobs::job_channel::JobReporter; use reqwest::blocking::Client; use reqwest::header; +use scraper::{Html, Selector}; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; +use sqlx::{QueryBuilder, Row, SqlitePool}; use std::cmp::Ordering; use std::collections::{HashMap, HashSet}; use std::sync::{Mutex, OnceLock}; use std::time::{Duration, SystemTime}; -use scraper::{Html, Selector}; -use sqlx::{QueryBuilder, Row, SqlitePool}; const HUB_API: &str = "https://hub.virtamate.com/citizenx/api.php"; const HUB_PACKAGES: &str = "https://s3cdn.virtamate.com/data/packages.json"; type DownloadUrlMaps = (HashMap, HashMap); -type DownloadUrlMapsWithSizes = - (HashMap, HashMap, HashMap); +type DownloadUrlMapsWithSizes = ( + HashMap, + HashMap, + HashMap, +); #[derive(Deserialize)] pub struct HubFindPackagesArgs { @@ -112,8 +112,8 @@ pub async fn run_hub_missing_scan_job( args: Option, ) -> Result<(), String> { tokio::task::spawn_blocking(move || { - let args: HubFindPackagesArgs = - args.map_or_else( + let args: HubFindPackagesArgs = args + .map_or_else( || { Ok(HubFindPackagesArgs { packages: Vec::new(), @@ -137,11 +137,9 @@ pub async fn run_hub_updates_scan_job( reporter: JobReporter, _args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - updates_scan_blocking(&state, &reporter) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || updates_scan_blocking(&state, &reporter)) + .await + .map_err(|err| err.to_string())? } pub async fn run_hub_download_all_job( @@ -179,7 +177,8 @@ pub async fn run_hub_resources_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "hub_resources args required".to_string())?; - let query: HubResourcesQuery = serde_json::from_value(args).map_err(|err| err.to_string())?; + let query: HubResourcesQuery = + serde_json::from_value(args).map_err(|err| err.to_string())?; let resources = get_resources(query)?; reporter.set_result(resources); Ok(()) @@ -234,10 +233,7 @@ pub async fn run_hub_overview_panel_job( let args: HubResourceDetailArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; let overview_data = get_overview_panel(&args.resource_id)?; - reporter.set_result( - serde_json::to_value(&overview_data) - .map_err(|err| err.to_string())?, - ); + reporter.set_result(serde_json::to_value(&overview_data).map_err(|err| err.to_string())?); Ok(()) }) .await @@ -269,7 +265,10 @@ pub async fn run_hub_find_packages_job( match scan_torrents_only(&args.packages) { Ok(result) => { merge_torrent_hits(&mut torrent_hits, result.torrent_hits); - merge_torrent_hits(&mut torrent_hits_no_version, result.torrent_hits_no_version); + merge_torrent_hits( + &mut torrent_hits_no_version, + result.torrent_hits_no_version, + ); } Err(err) => { reporter.log(format!("Torrent scan warning: {}", err)); @@ -290,9 +289,15 @@ pub async fn run_hub_find_packages_job( let mut external_sources = HashSet::new(); for source_str in &args.external_sources { match source_str.as_str() { - "pixeldrain" => { external_sources.insert(ExternalSource::Pixeldrain); } - "mediafire" => { external_sources.insert(ExternalSource::Mediafire); } - _ => { reporter.log(format!("Unknown external source: {}", source_str)); } + "pixeldrain" => { + external_sources.insert(ExternalSource::Pixeldrain); + } + "mediafire" => { + external_sources.insert(ExternalSource::Mediafire); + } + _ => { + reporter.log(format!("Unknown external source: {}", source_str)); + } } } @@ -334,7 +339,10 @@ pub async fn run_hub_find_packages_job( // Torrent hits: always include (informational only) merge_torrent_hits(&mut torrent_hits, external_result.torrent_hits); - merge_torrent_hits(&mut torrent_hits_no_version, external_result.torrent_hits_no_version); + merge_torrent_hits( + &mut torrent_hits_no_version, + external_result.torrent_hits_no_version, + ); } // Step 5: Return merged result @@ -363,7 +371,10 @@ fn merge_torrent_hits( for (key, values) in incoming { let entry = target.entry(key).or_insert_with(Vec::new); for value in values { - if entry.iter().any(|existing| existing.eq_ignore_ascii_case(&value)) { + if entry + .iter() + .any(|existing| existing.eq_ignore_ascii_case(&value)) + { continue; } entry.push(value); @@ -419,7 +430,9 @@ fn updates_scan_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), let name = filename.trim_end_matches(".var"); if let Some((base, version)) = split_var_version(name) { if let Ok(ver) = version.parse::() { - let entry = newest_by_package.entry(base.to_string()).or_insert((ver, download_id.clone())); + let entry = newest_by_package + .entry(base.to_string()) + .or_insert((ver, download_id.clone())); if ver > entry.0 { *entry = (ver, download_id.clone()); } @@ -472,13 +485,23 @@ async fn download_all_async( if url.is_empty() { continue; } - let entry = merged.entry(url.clone()).or_insert(crate::infra::download_manager::DownloadEnqueueItem { - url: url.clone(), - name: item.name.clone(), - size: item.size, - }); - if entry.name.as_ref().map(|v| v.trim().is_empty()).unwrap_or(true) - && item.name.as_ref().map(|v| !v.trim().is_empty()).unwrap_or(false) + let entry = merged.entry(url.clone()).or_insert( + crate::infra::download_manager::DownloadEnqueueItem { + url: url.clone(), + name: item.name.clone(), + size: item.size, + }, + ); + if entry + .name + .as_ref() + .map(|v| v.trim().is_empty()) + .unwrap_or(true) + && item + .name + .as_ref() + .map(|v| !v.trim().is_empty()) + .unwrap_or(false) { entry.name = item.name.clone(); } @@ -493,11 +516,13 @@ async fn download_all_async( if trimmed.is_empty() { continue; } - merged.entry(trimmed.clone()).or_insert(crate::infra::download_manager::DownloadEnqueueItem { - url: trimmed, - name: None, - size: None, - }); + merged.entry(trimmed.clone()).or_insert( + crate::infra::download_manager::DownloadEnqueueItem { + url: trimmed, + name: None, + size: None, + }, + ); } } if merged.is_empty() { @@ -609,7 +634,9 @@ pub fn search_hub_options( if refresh || guard.is_none() { *guard = Some(load_hub_options(refresh)?); } - let options = guard.clone().ok_or_else(|| "hub options empty".to_string())?; + let options = guard + .clone() + .ok_or_else(|| "hub options empty".to_string())?; let mut items = match kind { "location" => options.locations, "paytype" => options.pay_types, @@ -725,9 +752,7 @@ pub fn get_resource_detail(resource_id: &str) -> Result { resp.json::().map_err(|err| err.to_string()) } -pub fn find_packages_maps( - packages: &[String], -) -> Result { +pub fn find_packages_maps(packages: &[String]) -> Result { if packages.is_empty() { return Ok((HashMap::new(), HashMap::new())); } @@ -819,16 +844,10 @@ fn parse_file_size(value: Option<&Value>) -> Option { if let Some(size) = value.as_i64() { return Some(size); } - value - .as_str() - .and_then(|size| size.parse::().ok()) + value.as_str().and_then(|size| size.parse::().ok()) } -fn record_download_size( - download_sizes: &mut HashMap, - url: &str, - size: Option, -) { +fn record_download_size(download_sizes: &mut HashMap, url: &str, size: Option) { let Some(size) = size else { return }; if size <= 0 { return; @@ -958,10 +977,7 @@ fn hub_headers() -> header::HeaderMap { .parse() .unwrap(), ); - headers.insert( - header::ACCEPT_LANGUAGE, - "en-US,en;q=0.9".parse().unwrap(), - ); + headers.insert(header::ACCEPT_LANGUAGE, "en-US,en;q=0.9".parse().unwrap()); headers.insert(header::COOKIE, "vamhubconsent=yes".parse().unwrap()); headers.insert( header::USER_AGENT, @@ -973,7 +989,10 @@ fn hub_headers() -> header::HeaderMap { } pub fn get_overview_panel(resource_id: &str) -> Result { - let url = format!("https://hub.virtamate.com/resources/{}/overview-panel", resource_id); + let url = format!( + "https://hub.virtamate.com/resources/{}/overview-panel", + resource_id + ); let client = Client::new(); let response = client @@ -983,7 +1002,10 @@ pub fn get_overview_panel(resource_id: &str) -> Result Result Result = None; let ld_selector = Selector::parse("script[type=\"application/ld+json\"]").unwrap(); for element in document.select(&ld_selector) { - let json_text = element.text().collect::>().join("").trim().to_string(); + let json_text = element + .text() + .collect::>() + .join("") + .trim() + .to_string(); if json_text.is_empty() { continue; } diff --git a/varManager_backend/src/jobs/links.rs b/varManager_backend/src/jobs/links.rs index 8f52a65..fbf531a 100644 --- a/varManager_backend/src/jobs/links.rs +++ b/varManager_backend/src/jobs/links.rs @@ -1,9 +1,11 @@ +use crate::app::AppState; use crate::infra::db::{upsert_install_status, var_exists_conn}; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; -use crate::infra::paths::{config_paths, resolve_var_file_path, INSTALL_LINK_DIR, MISSING_LINK_DIR}; -use crate::app::AppState; +use crate::infra::paths::{ + config_paths, resolve_var_file_path, INSTALL_LINK_DIR, MISSING_LINK_DIR, +}; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use serde::{Deserialize, Serialize}; use serde_json::Value; use std::fs; @@ -67,9 +69,13 @@ pub async fn run_rebuild_links_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args - .map(|value| serde_json::from_value::(value).map_err(|e| e.to_string())) + .map(|value| { + serde_json::from_value::(value).map_err(|e| e.to_string()) + }) .transpose()? - .unwrap_or(RebuildLinksArgs { include_missing: true }); + .unwrap_or(RebuildLinksArgs { + include_missing: true, + }); rebuild_links_blocking(&state, &reporter, args) }) .await @@ -104,7 +110,11 @@ pub async fn run_missing_links_create_job( .map_err(|err| err.to_string())? } -fn rebuild_links_blocking(state: &AppState, reporter: &JobReporter, args: RebuildLinksArgs) -> Result<(), String> { +fn rebuild_links_blocking( + state: &AppState, + reporter: &JobReporter, + args: RebuildLinksArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; reporter.log("RebuildLinks start".to_string()); @@ -135,11 +145,7 @@ fn rebuild_links_blocking(state: &AppState, reporter: &JobReporter, args: Rebuil let target = match winfs::read_link_target(link_path) { Ok(target) => target, Err(err) => { - reporter.log(format!( - "skip non-link {} ({})", - link_path.display(), - err - )); + reporter.log(format!("skip non-link {} ({})", link_path.display(), err)); skipped += 1; continue; } @@ -221,7 +227,11 @@ fn rebuild_links_blocking(state: &AppState, reporter: &JobReporter, args: Rebuil Ok(()) } -fn move_links_blocking(state: &AppState, reporter: &JobReporter, args: MoveLinksArgs) -> Result<(), String> { +fn move_links_blocking( + state: &AppState, + reporter: &JobReporter, + args: MoveLinksArgs, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let target_dir = args.target_dir.trim(); @@ -352,7 +362,10 @@ fn find_link_path(root: &Path, var_name: &str) -> Option { let walker = WalkDir::new(root).follow_links(false).into_iter(); for entry in walker.filter_map(|e| e.ok()) { if entry.file_type().is_file() - && entry.file_name().to_string_lossy().eq_ignore_ascii_case(&target) + && entry + .file_name() + .to_string_lossy() + .eq_ignore_ascii_case(&target) { return Some(entry.path().to_path_buf()); } @@ -364,7 +377,9 @@ fn find_missing_matches(root: &Path, missing_var: &str) -> Vec { let mut matches = Vec::new(); let is_latest = missing_var.to_ascii_lowercase().ends_with(".latest"); let target_base = if is_latest { - missing_var.rsplit_once('.').map(|(base, _)| base.to_string()) + missing_var + .rsplit_once('.') + .map(|(base, _)| base.to_string()) } else { None }; diff --git a/varManager_backend/src/jobs/missing_deps.rs b/varManager_backend/src/jobs/missing_deps.rs index 2c8ac4a..0a2236a 100644 --- a/varManager_backend/src/jobs/missing_deps.rs +++ b/varManager_backend/src/jobs/missing_deps.rs @@ -1,16 +1,16 @@ +use crate::app::AppState; use crate::infra::db::{ list_dependencies_all, list_dependencies_for_installed, list_dependencies_for_vars, list_var_versions, upsert_install_status, var_exists_conn, }; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{config_paths, resolve_var_file_path, INSTALL_LINK_DIR}; -use crate::app::AppState; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::SqlitePool; use std::fs; use std::path::Path; -use sqlx::SqlitePool; #[derive(Deserialize)] struct MissingDepsArgs { @@ -35,15 +35,18 @@ pub async fn run_missing_deps_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "missing_deps args required".to_string())?; - let args: MissingDepsArgs = - serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: MissingDepsArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; missing_deps_blocking(&state, &reporter, args) }) .await .map_err(|err| err.to_string())? } -fn missing_deps_blocking(state: &AppState, reporter: &JobReporter, args: MissingDepsArgs) -> Result<(), String> { +fn missing_deps_blocking( + state: &AppState, + reporter: &JobReporter, + args: MissingDepsArgs, +) -> Result<(), String> { reporter.log(format!("MissingDeps start: scope={}", args.scope)); reporter.progress(1); @@ -139,14 +142,16 @@ fn missing_deps_blocking(state: &AppState, reporter: &JobReporter, args: Missing install_failed.sort(); install_failed.dedup(); - reporter.set_result(serde_json::to_value(MissingDepsResult { - scope: args.scope, - missing, - installed, - install_failed, - dependency_count: total, - }) - .map_err(|err| err.to_string())?); + reporter.set_result( + serde_json::to_value(MissingDepsResult { + scope: args.scope, + missing, + installed, + install_failed, + dependency_count: total, + }) + .map_err(|err| err.to_string())?, + ); reporter.progress(100); reporter.log("MissingDeps completed".to_string()); diff --git a/varManager_backend/src/jobs/packswitch.rs b/varManager_backend/src/jobs/packswitch.rs index fd585db..840414e 100644 --- a/varManager_backend/src/jobs/packswitch.rs +++ b/varManager_backend/src/jobs/packswitch.rs @@ -1,14 +1,14 @@ +use crate::app::AppState; use crate::infra::db::{upsert_install_status, var_exists_conn}; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{addon_packages_dir, addon_switch_root, config_paths}; -use crate::app::AppState; use crate::infra::{system_ops, winfs}; +use crate::jobs::job_channel::JobReporter; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::SqlitePool; use std::fs; use std::path::Path; -use sqlx::SqlitePool; #[derive(Deserialize)] struct PackSwitchArgs { @@ -88,7 +88,11 @@ pub async fn run_packswitch_set_job( .map_err(|err| err.to_string())? } -fn add_switch_blocking(state: &AppState, reporter: &JobReporter, args: PackSwitchArgs) -> Result<(), String> { +fn add_switch_blocking( + state: &AppState, + reporter: &JobReporter, + args: PackSwitchArgs, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let name = args.name.trim(); @@ -111,7 +115,11 @@ fn add_switch_blocking(state: &AppState, reporter: &JobReporter, args: PackSwitc Ok(()) } -fn delete_switch_blocking(state: &AppState, reporter: &JobReporter, args: PackSwitchArgs) -> Result<(), String> { +fn delete_switch_blocking( + state: &AppState, + reporter: &JobReporter, + args: PackSwitchArgs, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let name = args.name.trim(); diff --git a/varManager_backend/src/jobs/preview_jobs.rs b/varManager_backend/src/jobs/preview_jobs.rs index 56c3b91..bada293 100644 --- a/varManager_backend/src/jobs/preview_jobs.rs +++ b/varManager_backend/src/jobs/preview_jobs.rs @@ -1,13 +1,13 @@ -use crate::jobs::job_channel::JobReporter; -use crate::infra::paths::{config_paths, resolve_var_file_path, PREVIEW_DIR}; use crate::app::AppState; +use crate::infra::paths::{config_paths, resolve_var_file_path, PREVIEW_DIR}; +use crate::jobs::job_channel::JobReporter; use serde::Serialize; use serde_json::Value; +use sqlx::{Row, SqlitePool}; use std::fs::{self, File}; use std::io::{BufReader, Write}; use std::path::{Path, PathBuf}; use zip::ZipArchive; -use sqlx::{Row, SqlitePool}; #[derive(Serialize)] struct FixPreviewResult { diff --git a/varManager_backend/src/jobs/stale_jobs.rs b/varManager_backend/src/jobs/stale_jobs.rs index a51f6e0..0fcfd61 100644 --- a/varManager_backend/src/jobs/stale_jobs.rs +++ b/varManager_backend/src/jobs/stale_jobs.rs @@ -1,15 +1,15 @@ +use crate::app::AppState; use crate::infra::db::{delete_var_related_conn, upsert_install_status}; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{config_paths, resolve_var_file_path, OLD_VERSION_DIR, STALE_DIR}; -use crate::app::AppState; use crate::infra::{system_ops, winfs}; +use crate::jobs::job_channel::JobReporter; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::{Row, SqlitePool}; use std::collections::HashMap; use std::fs; use std::path::Path; -use sqlx::{Row, SqlitePool}; #[derive(Deserialize)] struct StaleVarsArgs { @@ -89,7 +89,10 @@ struct VarInfo { look: i64, } -fn stale_vars_blocking(state: &AppState, reporter: &JobReporter) -> Result { +fn stale_vars_blocking( + state: &AppState, + reporter: &JobReporter, +) -> Result { reporter.log("StaleVars start".to_string()); reporter.progress(1); let (varspath, vampath) = config_paths(state)?; @@ -153,7 +156,10 @@ fn stale_vars_blocking(state: &AppState, reporter: &JobReporter) -> Result Result { +fn old_version_vars_blocking( + state: &AppState, + reporter: &JobReporter, +) -> Result { reporter.log("OldVersionVars start".to_string()); reporter.progress(1); let (varspath, vampath) = config_paths(state)?; @@ -279,9 +285,7 @@ async fn load_vars(pool: &SqlitePool, filter_old: bool) -> Result, Ok(vars) } -fn find_old_versions( - vars: &[VarInfo], -) -> (Vec, HashMap) { +fn find_old_versions(vars: &[VarInfo]) -> (Vec, HashMap) { let mut grouped: HashMap> = HashMap::new(); for info in vars { let key = format!("{}.{}", info.creator, info.package); @@ -305,21 +309,15 @@ fn find_old_versions( } async fn has_dependents(pool: &SqlitePool, var_name: &str) -> Result { - let count: i64 = sqlx::query_scalar( - "SELECT COUNT(1) FROM dependencies WHERE dependency = ?1", - ) - .bind(var_name) - .fetch_one(pool) - .await - .map_err(|err| err.to_string())?; + let count: i64 = sqlx::query_scalar("SELECT COUNT(1) FROM dependencies WHERE dependency = ?1") + .bind(var_name) + .fetch_one(pool) + .await + .map_err(|err| err.to_string())?; Ok(count > 0) } -async fn cleanup_var( - pool: &SqlitePool, - varspath: &Path, - var_name: &str, -) -> Result<(), String> { +async fn cleanup_var(pool: &SqlitePool, varspath: &Path, var_name: &str) -> Result<(), String> { delete_var_related_conn(pool, var_name).await?; sqlx::query("DELETE FROM installStatus WHERE varName = ?1") .bind(var_name) @@ -332,7 +330,14 @@ async fn cleanup_var( fn delete_preview_pics(varspath: &Path, var_name: &str) -> Result<(), String> { let types = [ - "scenes", "looks", "hairstyle", "clothing", "assets", "morphs", "skin", "pose", + "scenes", + "looks", + "hairstyle", + "clothing", + "assets", + "morphs", + "skin", + "pose", ]; for typename in types { let dir = varspath @@ -356,7 +361,9 @@ async fn install_var( vampath: &Path, var_name: &str, ) -> Result<(), String> { - let link_dir = vampath.join("AddonPackages").join(crate::infra::paths::INSTALL_LINK_DIR); + let link_dir = vampath + .join("AddonPackages") + .join(crate::infra::paths::INSTALL_LINK_DIR); fs::create_dir_all(&link_dir).map_err(|err| err.to_string())?; let link_path = link_dir.join(format!("{}.var", var_name)); if link_path.exists() { diff --git a/varManager_backend/src/jobs/system_jobs.rs b/varManager_backend/src/jobs/system_jobs.rs index 7e52ad3..1da3622 100644 --- a/varManager_backend/src/jobs/system_jobs.rs +++ b/varManager_backend/src/jobs/system_jobs.rs @@ -1,7 +1,7 @@ -use crate::jobs::job_channel::JobReporter; use crate::app::data_dir; use crate::app::AppState; use crate::infra::system_ops; +use crate::jobs::job_channel::JobReporter; use crate::util; use serde::{Deserialize, Serialize}; use serde_json::Value; @@ -38,16 +38,16 @@ pub async fn run_vam_start_job( reporter: JobReporter, _args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - vam_start_blocking(&state, &reporter) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || vam_start_blocking(&state, &reporter)) + .await + .map_err(|err| err.to_string())? } fn vam_start_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), String> { system_ops::start_vam(state)?; - reporter.set_result(serde_json::to_value(StartResult { started: true }).map_err(|e| e.to_string())?); + reporter.set_result( + serde_json::to_value(StartResult { started: true }).map_err(|e| e.to_string())?, + ); Ok(()) } @@ -56,11 +56,9 @@ pub async fn run_rescan_packages_job( reporter: JobReporter, _args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - rescan_packages_blocking(&state, &reporter) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || rescan_packages_blocking(&state, &reporter)) + .await + .map_err(|err| err.to_string())? } fn rescan_packages_blocking(state: &AppState, reporter: &JobReporter) -> Result<(), String> { @@ -74,11 +72,9 @@ pub async fn run_open_url_job( reporter: JobReporter, args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - open_url_blocking(&reporter, args) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || open_url_blocking(&reporter, args)) + .await + .map_err(|err| err.to_string())? } pub async fn run_open_torrents_job( @@ -86,11 +82,9 @@ pub async fn run_open_torrents_job( reporter: JobReporter, args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - open_torrents_blocking(&reporter, args) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || open_torrents_blocking(&reporter, args)) + .await + .map_err(|err| err.to_string())? } fn open_url_blocking(reporter: &JobReporter, args: Option) -> Result<(), String> { diff --git a/varManager_backend/src/jobs/torrents.rs b/varManager_backend/src/jobs/torrents.rs index 5ae7afb..1d6399d 100644 --- a/varManager_backend/src/jobs/torrents.rs +++ b/varManager_backend/src/jobs/torrents.rs @@ -75,11 +75,16 @@ async fn torrent_download_async( let (varspath, _) = config_paths(state)?; let temp_dir = torrent_download_dir(); - fs::create_dir_all(&temp_dir).await.map_err(|err| err.to_string())?; + fs::create_dir_all(&temp_dir) + .await + .map_err(|err| err.to_string())?; let torrents_root = data_dir().join("links").join("torrents"); if !tokio::fs::try_exists(&torrents_root).await.unwrap_or(false) { - return Err(format!("torrents directory missing: {}", torrents_root.display())); + return Err(format!( + "torrents directory missing: {}", + torrents_root.display() + )); } let mut requested: HashMap> = HashMap::new(); @@ -124,9 +129,11 @@ async fn torrent_download_async( } }; - if let Some(entry) = meta.files.iter().find(|entry| { - entry.file_name.eq_ignore_ascii_case(&target) - }) { + if let Some(entry) = meta + .files + .iter() + .find(|entry| entry.file_name.eq_ignore_ascii_case(&target)) + { found = Some(ResolvedEntry { var_name: var_name.to_string(), torrent_name: torrent_name.to_string(), @@ -155,7 +162,9 @@ async fn torrent_download_async( } let temp_torrent_dir = temp_dir.join(".torrents"); - fs::create_dir_all(&temp_torrent_dir).await.map_err(|err| err.to_string())?; + fs::create_dir_all(&temp_torrent_dir) + .await + .map_err(|err| err.to_string())?; let total_targets: usize = by_torrent.values().map(|v| v.len()).sum(); let mut completed_targets = 0usize; @@ -185,10 +194,10 @@ async fn torrent_download_async( } // Register torrent download - let var_names: Vec = entries.iter() - .map(|e| e.var_name.clone()) - .collect(); - state.torrent_tracker.register(torrent_name.clone(), var_names); + let var_names: Vec = entries.iter().map(|e| e.var_name.clone()).collect(); + state + .torrent_tracker + .register(torrent_name.clone(), var_names); reporter.log(format!( "aria2 start: {} target(s) from {}", @@ -210,8 +219,7 @@ async fn torrent_download_async( .collect::>() .join(","); - let temp_torrent_path = - temp_torrent_dir_clone.join(unique_torrent_name(&torrent_name)); + let temp_torrent_path = temp_torrent_dir_clone.join(unique_torrent_name(&torrent_name)); if let Err(e) = fs::copy(&torrent_path, &temp_torrent_path).await { return Err((torrent_name, vec![], format!("Copy failed: {}", e))); @@ -225,10 +233,7 @@ async fn torrent_download_async( .arg("--seed-time=0") .arg("--seed-ratio=0.0") .arg("--bt-stop-timeout=0") - .arg(format!( - "--stop-with-process={}", - std::process::id() - )) + .arg(format!("--stop-with-process={}", std::process::id())) .arg("--dir") .arg(&temp_dir_clone) .arg(format!("--select-file={}", indices)) @@ -282,7 +287,12 @@ async fn torrent_download_async( // Unregister from tracker state_clone.torrent_tracker.unregister(&torrent_name); - Ok::<_, (String, Vec, String)>((torrent_name, moved, move_errors, skipped_count)) + Ok::<_, (String, Vec, String)>(( + torrent_name, + moved, + move_errors, + skipped_count, + )) }); handles.push(handle); @@ -317,10 +327,7 @@ async fn torrent_download_async( } if !failed.is_empty() { - reporter.log(format!( - "torrent download failures: {}", - failed.join(", ") - )); + reporter.log(format!("torrent download failures: {}", failed.join(", "))); } reporter.set_result( @@ -338,8 +345,7 @@ async fn torrent_download_async( fn parse_torrent(path: &Path) -> Result { let data = std::fs::read(path).map_err(|err| err.to_string())?; - let value: BencodeValue = - serde_bencode::from_bytes(&data).map_err(|err| err.to_string())?; + let value: BencodeValue = serde_bencode::from_bytes(&data).map_err(|err| err.to_string())?; let info = match value { BencodeValue::Dict(map) => dict_get(&map, "info") .ok_or_else(|| format!("torrent missing info: {}", path.display()))? @@ -382,9 +388,8 @@ fn parse_torrent(path: &Path) -> Result { relative.push(&text); file_name = Some(text); } - let file_name = file_name.ok_or_else(|| { - format!("torrent path empty: {}", path.display()) - })?; + let file_name = + file_name.ok_or_else(|| format!("torrent path empty: {}", path.display()))?; files.push(TorrentFileEntry { index: idx + 1, relative_path: relative, @@ -402,18 +407,13 @@ fn parse_torrent(path: &Path) -> Result { Ok(TorrentMeta { files }) } -fn dict_get<'a>( - map: &'a HashMap, BencodeValue>, - key: &str, -) -> Option<&'a BencodeValue> { +fn dict_get<'a>(map: &'a HashMap, BencodeValue>, key: &str) -> Option<&'a BencodeValue> { map.get(key.as_bytes()) } fn bencode_str(value: &BencodeValue) -> Option { match value { - BencodeValue::Bytes(bytes) => { - Some(String::from_utf8_lossy(bytes).to_string()) - } + BencodeValue::Bytes(bytes) => Some(String::from_utf8_lossy(bytes).to_string()), _ => None, } } diff --git a/varManager_backend/src/jobs/vars_jobs.rs b/varManager_backend/src/jobs/vars_jobs.rs index 5ebd25f..d45dc18 100644 --- a/varManager_backend/src/jobs/vars_jobs.rs +++ b/varManager_backend/src/jobs/vars_jobs.rs @@ -1,16 +1,16 @@ +use crate::app::AppState; +use crate::domain::var_logic::{implicated_vars, vars_dependencies}; use crate::infra::db::{self, delete_var_related_conn, upsert_install_status}; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{config_paths, resolve_var_file_path, DELETED_DIR, INSTALL_LINK_DIR}; -use crate::domain::var_logic::{implicated_vars, vars_dependencies}; -use crate::app::AppState; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::SqlitePool; use std::fs; use std::path::Path; use std::time::Instant; -use sqlx::SqlitePool; #[derive(Deserialize)] struct InstallVarsArgs { @@ -98,7 +98,8 @@ pub async fn run_uninstall_vars_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "uninstall_vars args required".to_string())?; - let args: UninstallVarsArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: UninstallVarsArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; uninstall_vars_blocking(&state, &reporter, args) }) .await @@ -119,7 +120,11 @@ pub async fn run_delete_vars_job( .map_err(|err| err.to_string())? } -fn install_vars_blocking(state: &AppState, reporter: &JobReporter, args: InstallVarsArgs) -> Result<(), String> { +fn install_vars_blocking( + state: &AppState, + reporter: &JobReporter, + args: InstallVarsArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; reporter.log("InstallVars start".to_string()); @@ -178,7 +183,11 @@ fn install_vars_blocking(state: &AppState, reporter: &JobReporter, args: Install Ok(()) } -fn uninstall_vars_blocking(state: &AppState, reporter: &JobReporter, args: UninstallVarsArgs) -> Result<(), String> { +fn uninstall_vars_blocking( + state: &AppState, + reporter: &JobReporter, + args: UninstallVarsArgs, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let started = Instant::now(); @@ -266,8 +275,12 @@ fn uninstall_vars_blocking(state: &AppState, reporter: &JobReporter, args: Unins } reporter.set_result( - serde_json::to_value(UninstallVarsResult { total, removed, skipped }) - .map_err(|err| err.to_string())?, + serde_json::to_value(UninstallVarsResult { + total, + removed, + skipped, + }) + .map_err(|err| err.to_string())?, ); reporter.progress(100); @@ -285,14 +298,19 @@ pub async fn run_preview_uninstall_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "preview_uninstall args required".to_string())?; - let args: PreviewUninstallArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: PreviewUninstallArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; preview_uninstall_blocking(&state, &reporter, args) }) .await .map_err(|err| err.to_string())? } -fn preview_uninstall_blocking(state: &AppState, reporter: &JobReporter, args: PreviewUninstallArgs) -> Result<(), String> { +fn preview_uninstall_blocking( + state: &AppState, + reporter: &JobReporter, + args: PreviewUninstallArgs, +) -> Result<(), String> { let started = Instant::now(); reporter.log("PreviewUninstall start".to_string()); reporter.progress(1); @@ -392,7 +410,11 @@ fn preview_uninstall_blocking(state: &AppState, reporter: &JobReporter, args: Pr Ok(()) } -fn delete_vars_blocking(state: &AppState, reporter: &JobReporter, args: DeleteVarsArgs) -> Result<(), String> { +fn delete_vars_blocking( + state: &AppState, + reporter: &JobReporter, + args: DeleteVarsArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; reporter.log("DeleteVars start".to_string()); @@ -449,8 +471,12 @@ fn delete_vars_blocking(state: &AppState, reporter: &JobReporter, args: DeleteVa } reporter.set_result( - serde_json::to_value(DeleteVarsResult { total, deleted, failed }) - .map_err(|err| err.to_string())?, + serde_json::to_value(DeleteVarsResult { + total, + deleted, + failed, + }) + .map_err(|err| err.to_string())?, ); reporter.progress(100); @@ -530,10 +556,20 @@ async fn remove_install_status(pool: &SqlitePool, var_name: &str) -> Result<(), fn delete_preview_pics(varspath: &Path, var_name: &str) -> Result<(), String> { let types = [ - "scenes", "looks", "hairstyle", "clothing", "assets", "morphs", "skin", "pose", + "scenes", + "looks", + "hairstyle", + "clothing", + "assets", + "morphs", + "skin", + "pose", ]; for typename in types { - let dir = varspath.join(crate::infra::paths::PREVIEW_DIR).join(typename).join(var_name); + let dir = varspath + .join(crate::infra::paths::PREVIEW_DIR) + .join(typename) + .join(var_name); if dir.exists() { fs::remove_dir_all(&dir).map_err(|err| err.to_string())?; } diff --git a/varManager_backend/src/jobs/vars_misc.rs b/varManager_backend/src/jobs/vars_misc.rs index 262a5db..b10b659 100644 --- a/varManager_backend/src/jobs/vars_misc.rs +++ b/varManager_backend/src/jobs/vars_misc.rs @@ -1,16 +1,16 @@ +use crate::app::AppState; +use crate::domain::var_logic::{implicated_vars, vars_dependencies}; use crate::infra::db::{upsert_install_status, var_exists_conn}; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; use crate::infra::paths::{config_paths, resolve_var_file_path, INSTALL_LINK_DIR}; -use crate::domain::var_logic::{implicated_vars, vars_dependencies}; -use crate::app::AppState; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use crate::util; use serde::{Deserialize, Serialize}; use serde_json::Value; +use sqlx::{Row, SqlitePool}; use std::fs; use std::path::{Path, PathBuf}; -use sqlx::{Row, SqlitePool}; #[derive(Deserialize)] struct ExportInstalledArgs { @@ -74,7 +74,8 @@ pub async fn run_export_installed_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "vars_export_installed args required".to_string())?; - let args: ExportInstalledArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: ExportInstalledArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; export_installed_blocking(&state, &reporter, args) }) .await @@ -102,7 +103,8 @@ pub async fn run_toggle_install_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "vars_toggle_install args required".to_string())?; - let args: ToggleInstallArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: ToggleInstallArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; toggle_install_blocking(&state, &reporter, args) }) .await @@ -128,11 +130,9 @@ pub async fn run_refresh_install_status_job( reporter: JobReporter, _args: Option, ) -> Result<(), String> { - tokio::task::spawn_blocking(move || { - refresh_install_status_blocking(&state, &reporter) - }) - .await - .map_err(|err| err.to_string())? + tokio::task::spawn_blocking(move || refresh_install_status_blocking(&state, &reporter)) + .await + .map_err(|err| err.to_string())? } fn export_installed_blocking( @@ -144,8 +144,7 @@ fn export_installed_blocking( let handle = tokio::runtime::Handle::current(); let rows = handle .block_on( - sqlx::query("SELECT varName FROM installStatus WHERE installed = 1") - .fetch_all(pool), + sqlx::query("SELECT varName FROM installStatus WHERE installed = 1").fetch_all(pool), ) .map_err(|err| err.to_string())?; let mut vars = Vec::new(); @@ -200,12 +199,7 @@ fn install_batch_blocking( continue; } match handle.block_on(install_var( - pool, - &varspath, - &vampath, - var_name, - false, - false, + pool, &varspath, &vampath, var_name, false, false, )) { Ok(InstallOutcome::Installed) => installed.push(var_name.clone()), Ok(InstallOutcome::AlreadyInstalled) => already_installed.push(var_name.clone()), @@ -293,12 +287,7 @@ fn toggle_install_blocking( let mut failed = Vec::new(); for (idx, var_name) in var_list.iter().enumerate() { match handle.block_on(install_var( - pool, - &varspath, - &vampath, - var_name, - false, - false, + pool, &varspath, &vampath, var_name, false, false, )) { Ok(InstallOutcome::Installed) => installed.push(var_name.clone()), Ok(InstallOutcome::AlreadyInstalled) => {} @@ -325,22 +314,37 @@ fn toggle_install_blocking( Ok(()) } -fn locate_blocking(state: &AppState, reporter: &JobReporter, args: LocateArgs) -> Result<(), String> { +fn locate_blocking( + state: &AppState, + reporter: &JobReporter, + args: LocateArgs, +) -> Result<(), String> { let (varspath, vampath) = config_paths(state)?; - if let Some(var_name) = args.var_name.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(var_name) = args + .var_name + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { let path = resolve_var_file_path(&varspath, var_name)?; util::open_explorer_select(&path)?; reporter.log(format!("locate {}", var_name)); return Ok(()); } - if let Some(path) = args.path.as_ref().map(|s| s.trim()).filter(|s| !s.is_empty()) { + if let Some(path) = args + .path + .as_ref() + .map(|s| s.trim()) + .filter(|s| !s.is_empty()) + { let p = PathBuf::from(path); let final_path = if p.is_absolute() { p } else { - let vampath = vampath.ok_or_else(|| "vampath is required to resolve path".to_string())?; + let vampath = + vampath.ok_or_else(|| "vampath is required to resolve path".to_string())?; vampath.join(p) }; util::open_explorer_select(&final_path)?; diff --git a/varManager_backend/src/main.rs b/varManager_backend/src/main.rs index 8ae07e0..613b6fd 100644 --- a/varManager_backend/src/main.rs +++ b/varManager_backend/src/main.rs @@ -4,15 +4,12 @@ use axum::{ }; use std::{ net::SocketAddr, - sync::{ - atomic::AtomicU64, - Arc, RwLock, - }, + sync::{atomic::AtomicU64, Arc, RwLock}, }; use tokio::sync::{oneshot, Semaphore}; -mod app; mod api; +mod app; mod domain; mod infra; mod jobs; @@ -45,9 +42,14 @@ async fn main() -> Result<(), Box> { .await .map_err(std::io::Error::other)?, ); - image_cache.clone().start_maintenance(shutdown_broadcast.clone()); + image_cache + .clone() + .start_maintenance(shutdown_broadcast.clone()); let config_state = Arc::new(RwLock::new(config.clone())); - let download_manager = Arc::new(DownloadManager::new(db_pool.clone(), Arc::clone(&config_state))); + let download_manager = Arc::new(DownloadManager::new( + db_pool.clone(), + Arc::clone(&config_state), + )); download_manager .pause_incomplete() .await @@ -108,7 +110,10 @@ async fn main() -> Result<(), Box> { .route("/preview", get(api::get_preview)) .route("/cache/stats", get(api::get_cache_stats)) .route("/cache/clear", post(api::clear_cache)) - .route("/cache/entry", axum::routing::delete(api::delete_cache_entry)) + .route( + "/cache/entry", + axum::routing::delete(api::delete_cache_entry), + ) .route("/packswitch", get(api::list_packswitch)) .route("/hub/options", get(api::list_hub_options)) .route("/dependents", get(api::list_dependents)) @@ -129,8 +134,7 @@ async fn main() -> Result<(), Box> { .route("/shutdown", post(api::shutdown)) .with_state(state); - let addr: SocketAddr = - format!("{}:{}", config.listen_host, config.listen_port).parse()?; + let addr: SocketAddr = format!("{}:{}", config.listen_host, config.listen_port).parse()?; let listener = tokio::net::TcpListener::bind(&addr).await?; tracing::info!(%addr, version = APP_VERSION, "backend listening"); diff --git a/varManager_backend/src/scenes/core.rs b/varManager_backend/src/scenes/core.rs index c3db124..0a7a5ce 100644 --- a/varManager_backend/src/scenes/core.rs +++ b/varManager_backend/src/scenes/core.rs @@ -1,10 +1,12 @@ +use crate::app::{data_dir, AppState}; +use crate::domain::var_logic::{resolve_var_exist_name, vars_dependencies}; use crate::infra::db::var_exists_conn; use crate::infra::fs_util; -use crate::jobs::job_channel::JobReporter; -use crate::infra::paths::{config_paths, loadscene_path, resolve_var_file_path, temp_links_dir, CACHE_DIR}; -use crate::domain::var_logic::{resolve_var_exist_name, vars_dependencies}; -use crate::app::{data_dir, AppState}; +use crate::infra::paths::{ + config_paths, loadscene_path, resolve_var_file_path, temp_links_dir, CACHE_DIR, +}; use crate::infra::winfs; +use crate::jobs::job_channel::JobReporter; use crate::util; use regex::Regex; use serde::{Deserialize, Serialize}; @@ -59,7 +61,12 @@ pub struct AnalysisSummary { pub parent_links: Vec, } -const SCENE_BASE_ATOMS: [&str; 4] = ["CoreControl", "PlayerNavigationPanel", "VRController", "WindowCamera"]; +const SCENE_BASE_ATOMS: [&str; 4] = [ + "CoreControl", + "PlayerNavigationPanel", + "VRController", + "WindowCamera", +]; const POSE_CONTROL_IDS: [&str; 26] = [ "hipControl", "pelvisControl", @@ -232,7 +239,11 @@ pub(crate) struct CacheClearArgs { entry_name: String, } -pub(crate) fn scene_load_blocking(state: &AppState, reporter: &JobReporter, args: SceneLoadArgs) -> Result<(), String> { +pub(crate) fn scene_load_blocking( + state: &AppState, + reporter: &JobReporter, + args: SceneLoadArgs, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let mut json_ls = args.json; @@ -267,11 +278,17 @@ pub(crate) fn scene_load_blocking(state: &AppState, reporter: &JobReporter, args let deps = read_lines(&depend_path)?; let gender = if gender_path.exists() { fs::read_to_string(&gender_path) - .unwrap_or_else(|_| args.character_gender.clone().unwrap_or_else(|| "unknown".to_string())) + .unwrap_or_else(|_| { + args.character_gender + .clone() + .unwrap_or_else(|| "unknown".to_string()) + }) .trim() .to_string() } else { - args.character_gender.clone().unwrap_or_else(|| "unknown".to_string()) + args.character_gender + .clone() + .unwrap_or_else(|| "unknown".to_string()) }; let result = build_loadscene( @@ -289,8 +306,14 @@ pub(crate) fn scene_load_blocking(state: &AppState, reporter: &JobReporter, args Ok(()) } -pub(crate) fn scene_analyze_blocking(state: &AppState, reporter: &JobReporter, args: SceneAnalyzeArgs) -> Result<(), String> { - let gender = args.character_gender.unwrap_or_else(|| "female".to_string()); +pub(crate) fn scene_analyze_blocking( + state: &AppState, + reporter: &JobReporter, + args: SceneAnalyzeArgs, +) -> Result<(), String> { + let gender = args + .character_gender + .unwrap_or_else(|| "female".to_string()); let result = read_save_name(state, &args.save_name, &gender, true)?; reporter.set_result( serde_json::to_value(SceneAnalyzeResult { @@ -560,7 +583,9 @@ fn read_save_name( let file = fs::File::open(destvarfile).map_err(|err| err.to_string())?; let mut zip = ZipArchive::new(file).map_err(|err| err.to_string())?; let mut entry = zip.by_name(&entry_name).map_err(|err| err.to_string())?; - entry.read_to_string(&mut jsonscene).map_err(|err| err.to_string())?; + entry + .read_to_string(&mut jsonscene) + .map_err(|err| err.to_string())?; } else { let jsonfile = vampath.join(save_name.replace('/', "\\")); jsonscene = fs::read_to_string(&jsonfile).map_err(|err| err.to_string())?; @@ -622,10 +647,18 @@ fn analysis_atoms(jsonscene: &str, scene_folder: &Path, is_person: bool) -> Resu } write_json_file(&scene_folder.join("posinfo.bin"), &Value::Object(posinfo))?; - let atoms = value.get("atoms").and_then(|v| v.as_array()).cloned().unwrap_or_default(); + let atoms = value + .get("atoms") + .and_then(|v| v.as_array()) + .cloned() + .unwrap_or_default(); let mut parent_atoms: HashMap> = HashMap::new(); for atom in atoms { - let mut atom_type = atom.get("type").and_then(|v| v.as_str()).unwrap_or("").to_string(); + let mut atom_type = atom + .get("type") + .and_then(|v| v.as_str()) + .unwrap_or("") + .to_string(); if atom_type.is_empty() { continue; } @@ -842,7 +875,10 @@ fn build_atom_tree(dir: &Path, cache_root: &Path) -> Result, S Ok(nodes) } -fn list_person_info(atoms_root: &Path, entry_name: &str) -> Result, String> { +fn list_person_info( + atoms_root: &Path, + entry_name: &str, +) -> Result, String> { let person_dir = atoms_root.join("Person"); let mut people = Vec::new(); if person_dir.exists() { @@ -869,7 +905,11 @@ fn list_person_info(atoms_root: &Path, entry_name: &str) -> Result Result { } } } - let first = files.first().ok_or_else(|| "CoreControl not found".to_string())?; + let first = files + .first() + .ok_or_else(|| "CoreControl not found".to_string())?; let contents = fs::read_to_string(first).map_err(|err| err.to_string())?; serde_json::from_str(&contents).map_err(|err| err.to_string()) } @@ -1147,32 +1192,113 @@ fn save_preset( } if skin { - save_static_preset(state, "Custom\\Atom\\Person\\Appearance\\Preset_eyeDefault.vap", DEFAULT_EYE_COLOR)?; - add_preset_resource(save_names, "looks", "Custom/Atom/Person/Appearance/Preset_eyeDefault.vap", character_gender, ignore_gender, person_order); + save_static_preset( + state, + "Custom\\Atom\\Person\\Appearance\\Preset_eyeDefault.vap", + DEFAULT_EYE_COLOR, + )?; + add_preset_resource( + save_names, + "looks", + "Custom/Atom/Person/Appearance/Preset_eyeDefault.vap", + character_gender, + ignore_gender, + person_order, + ); } if clothing { - save_static_preset(state, "Custom\\Atom\\Person\\Clothing\\Preset_ClothNaked.vap", CLOTH_NAKED)?; - add_preset_resource(save_names, "clothing", "Custom/Atom/Person/Clothing/Preset_ClothNaked.vap", character_gender, ignore_gender, person_order); + save_static_preset( + state, + "Custom\\Atom\\Person\\Clothing\\Preset_ClothNaked.vap", + CLOTH_NAKED, + )?; + add_preset_resource( + save_names, + "clothing", + "Custom/Atom/Person/Clothing/Preset_ClothNaked.vap", + character_gender, + ignore_gender, + person_order, + ); } if hair { - save_static_preset(state, "Custom\\Atom\\Person\\Hair\\Preset_HairBald.vap", HAIR_BALD)?; - add_preset_resource(save_names, "hairstyle", "Custom/Atom/Person/Hair/Preset_HairBald.vap", character_gender, ignore_gender, person_order); + save_static_preset( + state, + "Custom\\Atom\\Person\\Hair\\Preset_HairBald.vap", + HAIR_BALD, + )?; + add_preset_resource( + save_names, + "hairstyle", + "Custom/Atom/Person/Hair/Preset_HairBald.vap", + character_gender, + ignore_gender, + person_order, + ); } if morphs { - save_json_preset(state, var_name, "Custom\\Atom\\Person\\Morphs\\Preset_temp.vap", &json_morphs)?; - add_preset_resource(save_names, "morphs", "Custom/Atom/Person/Morphs/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\Morphs\\Preset_temp.vap", + &json_morphs, + )?; + add_preset_resource( + save_names, + "morphs", + "Custom/Atom/Person/Morphs/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); } if breast { - save_json_preset(state, var_name, "Custom\\Atom\\Person\\BreastPhysics\\Preset_temp.vap", &json_breast)?; - add_preset_resource(save_names, "breast", "Custom/Atom/Person/BreastPhysics/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\BreastPhysics\\Preset_temp.vap", + &json_breast, + )?; + add_preset_resource( + save_names, + "breast", + "Custom/Atom/Person/BreastPhysics/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); } if glute { - save_json_preset(state, var_name, "Custom\\Atom\\Person\\GlutePhysics\\Preset_temp.vap", &json_glute)?; - add_preset_resource(save_names, "glute", "Custom/Atom/Person/GlutePhysics/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\GlutePhysics\\Preset_temp.vap", + &json_glute, + )?; + add_preset_resource( + save_names, + "glute", + "Custom/Atom/Person/GlutePhysics/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); } if clothing || hair || skin { - save_json_preset(state, var_name, "Custom\\Atom\\Person\\Appearance\\Preset_temp.vap", &json_preset)?; - add_preset_resource(save_names, "looks", "Custom/Atom/Person/Appearance/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\Appearance\\Preset_temp.vap", + &json_preset, + )?; + add_preset_resource( + save_names, + "looks", + "Custom/Atom/Person/Appearance/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); } Ok(()) @@ -1207,8 +1333,20 @@ fn save_plugin_preset( } } } - save_json_preset(state, var_name, "Custom\\Atom\\Person\\Plugins\\Preset_temp.vap", &json_plugin)?; - add_preset_resource(save_names, "plugin", "Custom/Atom/Person/Plugins/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\Plugins\\Preset_temp.vap", + &json_plugin, + )?; + add_preset_resource( + save_names, + "plugin", + "Custom/Atom/Person/Plugins/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); Ok(()) } @@ -1237,8 +1375,20 @@ fn save_pose_preset( } } } - save_json_preset(state, var_name, "Custom\\Atom\\Person\\Pose\\Preset_temp.vap", &json_pose)?; - add_preset_resource(save_names, "pose", "Custom/Atom/Person/Pose/Preset_temp.vap", character_gender, ignore_gender, person_order); + save_json_preset( + state, + var_name, + "Custom\\Atom\\Person\\Pose\\Preset_temp.vap", + &json_pose, + )?; + add_preset_resource( + save_names, + "pose", + "Custom/Atom/Person/Pose/Preset_temp.vap", + character_gender, + ignore_gender, + person_order, + ); Ok(()) } @@ -1275,7 +1425,11 @@ fn save_animation_preset( .ok_or_else(|| "MotionAnimationMaster not found".to_string())?; json_animation["motionAnimationMaster"] = master; - save_raw_json(state, "Custom\\Atom\\Person\\AnimationPresets\\Preset_temp.bin", &json_animation)?; + save_raw_json( + state, + "Custom\\Atom\\Person\\AnimationPresets\\Preset_temp.bin", + &json_animation, + )?; add_preset_resource( save_names, "animation", @@ -1502,13 +1656,13 @@ fn build_loadscene( resource["characterGender"] = Value::String(character_gender.to_string()); } if resource.get("ignoreGender").is_none() { - resource["ignoreGender"] = Value::String(ignore_gender.to_string().to_ascii_lowercase()); + resource["ignoreGender"] = + Value::String(ignore_gender.to_string().to_ascii_lowercase()); } if resource.get("personOrder").is_none() { resource["personOrder"] = Value::String(person_order.to_string()); } - if delete_temp.is_empty() - && resource.get("type").and_then(|v| v.as_str()) == Some("scenes") + if delete_temp.is_empty() && resource.get("type").and_then(|v| v.as_str()) == Some("scenes") { delete_temp = collect_temp_links(vampath)?; } @@ -1538,8 +1692,11 @@ fn build_loadscene( if loadscene.exists() { let _ = fs::remove_file(&loadscene); } - fs::write(&loadscene, serde_json::to_string_pretty(json_ls).map_err(|err| err.to_string())?) - .map_err(|err| err.to_string())?; + fs::write( + &loadscene, + serde_json::to_string_pretty(json_ls).map_err(|err| err.to_string())?, + ) + .map_err(|err| err.to_string())?; if !delete_temp.is_empty() { spawn_delete_temp_thread(vampath.to_path_buf(), delete_temp); @@ -1552,7 +1709,11 @@ fn build_loadscene( }) } -fn install_temp(state: &AppState, reporter: &JobReporter, deps: &[String]) -> Result<(Vec, bool), String> { +fn install_temp( + state: &AppState, + reporter: &JobReporter, + deps: &[String], +) -> Result<(Vec, bool), String> { let (varspath, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; @@ -1648,11 +1809,19 @@ fn resolve_atom_source(cache_root: &Path, atom_path: &str) -> PathBuf { } fn write_json_file(path: &Path, value: &Value) -> Result<(), String> { - fs::write(path, serde_json::to_string(value).map_err(|err| err.to_string())?) - .map_err(|err| err.to_string()) + fs::write( + path, + serde_json::to_string(value).map_err(|err| err.to_string())?, + ) + .map_err(|err| err.to_string()) } -fn save_json_preset(state: &AppState, var_name: &str, rel: &str, value: &Value) -> Result<(), String> { +fn save_json_preset( + state: &AppState, + var_name: &str, + rel: &str, + value: &Value, +) -> Result<(), String> { let (_, vampath) = config_paths(state)?; let vampath = vampath.ok_or_else(|| "vampath is required in config.json".to_string())?; let path = vampath.join(rel); @@ -1672,8 +1841,11 @@ fn save_raw_json(state: &AppState, rel: &str, value: &Value) -> Result<(), Strin if let Some(parent) = path.parent() { fs::create_dir_all(parent).map_err(|err| err.to_string())?; } - fs::write(&path, serde_json::to_string(value).map_err(|err| err.to_string())?) - .map_err(|err| err.to_string())?; + fs::write( + &path, + serde_json::to_string(value).map_err(|err| err.to_string())?, + ) + .map_err(|err| err.to_string())?; Ok(()) } @@ -1772,7 +1944,9 @@ fn cache_dir(var_name: &str, entry_name: &str) -> PathBuf { data_dir() .join(CACHE_DIR) .join(util::valid_file_name(key)) - .join(util::valid_file_name(&util::normalize_entry_name(entry_name))) + .join(util::valid_file_name(&util::normalize_entry_name( + entry_name, + ))) } fn normalize_cache_key(var_name: &str, entry_name: &str) -> (String, String) { diff --git a/varManager_backend/src/scenes/jobs.rs b/varManager_backend/src/scenes/jobs.rs index 7f134b9..159e899 100644 --- a/varManager_backend/src/scenes/jobs.rs +++ b/varManager_backend/src/scenes/jobs.rs @@ -1,5 +1,5 @@ -use crate::jobs::job_channel::JobReporter; use crate::app::AppState; +use crate::jobs::job_channel::JobReporter; use serde_json::Value; use super::core; @@ -11,7 +11,8 @@ pub async fn run_scene_load_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "scene_load args required".to_string())?; - let args: core::SceneLoadArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: core::SceneLoadArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; core::scene_load_blocking(&state, &reporter, args) }) .await @@ -25,7 +26,8 @@ pub async fn run_scene_analyze_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "scene_analyze args required".to_string())?; - let args: core::SceneAnalyzeArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: core::SceneAnalyzeArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; core::scene_analyze_blocking(&state, &reporter, args) }) .await @@ -141,7 +143,8 @@ pub async fn run_cache_clear_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "cache_clear args required".to_string())?; - let args: core::CacheClearArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: core::CacheClearArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; core::cache_clear_blocking(&state, &reporter, args) }) .await @@ -156,7 +159,8 @@ async fn run_scene_preset_job( ) -> Result<(), String> { tokio::task::spawn_blocking(move || { let args = args.ok_or_else(|| "scene_preset args required".to_string())?; - let args: core::ScenePresetArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: core::ScenePresetArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; core::scene_preset_blocking(&state, &reporter, args, kind) }) .await @@ -187,12 +191,18 @@ async fn run_scene_hide_fav_job( hide_fav: i32, ) -> Result<(), String> { let args = args.ok_or_else(|| "scene_hide_fav args required".to_string())?; - let args: core::SceneHideFavArgs = serde_json::from_value(args).map_err(|err| err.to_string())?; + let args: core::SceneHideFavArgs = + serde_json::from_value(args).map_err(|err| err.to_string())?; let state_for_blocking = state.clone(); let var_name = args.var_name.clone(); let scene_path = args.scene_path.clone(); let status = tokio::task::spawn_blocking(move || { - core::set_hide_fav(&state_for_blocking, var_name.as_deref(), &scene_path, hide_fav) + core::set_hide_fav( + &state_for_blocking, + var_name.as_deref(), + &scene_path, + hide_fav, + ) }) .await .map_err(|err| err.to_string())??; diff --git a/varManager_backend/src/scenes/mod.rs b/varManager_backend/src/scenes/mod.rs index 8572e45..67542b4 100644 --- a/varManager_backend/src/scenes/mod.rs +++ b/varManager_backend/src/scenes/mod.rs @@ -1,25 +1,11 @@ mod core; mod jobs; -pub use core::{ - AnalysisSummary, - AtomTreeNode, - analysis_summary, - list_analysis_atoms, -}; +pub use core::{analysis_summary, list_analysis_atoms, AnalysisSummary, AtomTreeNode}; pub use jobs::{ - run_cache_clear_job, - run_scene_add_atoms_job, - run_scene_add_subscene_job, - run_scene_analyze_job, - run_scene_fav_job, - run_scene_hide_job, - run_scene_load_job, - run_scene_preset_animation_job, - run_scene_preset_look_job, - run_scene_preset_plugin_job, - run_scene_preset_pose_job, - run_scene_preset_scene_job, - run_scene_unfav_job, + run_cache_clear_job, run_scene_add_atoms_job, run_scene_add_subscene_job, + run_scene_analyze_job, run_scene_fav_job, run_scene_hide_job, run_scene_load_job, + run_scene_preset_animation_job, run_scene_preset_look_job, run_scene_preset_plugin_job, + run_scene_preset_pose_job, run_scene_preset_scene_job, run_scene_unfav_job, run_scene_unhide_job, }; diff --git a/varManager_backend/src/services/image_cache.rs b/varManager_backend/src/services/image_cache.rs index 3173886..2870edd 100644 --- a/varManager_backend/src/services/image_cache.rs +++ b/varManager_backend/src/services/image_cache.rs @@ -3,9 +3,9 @@ use bytes::Bytes; use dashmap::DashMap; use moka::future::Cache; use reqwest::header; -use sqlx::{Row, SqlitePool}; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; +use sqlx::{Row, SqlitePool}; use std::path::{Path, PathBuf}; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; @@ -136,8 +136,7 @@ impl ImageCacheService { config: ImageCacheConfig, db_pool: SqlitePool, ) -> Result { - let memory_max_bytes = - config.memory_cache_size_mb as u64 * 1024_u64 * 1024_u64; + let memory_max_bytes = config.memory_cache_size_mb as u64 * 1024_u64 * 1024_u64; let disk_max_bytes = config.disk_cache_size_mb as u64 * 1024_u64 * 1024_u64; let ttl = Duration::from_secs(config.cache_ttl_hours as u64 * 3600); @@ -177,7 +176,10 @@ impl ImageCacheService { }) } - pub fn start_maintenance(self: Arc, shutdown_broadcast: tokio::sync::broadcast::Sender<()>) { + pub fn start_maintenance( + self: Arc, + shutdown_broadcast: tokio::sync::broadcast::Sender<()>, + ) { if !self.config.enabled { return; } @@ -261,7 +263,9 @@ impl ImageCacheService { let result = self.fetch_source(&source).await; if let Ok((bytes, content_type)) = &result { - self.metrics.downloads_success.fetch_add(1, Ordering::Relaxed); + self.metrics + .downloads_success + .fetch_add(1, Ordering::Relaxed); if self.config.enabled { self.insert_memory(&key, bytes.clone(), content_type.clone()) .await; @@ -325,7 +329,10 @@ impl ImageCacheService { } async fn insert_memory(&self, key: &str, bytes: Bytes, content_type: String) { - let cached = CachedImage { bytes, content_type }; + let cached = CachedImage { + bytes, + content_type, + }; self.memory_cache.insert(key.to_string(), cached).await; } @@ -347,10 +354,9 @@ impl ImageCacheService { match &source.source { ImageSource::Hub { url } => self.download_hub_image(url).await, ImageSource::LocalFile { .. } => { - let full_path = source - .full_path - .as_ref() - .ok_or_else(|| ImageCacheError::Invalid("local file path missing".to_string()))?; + let full_path = source.full_path.as_ref().ok_or_else(|| { + ImageCacheError::Invalid("local file path missing".to_string()) + })?; read_local_image(full_path).await } } @@ -423,9 +429,8 @@ impl ImageCacheService { tokio::time::sleep(Duration::from_millis(delay_ms)).await; } } - Err(last_err.unwrap_or_else(|| { - ImageCacheError::Network("hub image download failed".to_string()) - })) + Err(last_err + .unwrap_or_else(|| ImageCacheError::Network("hub image download failed".to_string()))) } } @@ -482,11 +487,11 @@ impl DiskCache { access_count INTEGER NOT NULL DEFAULT 1 ); CREATE INDEX IF NOT EXISTS idx_last_accessed ON image_cache_entries(last_accessed); - "# + "#, ) - .execute(&db_pool) - .await - .map_err(ImageCacheError::from)?; + .execute(&db_pool) + .await + .map_err(ImageCacheError::from)?; let cache = Self { base_dir, @@ -507,9 +512,7 @@ impl DiskCache { None => return Ok(None), }; let now = now_ts(); - if self.ttl.as_secs() > 0 - && now.saturating_sub(entry.last_accessed) > self.ttl.as_secs() - { + if self.ttl.as_secs() > 0 && now.saturating_sub(entry.last_accessed) > self.ttl.as_secs() { self.remove_entry(&entry.key, &entry.file_name).await?; return Ok(None); } @@ -561,12 +564,8 @@ impl DiskCache { } let existing = self.lookup_entry_meta(&key).await?; - let effective_needed = size_bytes.saturating_sub( - existing - .as_ref() - .map(|entry| entry.size_bytes) - .unwrap_or(0), - ); + let effective_needed = + size_bytes.saturating_sub(existing.as_ref().map(|entry| entry.size_bytes).unwrap_or(0)); self.ensure_disk_space(effective_needed).await?; let extension = extension_from_content_type(&content_type) @@ -582,17 +581,17 @@ impl DiskCache { let (source_type, source_url, source_root, source_path) = source_fields(&source); let result = self .insert_entry( - &key, - &file_name, - &content_type, - size_bytes, - now, - source_type, - source_url, - source_root, - source_path, - ) - .await; + &key, + &file_name, + &content_type, + size_bytes, + now, + source_type, + source_url, + source_root, + source_path, + ) + .await; if let Err(err) = result { self.remove_file_best_effort(&file_name).await; return Err(err); @@ -630,12 +629,11 @@ impl DiskCache { } async fn stats(&self) -> Result { - let row = sqlx::query( - "SELECT COUNT(1), COALESCE(SUM(size_bytes), 0) FROM image_cache_entries", - ) - .fetch_one(&self.db_pool) - .await - .map_err(ImageCacheError::from)?; + let row = + sqlx::query("SELECT COUNT(1), COALESCE(SUM(size_bytes), 0) FROM image_cache_entries") + .fetch_one(&self.db_pool) + .await + .map_err(ImageCacheError::from)?; let entries: i64 = row.try_get(0).map_err(ImageCacheError::from)?; let size_bytes: i64 = row.try_get(1).map_err(ImageCacheError::from)?; Ok(DiskCacheStatsSnapshot { @@ -681,12 +679,10 @@ impl DiskCache { } self.cleanup_expired().await?; - let row = sqlx::query( - "SELECT COALESCE(SUM(size_bytes), 0) FROM image_cache_entries", - ) - .fetch_one(&self.db_pool) - .await - .map_err(ImageCacheError::from)?; + let row = sqlx::query("SELECT COALESCE(SUM(size_bytes), 0) FROM image_cache_entries") + .fetch_one(&self.db_pool) + .await + .map_err(ImageCacheError::from)?; let total_size: i64 = row.try_get(0).map_err(ImageCacheError::from)?; let total_size = total_size as u64; @@ -972,26 +968,17 @@ fn extension_from_source(source: &ImageSource) -> Option { } fn extension_from_url(url: &str) -> Option { - url::Url::parse(url) - .ok() - .and_then(|parsed| { - Path::new(parsed.path()) - .extension() - .and_then(|s| s.to_str()) - .map(|s| s.to_lowercase()) - }) + url::Url::parse(url).ok().and_then(|parsed| { + Path::new(parsed.path()) + .extension() + .and_then(|s| s.to_str()) + .map(|s| s.to_lowercase()) + }) } -fn source_fields( - source: &ImageSource, -) -> (String, Option, Option, Option) { +fn source_fields(source: &ImageSource) -> (String, Option, Option, Option) { match source { - ImageSource::Hub { url } => ( - "hub".to_string(), - Some(url.to_string()), - None, - None, - ), + ImageSource::Hub { url } => ("hub".to_string(), Some(url.to_string()), None, None), ImageSource::LocalFile { root, path } => ( "local".to_string(), None, @@ -1007,9 +994,15 @@ fn is_disk_full_error(err: &std::io::Error) -> bool { fn map_io_error(context: &'static str, err: std::io::Error) -> ImageCacheError { if is_disk_full_error(&err) { - ImageCacheError::DiskFull { context, source: err } + ImageCacheError::DiskFull { + context, + source: err, + } } else { - ImageCacheError::Io { context, source: err } + ImageCacheError::Io { + context, + source: err, + } } } @@ -1025,10 +1018,7 @@ fn hub_headers() -> header::HeaderMap { header::ACCEPT_ENCODING, "gzip, deflate, br, zstd".parse().unwrap(), ); - headers.insert( - header::ACCEPT_LANGUAGE, - "en-US,en;q=0.9".parse().unwrap(), - ); + headers.insert(header::ACCEPT_LANGUAGE, "en-US,en;q=0.9".parse().unwrap()); headers.insert(header::COOKIE, "vamhubconsent=yes".parse().unwrap()); headers.insert(header::DNT, "1".parse().unwrap()); headers.insert( diff --git a/varManager_backend/src/util/mod.rs b/varManager_backend/src/util/mod.rs index f54875d..7ff638c 100644 --- a/varManager_backend/src/util/mod.rs +++ b/varManager_backend/src/util/mod.rs @@ -38,4 +38,3 @@ pub fn open_url(url: &str) -> Result<(), String> { .map_err(|err| err.to_string())?; Ok(()) } - diff --git a/varManager_backend/tests/torrent_scan.rs b/varManager_backend/tests/torrent_scan.rs index 6877063..574f8a5 100644 --- a/varManager_backend/tests/torrent_scan.rs +++ b/varManager_backend/tests/torrent_scan.rs @@ -4,9 +4,7 @@ use std::path::Path; #[test] fn finds_anonymously_vamraider_captured_in_torrent_metadata() { let backend_root = Path::new(env!("CARGO_MANIFEST_DIR")); - let repo_root = backend_root - .parent() - .unwrap_or(backend_root); + let repo_root = backend_root.parent().unwrap_or(backend_root); let torrent_path = repo_root .join("data") .join("links") @@ -17,10 +15,9 @@ fn finds_anonymously_vamraider_captured_in_torrent_metadata() { .unwrap_or_else(|err| panic!("failed to read {}: {}", torrent_path.display(), err)); let content = String::from_utf8_lossy(&data); - let var_re = Regex::new( - r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var", - ) - .expect("failed to compile var regex"); + let var_re = + Regex::new(r"(?i)([A-Za-z0-9_\-]{1,60}\.[A-Za-z0-9_\-]{1,80}\.(?:\d+|latest))\.var") + .expect("failed to compile var regex"); let target = "Anonymously.vamraider_captured.1"; let found = var_re.captures_iter(&content).any(|caps| {