Update structure
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
586
SaveWizard/MainForm/MainForm.Designer.cs
generated
Normal file
586
SaveWizard/MainForm/MainForm.Designer.cs
generated
Normal file
@@ -0,0 +1,586 @@
|
||||
namespace SaveWizard
|
||||
{
|
||||
partial class MainForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Обязательная переменная конструктора.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Освободить все используемые ресурсы.
|
||||
/// </summary>
|
||||
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Код, автоматически созданный конструктором форм Windows
|
||||
|
||||
/// <summary>
|
||||
/// Требуемый метод для поддержки конструктора — не изменяйте
|
||||
/// содержимое этого метода с помощью редактора кода.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btn_open_save = new System.Windows.Forms.Button();
|
||||
this.tlp_basic_info = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.txt_loan_limit = new System.Windows.Forms.TextBox();
|
||||
this.chk_loan_limit = new System.Windows.Forms.CheckBox();
|
||||
this.chk_experience = new System.Windows.Forms.CheckBox();
|
||||
this.lbl_loan_limit = new System.Windows.Forms.Label();
|
||||
this.txt_experience = new System.Windows.Forms.TextBox();
|
||||
this.chk_money = new System.Windows.Forms.CheckBox();
|
||||
this.txt_money = new System.Windows.Forms.TextBox();
|
||||
this.lbl_money = new System.Windows.Forms.Label();
|
||||
this.lbl_experience = new System.Windows.Forms.Label();
|
||||
this.lbl_basic_info = new System.Windows.Forms.Label();
|
||||
this.chk_update_on_start = new System.Windows.Forms.CheckBox();
|
||||
this.tlp_skills = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lbl_skills = new System.Windows.Forms.Label();
|
||||
this.lbl_adr = new System.Windows.Forms.Label();
|
||||
this.txt_adr = new System.Windows.Forms.TextBox();
|
||||
this.chk_adr = new System.Windows.Forms.CheckBox();
|
||||
this.lbl_long_distance = new System.Windows.Forms.Label();
|
||||
this.lbl_high_value_cargo = new System.Windows.Forms.Label();
|
||||
this.lbl_fragile_cargo = new System.Windows.Forms.Label();
|
||||
this.lbl_urgent_delivery = new System.Windows.Forms.Label();
|
||||
this.lbl_ecodriving = new System.Windows.Forms.Label();
|
||||
this.txt_long_distance = new System.Windows.Forms.TextBox();
|
||||
this.txt_high_value_cargo = new System.Windows.Forms.TextBox();
|
||||
this.txt_fragile_cargo = new System.Windows.Forms.TextBox();
|
||||
this.txt_urgent_delivery = new System.Windows.Forms.TextBox();
|
||||
this.txt_ecodriving = new System.Windows.Forms.TextBox();
|
||||
this.chk_long_distance = new System.Windows.Forms.CheckBox();
|
||||
this.chk_high_value_cargo = new System.Windows.Forms.CheckBox();
|
||||
this.chk_fragile_cargo = new System.Windows.Forms.CheckBox();
|
||||
this.chk_urgent_delivery = new System.Windows.Forms.CheckBox();
|
||||
this.chk_ecodriving = new System.Windows.Forms.CheckBox();
|
||||
this.btn_unlock_garages = new System.Windows.Forms.Button();
|
||||
this.btn_recover_backup = new System.Windows.Forms.Button();
|
||||
this.btn_apply_changes = new System.Windows.Forms.Button();
|
||||
this.tlp_basic_info.SuspendLayout();
|
||||
this.tlp_skills.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_open_save
|
||||
//
|
||||
this.btn_open_save.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btn_open_save.Location = new System.Drawing.Point(12, 12);
|
||||
this.btn_open_save.Name = "btn_open_save";
|
||||
this.btn_open_save.Size = new System.Drawing.Size(115, 28);
|
||||
this.btn_open_save.TabIndex = 0;
|
||||
this.btn_open_save.Text = "Open save";
|
||||
this.btn_open_save.UseVisualStyleBackColor = true;
|
||||
this.btn_open_save.Click += new System.EventHandler(this.btn_open_save_Click);
|
||||
//
|
||||
// tlp_basic_info
|
||||
//
|
||||
this.tlp_basic_info.ColumnCount = 3;
|
||||
this.tlp_basic_info.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
|
||||
this.tlp_basic_info.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40F));
|
||||
this.tlp_basic_info.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30F));
|
||||
this.tlp_basic_info.Controls.Add(this.txt_loan_limit, 1, 3);
|
||||
this.tlp_basic_info.Controls.Add(this.chk_loan_limit, 2, 3);
|
||||
this.tlp_basic_info.Controls.Add(this.chk_experience, 2, 2);
|
||||
this.tlp_basic_info.Controls.Add(this.lbl_loan_limit, 0, 3);
|
||||
this.tlp_basic_info.Controls.Add(this.txt_experience, 1, 2);
|
||||
this.tlp_basic_info.Controls.Add(this.chk_money, 2, 1);
|
||||
this.tlp_basic_info.Controls.Add(this.txt_money, 1, 1);
|
||||
this.tlp_basic_info.Controls.Add(this.lbl_money, 0, 1);
|
||||
this.tlp_basic_info.Controls.Add(this.lbl_experience, 0, 2);
|
||||
this.tlp_basic_info.Controls.Add(this.lbl_basic_info, 1, 0);
|
||||
this.tlp_basic_info.Location = new System.Drawing.Point(12, 46);
|
||||
this.tlp_basic_info.Name = "tlp_basic_info";
|
||||
this.tlp_basic_info.RowCount = 4;
|
||||
this.tlp_basic_info.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.99927F));
|
||||
this.tlp_basic_info.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.99927F));
|
||||
this.tlp_basic_info.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.99927F));
|
||||
this.tlp_basic_info.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00219F));
|
||||
this.tlp_basic_info.Size = new System.Drawing.Size(343, 146);
|
||||
this.tlp_basic_info.TabIndex = 1;
|
||||
//
|
||||
// txt_loan_limit
|
||||
//
|
||||
this.txt_loan_limit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_loan_limit.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_loan_limit.Location = new System.Drawing.Point(105, 114);
|
||||
this.txt_loan_limit.MaxLength = 9;
|
||||
this.txt_loan_limit.Name = "txt_loan_limit";
|
||||
this.txt_loan_limit.Size = new System.Drawing.Size(131, 26);
|
||||
this.txt_loan_limit.TabIndex = 6;
|
||||
//
|
||||
// chk_loan_limit
|
||||
//
|
||||
this.chk_loan_limit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_loan_limit.AutoSize = true;
|
||||
this.chk_loan_limit.Checked = true;
|
||||
this.chk_loan_limit.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_loan_limit.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_loan_limit.Location = new System.Drawing.Point(242, 117);
|
||||
this.chk_loan_limit.Name = "chk_loan_limit";
|
||||
this.chk_loan_limit.Size = new System.Drawing.Size(98, 19);
|
||||
this.chk_loan_limit.TabIndex = 7;
|
||||
this.chk_loan_limit.Text = "Don\'t change";
|
||||
this.chk_loan_limit.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chk_experience
|
||||
//
|
||||
this.chk_experience.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_experience.AutoSize = true;
|
||||
this.chk_experience.Checked = true;
|
||||
this.chk_experience.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_experience.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_experience.Location = new System.Drawing.Point(242, 80);
|
||||
this.chk_experience.Name = "chk_experience";
|
||||
this.chk_experience.Size = new System.Drawing.Size(98, 19);
|
||||
this.chk_experience.TabIndex = 5;
|
||||
this.chk_experience.Text = "Don\'t change";
|
||||
this.chk_experience.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lbl_loan_limit
|
||||
//
|
||||
this.lbl_loan_limit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_loan_limit.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_loan_limit.Location = new System.Drawing.Point(3, 115);
|
||||
this.lbl_loan_limit.Name = "lbl_loan_limit";
|
||||
this.lbl_loan_limit.Size = new System.Drawing.Size(96, 23);
|
||||
this.lbl_loan_limit.TabIndex = 9;
|
||||
this.lbl_loan_limit.Text = "Loan limit:";
|
||||
//
|
||||
// txt_experience
|
||||
//
|
||||
this.txt_experience.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_experience.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_experience.Location = new System.Drawing.Point(105, 77);
|
||||
this.txt_experience.MaxLength = 9;
|
||||
this.txt_experience.Name = "txt_experience";
|
||||
this.txt_experience.Size = new System.Drawing.Size(131, 26);
|
||||
this.txt_experience.TabIndex = 4;
|
||||
//
|
||||
// chk_money
|
||||
//
|
||||
this.chk_money.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_money.AutoSize = true;
|
||||
this.chk_money.Checked = true;
|
||||
this.chk_money.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_money.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_money.Location = new System.Drawing.Point(242, 44);
|
||||
this.chk_money.Name = "chk_money";
|
||||
this.chk_money.Size = new System.Drawing.Size(98, 19);
|
||||
this.chk_money.TabIndex = 3;
|
||||
this.chk_money.Text = "Don\'t change";
|
||||
this.chk_money.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// txt_money
|
||||
//
|
||||
this.txt_money.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_money.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_money.Location = new System.Drawing.Point(105, 41);
|
||||
this.txt_money.MaxLength = 9;
|
||||
this.txt_money.Name = "txt_money";
|
||||
this.txt_money.Size = new System.Drawing.Size(131, 26);
|
||||
this.txt_money.TabIndex = 2;
|
||||
//
|
||||
// lbl_money
|
||||
//
|
||||
this.lbl_money.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_money.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_money.Location = new System.Drawing.Point(3, 42);
|
||||
this.lbl_money.Name = "lbl_money";
|
||||
this.lbl_money.Size = new System.Drawing.Size(96, 23);
|
||||
this.lbl_money.TabIndex = 1;
|
||||
this.lbl_money.Text = "Money:";
|
||||
//
|
||||
// lbl_experience
|
||||
//
|
||||
this.lbl_experience.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_experience.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_experience.Location = new System.Drawing.Point(3, 78);
|
||||
this.lbl_experience.Name = "lbl_experience";
|
||||
this.lbl_experience.Size = new System.Drawing.Size(96, 23);
|
||||
this.lbl_experience.TabIndex = 4;
|
||||
this.lbl_experience.Text = "Experience:";
|
||||
//
|
||||
// lbl_basic_info
|
||||
//
|
||||
this.lbl_basic_info.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lbl_basic_info.AutoSize = true;
|
||||
this.lbl_basic_info.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_basic_info.Location = new System.Drawing.Point(124, 5);
|
||||
this.lbl_basic_info.Name = "lbl_basic_info";
|
||||
this.lbl_basic_info.Size = new System.Drawing.Size(93, 26);
|
||||
this.lbl_basic_info.TabIndex = 0;
|
||||
this.lbl_basic_info.Text = "Basic info";
|
||||
//
|
||||
// chk_update_on_start
|
||||
//
|
||||
this.chk_update_on_start.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_update_on_start.Location = new System.Drawing.Point(174, 15);
|
||||
this.chk_update_on_start.Name = "chk_update_on_start";
|
||||
this.chk_update_on_start.Size = new System.Drawing.Size(181, 24);
|
||||
this.chk_update_on_start.TabIndex = 1;
|
||||
this.chk_update_on_start.Text = "Update configs on start";
|
||||
this.chk_update_on_start.UseVisualStyleBackColor = true;
|
||||
this.chk_update_on_start.CheckedChanged += new System.EventHandler(this.chk_update_on_start_CheckedChanged);
|
||||
//
|
||||
// tlp_skills
|
||||
//
|
||||
this.tlp_skills.ColumnCount = 3;
|
||||
this.tlp_skills.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.60933F));
|
||||
this.tlp_skills.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.36152F));
|
||||
this.tlp_skills.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 29.73761F));
|
||||
this.tlp_skills.Controls.Add(this.lbl_skills, 1, 0);
|
||||
this.tlp_skills.Controls.Add(this.lbl_adr, 0, 1);
|
||||
this.tlp_skills.Controls.Add(this.txt_adr, 1, 1);
|
||||
this.tlp_skills.Controls.Add(this.chk_adr, 2, 1);
|
||||
this.tlp_skills.Controls.Add(this.lbl_long_distance, 0, 2);
|
||||
this.tlp_skills.Controls.Add(this.lbl_high_value_cargo, 0, 3);
|
||||
this.tlp_skills.Controls.Add(this.lbl_fragile_cargo, 0, 4);
|
||||
this.tlp_skills.Controls.Add(this.lbl_urgent_delivery, 0, 5);
|
||||
this.tlp_skills.Controls.Add(this.lbl_ecodriving, 0, 6);
|
||||
this.tlp_skills.Controls.Add(this.txt_long_distance, 1, 2);
|
||||
this.tlp_skills.Controls.Add(this.txt_high_value_cargo, 1, 3);
|
||||
this.tlp_skills.Controls.Add(this.txt_fragile_cargo, 1, 4);
|
||||
this.tlp_skills.Controls.Add(this.txt_urgent_delivery, 1, 5);
|
||||
this.tlp_skills.Controls.Add(this.txt_ecodriving, 1, 6);
|
||||
this.tlp_skills.Controls.Add(this.chk_long_distance, 2, 2);
|
||||
this.tlp_skills.Controls.Add(this.chk_high_value_cargo, 2, 3);
|
||||
this.tlp_skills.Controls.Add(this.chk_fragile_cargo, 2, 4);
|
||||
this.tlp_skills.Controls.Add(this.chk_urgent_delivery, 2, 5);
|
||||
this.tlp_skills.Controls.Add(this.chk_ecodriving, 2, 6);
|
||||
this.tlp_skills.Location = new System.Drawing.Point(12, 198);
|
||||
this.tlp_skills.Name = "tlp_skills";
|
||||
this.tlp_skills.RowCount = 7;
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.28571F));
|
||||
this.tlp_skills.Size = new System.Drawing.Size(343, 254);
|
||||
this.tlp_skills.TabIndex = 3;
|
||||
//
|
||||
// lbl_skills
|
||||
//
|
||||
this.lbl_skills.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.lbl_skills.AutoSize = true;
|
||||
this.lbl_skills.Font = new System.Drawing.Font("Calibri", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_skills.Location = new System.Drawing.Point(157, 5);
|
||||
this.lbl_skills.Name = "lbl_skills";
|
||||
this.lbl_skills.Size = new System.Drawing.Size(55, 26);
|
||||
this.lbl_skills.TabIndex = 1;
|
||||
this.lbl_skills.Text = "Skills";
|
||||
//
|
||||
// lbl_adr
|
||||
//
|
||||
this.lbl_adr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_adr.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_adr.Location = new System.Drawing.Point(3, 42);
|
||||
this.lbl_adr.Name = "lbl_adr";
|
||||
this.lbl_adr.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_adr.TabIndex = 2;
|
||||
this.lbl_adr.Text = "ADR:";
|
||||
//
|
||||
// txt_adr
|
||||
//
|
||||
this.txt_adr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_adr.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_adr.Location = new System.Drawing.Point(132, 41);
|
||||
this.txt_adr.Name = "txt_adr";
|
||||
this.txt_adr.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_adr.TabIndex = 8;
|
||||
//
|
||||
// chk_adr
|
||||
//
|
||||
this.chk_adr.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_adr.AutoSize = true;
|
||||
this.chk_adr.Checked = true;
|
||||
this.chk_adr.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_adr.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_adr.Location = new System.Drawing.Point(243, 44);
|
||||
this.chk_adr.Name = "chk_adr";
|
||||
this.chk_adr.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_adr.TabIndex = 9;
|
||||
this.chk_adr.Text = "Don\'t change";
|
||||
this.chk_adr.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lbl_long_distance
|
||||
//
|
||||
this.lbl_long_distance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_long_distance.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_long_distance.Location = new System.Drawing.Point(3, 78);
|
||||
this.lbl_long_distance.Name = "lbl_long_distance";
|
||||
this.lbl_long_distance.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_long_distance.TabIndex = 8;
|
||||
this.lbl_long_distance.Text = "Long distance:";
|
||||
//
|
||||
// lbl_high_value_cargo
|
||||
//
|
||||
this.lbl_high_value_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_high_value_cargo.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_high_value_cargo.Location = new System.Drawing.Point(3, 114);
|
||||
this.lbl_high_value_cargo.Name = "lbl_high_value_cargo";
|
||||
this.lbl_high_value_cargo.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_high_value_cargo.TabIndex = 9;
|
||||
this.lbl_high_value_cargo.Text = "High value cargo:";
|
||||
//
|
||||
// lbl_fragile_cargo
|
||||
//
|
||||
this.lbl_fragile_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_fragile_cargo.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_fragile_cargo.Location = new System.Drawing.Point(3, 150);
|
||||
this.lbl_fragile_cargo.Name = "lbl_fragile_cargo";
|
||||
this.lbl_fragile_cargo.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_fragile_cargo.TabIndex = 10;
|
||||
this.lbl_fragile_cargo.Text = "Fragile cargo:";
|
||||
//
|
||||
// lbl_urgent_delivery
|
||||
//
|
||||
this.lbl_urgent_delivery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_urgent_delivery.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_urgent_delivery.Location = new System.Drawing.Point(3, 186);
|
||||
this.lbl_urgent_delivery.Name = "lbl_urgent_delivery";
|
||||
this.lbl_urgent_delivery.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_urgent_delivery.TabIndex = 11;
|
||||
this.lbl_urgent_delivery.Text = "Urgent delivery:";
|
||||
//
|
||||
// lbl_ecodriving
|
||||
//
|
||||
this.lbl_ecodriving.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbl_ecodriving.Font = new System.Drawing.Font("Calibri", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.lbl_ecodriving.Location = new System.Drawing.Point(3, 223);
|
||||
this.lbl_ecodriving.Name = "lbl_ecodriving";
|
||||
this.lbl_ecodriving.Size = new System.Drawing.Size(123, 23);
|
||||
this.lbl_ecodriving.TabIndex = 12;
|
||||
this.lbl_ecodriving.Text = "Ecodriving:";
|
||||
//
|
||||
// txt_long_distance
|
||||
//
|
||||
this.txt_long_distance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_long_distance.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_long_distance.Location = new System.Drawing.Point(132, 77);
|
||||
this.txt_long_distance.MaxLength = 1;
|
||||
this.txt_long_distance.Name = "txt_long_distance";
|
||||
this.txt_long_distance.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_long_distance.TabIndex = 10;
|
||||
//
|
||||
// txt_high_value_cargo
|
||||
//
|
||||
this.txt_high_value_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_high_value_cargo.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_high_value_cargo.Location = new System.Drawing.Point(132, 113);
|
||||
this.txt_high_value_cargo.MaxLength = 1;
|
||||
this.txt_high_value_cargo.Name = "txt_high_value_cargo";
|
||||
this.txt_high_value_cargo.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_high_value_cargo.TabIndex = 12;
|
||||
//
|
||||
// txt_fragile_cargo
|
||||
//
|
||||
this.txt_fragile_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_fragile_cargo.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_fragile_cargo.Location = new System.Drawing.Point(132, 149);
|
||||
this.txt_fragile_cargo.MaxLength = 1;
|
||||
this.txt_fragile_cargo.Name = "txt_fragile_cargo";
|
||||
this.txt_fragile_cargo.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_fragile_cargo.TabIndex = 14;
|
||||
//
|
||||
// txt_urgent_delivery
|
||||
//
|
||||
this.txt_urgent_delivery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_urgent_delivery.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_urgent_delivery.Location = new System.Drawing.Point(132, 185);
|
||||
this.txt_urgent_delivery.MaxLength = 1;
|
||||
this.txt_urgent_delivery.Name = "txt_urgent_delivery";
|
||||
this.txt_urgent_delivery.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_urgent_delivery.TabIndex = 16;
|
||||
//
|
||||
// txt_ecodriving
|
||||
//
|
||||
this.txt_ecodriving.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txt_ecodriving.Font = new System.Drawing.Font("Calibri", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.txt_ecodriving.Location = new System.Drawing.Point(132, 222);
|
||||
this.txt_ecodriving.MaxLength = 1;
|
||||
this.txt_ecodriving.Name = "txt_ecodriving";
|
||||
this.txt_ecodriving.Size = new System.Drawing.Size(105, 26);
|
||||
this.txt_ecodriving.TabIndex = 18;
|
||||
//
|
||||
// chk_long_distance
|
||||
//
|
||||
this.chk_long_distance.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_long_distance.AutoSize = true;
|
||||
this.chk_long_distance.Checked = true;
|
||||
this.chk_long_distance.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_long_distance.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_long_distance.Location = new System.Drawing.Point(243, 80);
|
||||
this.chk_long_distance.Name = "chk_long_distance";
|
||||
this.chk_long_distance.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_long_distance.TabIndex = 11;
|
||||
this.chk_long_distance.Text = "Don\'t change";
|
||||
this.chk_long_distance.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chk_high_value_cargo
|
||||
//
|
||||
this.chk_high_value_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_high_value_cargo.AutoSize = true;
|
||||
this.chk_high_value_cargo.Checked = true;
|
||||
this.chk_high_value_cargo.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_high_value_cargo.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_high_value_cargo.Location = new System.Drawing.Point(243, 116);
|
||||
this.chk_high_value_cargo.Name = "chk_high_value_cargo";
|
||||
this.chk_high_value_cargo.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_high_value_cargo.TabIndex = 13;
|
||||
this.chk_high_value_cargo.Text = "Don\'t change";
|
||||
this.chk_high_value_cargo.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chk_fragile_cargo
|
||||
//
|
||||
this.chk_fragile_cargo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_fragile_cargo.AutoSize = true;
|
||||
this.chk_fragile_cargo.Checked = true;
|
||||
this.chk_fragile_cargo.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_fragile_cargo.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_fragile_cargo.Location = new System.Drawing.Point(243, 152);
|
||||
this.chk_fragile_cargo.Name = "chk_fragile_cargo";
|
||||
this.chk_fragile_cargo.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_fragile_cargo.TabIndex = 15;
|
||||
this.chk_fragile_cargo.Text = "Don\'t change";
|
||||
this.chk_fragile_cargo.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chk_urgent_delivery
|
||||
//
|
||||
this.chk_urgent_delivery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_urgent_delivery.AutoSize = true;
|
||||
this.chk_urgent_delivery.Checked = true;
|
||||
this.chk_urgent_delivery.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_urgent_delivery.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_urgent_delivery.Location = new System.Drawing.Point(243, 188);
|
||||
this.chk_urgent_delivery.Name = "chk_urgent_delivery";
|
||||
this.chk_urgent_delivery.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_urgent_delivery.TabIndex = 17;
|
||||
this.chk_urgent_delivery.Text = "Don\'t change";
|
||||
this.chk_urgent_delivery.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chk_ecodriving
|
||||
//
|
||||
this.chk_ecodriving.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chk_ecodriving.AutoSize = true;
|
||||
this.chk_ecodriving.Checked = true;
|
||||
this.chk_ecodriving.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chk_ecodriving.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.chk_ecodriving.Location = new System.Drawing.Point(243, 225);
|
||||
this.chk_ecodriving.Name = "chk_ecodriving";
|
||||
this.chk_ecodriving.Size = new System.Drawing.Size(97, 19);
|
||||
this.chk_ecodriving.TabIndex = 19;
|
||||
this.chk_ecodriving.Text = "Don\'t change";
|
||||
this.chk_ecodriving.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_unlock_garages
|
||||
//
|
||||
this.btn_unlock_garages.Enabled = false;
|
||||
this.btn_unlock_garages.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btn_unlock_garages.Location = new System.Drawing.Point(12, 458);
|
||||
this.btn_unlock_garages.Name = "btn_unlock_garages";
|
||||
this.btn_unlock_garages.Size = new System.Drawing.Size(105, 34);
|
||||
this.btn_unlock_garages.TabIndex = 20;
|
||||
this.btn_unlock_garages.Text = "Unlock garages";
|
||||
this.btn_unlock_garages.UseVisualStyleBackColor = true;
|
||||
this.btn_unlock_garages.Click += new System.EventHandler(this.btn_unlock_garages_Click);
|
||||
//
|
||||
// btn_recover_backup
|
||||
//
|
||||
this.btn_recover_backup.Enabled = false;
|
||||
this.btn_recover_backup.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btn_recover_backup.Location = new System.Drawing.Point(131, 458);
|
||||
this.btn_recover_backup.Name = "btn_recover_backup";
|
||||
this.btn_recover_backup.Size = new System.Drawing.Size(105, 34);
|
||||
this.btn_recover_backup.TabIndex = 21;
|
||||
this.btn_recover_backup.Text = "Recover backup";
|
||||
this.btn_recover_backup.UseVisualStyleBackColor = true;
|
||||
this.btn_recover_backup.Click += new System.EventHandler(this.btn_recover_backup_Click);
|
||||
//
|
||||
// btn_apply_changes
|
||||
//
|
||||
this.btn_apply_changes.Enabled = false;
|
||||
this.btn_apply_changes.Font = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.btn_apply_changes.Location = new System.Drawing.Point(250, 458);
|
||||
this.btn_apply_changes.Name = "btn_apply_changes";
|
||||
this.btn_apply_changes.Size = new System.Drawing.Size(105, 34);
|
||||
this.btn_apply_changes.TabIndex = 22;
|
||||
this.btn_apply_changes.Text = "Apply changes";
|
||||
this.btn_apply_changes.UseVisualStyleBackColor = true;
|
||||
this.btn_apply_changes.Click += new System.EventHandler(this.btn_apply_changes_Click);
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(369, 501);
|
||||
this.Controls.Add(this.btn_apply_changes);
|
||||
this.Controls.Add(this.btn_recover_backup);
|
||||
this.Controls.Add(this.btn_unlock_garages);
|
||||
this.Controls.Add(this.tlp_skills);
|
||||
this.Controls.Add(this.chk_update_on_start);
|
||||
this.Controls.Add(this.tlp_basic_info);
|
||||
this.Controls.Add(this.btn_open_save);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "MainForm";
|
||||
this.Text = "SaveWizard";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed);
|
||||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
this.tlp_basic_info.ResumeLayout(false);
|
||||
this.tlp_basic_info.PerformLayout();
|
||||
this.tlp_skills.ResumeLayout(false);
|
||||
this.tlp_skills.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btn_open_save;
|
||||
private System.Windows.Forms.TableLayoutPanel tlp_basic_info;
|
||||
private System.Windows.Forms.Label lbl_basic_info;
|
||||
private System.Windows.Forms.Label lbl_money;
|
||||
private System.Windows.Forms.CheckBox chk_update_on_start;
|
||||
private System.Windows.Forms.TextBox txt_money;
|
||||
private System.Windows.Forms.TextBox txt_experience;
|
||||
private System.Windows.Forms.Label lbl_experience;
|
||||
private System.Windows.Forms.TextBox txt_loan_limit;
|
||||
private System.Windows.Forms.CheckBox chk_money;
|
||||
private System.Windows.Forms.CheckBox chk_experience;
|
||||
private System.Windows.Forms.CheckBox chk_loan_limit;
|
||||
private System.Windows.Forms.Label lbl_loan_limit;
|
||||
private System.Windows.Forms.TableLayoutPanel tlp_skills;
|
||||
private System.Windows.Forms.Label lbl_skills;
|
||||
private System.Windows.Forms.Label lbl_adr;
|
||||
private System.Windows.Forms.TextBox txt_adr;
|
||||
private System.Windows.Forms.CheckBox chk_adr;
|
||||
private System.Windows.Forms.Label lbl_long_distance;
|
||||
private System.Windows.Forms.Label lbl_high_value_cargo;
|
||||
private System.Windows.Forms.Label lbl_fragile_cargo;
|
||||
private System.Windows.Forms.Label lbl_urgent_delivery;
|
||||
private System.Windows.Forms.Label lbl_ecodriving;
|
||||
private System.Windows.Forms.TextBox txt_long_distance;
|
||||
private System.Windows.Forms.TextBox txt_high_value_cargo;
|
||||
private System.Windows.Forms.TextBox txt_fragile_cargo;
|
||||
private System.Windows.Forms.TextBox txt_urgent_delivery;
|
||||
private System.Windows.Forms.TextBox txt_ecodriving;
|
||||
private System.Windows.Forms.CheckBox chk_long_distance;
|
||||
private System.Windows.Forms.CheckBox chk_high_value_cargo;
|
||||
private System.Windows.Forms.CheckBox chk_fragile_cargo;
|
||||
private System.Windows.Forms.CheckBox chk_urgent_delivery;
|
||||
private System.Windows.Forms.CheckBox chk_ecodriving;
|
||||
private System.Windows.Forms.Button btn_unlock_garages;
|
||||
private System.Windows.Forms.Button btn_recover_backup;
|
||||
private System.Windows.Forms.Button btn_apply_changes;
|
||||
}
|
||||
}
|
||||
|
||||
293
SaveWizard/MainForm/MainForm.cs
Normal file
293
SaveWizard/MainForm/MainForm.cs
Normal file
@@ -0,0 +1,293 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SaveWizard
|
||||
{
|
||||
public partial class MainForm: Form
|
||||
{
|
||||
private readonly string config_file_name = "update.cfg";
|
||||
|
||||
[DllImport("SII_Decrypt.dll")]
|
||||
public static extern int GetFileFormat(string FileName);
|
||||
|
||||
[DllImport("SII_Decrypt.dll")]
|
||||
public static extern int DecryptAndDecodeFile(string InputFile, string OutputFile);
|
||||
|
||||
private Dictionary<TextBox, WindowItem> items = null;
|
||||
private string opened_file_path, selected_game;
|
||||
private Dictionary<string, bool> owns = null;
|
||||
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
// Test stuff
|
||||
//string path = Path.Combine(Environment.CurrentDirectory, "configs");
|
||||
//if (Directory.Exists(path))
|
||||
// Directory.Delete(path, true);
|
||||
//path = Path.Combine(Environment.CurrentDirectory, "update.cfg");
|
||||
//if (File.Exists(path))
|
||||
// File.Delete(path);
|
||||
}
|
||||
|
||||
private class WindowItem
|
||||
{
|
||||
private readonly CheckBox Check;
|
||||
private readonly string Str;
|
||||
|
||||
public WindowItem(CheckBox _check, string _str)
|
||||
{
|
||||
Check = _check;
|
||||
Str = _str;
|
||||
}
|
||||
|
||||
public CheckBox GetCheck()
|
||||
{
|
||||
return Check;
|
||||
}
|
||||
|
||||
public string GetString()
|
||||
{
|
||||
return Str;
|
||||
}
|
||||
}
|
||||
|
||||
private void boxTextChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextBox _sender = sender as TextBox;
|
||||
if (_sender != txt_adr)
|
||||
items[_sender].GetCheck().Checked = false;
|
||||
else
|
||||
chk_adr.Checked = false;
|
||||
}
|
||||
|
||||
private void ValidateBasic(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
//if (!(e.KeyChar >= '0' && e.KeyChar <= '9') && !char.IsControl(e.KeyChar))
|
||||
if (!(e.KeyChar >= '0' && e.KeyChar <= '9') && e.KeyChar != (char)Keys.Back)
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void ValidateSkills(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
//if (!(e.KeyChar >= '0' && e.KeyChar <= '6') && !char.IsControl(e.KeyChar))
|
||||
if (!(e.KeyChar >= '0' && e.KeyChar <= '6') && e.KeyChar != (char)Keys.Back)
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private List<string> GetADR(string value)
|
||||
{
|
||||
string binaryCode = Convert.ToString(int.Parse(value), 2);
|
||||
binaryCode = new string('0', 6 - binaryCode.Length) + binaryCode;
|
||||
List<string> result = new List<string>();
|
||||
foreach (char character in binaryCode)
|
||||
result.Add(character.ToString());
|
||||
return result;
|
||||
}
|
||||
|
||||
private void GetFileData(string filename)
|
||||
{
|
||||
RegexHandler.FillLines(File.ReadAllLines(filename).ToList());
|
||||
|
||||
foreach (KeyValuePair<TextBox, WindowItem> item in items)
|
||||
{
|
||||
item.Key.Text = RegexHandler.GetValue(RegexHandler.SearchLine(item.Value.GetString()));
|
||||
item.Value.GetCheck().Checked = true;
|
||||
}
|
||||
|
||||
txt_adr.Text = string.Join(",", GetADR(RegexHandler.GetValue(RegexHandler.SearchLine("adr:"))));
|
||||
chk_adr.Checked = true;
|
||||
|
||||
if (RegexHandler.SearchLine("company.volatile.stokes.calais") != 0)
|
||||
selected_game = "ets2";
|
||||
else if (RegexHandler.SearchLine("company.volatile.ed_mkt.elko") != 0)
|
||||
selected_game = "ats";
|
||||
else
|
||||
selected_game = null;
|
||||
if (selected_game != null)
|
||||
{
|
||||
string config_path = $"configs/{selected_game}/dlc.json";
|
||||
if (File.Exists(config_path))
|
||||
{
|
||||
Dictionary<string, string> dlc = JsonConvert.DeserializeObject<Dictionary<string, string>>(File.ReadAllText(config_path));
|
||||
owns = new Dictionary<string, bool>
|
||||
{
|
||||
{ "base", true }
|
||||
};
|
||||
List<string> companies = RegexHandler.GetArrayItems("companies:");
|
||||
foreach (string company in companies)
|
||||
foreach (KeyValuePair<string, string> item in dlc)
|
||||
if (company.Contains(item.Value))
|
||||
owns[item.Key] = true;
|
||||
}
|
||||
else
|
||||
Utils.ShowError($"'dlc.json' from '{selected_game}' have errors or not found, functionality has been limited");
|
||||
}
|
||||
|
||||
btn_unlock_garages.Enabled = true;
|
||||
btn_recover_backup.Enabled = true;
|
||||
btn_apply_changes.Enabled = true;
|
||||
}
|
||||
|
||||
private void ClearData()
|
||||
{
|
||||
opened_file_path = null;
|
||||
RegexHandler.FillLines(null);
|
||||
selected_game = null;
|
||||
owns = null;
|
||||
foreach (KeyValuePair<TextBox, WindowItem> item in items)
|
||||
{
|
||||
item.Key.Text = "";
|
||||
item.Value.GetCheck().Checked = true;
|
||||
}
|
||||
txt_adr.Text = "";
|
||||
chk_adr.Checked = true;
|
||||
btn_unlock_garages.Enabled = false;
|
||||
btn_recover_backup.Enabled = false;
|
||||
btn_apply_changes.Enabled = false;
|
||||
}
|
||||
|
||||
private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void MainForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!File.Exists("SII_Decrypt.dll"))
|
||||
{
|
||||
Utils.ShowError("SII_Decrypt.dll not found! Place dll file near this executable.");
|
||||
Close();
|
||||
}
|
||||
|
||||
items = new Dictionary<TextBox, WindowItem>
|
||||
{
|
||||
{ txt_money, new WindowItem(chk_money, "money_account:") },
|
||||
{ txt_experience, new WindowItem(chk_experience, "experience_points:") },
|
||||
{ txt_loan_limit, new WindowItem(chk_loan_limit, "loan_limit:") },
|
||||
{ txt_long_distance, new WindowItem(chk_long_distance, "long_dist:") },
|
||||
{ txt_high_value_cargo, new WindowItem(chk_high_value_cargo, "heavy:") },
|
||||
{ txt_fragile_cargo, new WindowItem(chk_fragile_cargo, "fragile:") },
|
||||
{ txt_urgent_delivery, new WindowItem(chk_urgent_delivery, "urgent:") },
|
||||
{ txt_ecodriving, new WindowItem(chk_ecodriving, "mechanical:") },
|
||||
};
|
||||
KeyPressEventHandler basic = new KeyPressEventHandler(ValidateBasic);
|
||||
txt_money.KeyPress += basic;
|
||||
txt_experience.KeyPress += basic;
|
||||
txt_loan_limit.KeyPress += basic;
|
||||
//txt_adr.KeyPress += new KeyPressEventHandler(ValidateADR);
|
||||
KeyPressEventHandler skills = new KeyPressEventHandler(ValidateSkills);
|
||||
txt_long_distance.KeyPress += skills;
|
||||
txt_high_value_cargo.KeyPress += skills;
|
||||
txt_fragile_cargo.KeyPress += skills;
|
||||
txt_urgent_delivery.KeyPress += skills;
|
||||
txt_ecodriving.KeyPress += skills;
|
||||
foreach (TextBox txtbox in items.Keys)
|
||||
txtbox.TextChanged += boxTextChanged;
|
||||
txt_adr.TextChanged += boxTextChanged;
|
||||
Dictionary<string, bool> update_conf = new Dictionary<string, bool>
|
||||
{
|
||||
{ "update_on_start", false }
|
||||
};
|
||||
string path = Path.Combine(Environment.CurrentDirectory, config_file_name);
|
||||
if (File.Exists(path))
|
||||
update_conf = JsonConvert.DeserializeObject<Dictionary<string, bool>>(File.ReadAllText(path));
|
||||
if (update_conf["update_on_start"])
|
||||
{
|
||||
chk_update_on_start.Checked = true;
|
||||
UpdateForm window = new UpdateForm();
|
||||
window.ShowDialog();
|
||||
window.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void chk_update_on_start_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
File.WriteAllText(
|
||||
Path.Combine(Environment.CurrentDirectory, config_file_name),
|
||||
JsonConvert.SerializeObject(new Dictionary<string, bool>
|
||||
{
|
||||
{ "update_on_start", chk_update_on_start.Checked }
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
private void btn_open_save_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClearData();
|
||||
OpenFileDialog ofd = new OpenFileDialog()
|
||||
{
|
||||
Title = "Выберите файл сохранения",
|
||||
Filter = "Сохранение в формате SII|game.sii",
|
||||
Multiselect = false,
|
||||
};
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (GetFileFormat(ofd.FileName) == 2)
|
||||
{
|
||||
if (DecryptAndDecodeFile(ofd.FileName, ofd.FileName) != 0)
|
||||
{
|
||||
Utils.ShowError("Something went wrong with decrypting file. Try again.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
GetFileData(ofd.FileName);
|
||||
opened_file_path = ofd.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_unlock_garages_Click(object sender, EventArgs e)
|
||||
{
|
||||
SecondForm dlg = new SecondForm(selected_game, owns);
|
||||
dlg.ShowDialog();
|
||||
dlg.Focus();
|
||||
}
|
||||
|
||||
private void btn_recover_backup_Click(object sender, EventArgs e)
|
||||
{
|
||||
string backup_path = opened_file_path + ".swbak";
|
||||
if (!File.Exists(backup_path))
|
||||
{
|
||||
Utils.ShowError("Backup not found.");
|
||||
return;
|
||||
}
|
||||
File.WriteAllLines(opened_file_path, File.ReadAllLines(backup_path));
|
||||
File.Delete(backup_path);
|
||||
Utils.ShowInfo("Backup successfully recovered.");
|
||||
GetFileData(opened_file_path);
|
||||
}
|
||||
|
||||
private void btn_apply_changes_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!chk_adr.Checked)
|
||||
{
|
||||
List<char> adrList = txt_adr.Text.ToList();
|
||||
adrList.RemoveAll(i => i == ' ' || i == ',' || i == '.');
|
||||
if (adrList.Count < 6)
|
||||
{
|
||||
Utils.ShowError("ADR can't have less than 6 elements.");
|
||||
}
|
||||
else if (adrList.Count > 6)
|
||||
{
|
||||
Utils.ShowError("ADR can't have more than 6 elements.");
|
||||
}
|
||||
else
|
||||
{
|
||||
int adrNew = Convert.ToInt32(string.Join("", adrList), 2);
|
||||
RegexHandler.SetValue(RegexHandler.SearchLine("adr:"), adrNew.ToString());
|
||||
}
|
||||
}
|
||||
foreach (KeyValuePair<TextBox, WindowItem> item in items)
|
||||
if (!item.Value.GetCheck().Checked)
|
||||
RegexHandler.SetValue(RegexHandler.SearchLine(item.Value.GetString()), item.Key.Text);
|
||||
File.WriteAllLines(opened_file_path + ".swbak", RegexHandler.GetBackup());
|
||||
File.WriteAllLines(opened_file_path, RegexHandler.GetAllLines());
|
||||
Utils.ShowInfo("Changes successfully applied.");
|
||||
GetFileData(opened_file_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
120
SaveWizard/MainForm/MainForm.resx
Normal file
120
SaveWizard/MainForm/MainForm.resx
Normal 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>
|
||||
Reference in New Issue
Block a user