Commit 0af72d38 authored by JoyJ's avatar JoyJ

添加项目文件。

parent cd1e094a

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YGO_DeckAnalyzer", "YGO_DeckAnalyzer\YGO_DeckAnalyzer.csproj", "{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9526D455-79BB-4379-9E84-03E6B5BFE8DA}
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="YGO_DeckAnalyzer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<userSettings>
<YGO_DeckAnalyzer.Properties.Settings>
<setting name="StringsConf" serializeAs="String">
<value />
</setting>
<setting name="CardsCdb" serializeAs="String">
<value />
</setting>
<setting name="StringsConfDir" serializeAs="String">
<value />
</setting>
<setting name="CardsCdbDir" serializeAs="String">
<value />
</setting>
<setting name="AllowMixDeck" serializeAs="String">
<value>False</value>
</setting>
<setting name="OutputDescription" serializeAs="String">
<value>False</value>
</setting>
<setting name="NoFile" serializeAs="String">
<value>False</value>
</setting>
<setting name="MostOnly" serializeAs="String">
<value>True</value>
</setting>
</YGO_DeckAnalyzer.Properties.Settings>
</userSettings>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
</configuration>
\ No newline at end of file
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
namespace YGO_DeckAnalyzer
{
partial class FormChart
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
this.cChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.menuSaveToImage = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuSave = new System.Windows.Forms.ToolStripMenuItem();
this.menuHighResSave = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopy = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopyHighRes = new System.Windows.Forms.ToolStripMenuItem();
this.tbChartType = new System.Windows.Forms.TrackBar();
this.label1 = new System.Windows.Forms.Label();
this.btnSepOthers = new System.Windows.Forms.Button();
this.btnCombineOthers = new System.Windows.Forms.Button();
this.sfdImage = new System.Windows.Forms.SaveFileDialog();
this.btnSetColor = new System.Windows.Forms.Button();
this.fontSetFont = new System.Windows.Forms.FontDialog();
this.btnColor = new System.Windows.Forms.Button();
this.colorSetColor = new System.Windows.Forms.ColorDialog();
this.btnSetLineColor = new System.Windows.Forms.Button();
this.colorSetLineColor = new System.Windows.Forms.ColorDialog();
this.trackImageScale = new System.Windows.Forms.TrackBar();
this.label2 = new System.Windows.Forms.Label();
this.menuSaveExtraHighRes = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopyExtraHighRes = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.cChart)).BeginInit();
this.menuSaveToImage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbChartType)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.trackImageScale)).BeginInit();
this.SuspendLayout();
//
// cChart
//
this.cChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cChart.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
chartArea1.Name = "ChartArea1";
this.cChart.ChartAreas.Add(chartArea1);
this.cChart.ContextMenuStrip = this.menuSaveToImage;
legend1.Name = "Legend1";
this.cChart.Legends.Add(legend1);
this.cChart.Location = new System.Drawing.Point(0, 0);
this.cChart.Name = "cChart";
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Pie;
series1.IsValueShownAsLabel = true;
series1.Label = "#VALX - #PERCENT{P2} (#VAL)";
series1.Legend = "Legend1";
series1.Name = "Series1";
this.cChart.Series.Add(series1);
this.cChart.Size = new System.Drawing.Size(1017, 629);
this.cChart.TabIndex = 0;
this.cChart.Text = "卡组分布图";
this.cChart.Click += new System.EventHandler(this.CChart_Click);
//
// menuSaveToImage
//
this.menuSaveToImage.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuSave,
this.menuHighResSave,
this.menuCopy,
this.menuCopyHighRes,
this.menuSaveExtraHighRes,
this.menuCopyExtraHighRes});
this.menuSaveToImage.Name = "menuSaveToImage";
this.menuSaveToImage.Size = new System.Drawing.Size(196, 158);
//
// menuSave
//
this.menuSave.Name = "menuSave";
this.menuSave.Size = new System.Drawing.Size(195, 22);
this.menuSave.Text = "保存";
this.menuSave.Click += new System.EventHandler(this.MenuSave_Click);
//
// menuHighResSave
//
this.menuHighResSave.Name = "menuHighResSave";
this.menuHighResSave.Size = new System.Drawing.Size(195, 22);
this.menuHighResSave.Text = "以高分辨率保存";
this.menuHighResSave.Click += new System.EventHandler(this.MenuHighResSave_Click);
//
// menuCopy
//
this.menuCopy.Name = "menuCopy";
this.menuCopy.Size = new System.Drawing.Size(195, 22);
this.menuCopy.Text = "复制到剪贴板";
this.menuCopy.Click += new System.EventHandler(this.MenuCopy_Click);
//
// menuCopyHighRes
//
this.menuCopyHighRes.Name = "menuCopyHighRes";
this.menuCopyHighRes.Size = new System.Drawing.Size(195, 22);
this.menuCopyHighRes.Text = "以高分辨率复制";
this.menuCopyHighRes.Click += new System.EventHandler(this.MenuCopyHighRes_Click);
//
// tbChartType
//
this.tbChartType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tbChartType.Location = new System.Drawing.Point(1023, 80);
this.tbChartType.Maximum = 30;
this.tbChartType.Name = "tbChartType";
this.tbChartType.Orientation = System.Windows.Forms.Orientation.Vertical;
this.tbChartType.Size = new System.Drawing.Size(45, 235);
this.tbChartType.TabIndex = 2;
this.tbChartType.Value = 17;
this.tbChartType.Scroll += new System.EventHandler(this.TrackBar1_Scroll);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(1023, 318);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 3;
this.label1.Text = "图类型";
//
// btnSepOthers
//
this.btnSepOthers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSepOthers.Location = new System.Drawing.Point(1023, 12);
this.btnSepOthers.Name = "btnSepOthers";
this.btnSepOthers.Size = new System.Drawing.Size(103, 28);
this.btnSepOthers.TabIndex = 4;
this.btnSepOthers.Text = "分割“其他”";
this.btnSepOthers.UseVisualStyleBackColor = true;
this.btnSepOthers.Click += new System.EventHandler(this.BtnSepOthers_Click);
//
// btnCombineOthers
//
this.btnCombineOthers.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCombineOthers.Location = new System.Drawing.Point(1023, 46);
this.btnCombineOthers.Name = "btnCombineOthers";
this.btnCombineOthers.Size = new System.Drawing.Size(103, 28);
this.btnCombineOthers.TabIndex = 5;
this.btnCombineOthers.Text = "合并“其他”";
this.btnCombineOthers.UseVisualStyleBackColor = true;
this.btnCombineOthers.Click += new System.EventHandler(this.BtnCombineOthers_Click);
//
// sfdImage
//
this.sfdImage.FileName = "output.jpg";
this.sfdImage.Filter = "JPG 文件|*.jpg|PNG 文件|*.png";
//
// btnSetColor
//
this.btnSetColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSetColor.Location = new System.Drawing.Point(1023, 333);
this.btnSetColor.Name = "btnSetColor";
this.btnSetColor.Size = new System.Drawing.Size(103, 29);
this.btnSetColor.TabIndex = 6;
this.btnSetColor.Text = "字体设定";
this.btnSetColor.UseVisualStyleBackColor = true;
this.btnSetColor.Click += new System.EventHandler(this.BtnSetColor_Click);
//
// btnColor
//
this.btnColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnColor.Location = new System.Drawing.Point(1023, 368);
this.btnColor.Name = "btnColor";
this.btnColor.Size = new System.Drawing.Size(103, 27);
this.btnColor.TabIndex = 7;
this.btnColor.Text = "字体颜色";
this.btnColor.UseVisualStyleBackColor = true;
this.btnColor.Click += new System.EventHandler(this.BtnColor_Click);
//
// colorSetColor
//
this.colorSetColor.AnyColor = true;
//
// btnSetLineColor
//
this.btnSetLineColor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSetLineColor.Location = new System.Drawing.Point(1023, 401);
this.btnSetLineColor.Name = "btnSetLineColor";
this.btnSetLineColor.Size = new System.Drawing.Size(103, 25);
this.btnSetLineColor.TabIndex = 8;
this.btnSetLineColor.Text = "连线颜色";
this.btnSetLineColor.UseVisualStyleBackColor = true;
this.btnSetLineColor.Click += new System.EventHandler(this.BtnSetLineColor_Click);
//
// colorSetLineColor
//
this.colorSetLineColor.AnyColor = true;
//
// trackImageScale
//
this.trackImageScale.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.trackImageScale.Location = new System.Drawing.Point(1081, 80);
this.trackImageScale.Maximum = 20;
this.trackImageScale.Minimum = -10;
this.trackImageScale.Name = "trackImageScale";
this.trackImageScale.Orientation = System.Windows.Forms.Orientation.Vertical;
this.trackImageScale.Size = new System.Drawing.Size(45, 235);
this.trackImageScale.TabIndex = 9;
this.trackImageScale.Scroll += new System.EventHandler(this.TrackImageScale_Scroll);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(1085, 318);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 10;
this.label2.Text = "图大小";
//
// menuSaveExtraHighRes
//
this.menuSaveExtraHighRes.Name = "menuSaveExtraHighRes";
this.menuSaveExtraHighRes.Size = new System.Drawing.Size(195, 22);
this.menuSaveExtraHighRes.Text = "以超高(8K)分辨率保存";
this.menuSaveExtraHighRes.Click += new System.EventHandler(this.menuSaveExtraHighRes_Click);
//
// menuCopyExtraHighRes
//
this.menuCopyExtraHighRes.Name = "menuCopyExtraHighRes";
this.menuCopyExtraHighRes.Size = new System.Drawing.Size(195, 22);
this.menuCopyExtraHighRes.Text = "以超高(8K)分辨率复制";
this.menuCopyExtraHighRes.Click += new System.EventHandler(this.menuCopyExtraHighRes_Click);
//
// FormChart
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1138, 628);
this.Controls.Add(this.label2);
this.Controls.Add(this.trackImageScale);
this.Controls.Add(this.btnSetLineColor);
this.Controls.Add(this.btnColor);
this.Controls.Add(this.btnSetColor);
this.Controls.Add(this.btnCombineOthers);
this.Controls.Add(this.btnSepOthers);
this.Controls.Add(this.label1);
this.Controls.Add(this.tbChartType);
this.Controls.Add(this.cChart);
this.Name = "FormChart";
this.Text = "卡组分布";
this.Load += new System.EventHandler(this.FormChart_Load);
((System.ComponentModel.ISupportInitialize)(this.cChart)).EndInit();
this.menuSaveToImage.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.tbChartType)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.trackImageScale)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataVisualization.Charting.Chart cChart;
private System.Windows.Forms.TrackBar tbChartType;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnSepOthers;
private System.Windows.Forms.Button btnCombineOthers;
private System.Windows.Forms.ContextMenuStrip menuSaveToImage;
private System.Windows.Forms.ToolStripMenuItem menuSave;
private System.Windows.Forms.ToolStripMenuItem menuHighResSave;
private System.Windows.Forms.ToolStripMenuItem menuCopy;
private System.Windows.Forms.ToolStripMenuItem menuCopyHighRes;
private System.Windows.Forms.SaveFileDialog sfdImage;
private System.Windows.Forms.Button btnSetColor;
private System.Windows.Forms.FontDialog fontSetFont;
private System.Windows.Forms.Button btnColor;
private System.Windows.Forms.ColorDialog colorSetColor;
private System.Windows.Forms.Button btnSetLineColor;
private System.Windows.Forms.ColorDialog colorSetLineColor;
private System.Windows.Forms.TrackBar trackImageScale;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ToolStripMenuItem menuSaveExtraHighRes;
private System.Windows.Forms.ToolStripMenuItem menuCopyExtraHighRes;
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms.DataVisualization.Charting;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace YGO_DeckAnalyzer
{
public partial class FormChart : Form
{
public FormChart(Dictionary<string, int> list)
{
deckTypesList = list;
this.InitializeComponent();
}
Dictionary<string, int> deckTypesList = new Dictionary<string, int>();
List<string> deckTypes = new List<string>();
List<int> deckNums = new List<int>();
private void ShowChart_CombineOthers(Dictionary<string, int> list)
{
deckTypes = new List<string>();
deckNums = new List<int>();
int total = 0;
foreach (var kvp in list)
{
total += kvp.Value;
}
foreach (var kvp in list)
{
if (kvp.Key == "其他" || (kvp.Value * 1.00 / total < 0.03))
{
if (deckTypes.Contains("其他"))
{
deckNums[deckTypes.IndexOf("其他")] += kvp.Value;
}
else
{
deckTypes.Add("其他");
deckNums.Add(kvp.Value);
}
}
else
{
deckTypes.Add(kvp.Key);
deckNums.Add(kvp.Value);
}
}
cChart.Series[0].Points.DataBindXY(deckTypes, deckNums);
this.SetBackground();
}
private void SetBackground()
{
foreach (var point in cChart.Series[0].Points)
{
if (File.Exists($"pics\\{point.AxisLabel}.jpg"))
{
point.BackImage = new FileInfo($"pics\\{point.AxisLabel}.jpg").FullName;
point.BackImageWrapMode = ChartImageWrapMode.TileFlipX;
}
else if (File.Exists($"pics\\{point.AxisLabel}.png"))
{
point.BackImage = new FileInfo($"pics\\{point.AxisLabel}.png").FullName;
point.BackImageWrapMode = ChartImageWrapMode.TileFlipX;
}
}
}
private void ShowChart_SepOthers(Dictionary<string, int> list)
{
deckTypes = new List<string>();
deckNums = new List<int>();
int total = 0;
foreach (var kvp in list)
{
total += kvp.Value;
}
foreach (var kvp in list)
{
deckTypes.Add(kvp.Key);
deckNums.Add(kvp.Value);
}
cChart.Series[0].Points.DataBindXY(deckTypes, deckNums);
this.SetBackground();
}
private void FormChart_Load(object sender, EventArgs e)
{
this.ShowChart_CombineOthers(deckTypesList);
cChart.Series[0]["PieLabelStyle"] = "Outside";
cChart.Series[0]["PieLineColor"] = "Black";
cChart.Series[0].ChartType = SeriesChartType.Pie;
if (File.Exists("pics\\bg.jpg"))
{
cChart.Series[0].LabelBackColor = Color.Transparent;
cChart.Series[0].BackSecondaryColor = Color.Transparent;
cChart.Series[0].ShadowColor = Color.Transparent;
cChart.Series[0].BorderColor = Color.Transparent;
cChart.ChartAreas[0].BackColor = Color.Transparent;
cChart.Legends[0].BackColor = Color.Transparent;
cChart.BackImage = new FileInfo("pics\\bg.jpg").FullName;
cChart.BackImageWrapMode = ChartImageWrapMode.Scaled;
}
else if (File.Exists("pics\\bg.png"))
{
cChart.Series[0].LabelBackColor = Color.Transparent;
cChart.Series[0].BackSecondaryColor = Color.Transparent;
cChart.Series[0].ShadowColor = Color.Transparent;
cChart.Series[0].BorderColor = Color.Transparent;
cChart.ChartAreas[0].BackColor = Color.Transparent;
cChart.Legends[0].BackColor = Color.Transparent;
cChart.BackImage = new FileInfo("pics\\bg.png").FullName;
cChart.BackImageWrapMode = ChartImageWrapMode.Scaled;
}
}
private void TrackBar1_Scroll(object sender, EventArgs e)
{
try
{
cChart.Series[0].ChartType = (SeriesChartType)((int)tbChartType.Value);
}
catch { }
}
private void BtnSepOthers_Click(object sender, EventArgs e)
{
this.ShowChart_SepOthers(deckTypesList);
}
private void BtnCombineOthers_Click(object sender, EventArgs e)
{
this.ShowChart_CombineOthers(deckTypesList);
}
private void MenuSave_Click(object sender, EventArgs e)
{
if (sfdImage.ShowDialog() == DialogResult.OK)
{
if (sfdImage.FilterIndex == 1)
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Jpeg);
}
else
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Png);
}
}
}
private void MenuCopy_Click(object sender, EventArgs e)
{
MemoryStream ms = new MemoryStream();
this.cChart.SaveImage(ms, ChartImageFormat.Jpeg);
Bitmap m = new Bitmap(ms);
//复制到粘贴板
Clipboard.SetImage(m);
}
private void MenuCopyHighRes_Click(object sender, EventArgs e)
{
Size s = cChart.Size;
cChart.Size = new Size(4096, 3000);
MemoryStream ms = new MemoryStream();
this.cChart.SaveImage(ms, ChartImageFormat.Jpeg);
Bitmap m = new Bitmap(ms);
//复制到粘贴板
Clipboard.SetImage(m);
cChart.Size = s;
}
private void MenuHighResSave_Click(object sender, EventArgs e)
{
if (sfdImage.ShowDialog() == DialogResult.OK)
{
Size s = cChart.Size;
cChart.Size = new Size(4096, 3000);
if (sfdImage.FilterIndex == 1)
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Jpeg);
}
else
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Png);
}
cChart.Size = s;
}
}
private void BtnSetColor_Click(object sender, EventArgs e)
{
if (fontSetFont.ShowDialog() == DialogResult.OK)
{
cChart.Series[0].Font = fontSetFont.Font;
cChart.Legends[0].Font = fontSetFont.Font;
}
}
private void BtnColor_Click(object sender, EventArgs e)
{
if (colorSetColor.ShowDialog()== DialogResult.OK)
{
cChart.Series[0].LabelForeColor = colorSetColor.Color;
cChart.Legends[0].ForeColor = colorSetColor.Color;
}
}
private void BtnSetLineColor_Click(object sender, EventArgs e)
{
if (colorSetLineColor.ShowDialog() == DialogResult.OK)
{
string r = colorSetLineColor.Color.R.ToString("X2");
string g = colorSetLineColor.Color.G.ToString("X2");
string b = colorSetLineColor.Color.B.ToString("X2");
cChart.Series[0]["PieLineColor"] = $"0x{r}{g}{b}";
}
}
private void CChart_Click(object sender, EventArgs e)
{
}
private void TrackImageScale_Scroll(object sender, EventArgs e)
{
int add = trackImageScale.Value;
cChart.ChartAreas[0].InnerPlotPosition = new ElementPosition(10 + add, 10 + add, 80 - add * 2, 80 - add * 2);
}
private void menuSaveExtraHighRes_Click(object sender, EventArgs e)
{
if (sfdImage.ShowDialog() == DialogResult.OK)
{
Size s = cChart.Size;
cChart.Size = new Size(8192, 6000);
if (sfdImage.FilterIndex == 1)
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Jpeg);
}
else
{
cChart.SaveImage(sfdImage.FileName, ChartImageFormat.Png);
}
cChart.Size = s;
}
}
private void menuCopyExtraHighRes_Click(object sender, EventArgs e)
{
Size s = cChart.Size;
cChart.Size = new Size(8192, 6000);
MemoryStream ms = new MemoryStream();
this.cChart.SaveImage(ms, ChartImageFormat.Jpeg);
Bitmap m = new Bitmap(ms);
//复制到粘贴板
Clipboard.SetImage(m);
cChart.Size = s;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuSaveToImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="sfdImage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>182, 17</value>
</metadata>
<metadata name="fontSetFont.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>288, 17</value>
</metadata>
<metadata name="colorSetColor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>409, 17</value>
</metadata>
<metadata name="colorSetLineColor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>536, 17</value>
</metadata>
</root>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace YGO_DeckAnalyzer
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new YGODeckAnalyzer());
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("YGO_DeckAnalyzer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("YGO_DeckAnalyzer")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("b6b28995-319e-4c1d-ba6f-5af6d2aa5d6d")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace YGO_DeckAnalyzer.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[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("YGO_DeckAnalyzer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace YGO_DeckAnalyzer.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.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("")]
public string StringsConf {
get {
return ((string)(this["StringsConf"]));
}
set {
this["StringsConf"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string CardsCdb {
get {
return ((string)(this["CardsCdb"]));
}
set {
this["CardsCdb"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string StringsConfDir {
get {
return ((string)(this["StringsConfDir"]));
}
set {
this["StringsConfDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string CardsCdbDir {
get {
return ((string)(this["CardsCdbDir"]));
}
set {
this["CardsCdbDir"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AllowMixDeck {
get {
return ((bool)(this["AllowMixDeck"]));
}
set {
this["AllowMixDeck"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool OutputDescription {
get {
return ((bool)(this["OutputDescription"]));
}
set {
this["OutputDescription"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool NoFile {
get {
return ((bool)(this["NoFile"]));
}
set {
this["NoFile"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool MostOnly {
get {
return ((bool)(this["MostOnly"]));
}
set {
this["MostOnly"] = value;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="YGO_DeckAnalyzer.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="StringsConf" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="CardsCdb" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="StringsConfDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="CardsCdbDir" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="AllowMixDeck" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OutputDescription" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="NoFile" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MostOnly" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
\ No newline at end of file
namespace YGO_DeckAnalyzer
{
partial class YGODeckAnalyzer
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.listDecks = new System.Windows.Forms.ListBox();
this.btnStart = new System.Windows.Forms.Button();
this.sfdSave = new System.Windows.Forms.SaveFileDialog();
this.btnChooseStringsConf = new System.Windows.Forms.Button();
this.txtStringsConf = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtCardsCdb = new System.Windows.Forms.TextBox();
this.btnChooseCardsCdb = new System.Windows.Forms.Button();
this.ofdStringsConf = new System.Windows.Forms.OpenFileDialog();
this.ofdCardsCdb = new System.Windows.Forms.OpenFileDialog();
this.btnClear = new System.Windows.Forms.Button();
this.checkAllowMixDeck = new System.Windows.Forms.CheckBox();
this.checkOutputDescription = new System.Windows.Forms.CheckBox();
this.checkNoFile = new System.Windows.Forms.CheckBox();
this.checkMostOnly = new System.Windows.Forms.CheckBox();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.bwWorker = new System.ComponentModel.BackgroundWorker();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.txtStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// listDecks
//
this.listDecks.AllowDrop = true;
this.listDecks.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listDecks.FormattingEnabled = true;
this.listDecks.ItemHeight = 12;
this.listDecks.Location = new System.Drawing.Point(12, 12);
this.listDecks.Name = "listDecks";
this.listDecks.Size = new System.Drawing.Size(339, 412);
this.listDecks.TabIndex = 0;
this.listDecks.DragDrop += new System.Windows.Forms.DragEventHandler(this.listDecks_DragDrop);
this.listDecks.DragEnter += new System.Windows.Forms.DragEventHandler(this.listDecks_DragEnter);
//
// btnStart
//
this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnStart.Location = new System.Drawing.Point(357, 365);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(135, 59);
this.btnStart.TabIndex = 1;
this.btnStart.Text = "让我康康!";
this.btnStart.UseVisualStyleBackColor = true;
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// sfdSave
//
this.sfdSave.FileName = "卡组分析.txt";
this.sfdSave.Filter = "TXT文件|*.txt|所有文件|*.*";
//
// btnChooseStringsConf
//
this.btnChooseStringsConf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnChooseStringsConf.Location = new System.Drawing.Point(357, 54);
this.btnChooseStringsConf.Name = "btnChooseStringsConf";
this.btnChooseStringsConf.Size = new System.Drawing.Size(75, 23);
this.btnChooseStringsConf.TabIndex = 2;
this.btnChooseStringsConf.Text = "浏览...";
this.btnChooseStringsConf.UseVisualStyleBackColor = true;
this.btnChooseStringsConf.Click += new System.EventHandler(this.btnChooseStringsConf_Click);
//
// txtStringsConf
//
this.txtStringsConf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtStringsConf.Location = new System.Drawing.Point(357, 27);
this.txtStringsConf.Name = "txtStringsConf";
this.txtStringsConf.Size = new System.Drawing.Size(135, 21);
this.txtStringsConf.TabIndex = 3;
this.txtStringsConf.TextChanged += new System.EventHandler(this.txtStringsConf_TextChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(355, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 12);
this.label1.TabIndex = 4;
this.label1.Text = "strings.conf位置";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(355, 81);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 12);
this.label2.TabIndex = 7;
this.label2.Text = "cards.cdb位置";
//
// txtCardsCdb
//
this.txtCardsCdb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.txtCardsCdb.Location = new System.Drawing.Point(357, 96);
this.txtCardsCdb.Name = "txtCardsCdb";
this.txtCardsCdb.Size = new System.Drawing.Size(135, 21);
this.txtCardsCdb.TabIndex = 6;
this.txtCardsCdb.TextChanged += new System.EventHandler(this.txtCardsCdb_TextChanged);
//
// btnChooseCardsCdb
//
this.btnChooseCardsCdb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnChooseCardsCdb.Location = new System.Drawing.Point(357, 123);
this.btnChooseCardsCdb.Name = "btnChooseCardsCdb";
this.btnChooseCardsCdb.Size = new System.Drawing.Size(75, 23);
this.btnChooseCardsCdb.TabIndex = 5;
this.btnChooseCardsCdb.Text = "浏览...";
this.btnChooseCardsCdb.UseVisualStyleBackColor = true;
this.btnChooseCardsCdb.Click += new System.EventHandler(this.btnChooseCardsCdb_Click);
//
// ofdStringsConf
//
this.ofdStringsConf.FileName = "strings.conf";
this.ofdStringsConf.Filter = "strings.conf|strings.conf|所有文件|*.*";
//
// ofdCardsCdb
//
this.ofdCardsCdb.FileName = "strings.conf";
this.ofdCardsCdb.Filter = "cards.cdb|cards.cdb|所有文件|*.*";
//
// btnClear
//
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.Location = new System.Drawing.Point(357, 301);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(135, 58);
this.btnClear.TabIndex = 8;
this.btnClear.Text = "全部清空";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// checkAllowMixDeck
//
this.checkAllowMixDeck.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkAllowMixDeck.AutoSize = true;
this.checkAllowMixDeck.Location = new System.Drawing.Point(357, 152);
this.checkAllowMixDeck.Name = "checkAllowMixDeck";
this.checkAllowMixDeck.Size = new System.Drawing.Size(132, 16);
this.checkAllowMixDeck.TabIndex = 9;
this.checkAllowMixDeck.Text = "允许“多系列混合”";
this.checkAllowMixDeck.UseVisualStyleBackColor = true;
this.checkAllowMixDeck.CheckedChanged += new System.EventHandler(this.checkAllowMixDeck_CheckedChanged);
//
// checkOutputDescription
//
this.checkOutputDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkOutputDescription.AutoSize = true;
this.checkOutputDescription.Location = new System.Drawing.Point(357, 174);
this.checkOutputDescription.Name = "checkOutputDescription";
this.checkOutputDescription.Size = new System.Drawing.Size(96, 16);
this.checkOutputDescription.TabIndex = 10;
this.checkOutputDescription.Text = "输出卡组详情";
this.checkOutputDescription.UseVisualStyleBackColor = true;
this.checkOutputDescription.CheckedChanged += new System.EventHandler(this.checkOutputDescription_CheckedChanged);
//
// checkNoFile
//
this.checkNoFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkNoFile.AutoSize = true;
this.checkNoFile.Location = new System.Drawing.Point(357, 218);
this.checkNoFile.Name = "checkNoFile";
this.checkNoFile.Size = new System.Drawing.Size(108, 16);
this.checkNoFile.TabIndex = 11;
this.checkNoFile.Text = "不生成详情文件";
this.checkNoFile.UseVisualStyleBackColor = true;
this.checkNoFile.CheckedChanged += new System.EventHandler(this.CheckNoFile_CheckedChanged);
//
// checkMostOnly
//
this.checkMostOnly.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkMostOnly.AutoSize = true;
this.checkMostOnly.Location = new System.Drawing.Point(357, 196);
this.checkMostOnly.Name = "checkMostOnly";
this.checkMostOnly.Size = new System.Drawing.Size(144, 16);
this.checkMostOnly.TabIndex = 12;
this.checkMostOnly.Text = "仅统计投入最多的系列";
this.checkMostOnly.UseVisualStyleBackColor = true;
this.checkMostOnly.CheckedChanged += new System.EventHandler(this.CheckMostOnly_CheckedChanged);
//
// bwWorker
//
this.bwWorker.WorkerReportsProgress = true;
this.bwWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bwWorker_DoWork);
this.bwWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bwWorker_ProgressChanged);
this.bwWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bwWorker_RunWorkerCompleted);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.txtStatus});
this.statusStrip1.Location = new System.Drawing.Point(0, 428);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(504, 22);
this.statusStrip1.TabIndex = 13;
this.statusStrip1.Text = "statusStrip1";
//
// txtStatus
//
this.txtStatus.Name = "txtStatus";
this.txtStatus.Size = new System.Drawing.Size(42, 17);
this.txtStatus.Text = "status";
//
// YGODeckAnalyzer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(504, 450);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.checkMostOnly);
this.Controls.Add(this.checkNoFile);
this.Controls.Add(this.checkOutputDescription);
this.Controls.Add(this.checkAllowMixDeck);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtCardsCdb);
this.Controls.Add(this.btnChooseCardsCdb);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtStringsConf);
this.Controls.Add(this.btnChooseStringsConf);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.listDecks);
this.Name = "YGODeckAnalyzer";
this.Text = "游戏王卡组统计器 v1.3e by JoyJ";
this.Load += new System.EventHandler(this.Form1_Load);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ListBox listDecks;
private System.Windows.Forms.Button btnStart;
private System.Windows.Forms.SaveFileDialog sfdSave;
private System.Windows.Forms.Button btnChooseStringsConf;
private System.Windows.Forms.TextBox txtStringsConf;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtCardsCdb;
private System.Windows.Forms.Button btnChooseCardsCdb;
private System.Windows.Forms.OpenFileDialog ofdStringsConf;
private System.Windows.Forms.OpenFileDialog ofdCardsCdb;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.CheckBox checkAllowMixDeck;
private System.Windows.Forms.CheckBox checkOutputDescription;
private System.Windows.Forms.CheckBox checkNoFile;
private System.Windows.Forms.CheckBox checkMostOnly;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private System.ComponentModel.BackgroundWorker bwWorker;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel txtStatus;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SQLite;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace YGO_DeckAnalyzer
{
public partial class YGODeckAnalyzer : Form
{
public YGODeckAnalyzer()
{
this.InitializeComponent();
}
private void btnStart_Click(object sender, EventArgs e)
{
btnStart.Enabled = false;
if (!checkNoFile.Checked)
{
if (this.sfdSave.ShowDialog() != DialogResult.OK)
{
return;
}
File.Delete(this.sfdSave.FileName);
}
bwWorker.RunWorkerAsync();
}
private string SpecialProcess_SeriesJudge(long card)
{
switch (card)
{
case 21362970:
case 67757079:
case 94878265:
return "00毛扎";
case 32465539:
case 94344242:
case 68950538:
case 58600555:
case 12615446:
case 85004150:
case 83048208:
return "电子光虫";
case 64631466:
case 94259633:
case 15173384:
case 41426869:
return "0110"; //纳祭
case 22339232:
case 32274490:
case 36021814:
case 37675138:
case 40991587:
case 57473560:
case 90243945:
return "00白骨";
case 26400609:
case 27415516:
case 53797637:
case 53804307:
case 89185742:
case 89399912:
case 90411554:
case 91020571:
case 27770341:
case 45725480:
return "00征龙";
case 46947713:
case 88093706:
case 71278040:
case 18789533:
return "0101"; //各类码语者
case 5560911:
case 28985331:
case 7409792:
case 9411399:
case 3431737:
case 9742784:
case 25472513:
case 67723438:
case 65536818:
case 53325667:
case 94973028:
case 74644400:
case 72291078:
case 75944053:
return "00均卡";
case 5697558:
return "00ED"; //地中
case 86120751:
case 97973692:
case 74063034:
case 47679935:
case 458748:
case 47457347:
return "0召唤师";
case 71564252:
case 15397015:
case 71197066:
case 40605147:
case 41420027:
case 84749824:
case 36975314:
case 5851097:
case 63845230:
case 36584821:
case 30241314:
case 35059553:
case 81674782:
return "BEAT";
case 41373230:
case 1984618:
case 68468459:
return "0145"; //教导
case 39185163:
case 66570171:
case 4064256:
case 92964816:
return "不死世界";
case 11110587:
return "00割草";
case 11827244:
return "003B"; //圆融魔术-真红眼
case 31443476:
return "010F"; //速攻旋转 - 弹丸
case 53936268:
return "0103"; //个人欺骗攻击 - 骚灵
case 30603688:
case 7084129:
case 1784686:
case 73616671:
case 47222536:
case 7922915:
case 48680970:
case 96471335:
case 85551711:
case 75380687:
case 41721210:
return "10A2"; //黑魔导
case 15180041:
case 19502505:
case 41175645:
case 25290459:
case 90500169:
return "0041"; //LV - 无LV的卡
case 18940556:
case 41782653:
case 38572779:
case 44335251:
case 36042004:
case 38179121:
return "00恐龙";
case 79814787:
case 71039903:
case 72855441:
case 34627841:
case 45644898:
case 8240199:
case 36734924:
case 88241506:
case 2783661:
case 29432790:
case 50371210:
case 56920308:
case 93437091:
case 17655904:
case 57043986:
return "00DD"; //青眼
case 11012154:
case 6990577:
case 43411769:
case 79905468:
case 84899094:
case 59537380:
case 13143275:
case 86148577:
case 87571563:
case 50186558:
case 47393199:
case 11908584:
return "0守护龙";
case 37694547:
return "0007"; //齿车街 - 古代机械
case 10000040:
case 10000000:
case 10000010:
case 10000020:
return "0三幻神";
case 87116928:
case 79229522:
return "1093"; //电子龙 - 嵌合
case 67831115:
case 27705190:
case 89320376:
return "0104"; //机怪虫 - 几张机怪虫相关星遗物
case 36468556:
case 91623717:
case 18252559:
case 24068492:
case 27053506:
return "BURN";
case 2819435:
return "00FA"; //幻煌
case 30012506:
case 77411244:
case 3405259:
case 1561110:
return "0ABC";
case 51126152:
case 52481437:
case 13647631:
case 88875132:
case 24919805:
case 76136345:
case 25274141:
case 26096328:
return "00列车";
case 92379223:
case 31434645:
return "0黄金国";
case 53855409:
case 96363153:
case 37675907:
case 50091196:
case 20932152:
case 80457744:
return "00废二";
case 89397517:
return "00A0"; //传说的骑士->传说之龙
case 26293219:
case 99899504:
case 63804806:
return "0骷髅头";
case 90764875:
case 64379261:
case 37984162:
case 84401683:
case 37168514:
return "00蛇头";
case 93130021:
case 10992251:
case 10642488:
case 14089428:
case 5494820:
case 14291024:
return "0胜利蛇";
case 62340868:
case 25955164:
case 98434877:
case 25833572:
return "属性魔神";
case 36562627:
case 49511705:
case 96012004:
case 70050374:
case 28112535:
case 76728962:
case 3549275:
case 39454112:
case 93078761:
return "00赌博";
case 81171949:
return "头奖壶7";
case 6853254:
return "00DD0巨神龙";
case 6075801:
case 33282498:
case 33460840:
case 60681103:
case 69868555:
case 87835759:
return "0巨神龙";
case 4148264:
case 58012707:
return "0G战队";
case 899287:
case 14512825:
case 41916534:
case 45072394:
case 46294982:
case 72283691:
case 73405179:
case 78527720:
return "00金宫";
case 59160188:
case 50383626:
case 29424328:
case 23898021:
case 25643346:
case 86377375:
return "黯黑世界";
case 24096499:
case 36318200:
case 77797992:
case 97317530:
return "森之圣兽";
case 28118128:
case 92729410:
case 39972129:
return "00子狸";
case 80208158:
case 15574615:
case 16796157:
case 43791861:
case 79185500:
return "00罗宾";
case 8198712:
case 32828635:
case 69217334:
case 95612049:
case 81306186:
case 59913418:
case 72426662:
case 86124104:
return "世界末日";
case 95308449:
return "0倒计时";
case 94212438:
case 67287533:
case 31893528:
case 30170981:
case 94772232:
case 40771118:
case 14386013:
case 16625614:
return "0通灵盘";
case 93151201:
case 84530620:
case 15510988:
case 70797118:
case 57019473:
case 21524779:
case 27217742:
return "雷电家族";
case 75917088:
case 2316186:
case 72709014:
case 74270067:
case 58015506:
return "王女试炼";
case 440556:
case 80727036:
case 7500772:
case 50449881:
case 50532786:
case 70655556:
case 11954712:
case 23536866:
case 51227866:
case 17201174:
case 67111213:
case 43138260:
case 70101178:
case 71923655:
case 20838380:
case 2584136:
case 32393580:
case 84224627:
case 14306092:
case 5014629:
case 28593363:
case 49221191:
case 37798171:
case 44223284:
case 21954587:
case 34290067:
case 93830681:
case 70156946:
case 69155991:
case 47840168:
case 20358953:
case 71015787:
case 13429800:
case 51254277:
case 11845050:
case 10532969:
case 25484449:
case 64319467:
case 17643265:
case 7150545:
case 63193879:
case 37792478:
case 87047161:
case 23672629:
case 59479050:
case 31320433:
case 37279508:
case 65676461:
return "00鲨鱼";
case 77506119:
case 49389523:
case 63595262:
case 64047146:
case 13995824:
case 10321588:
case 20351153:
case 58807980:
case 58685438:
case 22318971:
return "0独角兽";
case 58901502:
case 63364266:
case 59255742:
case 84305651:
case 98637386:
case 7391448:
return "00御用";
case 3070049:
case 67675300:
case 73659078:
case 15893860:
case 32750510:
case 24661486:
return "冰指示物";
case 61802346:
case 50920465:
case 43694481:
case 96565487:
case 28348537:
case 51706604:
return "00雪暴";
case 95929069:
case 68535320:
case 16223761:
return "冰火手";
case 49003308:
case 9053187:
case 43793530:
case 39674352:
case 53776525:
return "魔蜥义豪";
case 39389320:
case 42233477:
case 78621186:
case 40453765:
case 20394040:
return "0野蛮人";
case 20765952:
case 22610082:
case 29549364:
case 57882509:
case 56948373:
case 82432018:
case 94377247:
case 49064413:
case 48948935:
return "假面魔兽";
case 8508055:
case 55550921:
case 82452993:
case 3810071:
case 49814180:
case 96458440:
case 97570038:
return "00格斗";
case 84814897:
case 91597389:
case 87798440:
case 7369217:
case 87564935:
case 8964854:
case 63676256:
case 59364406:
case 47415292:
case 31768112:
case 12965761:
case 69456283:
case 11678191:
case 72083436:
case 11743119:
case 99249638:
case 26931058:
case 39778366:
case 19086954:
case 46181000:
case 85359414:
case 47693640:
case 57062206:
return "00同盟";
case 96029574:
case 95750695:
case 91798373:
case 81601517:
case 19041767:
case 26120084:
case 16984449:
return "00二重";
case 80476891:
case 55100740:
case 44088292:
case 38026562:
case 18993198:
return "0化合兽";
case 99173029:
case 92394653:
case 92200612:
case 90365482:
case 82841979:
case 74115234:
case 73055622:
case 66815913:
case 52900000:
case 48716139:
case 43543777:
case 43378076:
case 39817919:
case 37406863:
case 32181268:
case 30461781:
case 25415052:
case 24701235:
case 16889337:
case 9553721:
case 6544078:
case 1200843:
case 276357:
return "00灵魂";
case 42352091:
case 79747096:
case 4019153 :
case 15232745:
case 42230449:
case 78625448:
case 77402960:
case 41418852:
return "源数之门";
}
return null;
}
private void AddCustomSeries(ref Dictionary<string, string> series)
{
series.Add("00恐龙", "恐龙");
series.Add("0ABC", "ABC");
series.Add("BEAT", "METABEAT");
series.Add("不死世界", "不死世界");
series.Add("00割草", "割草");
series.Add("00均卡", "均卡(LINK/同调)");
series.Add("0守护龙", "守护龙");
series.Add("0三幻神", "三幻神");
series.Add("BURN", "烧血");
series.Add("00列车", "列车");
series.Add("0召唤师", "召唤师");
series.Add("00废二", "废二");
series.Add("00幻魔", "幻魔");
series.Add("00征龙", "征龙");
series.Add("00白骨", "白骨");
series.Add("电子光虫", "电子光虫");
series.Add("00毛扎", "毛扎");
series.Add("0骷髅头", "燃烧骷髅头");
series.Add("00蛇头", "蛇头");
series.Add("0胜利蛇", "胜利蛇");
series.Add("属性魔神", "门之守护神");
series.Add("00赌博", "骰子与硬币");
series.Add("头奖壶7", "头奖壶");
series.Add("0巨神龙", "巨神龙");
series.Add("0G战队", "G战队");
series.Add("00金宫", "急流山的金宫");
series.Add("黯黑世界", "黯黑世界");
series.Add("森之圣兽", "森之圣兽");
series.Add("00子狸", "子狸");
series.Add("00罗宾", "星斗罗宾");
series.Add("世界末日", "世界末日");
series.Add("0倒计时", "倒计时");
series.Add("0通灵盘", "通灵盘");
series.Add("雷电家族", "雷电家族");
series.Add("王女试炼", "王女试炼");
series.Add("00鲨鱼", "鲨");
series.Add("0独角兽", "独角兽");
series.Add("00御用", "御用");
series.Add("冰指示物", "冰指示物");
series.Add("00雪暴", "雪暴");
series.Add("0冰火手", "冰火手");
series.Add("魔蜥义豪", "魔蜥义豪");
series.Add("0野蛮人", "野蛮人");
series.Add("假面魔兽", "假面魔兽");
series.Add("00格斗", "格斗武僧");
series.Add("00同盟", "各种同盟均");
series.Add("00二重", "各种二重均");
series.Add("00灵魂", "各种灵魂均");
series.Add("0化合兽", "化合兽");
series.Add("源数之门", "源数之门");
}
private Dictionary<string, string> SpecialProcess(Dictionary<string, string> series)
{
this.AddCustomSeries(ref series);
if (series.Keys.Contains("004B"))
{
series["004B"] = "极星";
}
if (series.Keys.Contains("010E")) //进化药
{
series["010E"] = "恐龙";
}
if (series.Keys.Contains("00B9"))
{
series["00B9"] = "火山";
}
if (series.Keys.Contains("0125"))
{
series["0125"] = null; //笑容
}
if (series.Keys.Contains("00B6"))
{
series["00B6"] = null; //外神
}
if (series.Keys.Contains("00B7"))
{
series["00B7"] = null; //古神
}
if (series.Keys.Contains("00B8"))
{
series["00B8"] = null; //旧神
}
if (series.Keys.Contains("1017"))
{
series["1017"] = null; //同调士
}
if (series.Keys.Contains("00C2"))
{
series["00C2"] = null; //动力工具
}
if (series.Keys.Contains("0123"))
{
series["0123"] = "蔷薇龙"; //蔷薇
}
if (series.Keys.Contains("007E"))
{
series["007E"] = "霍普";
}
if (series.Keys.Contains("00A0"))
{
series["00A0"] = "传说之龙"; //传说的骑士
}
if (series.Keys.Contains("2017"))
{
series["2017"] = null; //同调龙
}
if (series.Keys.Contains("0061"))
{
series["0061"] = "忍者";
}
if (series.Keys.Contains("001E"))
{
series["001E"] = "HERO";
}
if (series.Keys.Contains("001F"))
{
series["001F"] = "HERO";
}
if (series.Keys.Contains("0007"))
{
series["0007"] = "古代机械";
}
if (series.Keys.Contains("00A3"))
{
series["00A3"] = null; //星尘
}
if (series.Keys.Contains("011D"))
{
series["011D"] = null; //禁忌的
}
if (series.Keys.Contains("0073"))
{
series["0073"] = null; //超量
}
if (series.Keys.Contains("0110"))
{
series["0110"] = "纳祭";
}
if (series.Keys.Contains("0066"))
{
series["0066"] = "废二";
}
if (series.Keys.Contains("0119"))
{
series["0119"] = "炎兽";
}
if (series.Keys.Contains("0118"))
{
series["0118"] = null;
}
if (series.Keys.Contains("0101"))
{
series["0101"] = "电子界";
}
if (series.Keys.Contains("0065"))
{
series["0065"] = "入魔";
}
if (series.Keys.Contains("00DB"))
{
series["00DB"] = "幻影骑士团";
}
if (series.Keys.Contains("00C5"))
{
series["00C5"] = "狱火机";
}
if (series.Keys.Contains("004C"))
{
series["004C"] = null; //落穴
}
if (series.Keys.Contains("0040"))
{
series["0040"] = "艾克佐迪亚";
}
if (series.Keys.Contains("00AB"))
{
series["00AB"] = "文具人";
}
if (series.Keys.Contains("010D"))
{
series["010D"] = "魔导兽";
}
if (series.Keys.Contains("0099"))
{
series["0099"] = "魔术师";
}
if (series.Keys.Contains("1002"))
{
series["1002"] = "次世代";
}
if (series.Keys.Contains("3008"))
{
series["3008"] = "HERO";
}
if (series.Keys.Contains("5008"))
{
series["5008"] = "HERO";
}
if (series.Keys.Contains("6008"))
{
series["6008"] = "HERO";
}
if (series.Keys.Contains("A008"))
{
series["A008"] = "HERO";
}
if (series.Keys.Contains("C008"))
{
series["C008"] = "HERO";
}
if (series.Keys.Contains("0071"))
{
series["0071"] = "甜点";
}
if (series.Keys.Contains("0009"))
{
series["0009"] = "HERO";
}
if (series.Keys.Contains("0008"))
{
series["0008"] = "HERO";
}
if (series.Keys.Contains("100A"))
{
series["100A"] = "入魔";
}
if (series.Keys.Contains("3013"))
{
series["3013"] = "机皇";
}
if (series.Keys.Contains("6013"))
{
series["6013"] = "机皇";
}
if (series.Keys.Contains("0020"))
{
series["0020"] = "六武众";
}
if (series.Keys.Contains("1033"))
{
series["1033"] = "黑羽";
}
if (series.Keys.Contains("0034"))
{
series["0034"] = "宝玉兽";
}
if (series.Keys.Contains("2034"))
{
series["2034"] = "宝玉兽";
}
if (series.Keys.Contains("103D"))
{
series["103D"] = "六武众";
}
if (series.Keys.Contains("3042"))
{
series["3042"] = "极星";
}
if (series.Keys.Contains("5042"))
{
series["5042"] = "极星";
}
if (series.Keys.Contains("6042"))
{
series["6042"] = "极星";
}
if (series.Keys.Contains("A042"))
{
series["A042"] = "极星";
}
if (series.Keys.Contains("0047"))
{
series["0047"] = "宝石骑士";
}
if (series.Keys.Contains("010C"))
{
series["010C"] = "机界";
}
if (series.Keys.Contains("0112"))
{
series["0112"] = null; //幻崩
}
if (series.Keys.Contains("0048"))
{
series["0048"] = null; //No
}
if (series.Keys.Contains("1048"))
{
series["1048"] = null; //CNo
}
if (series.Keys.Contains("1073"))
{
series["1073"] = null; //CX
}
if (series.Keys.Contains("2073"))
{
series["2073"] = null; //超量龙
}
if (series.Keys.Contains("0046"))
{
series["0046"] = null; //融合
}
if (series.Keys.Contains("0096"))
{
series["0096"] = null; //电子鱼人
}
if (series.Keys.Contains("0095"))
{
series["0095"] = null; //升阶魔法
}
if (series.Keys.Contains("304E"))
{
series["304E"] = "进化龙";
}
if (series.Keys.Contains("504E"))
{
series["504E"] = "进化龙";
}
if (series.Keys.Contains("006F"))
{
series["006F"] = "英豪挑战者";
}
if (series.Keys.Contains("0092"))
{
series["0092"] = "纹章兽";
}
if (series.Keys.Contains("1072"))
{
series["1072"] = "齿轮齿轮";
}
if (series.Keys.Contains("10F8"))
{
series["10F8"] = "魔术师";
}
if (series.Keys.Contains("20F8"))
{
series["20F8"] = null;
}
if (series.Keys.Contains("010D"))
{
series["010D"] = "魔导兽";
}
if (series.Keys.Contains("107A"))
{
series["107A"] = "圣骑士";
}
if (series.Keys.Contains("207A"))
{
series["207A"] = "圣骑士";
}
if (series.Keys.Contains("007B"))
{
series["007B"] = "银河眼";
}
if (series.Keys.Contains("0055"))
{
series["0055"] = "银河眼";
}
if (series.Keys.Contains("307B"))
{
series["307B"] = "银河眼";
}
if (series.Keys.Contains("009F"))
{
series["009F"] = "魔术师";
}
if (series.Keys.Contains("007D"))
{
series["007D"] = "阳炎兽";
}
if (series.Keys.Contains("107F"))
{
series["107F"] = "霍普";
}
if (series.Keys.Contains("207F"))
{
series["207F"] = "霍普";
}
if (series.Keys.Contains("1081"))
{
series["1081"] = "炎王";
}
if (series.Keys.Contains("0075"))
{
series["0075"] = null; //深渊
}
if (series.Keys.Contains("0093"))
{
series["0093"] = "电子龙";
}
if (series.Keys.Contains("0094"))
{
series["0094"] = "电子龙";
}
if (series.Keys.Contains("109A"))
{
series["109A"] = "超重武者";
}
if (series.Keys.Contains("109B"))
{
series["109B"] = "幻奏";
}
if (series.Keys.Contains("109C"))
{
series["109C"] = "星守";
}
if (series.Keys.Contains("10A2"))
{
series["10A2"] = "黑魔导";
}
if (series.Keys.Contains("20A2"))
{
series["20A2"] = "黑魔导";
}
if (series.Keys.Contains("30A2"))
{
series["30A2"] = "黑魔导";
}
if (series.Keys.Contains("10A4"))
{
series["10A4"] = "栗子球"; //羽翼栗子球
}
if (series.Keys.Contains("00A5"))
{
series["00A5"] = "HERO";
}
if (series.Keys.Contains("10AA"))
{
series["10AA"] = "机壳";
}
if (series.Keys.Contains("00AF"))
{
series["00AF"] = "DDD";
}
if (series.Keys.Contains("00D7"))
{
series["00D7"] = "破坏剑";
}
if (series.Keys.Contains("00C6"))
{
series["00C6"] = "魔术师";
}
if (series.Keys.Contains("00C7"))
{
series["00C7"] = "魔术师";
}
if (series.Keys.Contains("00CE"))
{
series["00CE"] = "水伶女";
}
if (series.Keys.Contains("00A9"))
{
series["00A9"] = "魔玩具";
}
if (series.Keys.Contains("00C3"))
{
series["00C3"] = "魔玩具";
}
if (series.Keys.Contains("10B5"))
{
series["10B5"] = "灵兽";
}
if (series.Keys.Contains("20B5"))
{
series["20B5"] = "灵兽";
}
if (series.Keys.Contains("40B5"))
{
series["40B5"] = "灵兽";
}
if (series.Keys.Contains("10C1"))
{
series["10C1"] = "PSY骨架";
}
if (series.Keys.Contains("10D9"))
{
series["10D9"] = "不知火";
}
if (series.Keys.Contains("00EA"))
{
series["00EA"] = "水晶机巧";
}
if (series.Keys.Contains("10DC"))
{
series["10DC"] = "超级量子";
}
if (series.Keys.Contains("20DC"))
{
series["20DC"] = "超级量子";
}
if (series.Keys.Contains("20EC"))
{
series["20EC"] = "魔界剧团";
}
if (series.Keys.Contains("10ED"))
{
series["10ED"] = "地中族";
}
if (series.Keys.Contains("10EE"))
{
series["10EE"] = "秘旋谍";
}
if (series.Keys.Contains("20EE"))
{
series["20EE"] = "秘旋谍";
}
if (series.Keys.Contains("00F2"))
{
series["00F2"] = "魔术师";
}
if (series.Keys.Contains("10F2"))
{
series["10F2"] = "魔术师";
}
if (series.Keys.Contains("20F2"))
{
series["20F2"] = "魔术师";
}
if (series.Keys.Contains("00F3"))
{
series["00F3"] = "捕食植物";
}
if (series.Keys.Contains("00F4"))
{
series["00F4"] = "召唤师";
}
if (series.Keys.Contains("0102"))
{
series["0102"] = "枪管";
}
if (series.Keys.Contains("1115"))
{
series["1115"] = "闪刀";
}
if (series.Keys.Contains("00FD"))
{
series["00FD"] = "星遗物";
}
if (series.Keys.Contains("1130"))
{
series["1130"] = "破械";
}
if (series.Keys.Contains("013B"))
{
series["013B"] = null; //叛逆
}
if (series.Keys.Contains("013C"))
{
series["013C"] = null; //代码破坏者
}
if (series.Keys.Contains("0143"))
{
series["0143"] = "黄金国";
}
if (series.Keys.Contains("2142"))
{
series["2142"] = "黄金国";
}
if (series.Keys.Contains("1143"))
{
series["1143"] = "黄金国";
}
if (series.Keys.Contains("0148"))
{
series["0148"] = "圣骑士";
}
if (series.Keys.Contains("0054"))
{
series["0054"] = "拟声(我我我/怒怒怒等)";
}
if (series.Keys.Contains("0059"))
{
series["0059"] = "拟声(我我我/怒怒怒等)";
}
if (series.Keys.Contains("008F"))
{
series["008F"] = "拟声(我我我/怒怒怒等)";
}
if (series.Keys.Contains("013A"))
{
series["013A"] = "拟声(我我我/怒怒怒等)";
}
if (series.Keys.Contains("0082"))
{
series["0082"] = "拟声(我我我/怒怒怒等)"; //蔷薇
}
if (series.Keys.Contains("00C0"))
{
series["00C0"] = "灵使"; //蔷薇
}
if (series.Keys.Contains("0091"))
{
series["0091"] = "守墓"; //蔷薇
}
return series;
}
private void btnChooseStringsConf_Click(object sender, EventArgs e)
{
if (this.ofdStringsConf.ShowDialog() == DialogResult.OK)
{
this.txtStringsConf.Text = this.ofdStringsConf.FileName;
}
}
bool init = true;
private void Form1_Load(object sender, EventArgs e)
{
this.txtStringsConf.Text = Properties.Settings.Default.StringsConf;
this.txtCardsCdb.Text = Properties.Settings.Default.CardsCdb;
this.ofdCardsCdb.InitialDirectory = Properties.Settings.Default.CardsCdbDir;
this.ofdStringsConf.InitialDirectory = Properties.Settings.Default.StringsConfDir;
this.checkOutputDescription.Checked = Properties.Settings.Default.OutputDescription;
this.checkAllowMixDeck.Checked = Properties.Settings.Default.AllowMixDeck;
this.checkNoFile.Checked = Properties.Settings.Default.NoFile;
this.checkMostOnly.Checked = Properties.Settings.Default.MostOnly;
this.init = false;
}
private void txtStringsConf_TextChanged(object sender, EventArgs e)
{
this.SaveOptions();
}
private void SaveOptions()
{
if (!this.init)
{
Properties.Settings.Default.StringsConf = this.txtStringsConf.Text;
Properties.Settings.Default.CardsCdb = this.txtCardsCdb.Text;
Properties.Settings.Default.CardsCdbDir = this.ofdCardsCdb.InitialDirectory;
Properties.Settings.Default.StringsConfDir = this.ofdStringsConf.InitialDirectory;
Properties.Settings.Default.OutputDescription = this.checkOutputDescription.Checked;
Properties.Settings.Default.AllowMixDeck = this.checkAllowMixDeck.Checked;
Properties.Settings.Default.Save();
}
}
private void txtCardsCdb_TextChanged(object sender, EventArgs e)
{
this.SaveOptions();
}
private void btnChooseCardsCdb_Click(object sender, EventArgs e)
{
if (this.ofdCardsCdb.ShowDialog() == DialogResult.OK)
{
this.txtCardsCdb.Text = this.ofdCardsCdb.FileName;
}
}
private void listDecks_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.All;
}
}
private void listDecks_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files)
{
if (Directory.Exists(file))
{
this.listDecks.Items.AddRange(Directory.EnumerateFiles(file,"*.ydk",SearchOption.AllDirectories).ToArray());
}
else
{
this.listDecks.Items.Add(file);
}
}
}
private void btnClear_Click(object sender, EventArgs e)
{
this.listDecks.Items.Clear();
}
private void checkAllowMixDeck_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.AllowMixDeck = this.checkAllowMixDeck.Checked;
this.SaveOptions();
}
private void checkOutputDescription_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.OutputDescription = this.checkOutputDescription.Checked;
this.SaveOptions();
}
private void CheckNoFile_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.NoFile = checkNoFile.Checked;
this.SaveOptions();
}
private void CheckMostOnly_CheckedChanged(object sender, EventArgs e)
{
Properties.Settings.Default.MostOnly = checkMostOnly.Checked;
this.SaveOptions();
}
private void bwWorker_DoWork(object sender, DoWorkEventArgs e)
{
int failed = 0;
FileStream fsout = null;
StreamWriter sw = null;
FileStream fs = null;
StreamReader sr = null;
SQLiteConnection sql = new SQLiteConnection($"Data Source={this.txtCardsCdb.Text};");
SQLiteCommand cmd = new SQLiteCommand(sql);
Dictionary<string, string> series = new Dictionary<string, string>();
Dictionary<string, int> overAllDeckType = new Dictionary<string, int>();
try
{
sql.Open();
fs = File.OpenRead(this.txtStringsConf.Text);
sr = new StreamReader(fs);
for (string line = sr.ReadLine(); line != null; line = sr.ReadLine())
{
line = line.Trim().ToUpper();
if (line.StartsWith("!SETNAME"))
{
string[] lineSplit = line.Split(' ');
series.Add(lineSplit[1].Substring(2).PadLeft(4, '0'), lineSplit[2].Split('\t')[0]);
}
}
sr.Close();
fs.Close();
series = this.SpecialProcess(series);
if (!checkNoFile.Checked)
{
fsout = File.OpenWrite(this.sfdSave.FileName);
sw = new StreamWriter(fsout, Encoding.UTF8);
if (this.checkOutputDescription.Checked)
{
sw.WriteLine("----------------------------------");
sw.WriteLine($"卡组分析(共{this.listDecks.Items.Count}个)");
sw.WriteLine("----------------------------------");
}
}
cmd.CommandText = $"SELECT id,setcode FROM datas";
var rdr = cmd.ExecuteReader();
Dictionary<long, string> cardSetCode = new Dictionary<long, string>();
while (rdr.Read())
{
long card = (long)rdr["id"];
long setcode = (long)rdr["setcode"];
string setcodeString = setcode.ToString("X");
int realLen = (4 - (setcodeString.Length % 4));
if (realLen == 4)
{
realLen = 0;
}
realLen += setcodeString.Length;
setcodeString = setcodeString.PadLeft(realLen, '0');
if (setcodeString != "0000")
{
cardSetCode.Add(card, setcodeString);
}
else
{
cardSetCode.Add(card, "");
}
}
rdr.Close();
int completed = 0;
foreach (object obj in this.listDecks.Items)
{
try
{
fs = File.OpenRead(obj as string);
sr = new StreamReader(fs);
Dictionary<string, int> deckCardSeries = new Dictionary<string, int>();
bool atMain = true;
int main = 0;
for (string line = sr.ReadLine(); line != null; line = sr.ReadLine())
{
line = line.Trim();
long card = -1;
if (line.StartsWith("#extra"))
{
atMain = false;
}
if (long.TryParse(line, out card))
{
if (atMain)
{
main++;
}
string setcodeString = cardSetCode[card];
string processing = this.SpecialProcess_SeriesJudge(card);
if (processing != null)
{
setcodeString = processing;
}
while (setcodeString.Length > 0)
{
processing = setcodeString.Substring(0, 4);
setcodeString = setcodeString.Substring(4);
if (deckCardSeries.Keys.Contains(processing))
{
deckCardSeries[processing]++;
}
else
{
deckCardSeries.Add(processing, 1);
}
}
}
}
List<string> deckType = new List<string>();
int most = 0;
string mostType = "";
if (this.checkOutputDescription.Checked && !checkNoFile.Checked)
{
sw.WriteLine($"{obj as string}:");
}
Dictionary<string, int> deckCardSeriesFilter = new Dictionary<string, int>();
foreach (KeyValuePair<string, int> kvp in deckCardSeries)
{
string serie = "";
if (!series.ContainsKey(kvp.Key))
{
serie = $"未知(0x{kvp.Key})";
}
else
{
serie = series[kvp.Key];
}
if (serie != null)
{
if (deckCardSeriesFilter.ContainsKey(serie))
{
deckCardSeriesFilter[serie] += kvp.Value;
}
else
{
deckCardSeriesFilter.Add(serie, kvp.Value);
}
}
}
string postfix = "";
while (deckCardSeriesFilter.Count > 0)
{
most = 0;
mostType = "";
//foreach (KeyValuePair<string,int> kvp in deckCardSeries)
//{
// if (kvp.Value > most)
// {
// most = kvp.Value;
// mostTypeKey = kvp.Key;
// if (!series.ContainsKey(mostTypeKey))
// {
// mostType = $"未知(0x{mostTypeKey})";
// }
// else
// {
// mostType = series[mostTypeKey];
// }
// }
//}
foreach (KeyValuePair<string, int> kvp in deckCardSeriesFilter)
{
if (kvp.Value > most)
{
most = kvp.Value;
mostType = kvp.Key;
}
}
if (most <= 6 && (!checkMostOnly.Checked || most <= 3))
{
if (deckCardSeriesFilter.Keys.Contains("割草"))
{
deckType.Add("割草");
}
if (deckCardSeriesFilter.Keys.Contains("机巧蛇"))
{
deckType.Add("机巧蛇");
}
break;
}
else
{
if (this.checkOutputDescription.Checked && !checkNoFile.Checked)
{
sw.WriteLine($"{mostType}系列投入:{most}");
}
if (!deckType.Contains(mostType))
{
deckType.Add(mostType);
}
deckCardSeriesFilter.Remove(mostType);
}
}
if (deckType.Count == 0)
{
deckType.Add("其他");
}
//deckType.Sort();
string realDeckType = "";
if (!checkMostOnly.Checked)
{
if (deckType.Contains("割草"))
{
realDeckType = "割草";
deckType.Remove("割草");
}
if (main > 55 && realDeckType != "割草")
{
realDeckType = $"{main}张";
}
}
if (deckType.Count > 1)
{
if (deckType.Contains("METABEAT"))
{
deckType.Remove("METABEAT");
}
if (deckType.Contains("均卡(LINK/同调)"))
{
deckType.Remove("均卡(LINK/同调)");
}
if (deckType.Contains("黑魔导") || deckType.Contains("召唤师"))
{
deckType.Remove("风魔女");
}
if (deckType.Contains("恩底弥翁"))
{
deckType.Remove("魔导兽");
}
if (deckType.Contains("甘多拉"))
{
deckType.Remove("守护龙");
deckType.Remove("圣像骑士");
deckType.Remove("龙骑兵团");
}
}
if (deckType.Count >= 3 && this.checkAllowMixDeck.Checked)
{
realDeckType = "多系列混合";
}
else
{
if (!checkMostOnly.Checked)
{
realDeckType += postfix;
foreach (string type in deckType)
{
realDeckType += type;
}
}
else
{
realDeckType = deckType[0];
}
}
if (realDeckType.EndsWith("张其他"))
{
realDeckType = "其他";
}
//总览记录
if (!overAllDeckType.ContainsKey(realDeckType))
{
overAllDeckType.Add(realDeckType, 1);
}
else
{
overAllDeckType[realDeckType]++;
}
}
catch
{
failed++;
}
finally
{
sr.Close();
fs.Close();
}
completed++;
bwWorker.ReportProgress(0, completed);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
sw?.Close();
fsout?.Close();
return;
}
finally
{
sr?.Close();
fs?.Close();
cmd?.Dispose();
sql?.Close();
}
if (!checkNoFile.Checked)
{
sw.WriteLine();
sw.WriteLine("----------------------------------");
sw.WriteLine($"卡组总览(共{this.listDecks.Items.Count}个)");
sw.WriteLine("----------------------------------");
}
int all = this.listDecks.Items.Count;
Dictionary<string, int> list = new Dictionary<string, int>();
while (overAllDeckType.Count > 0)
{
int most = 0;
string mostKey = "";
foreach (KeyValuePair<string, int> kvp in overAllDeckType)
{
if (kvp.Value > most)
{
most = kvp.Value;
mostKey = kvp.Key;
}
}
string mostKeyModify = mostKey;
if (mostKey.StartsWith("55张") || mostKey.StartsWith("56张") || mostKey.StartsWith("57张") ||
mostKey.StartsWith("58张") || mostKey.StartsWith("59张") || mostKey.StartsWith("60张"))
{
mostKeyModify = mostKeyModify.Substring(3);
}
if (mostKeyModify.StartsWith("割草"))
{
mostKeyModify = mostKeyModify.Substring(2);
}
if (mostKeyModify.Length == 0)
{
mostKeyModify = "其他";
}
if (list.Keys.Contains(mostKeyModify))
{
list[mostKeyModify] += overAllDeckType[mostKey];
}
else
{
list.Add(mostKeyModify, overAllDeckType[mostKey]);
}
if (!checkNoFile.Checked)
{
sw.WriteLine($"{mostKey} - {overAllDeckType[mostKey]}个 ({overAllDeckType[mostKey] * 100 / all} %)");
}
overAllDeckType.Remove(mostKey);
}
sw?.Close();
fsout?.Close();
string message = "处理结束";
if (failed > 0)
{
message += ",失败{failed}个";
}
if (!checkNoFile.Checked)
{
MessageBox.Show(message);
}
bwWorker.ReportProgress(0, list);
}
private void bwWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
if (e.UserState is Dictionary<string,int>)
{
FormChart form = new FormChart(e.UserState as Dictionary<string,int>);
form.Show();
}
else
{
txtStatus.Text = $"{(int)(e.UserState)} / {listDecks.Items.Count}";
}
}
private void bwWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
btnStart.Enabled = true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.0\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B6B28995-319E-4C1D-BA6F-5AF6D2AA5D6D}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>YGO_DeckAnalyzer</RootNamespace>
<AssemblyName>YGO_DeckAnalyzer</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.112.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.112.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.112.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms.DataVisualization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FormChart.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FormChart.Designer.cs">
<DependentUpon>FormChart.cs</DependentUpon>
</Compile>
<Compile Include="YGO_DeckAnalyzer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="YGO_DeckAnalyzer.Designer.cs">
<DependentUpon>YGO_DeckAnalyzer.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FormChart.resx">
<DependentUpon>FormChart.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="YGO_DeckAnalyzer.resx">
<DependentUpon>YGO_DeckAnalyzer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="pics\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.0\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.0\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.112.0\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.0\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.0\build\EntityFramework.targets')" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.112.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.112.0\build\net46\System.Data.SQLite.Core.targets')" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="sfdSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ofdStringsConf.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>114, 17</value>
</metadata>
<metadata name="ofdCardsCdb.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>262, 17</value>
</metadata>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>391, 17</value>
</metadata>
<metadata name="bwWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>565, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>678, 17</value>
</metadata>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.4.0" targetFramework="net472" />
<package id="System.Data.SQLite" version="1.0.112.0" targetFramework="net472" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net472" />
<package id="System.Data.SQLite.EF6" version="1.0.112.0" targetFramework="net472" />
<package id="System.Data.SQLite.Linq" version="1.0.112.0" targetFramework="net472" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment