diff --git a/Inventory Kamera Installer/Inventory Kamera Installer.vdproj b/Inventory Kamera Installer/Inventory Kamera Installer.vdproj deleted file mode 100644 index 5466da2..0000000 --- a/Inventory Kamera Installer/Inventory Kamera Installer.vdproj +++ /dev/null @@ -1,657 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:Inventory Kamera Installer" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:Debug\\Inventory Kamera Installer.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:Release\\Inventory Kamera Installer.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - } - } - "Deployable" - { - "CustomAction" - { - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - "{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_05F40A618DA14F57A513B1DA4F26452D" - { - "Name" = "8:.NET Framework" - "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:.NETFramework,Version=v4.7.2" - "AllowLaterVersions" = "11:FALSE" - "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=863262" - } - } - } - "File" - { - } - "FileType" - { - } - "Folder" - { - "{1525181F-901A-416C-8A58-119130FE478E}:_1F0F46B7900547438BE460F860EFDC4D" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_2BF1CBD659FC49E79BE244954F903FF8" - { - "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_A179E1C5C9F9403DB465E0C4C76B7F5E" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:Inventory Kamera Installer" - "ProductCode" = "8:{FA61D05A-9269-483C-B5AB-41B7C8BE4636}" - "PackageCode" = "8:{323FA989-04C7-43DF-BBA7-66AF5F188B53}" - "UpgradeCode" = "8:{59DFE4D6-0D6C-46BF-BCB3-C679A04FD534}" - "AspNetVersion" = "8:2.0.50727.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:FALSE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:1.0.0" - "Manufacturer" = "8:Default Company Name" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:" - "Title" = "8:Inventory Kamera Installer" - "Subject" = "8:" - "ARPCONTACT" = "8:Default Company Name" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:" - "ARPURLINFOABOUT" = "8:" - "ARPPRODUCTICON" = "8:" - "ARPIconIndex" = "3:0" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:0" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_A7283BD0A2094A76BEC08490F29D6CE1" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_479D5628C7824AD7B1A8FB78447B7687" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1CBC7F0C982A4DA4B567F51573FD010F" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_B5F4A470EBD54C429E3F699D8CDC9503" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - } - "UserInterface" - { - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2109A99915954BBB8C04EA406F2226A5" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5F5C5B5C93B94E309E5C18E210E763C7" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_5B7DB82D2C3A49189BE898CF5D77E055" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5BF53B9EF6864C38B977C56B20976ADF" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_05E1EA3D5BA84B04BFE8AD18EAF59E30" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5D8222A2DCF04FC2B22ADC14D1E97DD0" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BE0AF26C920E44BC9C4FFFE452B905E2" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_CFA76FE339EF4BFE80F139A8135B5FC9" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "InstallAllUsersVisible" - { - "Name" = "8:InstallAllUsersVisible" - "DisplayName" = "8:#1059" - "Description" = "8:#1159" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_EB5ADDF8174F4861BE716E3754B06B1D" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5D9A7058C29F428A964728A17D1110ED" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_EDD0B4B0C96F4CE9A5D82BFA4C9499DB" - { - "Sequence" = "3:100" - "DisplayName" = "8:Finished" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_732F2981DA944A319A6365B763ABBD56" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9B595C1727414142AACB0801B6FED400" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A826555D25EC4FE497B823EB1EDB83D4" - { - "Sequence" = "3:100" - "DisplayName" = "8:Welcome" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_B8186BE93EF2406195B676178A2FCFB5" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirm Installation" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BC2C051620DF45A6BE567027421C64F0" - { - "Sequence" = "3:200" - "DisplayName" = "8:Installation Folder" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFolderDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_ED9BE7F9BF414FBBA49530FE31D19719" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_36F13273D5FF4EB3921C4EDEDC7D91F9" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progress" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - } - } -} diff --git a/InventoryKamera.sln b/InventoryKamera.sln index 18cea2d..0e8b6bd 100644 --- a/InventoryKamera.sln +++ b/InventoryKamera.sln @@ -5,10 +5,6 @@ VisualStudioVersion = 17.2.32616.157 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InventoryKamera", "InventoryKamera\InventoryKamera.csproj", "{7B7F907E-11F4-4000-B711-8E532A36F8A9}" EndProject -Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Inventory Kamera Installer", "Inventory Kamera Installer\Inventory Kamera Installer.vdproj", "{A0A931B9-288D-48F5-9E1D-E0307BD5F3CD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InventoryKameraWPF", "InventoryKameraWPF\InventoryKameraWPF.csproj", "{01D9CF37-EF4D-4396-B955-28C1879359D7}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/InventoryKamera/App.config b/InventoryKamera/App.config index 88a4eec..d8f4ab4 100644 --- a/InventoryKamera/App.config +++ b/InventoryKamera/App.config @@ -71,7 +71,7 @@ - wanderer + Wanderer @@ -84,6 +84,18 @@ 1 + + 0 + + + 0 + + + Manequin1 + + + Manequin2 + diff --git a/InventoryKamera/InventoryKamera.csproj b/InventoryKamera/InventoryKamera.csproj index 6f62003..8a8a057 100644 --- a/InventoryKamera/InventoryKamera.csproj +++ b/InventoryKamera/InventoryKamera.csproj @@ -193,6 +193,7 @@ MainUI.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/InventoryKamera/Properties/AssemblyInfo.cs b/InventoryKamera/Properties/AssemblyInfo.cs index cd83d07..2a78894 100644 --- a/InventoryKamera/Properties/AssemblyInfo.cs +++ b/InventoryKamera/Properties/AssemblyInfo.cs @@ -32,6 +32,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.3.17.*")] +[assembly: AssemblyVersion("1.4.3.*")] //[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: NeutralResourcesLanguage("en")] \ No newline at end of file diff --git a/InventoryKamera/Properties/DataSources/InventoryKamera.Properties.Settings.datasource b/InventoryKamera/Properties/DataSources/InventoryKamera.Properties.Settings.datasource new file mode 100644 index 0000000..e4def06 --- /dev/null +++ b/InventoryKamera/Properties/DataSources/InventoryKamera.Properties.Settings.datasource @@ -0,0 +1,10 @@ + + + + InventoryKamera.Properties.Settings, Properties.Resources.Designer.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/InventoryKamera/Properties/Settings.Designer.cs b/InventoryKamera/Properties/Settings.Designer.cs index 224f0ac..e66c49f 100644 --- a/InventoryKamera/Properties/Settings.Designer.cs +++ b/InventoryKamera/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace InventoryKamera.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -265,7 +265,7 @@ public string TravelerName { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("wanderer")] + [global::System.Configuration.DefaultSettingValueAttribute("Wanderer")] public string WandererName { get { return ((string)(this["WandererName"])); @@ -300,5 +300,53 @@ public int Slot1Key { this["Slot1Key"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public int SortByObtained { + get { + return ((int)(this["SortByObtained"])); + } + set { + this["SortByObtained"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("0")] + public int NumOfCharToScan { + get { + return ((int)(this["NumOfCharToScan"])); + } + set { + this["NumOfCharToScan"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Manequin1")] + public string Manequin1Name { + get { + return ((string)(this["Manequin1Name"])); + } + set { + this["Manequin1Name"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Manequin2")] + public string Manequin2Name { + get { + return ((string)(this["Manequin2Name"])); + } + set { + this["Manequin2Name"] = value; + } + } } } diff --git a/InventoryKamera/Properties/Settings.settings b/InventoryKamera/Properties/Settings.settings index 5bf672d..d677a42 100644 --- a/InventoryKamera/Properties/Settings.settings +++ b/InventoryKamera/Properties/Settings.settings @@ -63,7 +63,7 @@ - wanderer + Wanderer <?xml version="1.0" encoding="utf-16"?> @@ -75,5 +75,17 @@ 1 + + 0 + + + 0 + + + Manequin1 + + + Manequin2 + \ No newline at end of file diff --git a/InventoryKamera/data/DatabaseManager.cs b/InventoryKamera/data/DatabaseManager.cs index 392b750..2ba0aa3 100644 --- a/InventoryKamera/data/DatabaseManager.cs +++ b/InventoryKamera/data/DatabaseManager.cs @@ -40,6 +40,7 @@ public string ListsDir private const string commitsAPIURL = "https://gitlab.com/api/v4/projects/53216109/repository/commits"; private const string repoBaseURL = "https://gitlab.com/Dimbreath/AnimeGameData/-/raw/master/"; private const string TextMapEnURL = repoBaseURL + "TextMap/TextMapEN.json"; + private const string TextMapMediumEnURL = repoBaseURL + "TextMap/TextMap_MediumEN.json"; private const string CharactersURL = repoBaseURL + "ExcelBinOutput/AvatarExcelConfigData.json"; private const string ConstellationsURL = repoBaseURL + "ExcelBinOutput/FetterInfoExcelConfigData.json"; private const string TalentsURL = repoBaseURL + "ExcelBinOutput/AvatarTalentExcelConfigData.json"; @@ -86,6 +87,15 @@ public DatabaseManager() LocalVersion = new Version(File.ReadAllText(ListsDir + NewVersion)); + + + if (!(File.Exists(ListsDir + WeaponsJson) && + File.Exists(ListsDir + ArtifactsJson) && + File.Exists(ListsDir + CharactersJson) && + File.Exists(ListsDir + MaterialsJson))) + { + UpdateGameData(force: true); + } } public bool UpdateAvailable() @@ -251,10 +261,22 @@ private void LoadMappings() { if (!Mappings.Any()) { - Mappings = new ConcurrentDictionary(JObject.Parse(LoadJsonFromURLAsync(TextMapEnURL)) + var mapping = JObject.Parse(LoadJsonFromURLAsync(TextMapEnURL)) + .ToObject>() + .Where(e => !string.IsNullOrWhiteSpace(e.Value)) // Remove any mapping with empty + .ToDictionary(i => i.Key, i => i.Value); + + var mediumMapping = JObject.Parse(LoadJsonFromURLAsync(TextMapMediumEnURL)) .ToObject>() .Where(e => !string.IsNullOrWhiteSpace(e.Value)) // Remove any mapping with empty - .ToDictionary(i => i.Key, i => i.Value)); + .ToDictionary(i => i.Key, i => i.Value); + + foreach (var entry in mediumMapping) + { + mapping[entry.Key] = entry.Value; // Should be no overlap + } + + Mappings = new ConcurrentDictionary(mapping); } } } @@ -358,8 +380,12 @@ private UpdateStatus UpdateCharacters(bool force) string nameKey = nameGOOD.ToLower(); int characterID = (int)character["id"]; + if (characterID > 10000900) return; // Not playable characters + string const3Description = ""; + string const5Description = ""; string skill = ""; + string auto = "Normal Attack"; var value = new JObject(); @@ -416,7 +442,6 @@ private UpdateStatus UpdateCharacters(bool force) skill = skills.First(entry => entry["skillIcon"].ToString().Contains($"Skill_S_{name}"))["nameTextMapHash"].ToString(); skill = Mappings[skill].ToString(); - value.Add("ConstellationName", new JArray { GetConstellationNameFromId(characterID) @@ -428,16 +453,34 @@ private UpdateStatus UpdateCharacters(bool force) const3Description = talents.Where(entry => entry["icon"].ToString().Contains(name)).ElementAt(2)["descTextMapHash"].ToString(); const3Description = Mappings[const3Description].ToString(); - if (const3Description.Contains(skill)) + if (const3Description.Contains(auto)) + { + constellationOrder.Add("auto"); + } else if (const3Description.Contains(skill)) { constellationOrder.Add("skill"); - constellationOrder.Add("burst"); } else { constellationOrder.Add("burst"); + } + + // The skill/burst name is always mentioned in the constellation's description so we'll check for it + const5Description = talents.Where(entry => entry["icon"].ToString().Contains(name)).ElementAt(4)["descTextMapHash"].ToString(); + const5Description = Mappings[const5Description].ToString(); + + if (const5Description.Contains(auto)) + { + constellationOrder.Add("auto"); + } + else if (const5Description.Contains(skill)) + { constellationOrder.Add("skill"); } + else + { + constellationOrder.Add("burst"); + } value.Add("ConstellationOrder", constellationOrder); diff --git a/InventoryKamera/data/GOOD.cs b/InventoryKamera/data/GOOD.cs index 3ae99c0..7feb87a 100644 --- a/InventoryKamera/data/GOOD.cs +++ b/InventoryKamera/data/GOOD.cs @@ -45,7 +45,7 @@ public GOOD(InventoryKamera genshinData) : this() { // Get rid of VS warning since we are converting this class to JSON Format = "GOOD"; - Version = 2; + Version = 3; AppVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(3); Source = "Inventory_Kamera"; diff --git a/InventoryKamera/data/InventoryKamera.cs b/InventoryKamera/data/InventoryKamera.cs index e82acc0..c4e70a1 100644 --- a/InventoryKamera/data/InventoryKamera.cs +++ b/InventoryKamera/data/InventoryKamera.cs @@ -1,9 +1,12 @@ using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; using System.Threading; using System.Threading.Tasks; @@ -27,6 +30,7 @@ public class InventoryKamera private WeaponScraper weaponScraper; private ArtifactScraper artifactScraper; + private CharacterScraper characterScraper; private MaterialScraper materialScraper; private volatile bool b_threadCancel; @@ -48,6 +52,7 @@ public InventoryKamera() weaponScraper = new WeaponScraper(); artifactScraper = new ArtifactScraper(); + characterScraper = new CharacterScraper(); materialScraper = new MaterialScraper(); b_threadCancel = false; @@ -111,12 +116,119 @@ public void GatherData() // Assign Traveler's custom name GenshinProcesor.AssignTravelerName(Properties.Settings.Default.TravelerName); - - // Assign Wanderer's custom name - GenshinProcesor.UpdateCharacterName("wanderer", Properties.Settings.Default.WandererName); + // Assign Wanderer's custom name + GenshinProcesor.UpdateCharacterName("wanderer", Properties.Settings.Default.WandererName); - if (Properties.Settings.Default.ScanWeapons) + try + { + GenshinProcesor.UpdateCharacterName("manequin1", Properties.Settings.Default.Manequin1Name); + GenshinProcesor.UpdateCharacterName("manequin2", Properties.Settings.Default.Manequin2Name); + } + catch(Exception e) + { + // Source - https://stackoverflow.com/questions/33081102/how-to-add-a-new-object-to-an-existing-json-file + // Posted by Alex, modified by community. See post 'Timeline' for change history + // Retrieved 2025-11-07, License - CC BY-SA 3.0 + + //load from file + + var path = $"./inventorylists/characters.json"; + + var initialJson = File.ReadAllText(path, Encoding.Default); + + var jsonToOutput = initialJson.Remove(initialJson.Length - 3, 3); + + #region manequins + //"manequin1": { + // "GOOD": "Manequin1", + // "ConstellationName": [ + // "support for manequins to ommit them during scan, as of writing it (6th November 2025) GO doesn't support manequins" + // ], + // "ConstellationOrder": [ + // "burst", + // "skill" + // ], + // "Element": [ + // "electro", + // "pyro", + // "dendro", + // "geo", + // "hydro", + // "anemo" + // ], + // "WeaponType": 0 + //}, + //"manequin2": { + // "GOOD": "Manequin2", + // "ConstellationName": [ + // "support for manequins to ommit them during scan, as of writing it (6th November 2025) GO doesn't support manequins" + // ], + // "ConstellationOrder": [ + // "burst", + // "skill" + // ], + // "Element": [ + // "electro", + // "pyro", + // "dendro", + // "geo", + // "hydro", + // "anemo" + // ], + // "WeaponType": 0 + //} + #endregion + + + var manequinData = ",\n" + + " \"manequin1\":{\n" + + " \"GOOD\":\"Manequin1\",\n" + + " \"ConstellationName\":[\n" + + " \"support for manequins to ommit them during scan, as of writing it (6th November 2025) GO doesn't support manequins\"\n" + + " ],\n" + + " \"ConstellationOrder\":[\n" + + " \"burst\",\n" + + " \"skills\"\n" + + " ],\n" + + " \"Element\":[\n" + + " \"electro\",\n" + + " \"pyro\",\n" + + " \"dendro\",\n" + + " \"geo\",\n" + + " \"hydro\",\n" + + " \"anemo\"\n" + + " ],\n" + + " \"WeaponType\": 0" + + " },\n" + + " \"manequin2\":{\n" + + " \"GOOD\":\"Manequin2\",\n" + + " \"ConstellationName\":[\n" + + " \"support for manequins to ommit them during scan, as of writing it (6th November 2025) GO doesn't support manequins\"\n" + + " ],\n" + + " \"ConstellationOrder\":[\n" + + " \"burst\",\n" + + " \"skills\"\n" + + " ],\n" + + " \"Element\":[\n" + + " \"electro\",\n" + + " \"pyro\",\n" + + " \"dendro\",\n" + + " \"geo\",\n" + + " \"hydro\",\n" + + " \"anemo\"\n" + + " ],\n" + + " \"WeaponType\": 0" + + " }\n" + + "}"; + jsonToOutput += manequinData; + //save to file here + File.WriteAllText(path, jsonToOutput); + + GatherData(); + } + + if (Properties.Settings.Default.ScanWeapons) { Logger.Info("Scanning weapons..."); // Get Weapons @@ -166,7 +278,7 @@ public void GatherData() Navigation.CharacterScreen(); try { - CharacterScraper.ScanCharacters(ref Characters); + characterScraper.ScanCharacters(ref Characters); } catch (ThreadAbortException) { } catch (Exception ex) @@ -386,8 +498,11 @@ public void ImageProcessorWorker() imageCollection.Bitmaps[5].Save(artifactPath + "equipped/equipped.png"); Directory.CreateDirectory(artifactPath + "locked"); imageCollection.Bitmaps[6].Save(artifactPath + "locked/locked.png"); + Directory.CreateDirectory(artifactPath + "sanctify"); + imageCollection.Bitmaps[7].Save(artifactPath + "sanctify/sanctify.png"); + - imageCollection.Bitmaps.Last().Save(artifactPath + "card.png"); + imageCollection.Bitmaps.Last().Save(artifactPath + "card.png"); Task.Run(()=>LogObject(artifact, artifactPath + "artifact.json")); } diff --git a/InventoryKamera/game/Artifact.cs b/InventoryKamera/game/Artifact.cs index 62ad95b..25a2a35 100644 --- a/InventoryKamera/game/Artifact.cs +++ b/InventoryKamera/game/Artifact.cs @@ -27,6 +27,9 @@ public class Artifact [JsonProperty("substats")] public List SubStats { get; private set; } + [JsonProperty("unactivatedSubstats")] + public List unactivatedSubstats { get; private set; } + [JsonProperty("location")] public string EquippedCharacter { get; internal set; } @@ -43,19 +46,21 @@ public Artifact() MainStat = null; Level = -1; SubStats = new List(4); + unactivatedSubstats = new List(1); SetName = null; EquippedCharacter = null; Lock = false; Id = 0; } - public Artifact(string _setName, int _rarity, int _level, string _gearSlot, string _mainStat, List _subStats, string _equippedCharacter = null, int _id = 0, bool _Lock = false) + public Artifact(string _setName, int _rarity, int _level, string _gearSlot, string _mainStat, List _subStats, List _unactivatedSubStats, string _equippedCharacter = null, int _id = 0, bool _Lock = false) { GearSlot = string.IsNullOrWhiteSpace(_gearSlot) ? "" : _gearSlot; Rarity = _rarity; MainStat = string.IsNullOrWhiteSpace(_mainStat) ? "" : _mainStat; Level = _level; SubStats = _subStats.ToList().Where(e => e.value > 0).ToList(); + unactivatedSubstats = _unactivatedSubStats.ToList().Where(e => e.value > 0).ToList(); SetName = string.IsNullOrWhiteSpace(_setName) ? "" : _setName; EquippedCharacter = string.IsNullOrWhiteSpace(_equippedCharacter) ? "" : _equippedCharacter; Lock = _Lock; diff --git a/InventoryKamera/game/Character.cs b/InventoryKamera/game/Character.cs index 34acad9..92507d4 100644 --- a/InventoryKamera/game/Character.cs +++ b/InventoryKamera/game/Character.cs @@ -100,7 +100,7 @@ public bool HasValidName() public bool HasValidLevel() { - return 1 <= Level && Level <= 90; + return 1 <= Level && Level <= 100; } public bool HasValidElement() @@ -158,7 +158,7 @@ public int AscensionLevel() { return 5; } - else if (Level <= 90 || (Level == 90 && !Ascended)) + else if (Level <= 100 || (Level == 100 && !Ascended)) { return 6; } diff --git a/InventoryKamera/game/Navigation.cs b/InventoryKamera/game/Navigation.cs index beb1ab6..190a961 100644 --- a/InventoryKamera/game/Navigation.cs +++ b/InventoryKamera/game/Navigation.cs @@ -553,6 +553,16 @@ internal static void ClearArtifactFilters() SystemWait(Speed.Fast); } + internal static void ChangeArtifactSortObtained() + { + var x = 0.6437 * GetWidth(); + var y = (IsNormal ? 0.1278 : 0.1150) * GetHeight(); + + Click((int)x, (int)y); + + SystemWait(Speed.Slow); + } + public enum Speed { Slowest, diff --git a/InventoryKamera/scraping/ArtifactScraper.cs b/InventoryKamera/scraping/ArtifactScraper.cs index f66671d..79dd682 100644 --- a/InventoryKamera/scraping/ArtifactScraper.cs +++ b/InventoryKamera/scraping/ArtifactScraper.cs @@ -1,6 +1,7 @@ using Accord.Imaging; using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Globalization; using System.Linq; @@ -18,6 +19,7 @@ public ArtifactScraper() { inventoryPage = InventoryPage.Artifacts; SortByLevel = Properties.Settings.Default.MinimumArtifactLevel > 0; + SortByObtained = Properties.Settings.Default.SortByObtained; } public void ScanArtifacts(int count = 0) @@ -25,8 +27,14 @@ public void ScanArtifacts(int count = 0) // Get Max artifacts from screen int artifactCount = count == 0 ? ScanItemCount() : count; int page = 1; - var (rectangles, cols, rows) = GetPageOfItems(page); + + SetSort(); + ClearFilters(); + + var (rectangles, cols, rows) = GetPageOfItems(page); int fullPage = cols * rows; + // lowers the artifact count if user is scanning in recently obtained pages + artifactCount = (SortByObtained * fullPage <= artifactCount && SortByObtained > 0) ? SortByObtained * fullPage : artifactCount; int totalRows = (int)Math.Ceiling(artifactCount / (decimal)cols); int cardsQueued = 0; int rowsQueued = 0; @@ -36,7 +44,7 @@ public void ScanArtifacts(int count = 0) Logger.Info("Found {0} for artifact count.", artifactCount); - ClearFilters(); + //if (SortByLevel) //{ @@ -132,8 +140,9 @@ public void ScanArtifacts(int count = 0) Navigation.sim.Mouse.VerticalScroll(-1); Navigation.Wait(1); } - // Scroll back one to keep it from getting too crazy - if (page % 12 == 0) + // Scroll back one to keep it from getting too crazy + var rollbackPeriod = Navigation.IsNormal ? 9 : 3; + if (page % rollbackPeriod == 0) { Logger.Debug("Scrolled back one"); Navigation.sim.Mouse.VerticalScroll(1); @@ -161,22 +170,51 @@ private void ClearFilters() { Navigation.ClearArtifactFilters(); } + Navigation.SystemWait(Navigation.Speed.Slow); + } + } + + private void SetSort() + { + using (var x = Navigation.CaptureRegion( + x: (int)( 0.6250 * Navigation.GetWidth()), + y: (int)((Navigation.IsNormal ? 0.1111 : 0.1000) * Navigation.GetHeight()), + width: (int)( 0.0375 * Navigation.GetWidth()), + height: (int)(0.0347 * Navigation.GetHeight()))) + { + //Navigation.DisplayBitmap(x); + Color sortObtainedTrue = Color.FromArgb(255, 224, 198, 147); + Color sortObtainedStatus = x.GetPixel((int)x.Width / 2,(int) x.Height / 2); + var sortObtained = GenshinProcesor.CompareColors(sortObtainedTrue, sortObtainedStatus); + if( SortByObtained > 0 ^ sortObtained) + { + Navigation.ChangeArtifactSortObtained(); + } + Navigation.SystemWait(Navigation.Speed.Slow); } } public async void QueueScan(int id) { var card = GetItemCard(); - Bitmap name, gearSlot, mainStat, subStats, level, equipped, locked; + Bitmap name, gearSlot, mainStat, subStats, level, equipped, locked, sanctify; + bool _sanctify; name = GetItemNameBitmap(card); - locked = GetLockedBitmap(card); equipped = GetEquippedBitmap(card); gearSlot = GetGearSlotBitmap(card); mainStat = GetMainStatBitmap(card); - level = GetLevelBitmap(card); - subStats = GetSubstatsBitmap(card); + sanctify = GetSanctifyBitmap(card); + // Check for lock color + Color sanctifiedColor = Color.FromArgb(255, 220, 192, 255); // Dark area around red lock + Color sanctifyStatus = sanctify.GetPixel(10, 10); + _sanctify = GenshinProcesor.CompareColors(sanctifiedColor, sanctifyStatus); + + // may change because of sanctifying + locked = GetLockedBitmap(card, _sanctify); + level = GetLevelBitmap(card, _sanctify); + subStats = GetSubstatsBitmap(card, _sanctify); //Navigation.DisplayBitmap(name); //Navigation.DisplayBitmap(locked); @@ -184,9 +222,10 @@ public async void QueueScan(int id) //Navigation.DisplayBitmap(mainStat); //Navigation.DisplayBitmap(subStats); //Navigation.DisplayBitmap(level); + //Navigation.DisplayBitmap(sanctify); - // Separate to all pieces of artifact and add to pics - List artifactImages = new List + // Separate to all pieces of artifact and add to pics + List artifactImages = new List { name, //0 gearSlot, @@ -194,8 +233,9 @@ public async void QueueScan(int id) level, subStats, equipped, //5 - locked, - card + locked, + sanctify, + card }; bool belowRarity = GetRarity(name) < Properties.Settings.Default.MinimumArtifactRarity; @@ -211,13 +251,17 @@ public async void QueueScan(int id) InventoryKamera.workerQueue.Enqueue(new OCRImageCollection(artifactImages, "artifact", id)); } - private Bitmap GetSubstatsBitmap(Bitmap card) + private Bitmap GetSubstatsBitmap(Bitmap card, bool isSanctified = false) { + double baseY = Navigation.IsNormal ? 0.4216 : 0.3682; + double sanctifiedShift = Navigation.IsNormal ? 0.0520 : 0.0471; + double yShift = isSanctified ? sanctifiedShift : 0.0; + return GenshinProcesor.CopyBitmap(card,new Rectangle( - x:(int)(card.Width * 0.0911), - y:(int)(card.Height * (Navigation.IsNormal ? 0.4216 : 0.3682)), - width:(int)(card.Width * 0.8097), - height:(int)(card.Height * (Navigation.IsNormal ? 0.1841 : 0.1573)))); + x:(int)(card.Width * 0.0605), + y:(int)(card.Height * (baseY + yShift)), + width:(int)(card.Width * 0.8297), + height:(int)(card.Height * (Navigation.IsNormal ? 0.2301 : 0.1573)))); } private Bitmap GetMainStatBitmap(Bitmap card) @@ -229,15 +273,28 @@ private Bitmap GetMainStatBitmap(Bitmap card) height: (int)(card.Height * (Navigation.IsNormal ? 0.0416 : 0.0416)))); } - private Bitmap GetLevelBitmap(Bitmap card) + private Bitmap GetLevelBitmap(Bitmap card, bool isSanctified = false) { + double baseY = Navigation.IsNormal ? 0.3634 : 0.3197; + double sanctifiedShift = Navigation.IsNormal ? 0.0520 : 0.0465; + double yShift = isSanctified ? sanctifiedShift : 0.0; + return GenshinProcesor.CopyBitmap(card, new Rectangle( x: (int)(card.Width * 0.0506), - y: (int)(card.Height * (Navigation.IsNormal ? 0.3634 : 0.3197)), + y: (int)(card.Height * (baseY + yShift)), width: (int)(card.Width * 0.1417), height: (int)(card.Height * (Navigation.IsNormal ? 0.0416 : 0.0347)))); } + private Bitmap GetSanctifyBitmap(Bitmap card) + { + return GenshinProcesor.CopyBitmap(card, new Rectangle( + x: (int)(card.Width * 0.0), + y: (int)(card.Height * (Navigation.IsNormal ? 0.3333 : 0.2941)), + width: (int)(card.Width * 0.0606), + height: (int)(card.Height * (Navigation.IsNormal ? 0.0526 : 0.0470)))); + } + private Bitmap GetGearSlotBitmap(Bitmap card) { return GenshinProcesor.CopyBitmap(card, new Rectangle( @@ -255,7 +312,8 @@ public static async Task CatalogueFromBitmapsAsync(List bm, in string setName = null; string equippedCharacter = null; List subStats = new List(); - int rarity = 0; + List unactivatedSubStats = new List(); + int rarity = 0; int level = 0; bool _lock = false; @@ -281,7 +339,7 @@ public static async Task CatalogueFromBitmapsAsync(List bm, in var taskGear = Task.Run(() => gearSlot = ScanArtifactGearSlot(bm[a_gearSlot])); var taskMain = taskGear.ContinueWith( (antecedent) => mainStat = ScanArtifactMainStat(bm[a_mainStat], antecedent.Result)); var taskLevel = Task.Run(() => level = ScanArtifactLevel(bm[a_level])); - var taskSubs = Task.Run(() => subStats = ScanArtifactSubStats(bm[a_subStats])); + var taskSubs = Task.Run(() => (subStats, unactivatedSubStats) = ScanArtifactSubStats(bm[a_subStats])); var taskEquip = Task.Run(() => equippedCharacter = ScanArtifactEquippedCharacter(bm[a_equippedCharacter])); var taskName = Task.Run(() => setName = ScanArtifactSet(bm[a_name])); @@ -297,7 +355,7 @@ public static async Task CatalogueFromBitmapsAsync(List bm, in await Task.WhenAll(tasks.ToArray()); } - return new Artifact(setName, rarity, level, gearSlot, mainStat, subStats, equippedCharacter, id, _lock); + return new Artifact(setName, rarity, level, gearSlot, mainStat, subStats, unactivatedSubStats, equippedCharacter, id, _lock); } private static int GetRarity(Bitmap bm) @@ -417,32 +475,42 @@ private static int ScanArtifactLevel(Bitmap bm) return int.TryParse(text, out int level) ? level : -1; } - private static List ScanArtifactSubStats(Bitmap artifactImage) + private static (List active, List unactivated) ScanArtifactSubStats(Bitmap artifactImage) { Bitmap bm = (Bitmap)artifactImage.Clone(); List lines = new List(); List substats = new List(); + List unactivated = new List(); string text; GenshinProcesor.SetBrightness(-30, ref bm); GenshinProcesor.SetContrast(85, ref bm); + bool hasUnactivated = false; using (var n = GenshinProcesor.ConvertToGrayscale(bm)) { text = GenshinProcesor.AnalyzeText(n, Tesseract.PageSegMode.Auto).ToLower(); } + if(text.Contains("(unactivated)")) + { + hasUnactivated = true; + } + lines = new List(text.Split('\n')); lines.RemoveAll(line => string.IsNullOrWhiteSpace(line)); - var index = lines.FindIndex(line => line.Contains(":") || line.Contains("piece") || line.Contains("set") || line.Contains("2-")); + var index = lines.FindIndex(line => + Regex.IsMatch(line, @"(piece|set|2-)") || + Regex.IsMatch(line.Trim(), @"^[A-Za-z\s]+:$") + ); if (index >= 0) - { - lines.RemoveRange(index, lines.Count - index); - } + { + lines.RemoveRange(index, lines.Count - index); + } bm.Dispose(); - for (int i = 0; i < lines.Count; i++) - { - var line = Regex.Replace(lines[i], @"(?:^[^a-zA-Z]*)", string.Empty).Replace(" ", string.Empty); + for (int i = 0; i < lines.Count; i++) + { + var line = Regex.Replace(lines[i], @"(?:^[^a-zA-Z]*)", string.Empty).Replace(" ", string.Empty); if (line.Any(char.IsDigit)) { @@ -480,8 +548,22 @@ private static List ScanArtifactSubStats(Bitmap artifactImage) substats.Insert(i, substat); } - } - return substats; + } + + if(substats.Count == 0 ) + { + Logger.Debug("Failed to obtain substats"); + } + + //if theres an unactivated substat, moves the last one (should be the only unactivated) to the unactivated list + if (hasUnactivated && substats.Count > 0) + { + SubStat lastSubstat = substats[substats.Count - 1]; + unactivated.Insert(0, lastSubstat); + substats.Remove(lastSubstat); + } + + return (substats, unactivated); } private static string ScanArtifactEquippedCharacter(Bitmap bm) diff --git a/InventoryKamera/scraping/CharacterScraper.cs b/InventoryKamera/scraping/CharacterScraper.cs index 4031d28..46c79d8 100644 --- a/InventoryKamera/scraping/CharacterScraper.cs +++ b/InventoryKamera/scraping/CharacterScraper.cs @@ -9,13 +9,21 @@ namespace InventoryKamera { - public static class CharacterScraper + internal class CharacterScraper { private static NLog.Logger Logger = NLog.LogManager.GetCurrentClassLogger(); - public static void ScanCharacters(ref List Characters) + protected int NumOfCharToScan; + + public CharacterScraper() + { + NumOfCharToScan = Properties.Settings.Default.NumOfCharToScan; + } + + public void ScanCharacters(ref List Characters) { int viewed = 0; + int counter = 0; string first = null; HashSet scanned = new HashSet(); @@ -24,36 +32,40 @@ public static void ScanCharacters(ref List Characters) while (true) { var character = ScanCharacter(first); - if (Characters.Count > 0 && character.NameGOOD == Characters.ElementAt(0).NameGOOD) break; - if (character.IsValid()) + if(character.NameGOOD != "manequin") { - if (!scanned.Contains(character.NameGOOD)) - { - Characters.Add(character); - UserInterface.IncrementCharacterCount(); - Logger.Info("Scanned {0} successfully", character.NameGOOD); - if (Characters.Count == 1) first = character.NameGOOD; - } - else + if (Characters.Count > 0 && character.NameGOOD == Characters.ElementAt(0).NameGOOD) break; + if (character.IsValid()) { - Logger.Info("Prevented {0} duplicate scan", character.NameGOOD); + if (!scanned.Contains(character.NameGOOD)) + { + Characters.Add(character); + UserInterface.IncrementCharacterCount(); + counter++; + Logger.Info("Scanned {0} successfully", character.NameGOOD); + if (Characters.Count == 1) first = character.NameGOOD; + } + else + { + Logger.Info("Prevented {0} duplicate scan", character.NameGOOD); + } } - } - else - { - string error = ""; - if (!character.HasValidName()) error += "Invalid character name\n"; - if (!character.HasValidLevel()) error += "Invalid level\n"; - if (!character.HasValidElement()) error += "Invalid element\n"; - if (!character.HasValidConstellation()) error += "Invalid constellation\n"; - if (!character.HasValidTalents()) error += "Invalid talents\n"; - Logger.Error("Failed to scan character\n" + error + character); - } + else + { + string error = ""; + if (!character.HasValidName()) error += "Invalid character name\n"; + if (!character.HasValidLevel()) error += "Invalid level\n"; + if (!character.HasValidElement()) error += "Invalid element\n"; + if (!character.HasValidConstellation()) error += "Invalid constellation\n"; + if (!character.HasValidTalents()) error += "Invalid talents\n"; + Logger.Error("Failed to scan character\n" + error + character); + } + } - Navigation.SelectNextCharacter(); + Navigation.SelectNextCharacter(); UserInterface.ResetCharacterDisplay(); - if (++viewed > 3 && Characters.Count < 1) break; + if ((++viewed > 3 && Characters.Count < 1) || (NumOfCharToScan !=0 && counter >= NumOfCharToScan)) break; } // Childe passive buff fix @@ -92,7 +104,13 @@ private static Character ScanCharacter(string firstCharacter) // Scan the Name and element of Character. Attempt 75 times max. ScanNameAndElement(ref name, ref element); - if (string.IsNullOrWhiteSpace(name)) + if(name == "Manequin1" || name == "Manequin2") + { + character.NameGOOD = name; + return character; + } + + if (string.IsNullOrWhiteSpace(name)) { if (string.IsNullOrWhiteSpace(name)) UserInterface.AddError("Could not determine character's name"); if (string.IsNullOrWhiteSpace(element)) UserInterface.AddError("Could not determine character's element"); @@ -144,23 +162,21 @@ private static Character ScanCharacter(string firstCharacter) string talentLeveledAtConst3 = character.NameGOOD.Contains("Traveler") ? (string)GenshinProcesor.Characters[name.ToLower()]["ConstellationOrder"][character.Element.ToLower()][0] : (string)GenshinProcesor.Characters[name.ToLower()]["ConstellationOrder"][0]; + string talentLeveledAtConst5 = character.NameGOOD.Contains("Traveler") + ? (string)GenshinProcesor.Characters[name.ToLower()]["ConstellationOrder"][character.Element.ToLower()][1] + : (string)GenshinProcesor.Characters[name.ToLower()]["ConstellationOrder"][1]; - // Scale down talents - if (character.Constellation >= 5) + // Scale down talents + if (character.Constellation >= 3) { - Logger.Info("{0} constellation 5+, adjusting scanned skill and burst levels", character.NameGOOD); - character.Talents["skill"] -= 3; - character.Talents["burst"] -= 3; + Logger.Info("{0} constellation 3+, adjusting scanned {1} level", character.NameGOOD, talentLeveledAtConst3); + character.Talents[talentLeveledAtConst3] -= 3; } - else if (talentLeveledAtConst3 == "skill") - { - Logger.Info("{0} constellation 3+, adjusting scanned skill level", character.NameGOOD); - character.Talents["skill"] -= 3; - } - else + + if (character.Constellation >= 5) { - Logger.Info("{0} constellation 3+, adjusting scanned burst level", character.NameGOOD); - character.Talents["burst"] -= 3; + Logger.Info("{0} constellation 5+, adjusting scanned {1} level", character.NameGOOD, talentLeveledAtConst5); + character.Talents[talentLeveledAtConst5] -= 3; } } else @@ -451,10 +467,10 @@ private static Dictionary ScanTalents(Character character) if (Navigation.GetAspectRatio() == new Size(8, 5)) yRef = 800.0; Rectangle region = new Rectangle( - x: (int)((Navigation.IsNormal ? 0.0003 : 0) * Navigation.GetWidth() ), - y: (int)((Navigation.IsNormal ? 0.1278 : 0) * Navigation.GetHeight() ), - width: (int)((Navigation.IsNormal ? 0.2913 : 0) * Navigation.GetWidth() ), - height: (int)((Navigation.IsNormal ? 0.0711 : 0) * Navigation.GetHeight() )); + x: (int)((Navigation.IsNormal ? 0.0003 : 0.0003) * Navigation.GetWidth() ), + y: (int)((Navigation.IsNormal ? 0.1278 : 0.1078) * Navigation.GetHeight() ), + width: (int)((Navigation.IsNormal ? 0.2913 : 0.2913) * Navigation.GetWidth() ), + height: (int)((Navigation.IsNormal ? 0.0711 : 0.0711) * Navigation.GetHeight() )); for (int i = 0; i < 3; i++) { diff --git a/InventoryKamera/scraping/GenshinProcesor.cs b/InventoryKamera/scraping/GenshinProcesor.cs index 0d8e192..e27cce8 100644 --- a/InventoryKamera/scraping/GenshinProcesor.cs +++ b/InventoryKamera/scraping/GenshinProcesor.cs @@ -75,7 +75,9 @@ public static class GenshinProcesor internal static readonly List customNames = new List { "Traveler", - "Wanderer" + "Wanderer", + "Manequin1", + "Manequin2" }; internal static ConcurrentBag engines; @@ -242,7 +244,7 @@ internal static bool IsValidSlot(string gearSlot) internal static bool IsValidCharacter(string character) { - return character.Contains("Traveler") || character == "Wanderer" || Characters.ContainsKey(character.ToLower()); + return character.Contains("Traveler") || character == "Wanderer" || character == "Manequin1" || character == "Manequin2" || Characters.ContainsKey(character.ToLower()); } internal static bool IsValidElement(string element) diff --git a/InventoryKamera/scraping/InventoryScraper.cs b/InventoryKamera/scraping/InventoryScraper.cs index f41213e..a38b0fc 100644 --- a/InventoryKamera/scraping/InventoryScraper.cs +++ b/InventoryKamera/scraping/InventoryScraper.cs @@ -55,6 +55,8 @@ internal class InventoryScraper protected bool SortByLevel = false; + protected int SortByObtained = 0; + protected readonly List materialPages; private List prevRect; @@ -386,15 +388,7 @@ internal string CurrentSortingMethod() using (var brush = new SolidBrush(Color.Black)) { // Fill Top region - switch (inventoryPage) - { - case InventoryPage.Artifacts: - g.FillRectangle(brush, 0, 0, processedScreenshot.Width, (int)(processedScreenshot.Height * 0.143)); - break; - default: - g.FillRectangle(brush, 0, 0, processedScreenshot.Width, (int)(processedScreenshot.Height * 0.09)); - break; - } + g.FillRectangle(brush, 0, 0, processedScreenshot.Width, (int)(processedScreenshot.Height * 0.09)); // Fill Left region g.FillRectangle(brush, 0, 0, (int)(processedScreenshot.Width * 0.05), processedScreenshot.Height); @@ -410,7 +404,7 @@ internal string CurrentSortingMethod() List rectangles; int cols, rows, itemCount, counter = 0; double weight = 0; - int itemPerPage = inventoryPage == InventoryPage.Artifacts ? 32 : 40; + int itemPerPage = (inventoryPage != InventoryPage.Artifacts || !Navigation.IsNormal) ? 40 : 32; do { (rectangles, cols, rows) = ProcessScreenshot(processedScreenshot, weight); @@ -521,12 +515,16 @@ internal static Bitmap GetItemNameBitmap(Bitmap card) /// /// Bitmap of the item card /// A bitmap copy of the item card's lock status icon - internal static Bitmap GetLockedBitmap(Bitmap card) + internal static Bitmap GetLockedBitmap(Bitmap card, bool isSanctified = false) { + double baseY = Navigation.IsNormal ? 0.353 : 0.309; + double sanctifiedShift = Navigation.IsNormal ? 0.0520 : 0.0471; + double yShift = isSanctified ? sanctifiedShift : 0.0; + return GenshinProcesor.CopyBitmap(card, new Rectangle( x: (int)(card.Width * 0.75), - y: (int)(card.Height * (Navigation.IsNormal ? 0.353 : 0.309)), + y: (int)(card.Height * (baseY + yShift)), width: (int)(card.Width * 0.0955), height: (int)(card.Height * (Navigation.IsNormal ? 0.055 : 0.0495)))); } diff --git a/InventoryKamera/ui/main/MainForm.Designer.cs b/InventoryKamera/ui/main/MainForm.Designer.cs index 24bbae9..7191b56 100644 --- a/InventoryKamera/ui/main/MainForm.Designer.cs +++ b/InventoryKamera/ui/main/MainForm.Designer.cs @@ -65,12 +65,13 @@ private void InitializeComponent() this.Navigation_Label = new System.Windows.Forms.Label(); this.ScannerOutput_Panel = new System.Windows.Forms.Panel(); this.GearPictureBox = new System.Windows.Forms.PictureBox(); + this.OutputPath_TextBox = new System.Windows.Forms.TextBox(); + this.FileSelectButton = new System.Windows.Forms.Button(); this.ScannerDelay_Label = new System.Windows.Forms.Label(); this.ScanItemsList_Label = new System.Windows.Forms.Label(); this.FastScannerDelay_Label = new System.Windows.Forms.Label(); this.MidScannerDelay_Label = new System.Windows.Forms.Label(); this.SlowScannerDelay_Label = new System.Windows.Forms.Label(); - this.FileSelectButton = new System.Windows.Forms.Button(); this.FileLocation_Label = new System.Windows.Forms.Label(); this.Language_Label = new System.Windows.Forms.Label(); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); @@ -101,6 +102,10 @@ private void InitializeComponent() this.EquipArtifactsCheckBox = new System.Windows.Forms.CheckBox(); this.screenshotsToolTip = new System.Windows.Forms.ToolTip(this.components); this.LogScreenshotsCheckBox = new System.Windows.Forms.CheckBox(); + this.SortByObtained = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.NumOfCharToScanControl = new System.Windows.Forms.NumericUpDown(); + this.SortByObtainedControl = new System.Windows.Forms.NumericUpDown(); this.wandererNameTextBox = new System.Windows.Forms.TextBox(); this.travelerNameTextBox = new System.Windows.Forms.TextBox(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); @@ -112,8 +117,12 @@ private void InitializeComponent() this.Characters_CheckBox = new System.Windows.Forms.CheckBox(); this.Artifacts_Checkbox = new System.Windows.Forms.CheckBox(); this.Weapons_CheckBox = new System.Windows.Forms.CheckBox(); - this.OutputPath_TextBox = new System.Windows.Forms.TextBox(); this.ScannerDelay_TrackBar = new System.Windows.Forms.TrackBar(); + this.ZeroMeansAllTooltips = new System.Windows.Forms.ToolTip(this.components); + this.label6 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.CharacterTalent3_PictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CharacterTalent2_PictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.CharacterTalent1_PictureBox)).BeginInit(); @@ -123,6 +132,8 @@ private void InitializeComponent() this.ScannerOutput_Panel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.GearPictureBox)).BeginInit(); this.menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NumOfCharToScanControl)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SortByObtainedControl)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MinimumWeaponLevelControl)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ArtifactRarityControl)).BeginInit(); @@ -519,6 +530,8 @@ private void InitializeComponent() this.ScannerOutput_Panel.Controls.Add(this.WeaponArtifactOutput_TextBox_Label); this.ScannerOutput_Panel.Controls.Add(this.ErrorLog_Label); this.ScannerOutput_Panel.Controls.Add(this.ErrorLog_TextBox); + this.ScannerOutput_Panel.Controls.Add(this.OutputPath_TextBox); + this.ScannerOutput_Panel.Controls.Add(this.FileSelectButton); this.ScannerOutput_Panel.Location = new System.Drawing.Point(153, 206); this.ScannerOutput_Panel.Margin = new System.Windows.Forms.Padding(0); this.ScannerOutput_Panel.Name = "ScannerOutput_Panel"; @@ -534,6 +547,30 @@ private void InitializeComponent() this.GearPictureBox.TabIndex = 61; this.GearPictureBox.TabStop = false; // + // OutputPath_TextBox + // + this.OutputPath_TextBox.BackColor = System.Drawing.Color.White; + this.OutputPath_TextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "OutputPath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.OutputPath_TextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.OutputPath_TextBox.Location = new System.Drawing.Point(48, -1); + this.OutputPath_TextBox.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.OutputPath_TextBox.Name = "OutputPath_TextBox"; + this.OutputPath_TextBox.Size = new System.Drawing.Size(386, 18); + this.OutputPath_TextBox.TabIndex = 79; + this.OutputPath_TextBox.Text = global::InventoryKamera.Properties.Settings.Default.OutputPath; + // + // FileSelectButton + // + this.FileSelectButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FileSelectButton.Location = new System.Drawing.Point(2, -1); + this.FileSelectButton.Margin = new System.Windows.Forms.Padding(2); + this.FileSelectButton.Name = "FileSelectButton"; + this.FileSelectButton.Size = new System.Drawing.Size(50, 19); + this.FileSelectButton.TabIndex = 77; + this.FileSelectButton.Text = "Select"; + this.FileSelectButton.UseVisualStyleBackColor = true; + this.FileSelectButton.Click += new System.EventHandler(this.FileSelectButton_Click); + // // ScannerDelay_Label // this.ScannerDelay_Label.AutoSize = true; @@ -588,23 +625,11 @@ private void InitializeComponent() this.SlowScannerDelay_Label.TabIndex = 76; this.SlowScannerDelay_Label.Text = "Slow"; // - // FileSelectButton - // - this.FileSelectButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FileSelectButton.Location = new System.Drawing.Point(153, 182); - this.FileSelectButton.Margin = new System.Windows.Forms.Padding(2); - this.FileSelectButton.Name = "FileSelectButton"; - this.FileSelectButton.Size = new System.Drawing.Size(50, 19); - this.FileSelectButton.TabIndex = 77; - this.FileSelectButton.Text = "Select"; - this.FileSelectButton.UseVisualStyleBackColor = true; - this.FileSelectButton.Click += new System.EventHandler(this.FileSelectButton_Click); - // // FileLocation_Label // this.FileLocation_Label.AutoSize = true; this.FileLocation_Label.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FileLocation_Label.Location = new System.Drawing.Point(150, 166); + this.FileLocation_Label.Location = new System.Drawing.Point(153, 188); this.FileLocation_Label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.FileLocation_Label.Name = "FileLocation_Label"; this.FileLocation_Label.Size = new System.Drawing.Size(69, 13); @@ -803,7 +828,7 @@ private void InitializeComponent() // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(238, 114); + this.label1.Location = new System.Drawing.Point(326, 106); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(87, 13); this.label1.TabIndex = 102; @@ -812,7 +837,7 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(230, 148); + this.label4.Location = new System.Drawing.Point(318, 132); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(95, 13); this.label4.TabIndex = 106; @@ -864,22 +889,65 @@ private void InitializeComponent() "enshots will be cleared when a new scan is started.\r\n"); this.LogScreenshotsCheckBox.UseVisualStyleBackColor = true; // + // SortByObtained + // + this.SortByObtained.AutoSize = true; + this.SortByObtained.Location = new System.Drawing.Point(7, 168); + this.SortByObtained.Name = "SortByObtained"; + this.SortByObtained.Size = new System.Drawing.Size(145, 13); + this.SortByObtained.TabIndex = 107; + this.SortByObtained.Text = "Num of Artifact Page to Scan"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(153, 110); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(149, 13); + this.label5.TabIndex = 109; + this.label5.Text = "Number of Character To Scan"; + // + // NumOfCharToScanControl + // + this.NumOfCharToScanControl.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::InventoryKamera.Properties.Settings.Default, "NumOfCharToScan", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.NumOfCharToScanControl.Location = new System.Drawing.Point(154, 129); + this.NumOfCharToScanControl.Name = "NumOfCharToScanControl"; + this.NumOfCharToScanControl.Size = new System.Drawing.Size(39, 20); + this.NumOfCharToScanControl.TabIndex = 110; + this.ZeroMeansAllTooltips.SetToolTip(this.NumOfCharToScanControl, "Selecting 0 scans all characters"); + this.NumOfCharToScanControl.Value = global::InventoryKamera.Properties.Settings.Default.NumOfCharToScan; + // + // SortByObtainedControl + // + this.SortByObtainedControl.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::InventoryKamera.Properties.Settings.Default, "SortByObtained", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.SortByObtainedControl.Location = new System.Drawing.Point(10, 184); + this.SortByObtainedControl.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.SortByObtainedControl.Name = "SortByObtainedControl"; + this.SortByObtainedControl.Size = new System.Drawing.Size(45, 20); + this.SortByObtainedControl.TabIndex = 108; + this.ZeroMeansAllTooltips.SetToolTip(this.SortByObtainedControl, "Selecting 0 scans all Artifacts"); + this.SortByObtainedControl.Value = global::InventoryKamera.Properties.Settings.Default.SortByObtained; + // // wandererNameTextBox // this.wandererNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "WandererName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.wandererNameTextBox.Location = new System.Drawing.Point(328, 145); + this.wandererNameTextBox.Location = new System.Drawing.Point(416, 129); this.wandererNameTextBox.Name = "wandererNameTextBox"; this.wandererNameTextBox.Size = new System.Drawing.Size(169, 20); this.wandererNameTextBox.TabIndex = 105; this.wandererNameTextBox.Text = global::InventoryKamera.Properties.Settings.Default.WandererName; this.wandererNameTextBox.TextChanged += new System.EventHandler(this.ValidateCustomName); this.wandererNameTextBox.MouseHover += new System.EventHandler(this.DisplayCustomNameTooltip); - this.wandererNameTextBox.ParentChanged += new System.EventHandler(this.ValidateCustomName); + this.wandererNameTextBox.ParentChanged += new System.EventHandler(this.ValidateCustomName2); // // travelerNameTextBox // this.travelerNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "TravelerName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.travelerNameTextBox.Location = new System.Drawing.Point(328, 111); + this.travelerNameTextBox.Location = new System.Drawing.Point(416, 103); this.travelerNameTextBox.Name = "travelerNameTextBox"; this.travelerNameTextBox.Size = new System.Drawing.Size(169, 20); this.travelerNameTextBox.TabIndex = 101; @@ -1032,18 +1100,6 @@ private void InitializeComponent() this.Weapons_CheckBox.Text = "Weapons"; this.Weapons_CheckBox.UseVisualStyleBackColor = true; // - // OutputPath_TextBox - // - this.OutputPath_TextBox.BackColor = System.Drawing.Color.White; - this.OutputPath_TextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "OutputPath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); - this.OutputPath_TextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.OutputPath_TextBox.Location = new System.Drawing.Point(202, 182); - this.OutputPath_TextBox.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); - this.OutputPath_TextBox.Name = "OutputPath_TextBox"; - this.OutputPath_TextBox.Size = new System.Drawing.Size(386, 18); - this.OutputPath_TextBox.TabIndex = 79; - this.OutputPath_TextBox.Text = global::InventoryKamera.Properties.Settings.Default.OutputPath; - // // ScannerDelay_TrackBar // this.ScannerDelay_TrackBar.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::InventoryKamera.Properties.Settings.Default, "ScannerDelay", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged, null, "N0")); @@ -1056,12 +1112,58 @@ private void InitializeComponent() this.ScannerDelay_TrackBar.Value = global::InventoryKamera.Properties.Settings.Default.ScannerDelay; this.ScannerDelay_TrackBar.ValueChanged += new System.EventHandler(this.ScannerDelay_TrackBar_ValueChanged); // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(303, 158); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(107, 13); + this.label6.TabIndex = 111; + this.label6.Text = "Manequin\'s (f) Name:"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(298, 186); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(112, 13); + this.label7.TabIndex = 112; + this.label7.Text = "Manequin\'s (m) Name:"; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "Manequin1Name", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox1.Location = new System.Drawing.Point(416, 155); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(169, 20); + this.textBox1.TabIndex = 113; + this.textBox1.Text = "Manequin1"; + this.textBox1.TextChanged += new System.EventHandler(this.ValidateCustomName1); + // + // textBox2 + // + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::InventoryKamera.Properties.Settings.Default, "Manequin2Name", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.textBox2.Location = new System.Drawing.Point(416, 181); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(169, 20); + this.textBox2.TabIndex = 114; + this.textBox2.Text = "Manequin2"; + this.textBox2.TextChanged += new System.EventHandler(this.ValidateCustomName2); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.ClientSize = new System.Drawing.Size(595, 519); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label7); + this.Controls.Add(this.label6); + this.Controls.Add(this.NumOfCharToScanControl); + this.Controls.Add(this.label5); + this.Controls.Add(this.SortByObtainedControl); + this.Controls.Add(this.SortByObtained); this.Controls.Add(this.label4); this.Controls.Add(this.wandererNameTextBox); this.Controls.Add(this.label1); @@ -1085,9 +1187,7 @@ private void InitializeComponent() this.Controls.Add(this.Artifacts_Checkbox); this.Controls.Add(this.Weapons_CheckBox); this.Controls.Add(this.Language_Label); - this.Controls.Add(this.OutputPath_TextBox); this.Controls.Add(this.FileLocation_Label); - this.Controls.Add(this.FileSelectButton); this.Controls.Add(this.SlowScannerDelay_Label); this.Controls.Add(this.MidScannerDelay_Label); this.Controls.Add(this.FastScannerDelay_Label); @@ -1135,6 +1235,8 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.GearPictureBox)).EndInit(); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.NumOfCharToScanControl)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SortByObtainedControl)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.MinimumWeaponLevelControl)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ArtifactRarityControl)).EndInit(); @@ -1231,6 +1333,15 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem updateExecutablesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem characterSlot1KeyToolStripMenuItem; private System.Windows.Forms.ToolStripTextBox slot1StripTextBox; + private System.Windows.Forms.Label SortByObtained; + private System.Windows.Forms.NumericUpDown SortByObtainedControl; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.NumericUpDown NumOfCharToScanControl; + private System.Windows.Forms.ToolTip ZeroMeansAllTooltips; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox textBox2; } } diff --git a/InventoryKamera/ui/main/MainForm.cs b/InventoryKamera/ui/main/MainForm.cs index dfe3b19..5089639 100644 --- a/InventoryKamera/ui/main/MainForm.cs +++ b/InventoryKamera/ui/main/MainForm.cs @@ -188,6 +188,42 @@ private void ValidateCustomName(object sender, EventArgs e) } } + private void ValidateCustomName1(object sender, EventArgs e) + { + var textbox = sender as TextBox; + var name = textbox.Text; + + if (!string.IsNullOrWhiteSpace(name)) + { + if (GenshinProcesor.Characters.ContainsKey(name.ConvertToGood().ToLower())) + { + textbox.BackColor = Color.Yellow; + } + else + { + textbox.BackColor = Color.White; + } + } + } + private void ValidateCustomName2(object sender, EventArgs e) + { + var textbox = sender as TextBox; + var name = textbox.Text; + + if (!string.IsNullOrWhiteSpace(name)) + { + if (GenshinProcesor.Characters.ContainsKey(name.ConvertToGood().ToLower())) + { + textbox.BackColor = Color.Yellow; + } + else + { + textbox.BackColor = Color.White; + } + } + } + + private void DisplayCustomNameTooltip(object sender, EventArgs e) { var textbox = sender as TextBox; @@ -344,17 +380,17 @@ private void OpenOptimizerDialog(GOOD data, bool skip = false) private void Github_Label_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera/"); + Process.Start("https://github.com/taiwenlee/Inventory_Kamera/"); } private void Releases_Label_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera/releases"); + Process.Start("https://github.com/taiwenlee/Inventory_Kamera/releases"); } private void IssuesPage_Label_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - Process.Start("https://github.com/Andrewthe13th/Inventory_Kamera/issues"); + Process.Start("https://github.com/taiwenlee/Inventory_Kamera/issues"); } private void FileSelectButton_Click(object sender, EventArgs e) diff --git a/InventoryKamera/ui/main/MainForm.resx b/InventoryKamera/ui/main/MainForm.resx index 00746e7..80dd6b8 100644 --- a/InventoryKamera/ui/main/MainForm.resx +++ b/InventoryKamera/ui/main/MainForm.resx @@ -132,6 +132,9 @@ 495, 17 + + 17, 54 + True diff --git a/README.md b/README.md index c2fc918..8943ed6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Fan-made Genshin Impact tool that scans characters, weapons, artifacts, material This scanner exports in `.GOOD`, a JSON-based exporting format, which allows you to use it with compatible online Genshin Impact tools. These tools include artifact optimizing tools including [Genshin Optimizer](https://frzyc.github.io/genshin-optimizer/#/), [SEELIE.me](https://seelie.me/) and [Aspirine's Genshin Impact Calculator](https://genshin.aspirine.su/). ## Download -[LATEST DOWNLOAD HERE](https://github.com/Andrewthe13th/Inventory_Kamera/releases/latest) <- CLICK ME NOT THE "CODE" BUTTON NEAR THE TOP OF THIS PAGE +[LATEST DOWNLOAD HERE](https://github.com/taiwenlee/Inventory_Kamera/releases/latest) <- CLICK ME NOT THE "CODE" BUTTON NEAR THE TOP OF THIS PAGE ## DISCORD https://discord.gg/zh56aVWe3U @@ -203,34 +203,10 @@ artifacts.json Consider using [a JSON text validator](https://jsonlint.com/) after following this manual method. Support may or may not be provided if you choose this route. -## Reporting an issue - -If you run into a problem with our scanner (e.g. a bug, app crash, invalid export format), please [create an issue here](https://github.com/Andrewthe13th/Inventory_Kamera/issues/new/choose) and try to fill it out as much as possible. It, along with the evidence, will greatly speed up the bug-fixing process. - -Alternatively, the [Inventory Kamera Discord](https://discord.gg/zh56aVWe3U) is open for more real-time discussion and support help. - -> **Note** -> -> Before submitting an issue, **please [check for similar issues](https://github.com/Andrewthe13th/Inventory_Kamera/issues?q=is%3Aissue), especially the ones that are still open.** -> -> Start by leaving a reaction emoji to that issue (more reactions means more dev attention!). Please try to limit comments to new or helpful information (i.e. not "Same issue here" comments). You can choose to _subscribe_ to that issue by clicking 'Subscribe' in the Notifications section to get notifications on thread developments. - ### Creating a new issue We would **love to have Screenshots (especially video recordings!) and Error Logs as evidence**. These can be very helpful for debugging your problem. Add it to the issue via drag-and-drop or by attaching the file to the template. Inventory Kamera may place screenshots in the `logging` folder (divided into categories) when it thinks it encountered an issue. Attaching a zipped copy of your `logging` folder is the best way to submit logs. You may check the 'Log All Screenshots' box to force this behavior in most areas that may concern the devs. -## Requesting a new feature - -If you would like to request a new feature, please visit the [discussion forum](https://github.com/Andrewthe13th/Inventory_Kamera/discussions) before opening a new feature request using [Inventory Kamera feature request form](https://github.com/Andrewthe13th/Inventory_Kamera/discussions/new?category=ideas-or-feature-requests). - -Alternatively, the [Inventory Kamera Discord](https://discord.gg/zh56aVWe3U) is has a feature request channel. - -## Asking a question - -General questions? Start by looking for similar questions in the [Inventory Kamera discussion forum](https://github.com/Andrewthe13th/Inventory_Kamera/discussions) OR the [Inventory Kamera Discord](https://discord.gg/zh56aVWe3U). - -If you have a question that doesn't have a thread, create a new [general](https://github.com/Andrewthe13th/Inventory_Kamera/discussions/new?category=general) or [Q&A](https://github.com/Andrewthe13th/Inventory_Kamera/discussions/new?category=q-a) thread. - ## Frequently Asked Questions (FAQ) #### Can Inventory Kamera get me banned? @@ -246,10 +222,6 @@ However, that does not mean it will stay that way forever! We are at the mercy o Inventory Kamera only supports _**English**_ currently. This limitation is due to only having a trained dataset available for the English language. The in-game "Game Langugae" option must be set to Engish. Scanning efficiency is not guaranteed for other languages. More languages may be implemented in the future but there are no current plans. -#### I need help! Where can I go? - -Help may be found in the [Inventory Kamera discussion forum](https://github.com/Andrewthe13th/Inventory_Kamera/discussions) or in the [Inventory Kamera Discord](https://discord.gg/zh56aVWe3U). - ## License - This project is distributed under the [MIT license](LICENSE).