초기 커밋.

This commit is contained in:
2026-04-01 20:20:09 +09:00
parent c286f362e5
commit fd1a2cba32
172 changed files with 43588 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lolDataSimulation
{
static class Program
{
/// <summary>
/// 해당 응용 프로그램의 주 진입점입니다.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new SimulationForm());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("lolDataSimulation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("lolDataSimulation")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("4485ca9d-7fc7-4258-a90d-1eff38d73b3e")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로
// 지정되도록 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace lolDataSimulation.Properties
{
/// <summary>
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
/// </summary>
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
// ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("lolDataSimulation.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
/// 재정의합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?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>

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace lolDataSimulation.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,181 @@
namespace lolDataSimulation
{
partial class SimulationForm
{
/// <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 Form
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
this.btnBanPickNect = new System.Windows.Forms.Button();
this.btnClear = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.btnClearGameData = new System.Windows.Forms.Button();
this.btnSyncGameData = new System.Windows.Forms.Button();
this.btnAutoplayStart = new System.Windows.Forms.Button();
this.btnAutoplayEnd = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.SuspendLayout();
//
// btnBanPickNect
//
this.btnBanPickNect.Location = new System.Drawing.Point(321, 57);
this.btnBanPickNect.Name = "btnBanPickNect";
this.btnBanPickNect.Size = new System.Drawing.Size(223, 133);
this.btnBanPickNect.TabIndex = 0;
this.btnBanPickNect.Text = "밴픽다음단계";
this.btnBanPickNect.UseVisualStyleBackColor = true;
this.btnBanPickNect.Click += new System.EventHandler(this.btnBanPickNect_Click);
//
// btnClear
//
this.btnClear.Location = new System.Drawing.Point(12, 57);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(303, 135);
this.btnClear.TabIndex = 1;
this.btnClear.Text = "밴픽초기화";
this.btnClear.UseVisualStyleBackColor = true;
this.btnClear.Click += new System.EventHandler(this.button2_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(12, 30);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(303, 21);
this.textBox1.TabIndex = 2;
this.textBox1.Text = "LOLTMNT03_219847";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(321, 30);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(223, 21);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "-1000";
//
// numericUpDown1
//
this.numericUpDown1.Font = new System.Drawing.Font("굴림", 30F);
this.numericUpDown1.Location = new System.Drawing.Point(12, 235);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(120, 53);
this.numericUpDown1.TabIndex = 4;
//
// numericUpDown2
//
this.numericUpDown2.Font = new System.Drawing.Font("굴림", 30F);
this.numericUpDown2.Location = new System.Drawing.Point(138, 235);
this.numericUpDown2.Maximum = new decimal(new int[] {
59,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(120, 53);
this.numericUpDown2.TabIndex = 4;
this.numericUpDown2.ValueChanged += new System.EventHandler(this.numericUpDown2_ValueChanged);
//
// btnClearGameData
//
this.btnClearGameData.Location = new System.Drawing.Point(12, 294);
this.btnClearGameData.Name = "btnClearGameData";
this.btnClearGameData.Size = new System.Drawing.Size(165, 82);
this.btnClearGameData.TabIndex = 5;
this.btnClearGameData.Text = "초기화";
this.btnClearGameData.UseVisualStyleBackColor = true;
this.btnClearGameData.Click += new System.EventHandler(this.btnClearGameData_Click);
//
// btnSyncGameData
//
this.btnSyncGameData.Location = new System.Drawing.Point(183, 294);
this.btnSyncGameData.Name = "btnSyncGameData";
this.btnSyncGameData.Size = new System.Drawing.Size(165, 82);
this.btnSyncGameData.TabIndex = 5;
this.btnSyncGameData.Text = "동기화";
this.btnSyncGameData.UseVisualStyleBackColor = true;
this.btnSyncGameData.Click += new System.EventHandler(this.btnSyncGameData_Click);
//
// btnAutoplayStart
//
this.btnAutoplayStart.Location = new System.Drawing.Point(354, 294);
this.btnAutoplayStart.Name = "btnAutoplayStart";
this.btnAutoplayStart.Size = new System.Drawing.Size(165, 82);
this.btnAutoplayStart.TabIndex = 5;
this.btnAutoplayStart.Text = "오토플레이시작";
this.btnAutoplayStart.UseVisualStyleBackColor = true;
this.btnAutoplayStart.Click += new System.EventHandler(this.button3_Click);
//
// btnAutoplayEnd
//
this.btnAutoplayEnd.Location = new System.Drawing.Point(525, 294);
this.btnAutoplayEnd.Name = "btnAutoplayEnd";
this.btnAutoplayEnd.Size = new System.Drawing.Size(165, 82);
this.btnAutoplayEnd.TabIndex = 5;
this.btnAutoplayEnd.Text = "오토플레이끝";
this.btnAutoplayEnd.UseVisualStyleBackColor = true;
this.btnAutoplayEnd.Click += new System.EventHandler(this.btnAutoplayEnd_Click);
//
// SimulationForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.btnAutoplayEnd);
this.Controls.Add(this.btnAutoplayStart);
this.Controls.Add(this.btnSyncGameData);
this.Controls.Add(this.btnClearGameData);
this.Controls.Add(this.numericUpDown2);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.btnClear);
this.Controls.Add(this.btnBanPickNect);
this.Name = "SimulationForm";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnBanPickNect;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Button btnClearGameData;
private System.Windows.Forms.Button btnSyncGameData;
private System.Windows.Forms.Button btnAutoplayStart;
private System.Windows.Forms.Button btnAutoplayEnd;
}
}

View File

@@ -0,0 +1,324 @@
using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace lolDataSimulation
{
/// <summary>
/// 시뮬레이션으로 게임데이터를 만들기위한 프로그램
///
/// 좀 쓰다 버릴줄알고 발로짰다. 이렇게 많이 쓸줄 알았으면 여기에 목숨을 걸어야했는데..
///
/// </summary>
public partial class SimulationForm : Form
{
public SimulationForm()
{
InitializeComponent();
updateTimer.Tick += timeup;
}
private void button2_Click(object sender, EventArgs e)
{
var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
mEventDataBaseTarget.GetCollection<BsonDocument>("champ_select").DeleteMany("{ RequestGameID : '" + textBox1.Text + "' }");
textBox2.Text = (-1000).ToString();
}
private void btnBanPickNect_Click(object sender, EventArgs e)
{
banPickNext();
}
//MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@203.251.148.27:50002");
MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@211.42.188.8:50003");
//MongoClient mDBClient = new MongoClient("mongodb://root:veryhardpassword123@localhost:60001");
void banPickNext()
{
var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
var filter = Builders<BsonDocument>.Filter.And(
Builders<BsonDocument>.Filter.Eq("RequestGameID", textBox1.Text),
Builders<BsonDocument>.Filter.Eq("sequenceIndex", Convert.ToInt32(textBox2.Text))
);
var projection = Builders<BsonDocument>.Projection
.Exclude("_id")
.Include("RequestGameID")
.Include("sequenceIndex")
.Include("eventDocument");
List<BsonDocument> documents = mEventDataBaseSeed.GetCollection<BsonDocument>("champ_select")
.Find(filter)
.SortByDescending(x => x["sequenceIndex"])
.Project(projection)
.Limit(1)
.ToList();
if (documents.Count == 0)
{
MessageBox.Show("업데이트할 데이터가 없습니다.");
return;
}
var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
mEventDataBaseTarget.GetCollection<BsonDocument>("champ_select").InsertOne(documents.Last());
textBox2.Text = (Convert.ToInt32(textBox2.Text) + 1).ToString();
}
Timer updateTimer = new Timer();
private void button3_Click(object sender, EventArgs e)
{
updateTimer.Interval = 1000;
updateTimer.Start();
}
void timeup(object o, EventArgs e)
{
if (Convert.ToInt32(numericUpDown2.Value) == 59)
{
numericUpDown1.Value += 1;
numericUpDown2.Value = 0;
}
else
{
numericUpDown2.Value += 1;
}
}
string[] bufUpdateCollectionsName = { "stats_update", "epic_monster_kill", "building_destroyed", "turret_plate_destroyed", "queued_dragon_info" };
void liveDataUpdateWork()
{
var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
int calculatedTime = 0;
calculatedTime += Convert.ToInt32(numericUpDown1.Value) * 60 * 1000;
calculatedTime += Convert.ToInt32(numericUpDown2.Value) * 1000;
Dictionary<string, List<WriteModel<BsonValue>>> bufDataTable = new Dictionary<string, List<WriteModel<BsonValue>>>();
var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize<BsonDocument>("{'eventDocument.gameTime' : {$lt : " + calculatedTime + " }}");
var filter = Builders<BsonDocument>.Filter.And(
Builders<BsonDocument>.Filter.Eq("RequestGameID", textBox1.Text),
subFilter
);
foreach (string item in bufUpdateCollectionsName)
{
var projection = Builders<BsonDocument>.Projection
.Exclude("_id")
.Include("RequestGameID")
.Include("sequenceIndex")
.Include("eventDocument");
List<BsonDocument> documents = mEventDataBaseSeed.GetCollection<BsonDocument>(item)
.Find(filter)
.SortByDescending(x => x["sequenceIndex"])
.Project(projection)
.Limit(1)
.ToList();
if (documents.Count == 0)
{
continue;
}
BsonDocument bufUpdateValue = documents[0].AsBsonDocument;
string bufStatus = bufUpdateValue["eventDocument"]["rfc461Schema"].ToString();
var gameFilter = Builders<BsonValue>.Filter.Eq(x => x["RequestGameID"], textBox1.Text);
var sequanceFilter = Builders<BsonValue>.Filter.Eq(x => x["sequenceIndex"], documents[0]["sequenceIndex"]);
var Parentfilter = Builders<BsonValue>.Filter.And(gameFilter, sequanceFilter);
UpdateOneModel<BsonValue> updateRaw = new UpdateOneModel<BsonValue>(
Parentfilter,
Builders<BsonValue>.Update.Set(x => x["eventDocument"], bufUpdateValue["eventDocument"])
)
{ IsUpsert = true };
if (!bufDataTable.ContainsKey(bufStatus))
{
bufDataTable.Add(bufStatus, new List<WriteModel<BsonValue>>());
}
if (item == "stats_update")
{
Console.WriteLine(bufUpdateValue["eventDocument"]["gameTime"].ToString());
}
bufDataTable[bufStatus].Add(updateRaw);
}
foreach (var item in bufDataTable)
{
mEventDataBaseTarget.GetCollection<BsonValue>(item.Key)
.BulkWriteAsync(item.Value);
}
}
private void numericUpDown2_ValueChanged(object sender, EventArgs e)
{
liveDataUpdateWork();
}
private void btnClearGameData_Click(object sender, EventArgs e)
{
var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
foreach (string item in bufUpdateCollectionsName)
{
mEventDataBaseTarget.GetCollection<BsonValue>(item)
.DeleteMany(x => true);
}
}
private void btnAutoplayEnd_Click(object sender, EventArgs e)
{
updateTimer.Stop();
}
private void btnSyncGameData_Click(object sender, EventArgs e)
{
var mEventDataBaseTarget = mDBClient.GetDatabase("datalol");
var mEventDataBaseSeed = mDBClient.GetDatabase("data_lol_test_seed");
int calculatedTime = 0;
calculatedTime += Convert.ToInt32(numericUpDown1.Value) * 60 * 1000;
calculatedTime += Convert.ToInt32(numericUpDown2.Value) * 1000;
Dictionary<string, List<WriteModel<BsonValue>>> bufDataTable = new Dictionary<string, List<WriteModel<BsonValue>>>();
var subFilter = MongoDB.Bson.Serialization.BsonSerializer.Deserialize<BsonDocument>("{'eventDocument.gameTime' : {$lt : " + calculatedTime + " }}");
var filter = Builders<BsonDocument>.Filter.And(
Builders<BsonDocument>.Filter.Eq("RequestGameID", textBox1.Text),
subFilter
);
foreach (string item in bufUpdateCollectionsName)
{
var projection = Builders<BsonDocument>.Projection
.Exclude("_id")
.Include("RequestGameID")
.Include("sequenceIndex")
.Include("eventDocument");
List<BsonDocument> documents = mEventDataBaseSeed.GetCollection<BsonDocument>(item)
.Find(filter)
//.SortByDescending(x => x["sequenceIndex"])
.Project(projection)
.ToList();
if (documents.Count == 0)
{
continue;
}
//BsonDocument bufUpdateValue = documents[0].AsBsonDocument;
foreach (BsonDocument itemd in documents)
{
string bufStatus = itemd["eventDocument"]["rfc461Schema"].ToString();
var gameFilter = Builders<BsonValue>.Filter.Eq(x => x["RequestGameID"], textBox1.Text);
var sequanceFilter = Builders<BsonValue>.Filter.Eq(x => x["sequenceIndex"], itemd["sequenceIndex"]);
var Parentfilter = Builders<BsonValue>.Filter.And(gameFilter, sequanceFilter);
UpdateOneModel<BsonValue> updateRaw = new UpdateOneModel<BsonValue>(
Parentfilter,
Builders<BsonValue>.Update.Set(x => x["eventDocument"], itemd["eventDocument"])
)
{ IsUpsert = true };
if (!bufDataTable.ContainsKey(bufStatus))
{
bufDataTable.Add(bufStatus, new List<WriteModel<BsonValue>>());
}
if (item == "stats_update")
{
Console.WriteLine(itemd["eventDocument"]["gameTime"].ToString());
}
bufDataTable[bufStatus].Add(updateRaw);
}
}
foreach (var item in bufDataTable)
{
mEventDataBaseTarget.GetCollection<BsonValue>(item.Key)
.BulkWriteAsync(item.Value);
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?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>
</root>

View File

@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>{4485CA9D-7FC7-4258-A90D-1EFF38D73B3E}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>lolDataSimulation</RootNamespace>
<AssemblyName>lolDataSimulation</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="DnsClient, Version=1.4.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.4.0\lib\net471\DnsClient.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Bson, Version=2.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.12.3\lib\net452\MongoDB.Bson.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver, Version=2.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.12.3\lib\net452\MongoDB.Driver.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.12.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.12.3\lib\net452\MongoDB.Driver.Core.dll</HintPath>
</Reference>
<Reference Include="MongoDB.Libmongocrypt, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Libmongocrypt.1.2.1\lib\net452\MongoDB.Libmongocrypt.dll</HintPath>
</Reference>
<Reference Include="SharpCompress, Version=0.23.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.23.0\lib\net45\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<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.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="SimulationForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SimulationForm.Designer.cs">
<DependentUpon>SimulationForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="SimulationForm.resx">
<DependentUpon>SimulationForm.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>
</Compile>
<None Include="libmongocrypt.dylib" />
<None Include="libmongocrypt.so" />
<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>
<Content Include="Core\Compression\Snappy\lib\win\snappy32.dll" />
<Content Include="Core\Compression\Snappy\lib\win\snappy64.dll" />
<Content Include="Core\Compression\Zstandard\lib\win\libzstd.dll" />
<Content Include="mongocrypt.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\MongoDB.Libmongocrypt.1.2.1\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.2.1\build\MongoDB.Libmongocrypt.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.2.1\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.2.1\build\MongoDB.Libmongocrypt.targets'))" />
<Error Condition="!Exists('..\packages\MongoDB.Driver.Core.2.12.3\build\MongoDB.Driver.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Driver.Core.2.12.3\build\MongoDB.Driver.Core.targets'))" />
</Target>
<Import Project="..\packages\MongoDB.Driver.Core.2.12.3\build\MongoDB.Driver.Core.targets" Condition="Exists('..\packages\MongoDB.Driver.Core.2.12.3\build\MongoDB.Driver.Core.targets')" />
</Project>

Binary file not shown.

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DnsClient" version="1.4.0" targetFramework="net472" />
<package id="MongoDB.Bson" version="2.12.3" targetFramework="net472" />
<package id="MongoDB.Driver" version="2.12.3" targetFramework="net472" />
<package id="MongoDB.Driver.Core" version="2.12.3" targetFramework="net472" />
<package id="MongoDB.Libmongocrypt" version="1.2.1" targetFramework="net472" />
<package id="SharpCompress" version="0.23.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.IO" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net472" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
</packages>