Explorar el Código

Refactor Analyser to have proper background threading and a progressbar

Marou hace 7 años
padre
commit
8762c5e6f1
Se han modificado 31 ficheros con 199 adiciones y 132 borrados
  1. BIN
      QSP/qsp-analyser/QSP_Analyser.exe
  2. 93 83
      QSP/qsp-analyser/QSP_Analyser/MainForm.Designer.cs
  3. 59 34
      QSP/qsp-analyser/QSP_Analyser/MainForm.cs
  4. 7 1
      QSP/qsp-analyser/QSP_Analyser/QSPGameCode.cs
  5. 1 1
      QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.application
  6. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.exe
  7. 2 2
      QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.exe.manifest
  8. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.pdb
  9. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Debug/app.publish/QSP_Analyser.exe
  10. 1 1
      QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.application
  11. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.exe
  12. 2 2
      QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.exe.manifest
  13. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.pdb
  14. BIN
      QSP/qsp-analyser/QSP_Analyser/bin/Release/app.publish/QSP_Analyser.exe
  15. 1 1
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/CoreCompileInputs.cache
  16. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  17. 1 1
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.application
  18. 13 0
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csproj.FileListAbsolute.txt
  19. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csproj.GenerateResource.Cache
  20. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csprojResolveAssemblyReference.cache
  21. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.exe
  22. 2 2
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.exe.manifest
  23. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.pdb
  24. 1 1
      QSP/qsp-analyser/QSP_Analyser/obj/Release/CoreCompileInputs.cache
  25. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
  26. 1 1
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.application
  27. 13 0
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.csproj.FileListAbsolute.txt
  28. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.csproj.GenerateResource.Cache
  29. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.exe
  30. 2 2
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.exe.manifest
  31. BIN
      QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.pdb

BIN
QSP/qsp-analyser/QSP_Analyser.exe


+ 93 - 83
QSP/qsp-analyser/QSP_Analyser/MainForm.Designer.cs

@@ -57,23 +57,24 @@
             this.txtVariableNames = new System.Windows.Forms.TextBox();
             this.chkVariableCalls = new System.Windows.Forms.CheckBox();
             this.tabTranslate = new System.Windows.Forms.TabPage();
-            this.chkIgnoreEmptyTranslationsCsv = new System.Windows.Forms.CheckBox();
-            this.lblSuffixCsv = new System.Windows.Forms.Label();
-            this.edtSuffixCsv = new System.Windows.Forms.TextBox();
-            this.btnTranslateFromCsv = new System.Windows.Forms.Button();
+            this.btnBeautify = new System.Windows.Forms.Button();
+            this.grpTranslateCsv = new System.Windows.Forms.GroupBox();
             this.grpCsvDelimiter = new System.Windows.Forms.GroupBox();
             this.radComma = new System.Windows.Forms.RadioButton();
             this.radSemicolon = new System.Windows.Forms.RadioButton();
+            this.btnTranslateFromCsv = new System.Windows.Forms.Button();
+            this.chkIgnoreEmptyTranslationsCsv = new System.Windows.Forms.CheckBox();
+            this.lblSuffixCsv = new System.Windows.Forms.Label();
             this.btnExportCsv = new System.Windows.Forms.Button();
+            this.edtSuffixCsv = new System.Windows.Forms.TextBox();
             this.edtFile = new System.Windows.Forms.TextBox();
-            this.grpTranslateCsv = new System.Windows.Forms.GroupBox();
-            this.btnBeautify = new System.Windows.Forms.Button();
+            this.progressBar1 = new System.Windows.Forms.ProgressBar();
             this.tabControl.SuspendLayout();
             this.tabCheck.SuspendLayout();
             this.tabOptions.SuspendLayout();
             this.tabTranslate.SuspendLayout();
-            this.grpCsvDelimiter.SuspendLayout();
             this.grpTranslateCsv.SuspendLayout();
+            this.grpCsvDelimiter.SuspendLayout();
             this.SuspendLayout();
             // 
             // label1
@@ -81,7 +82,7 @@
             this.label1.AutoSize = true;
             this.label1.Location = new System.Drawing.Point(15, 13);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(372, 13);
+            this.label1.Size = new System.Drawing.Size(287, 13);
             this.label1.TabIndex = 0;
             this.label1.Text = "This utility analyzes the QSP game code in form TXT2GAM.";
             // 
@@ -250,7 +251,7 @@
             this.chkCurlyParse.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableCurlyParsing", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkCurlyParse.Location = new System.Drawing.Point(250, 290);
             this.chkCurlyParse.Name = "chkCurlyParse";
-            this.chkCurlyParse.Size = new System.Drawing.Size(321, 17);
+            this.chkCurlyParse.Size = new System.Drawing.Size(250, 17);
             this.chkCurlyParse.TabIndex = 23;
             this.chkCurlyParse.Text = "Content between curly brackets take as a code";
             this.chkCurlyParse.UseVisualStyleBackColor = true;
@@ -263,7 +264,7 @@
             this.chkActions.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableSortingActions", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkActions.Location = new System.Drawing.Point(260, 112);
             this.chkActions.Name = "chkActions";
-            this.chkActions.Size = new System.Drawing.Size(76, 17);
+            this.chkActions.Size = new System.Drawing.Size(61, 17);
             this.chkActions.TabIndex = 22;
             this.chkActions.Text = "Actions";
             this.chkActions.UseVisualStyleBackColor = true;
@@ -300,7 +301,7 @@
             this.lblSystemVariables.AutoSize = true;
             this.lblSystemVariables.Location = new System.Drawing.Point(0, 255);
             this.lblSystemVariables.Name = "lblSystemVariables";
-            this.lblSystemVariables.Size = new System.Drawing.Size(408, 13);
+            this.lblSystemVariables.Size = new System.Drawing.Size(292, 13);
             this.lblSystemVariables.TabIndex = 19;
             this.lblSystemVariables.Text = "System variables (exception from the list of unused variables)";
             // 
@@ -309,7 +310,7 @@
             this.lblSortHeader.AutoSize = true;
             this.lblSortHeader.Location = new System.Drawing.Point(245, 14);
             this.lblSortHeader.Name = "lblSortHeader";
-            this.lblSortHeader.Size = new System.Drawing.Size(137, 13);
+            this.lblSortHeader.Size = new System.Drawing.Size(76, 13);
             this.lblSortHeader.TabIndex = 15;
             this.lblSortHeader.Text = "Sort by output:";
             // 
@@ -342,7 +343,7 @@
             this.chkSortObjects.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableSortingObjects", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkSortObjects.Location = new System.Drawing.Point(260, 88);
             this.chkSortObjects.Name = "chkSortObjects";
-            this.chkSortObjects.Size = new System.Drawing.Size(79, 17);
+            this.chkSortObjects.Size = new System.Drawing.Size(51, 17);
             this.chkSortObjects.TabIndex = 17;
             this.chkSortObjects.Text = "Items";
             this.chkSortObjects.UseVisualStyleBackColor = true;
@@ -355,7 +356,7 @@
             this.chkSortVariables.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableSortingVariables", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkSortVariables.Location = new System.Drawing.Point(260, 65);
             this.chkSortVariables.Name = "chkSortVariables";
-            this.chkSortVariables.Size = new System.Drawing.Size(92, 17);
+            this.chkSortVariables.Size = new System.Drawing.Size(69, 17);
             this.chkSortVariables.TabIndex = 16;
             this.chkSortVariables.Text = "Variables";
             this.chkSortVariables.UseVisualStyleBackColor = true;
@@ -368,7 +369,7 @@
             this.chkSortLocations.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableSortingLocations", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkSortLocations.Location = new System.Drawing.Point(260, 42);
             this.chkSortLocations.Name = "chkSortLocations";
-            this.chkSortLocations.Size = new System.Drawing.Size(70, 17);
+            this.chkSortLocations.Size = new System.Drawing.Size(72, 17);
             this.chkSortLocations.TabIndex = 14;
             this.chkSortLocations.Text = "Locations";
             this.chkSortLocations.UseVisualStyleBackColor = true;
@@ -394,7 +395,7 @@
             this.chkVariableCalls.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "EnableVariableCalls", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
             this.chkVariableCalls.Location = new System.Drawing.Point(3, 6);
             this.chkVariableCalls.Name = "chkVariableCalls";
-            this.chkVariableCalls.Size = new System.Drawing.Size(210, 30);
+            this.chkVariableCalls.Size = new System.Drawing.Size(166, 30);
             this.chkVariableCalls.TabIndex = 11;
             this.chkVariableCalls.Text = "Consider variable assignment \r\nby link to location:";
             this.chkVariableCalls.UseVisualStyleBackColor = true;
@@ -410,47 +411,30 @@
             this.tabTranslate.Text = "Conversion";
             this.tabTranslate.UseVisualStyleBackColor = true;
             // 
-            // chkIgnoreEmptyTranslationsCsv
-            // 
-            this.chkIgnoreEmptyTranslationsCsv.AutoSize = true;
-            this.chkIgnoreEmptyTranslationsCsv.Checked = global::Analyser.Properties.Settings.Default.IgnoreEmptyTranslationsCsv;
-            this.chkIgnoreEmptyTranslationsCsv.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.chkIgnoreEmptyTranslationsCsv.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "IgnoreEmptyTranslationsCsv", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
-            this.chkIgnoreEmptyTranslationsCsv.Location = new System.Drawing.Point(235, 55);
-            this.chkIgnoreEmptyTranslationsCsv.Name = "chkIgnoreEmptyTranslationsCsv";
-            this.chkIgnoreEmptyTranslationsCsv.Size = new System.Drawing.Size(367, 30);
-            this.chkIgnoreEmptyTranslationsCsv.TabIndex = 7;
-            this.chkIgnoreEmptyTranslationsCsv.Text = "Ignore unconverted strings\r\n(for \"empty\" value of conversion will be used original text)";
-            this.chkIgnoreEmptyTranslationsCsv.UseVisualStyleBackColor = true;
-            // 
-            // 
-            // lblSuffixCsv
-            // 
-            this.lblSuffixCsv.AutoSize = true;
-            this.lblSuffixCsv.Location = new System.Drawing.Point(232, 32);
-            this.lblSuffixCsv.Name = "lblSuffixCsv";
-            this.lblSuffixCsv.Size = new System.Drawing.Size(163, 13);
-            this.lblSuffixCsv.TabIndex = 6;
-            this.lblSuffixCsv.Text = "Extension for conversion file:";
-            // 
-            // edtSuffixCsv
+            // btnBeautify
             // 
-            this.edtSuffixCsv.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Analyser.Properties.Settings.Default, "CsvTranslationSuffix", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
-            this.edtSuffixCsv.Location = new System.Drawing.Point(401, 29);
-            this.edtSuffixCsv.Name = "edtSuffixCsv";
-            this.edtSuffixCsv.Size = new System.Drawing.Size(100, 20);
-            this.edtSuffixCsv.TabIndex = 5;
-            this.edtSuffixCsv.Text = global::Analyser.Properties.Settings.Default.CsvTranslationSuffix;
+            this.btnBeautify.Location = new System.Drawing.Point(56, 279);
+            this.btnBeautify.Name = "btnBeautify";
+            this.btnBeautify.Size = new System.Drawing.Size(129, 23);
+            this.btnBeautify.TabIndex = 9;
+            this.btnBeautify.Text = "Format the code";
+            this.btnBeautify.UseVisualStyleBackColor = true;
+            this.btnBeautify.Click += new System.EventHandler(this.btnBeautify_Click);
             // 
-            // btnTranslateFromCsv
+            // grpTranslateCsv
             // 
-            this.btnTranslateFromCsv.Location = new System.Drawing.Point(303, 126);
-            this.btnTranslateFromCsv.Name = "btnTranslateFromCsv";
-            this.btnTranslateFromCsv.Size = new System.Drawing.Size(198, 23);
-            this.btnTranslateFromCsv.TabIndex = 4;
-            this.btnTranslateFromCsv.Text = "Make conversion, use CSV";
-            this.btnTranslateFromCsv.UseVisualStyleBackColor = true;
-            this.btnTranslateFromCsv.Click += new System.EventHandler(this.btnTranslateFromCsv_Click);
+            this.grpTranslateCsv.Controls.Add(this.grpCsvDelimiter);
+            this.grpTranslateCsv.Controls.Add(this.btnTranslateFromCsv);
+            this.grpTranslateCsv.Controls.Add(this.chkIgnoreEmptyTranslationsCsv);
+            this.grpTranslateCsv.Controls.Add(this.lblSuffixCsv);
+            this.grpTranslateCsv.Controls.Add(this.btnExportCsv);
+            this.grpTranslateCsv.Controls.Add(this.edtSuffixCsv);
+            this.grpTranslateCsv.Location = new System.Drawing.Point(7, 3);
+            this.grpTranslateCsv.Name = "grpTranslateCsv";
+            this.grpTranslateCsv.Size = new System.Drawing.Size(642, 168);
+            this.grpTranslateCsv.TabIndex = 8;
+            this.grpTranslateCsv.TabStop = false;
+            this.grpTranslateCsv.Text = "Conversion";
             // 
             // grpCsvDelimiter
             // 
@@ -469,7 +453,7 @@
             this.radComma.Checked = true;
             this.radComma.Location = new System.Drawing.Point(6, 19);
             this.radComma.Name = "radComma";
-            this.radComma.Size = new System.Drawing.Size(79, 17);
+            this.radComma.Size = new System.Drawing.Size(72, 17);
             this.radComma.TabIndex = 1;
             this.radComma.TabStop = true;
             this.radComma.Text = "Comma - ,";
@@ -480,11 +464,44 @@
             this.radSemicolon.AutoSize = true;
             this.radSemicolon.Location = new System.Drawing.Point(6, 42);
             this.radSemicolon.Name = "radSemicolon";
-            this.radSemicolon.Size = new System.Drawing.Size(120, 17);
+            this.radSemicolon.Size = new System.Drawing.Size(86, 17);
             this.radSemicolon.TabIndex = 2;
             this.radSemicolon.Text = "Semicolon - ;";
             this.radSemicolon.UseVisualStyleBackColor = true;
             // 
+            // btnTranslateFromCsv
+            // 
+            this.btnTranslateFromCsv.Location = new System.Drawing.Point(303, 126);
+            this.btnTranslateFromCsv.Name = "btnTranslateFromCsv";
+            this.btnTranslateFromCsv.Size = new System.Drawing.Size(198, 23);
+            this.btnTranslateFromCsv.TabIndex = 4;
+            this.btnTranslateFromCsv.Text = "Make conversion, use CSV";
+            this.btnTranslateFromCsv.UseVisualStyleBackColor = true;
+            this.btnTranslateFromCsv.Click += new System.EventHandler(this.btnTranslateFromCsv_Click);
+            // 
+            // chkIgnoreEmptyTranslationsCsv
+            // 
+            this.chkIgnoreEmptyTranslationsCsv.AutoSize = true;
+            this.chkIgnoreEmptyTranslationsCsv.Checked = global::Analyser.Properties.Settings.Default.IgnoreEmptyTranslationsCsv;
+            this.chkIgnoreEmptyTranslationsCsv.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.chkIgnoreEmptyTranslationsCsv.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::Analyser.Properties.Settings.Default, "IgnoreEmptyTranslationsCsv", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+            this.chkIgnoreEmptyTranslationsCsv.Location = new System.Drawing.Point(235, 55);
+            this.chkIgnoreEmptyTranslationsCsv.Name = "chkIgnoreEmptyTranslationsCsv";
+            this.chkIgnoreEmptyTranslationsCsv.Size = new System.Drawing.Size(295, 30);
+            this.chkIgnoreEmptyTranslationsCsv.TabIndex = 7;
+            this.chkIgnoreEmptyTranslationsCsv.Text = "Ignore unconverted strings\r\n(for \"empty\" value of conversion will be used origina" +
+    "l text)";
+            this.chkIgnoreEmptyTranslationsCsv.UseVisualStyleBackColor = true;
+            // 
+            // lblSuffixCsv
+            // 
+            this.lblSuffixCsv.AutoSize = true;
+            this.lblSuffixCsv.Location = new System.Drawing.Point(232, 32);
+            this.lblSuffixCsv.Name = "lblSuffixCsv";
+            this.lblSuffixCsv.Size = new System.Drawing.Size(142, 13);
+            this.lblSuffixCsv.TabIndex = 6;
+            this.lblSuffixCsv.Text = "Extension for conversion file:";
+            // 
             // btnExportCsv
             // 
             this.btnExportCsv.Location = new System.Drawing.Point(41, 126);
@@ -495,6 +512,15 @@
             this.btnExportCsv.UseVisualStyleBackColor = true;
             this.btnExportCsv.Click += new System.EventHandler(this.btnExportCsv_Click);
             // 
+            // edtSuffixCsv
+            // 
+            this.edtSuffixCsv.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Analyser.Properties.Settings.Default, "CsvTranslationSuffix", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
+            this.edtSuffixCsv.Location = new System.Drawing.Point(401, 29);
+            this.edtSuffixCsv.Name = "edtSuffixCsv";
+            this.edtSuffixCsv.Size = new System.Drawing.Size(100, 20);
+            this.edtSuffixCsv.TabIndex = 5;
+            this.edtSuffixCsv.Text = global::Analyser.Properties.Settings.Default.CsvTranslationSuffix;
+            // 
             // edtFile
             // 
             this.edtFile.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::Analyser.Properties.Settings.Default, "filepath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
@@ -504,36 +530,19 @@
             this.edtFile.TabIndex = 1;
             this.edtFile.Text = global::Analyser.Properties.Settings.Default.filepath;
             // 
-            // grpTranslateCsv
-            // 
-            this.grpTranslateCsv.Controls.Add(this.grpCsvDelimiter);
-            this.grpTranslateCsv.Controls.Add(this.btnTranslateFromCsv);
-            this.grpTranslateCsv.Controls.Add(this.chkIgnoreEmptyTranslationsCsv);
-            this.grpTranslateCsv.Controls.Add(this.lblSuffixCsv);
-            this.grpTranslateCsv.Controls.Add(this.btnExportCsv);
-            this.grpTranslateCsv.Controls.Add(this.edtSuffixCsv);
-            this.grpTranslateCsv.Location = new System.Drawing.Point(7, 3);
-            this.grpTranslateCsv.Name = "grpTranslateCsv";
-            this.grpTranslateCsv.Size = new System.Drawing.Size(642, 168);
-            this.grpTranslateCsv.TabIndex = 8;
-            this.grpTranslateCsv.TabStop = false;
-            this.grpTranslateCsv.Text = "Conversion";
-            // 
-            // btnBeautify
+            // progressBar1
             // 
-            this.btnBeautify.Location = new System.Drawing.Point(56, 279);
-            this.btnBeautify.Name = "btnBeautify";
-            this.btnBeautify.Size = new System.Drawing.Size(129, 23);
-            this.btnBeautify.TabIndex = 9;
-            this.btnBeautify.Text = "Format the code";
-            this.btnBeautify.UseVisualStyleBackColor = true;
-            this.btnBeautify.Click += new System.EventHandler(this.btnBeautify_Click);
+            this.progressBar1.Location = new System.Drawing.Point(5, 626);
+            this.progressBar1.Name = "progressBar1";
+            this.progressBar1.Size = new System.Drawing.Size(659, 23);
+            this.progressBar1.TabIndex = 13;
             // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(666, 630);
+            this.ClientSize = new System.Drawing.Size(668, 653);
+            this.Controls.Add(this.progressBar1);
             this.Controls.Add(this.tabControl);
             this.Controls.Add(this.btnBrowse);
             this.Controls.Add(this.edtFile);
@@ -544,19 +553,19 @@
             this.Name = "MainForm";
             this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
             this.Text = "QSP Code Analyzer";
+            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
             this.Load += new System.EventHandler(this.MainForm_Load);
             this.Shown += new System.EventHandler(this.MainForm_Shown);
-            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
             this.tabControl.ResumeLayout(false);
             this.tabCheck.ResumeLayout(false);
             this.tabCheck.PerformLayout();
             this.tabOptions.ResumeLayout(false);
             this.tabOptions.PerformLayout();
             this.tabTranslate.ResumeLayout(false);
-            this.grpCsvDelimiter.ResumeLayout(false);
-            this.grpCsvDelimiter.PerformLayout();
             this.grpTranslateCsv.ResumeLayout(false);
             this.grpTranslateCsv.PerformLayout();
+            this.grpCsvDelimiter.ResumeLayout(false);
+            this.grpCsvDelimiter.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -604,6 +613,7 @@
         private System.Windows.Forms.CheckBox chkCurlyParse;
         private System.Windows.Forms.GroupBox grpTranslateCsv;
         private System.Windows.Forms.Button btnBeautify;
+        private System.Windows.Forms.ProgressBar progressBar1;
     }
 }
 

+ 59 - 34
QSP/qsp-analyser/QSP_Analyser/MainForm.cs

@@ -8,6 +8,7 @@ using System.Text;
 using System.Text.RegularExpressions;
 using System.Windows.Forms;
 using System.IO;
+using System.Threading;
 
 namespace Analyser
 {
@@ -17,41 +18,27 @@ namespace Analyser
         QSPGameCode game;
 
 
-
         //Глобальные переменные
         ArrayList ObjectsAdded;
         ArrayList ObjectsDeleted;
 
         bool inited = false;
         string logText = "";
+        static BackgroundWorker _bw;
 
         public MainForm()
         {
             InitializeComponent();
+            _bw = new BackgroundWorker
+            {
+                WorkerReportsProgress = true,
+                WorkerSupportsCancellation = true
+            };
+            _bw.DoWork += bw_DoWork;
+            _bw.ProgressChanged += bw_ProgressChanged;
+            _bw.RunWorkerCompleted += bw_RunWorkerCompleted;
         }
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
         private void btnBrowse_Click(object sender, EventArgs e)
         {
             //выбираем файл
@@ -65,8 +52,19 @@ namespace Analyser
             }
         }
 
+        private delegate void PrintErrorsDelegate();
         private void PrintErrors()
         {
+
+            if (this.InvokeRequired)
+            {
+                // Pass the same function to BeginInvoke,
+                // but the call would come on the correct
+                // thread and InvokeRequired will be false.
+                this.BeginInvoke(new PrintErrorsDelegate(PrintErrors));
+
+                return;
+            }
             //Выводим ошибки и ворнинги
             //Log("Строка #" + Convert.ToString(game.GetErrorLine()) + ": " + game.GetError());
             Log("No of errors: " + Common.GetErrorsCount() + ", warnings: " + Common.GetWarningsCount());
@@ -87,29 +85,46 @@ namespace Analyser
             PrintLog();
         }
 
-        private void ParseFile()
+        private void bw_DoWork(object sender, DoWorkEventArgs e)
         {
             //Устанаваливаем настройки парсера
             List<string> systemVars = new List<string>(txtSystemVariables.Lines);
             if (chkAero.Checked)
                 systemVars.AddRange(txtSystemAeroVars.Lines);
             Common.SetConfig(new List<string>(txtVariableNames.Lines), systemVars, chkCurlyParse.Checked);
-
             if (CheckForFile(edtFile.Text, true))
             {
-                Log("Trying to read the file ...");
-                if (game.ParseGame(edtFile.Text))
-                {
-                    Log("The file was read successfully");
-                }
-                PrintErrors();
-                Common.ClearNonGameErrors();
+                game.ParseGame(edtFile.Text, sender, e);
+                this.Log("The file was read successfully");
+                this.PrintLog();
             }
             else
             {
-                Log("File was not read.");
+                this.Log("File was not read.");
+                PrintLog();
             }
+        }
+
+        private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
+        {
+
+            this.PrintErrors();
+            Common.ClearNonGameErrors();
+            this.PrintLog();
+        }
+
+        private void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
+        {
+            progressBar1.Value = e.ProgressPercentage;
+        }
+
+
+        private void ParseFile()
+        {
+            Log("Trying to read the file ...");
             PrintLog();
+            _bw.RunWorkerAsync();
+
         }
 
         private void btnReset_Click(object sender, EventArgs e)
@@ -127,13 +142,23 @@ namespace Analyser
             this.Text += "   v " + System.Windows.Forms.Application.ProductVersion;
         }
 
-        private void Log(string line)
+        public void Log(string line)
         {
             logText += line + Environment.NewLine;
         }
 
+        private delegate void PrintLogDelegate();
         private void PrintLog()
         {
+            if (this.InvokeRequired)
+            {
+                // Pass the same function to BeginInvoke,
+                // but the call would come on the correct
+                // thread and InvokeRequired will be false.
+                this.BeginInvoke(new PrintLogDelegate(PrintLog));
+
+                return;
+            }
             txtStatus.Text = logText;
         }
 

+ 7 - 1
QSP/qsp-analyser/QSP_Analyser/QSPGameCode.cs

@@ -3,6 +3,8 @@ using System.Collections;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
+using System.Threading;
+using System.ComponentModel;
 
 namespace Analyser
 {
@@ -2107,8 +2109,11 @@ namespace Analyser
             m_lastLocation = null;
         }
 
-        public bool ParseGame(string fileName)
+        public bool ParseGame(string fileName, object sender, DoWorkEventArgs e)
         {
+            int totalLines = 0;
+            StreamReader rTl = new StreamReader(fileName);
+            while (rTl.ReadLine() != null) { totalLines++; };
             m_LocationsByName.Clear();
             m_LocationsByOrder.Clear();
             ClearErrors();
@@ -2161,6 +2166,7 @@ namespace Analyser
                     if (inside && GetLastLocation() != null)
                         locationCode.Add(s);
                 }
+                (sender as BackgroundWorker).ReportProgress(Convert.ToInt32(((double)line_counter/(double)totalLines) * 100));
             }
             fi.Close();
             return true;

+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>uP4mNa7X/HZJWIl1NrI2jAKEg3Y=</dsig:DigestValue>
+        <dsig:DigestValue>tEEMQVRC+oYQBvBWq1UpNy/9llU=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.exe


+ 2 - 2
QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.exe.manifest

@@ -41,14 +41,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="77824">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="79360">
       <assemblyIdentity name="QSP_Analyser" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>thJRT8L4ZkRToqtichfxQW989qE=</dsig:DigestValue>
+        <dsig:DigestValue>K+biMxjimIP/0cXS627dl5uQg8k=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/bin/Debug/QSP_Analyser.pdb


BIN
QSP/qsp-analyser/QSP_Analyser/bin/Debug/app.publish/QSP_Analyser.exe


+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>lAPGr7Cf7vpNIJp5b1q55nXG27E=</dsig:DigestValue>
+        <dsig:DigestValue>evByPqrEzp0TcoZkc+QidviqCD8=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.exe


+ 2 - 2
QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.exe.manifest

@@ -41,14 +41,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="70656">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="72192">
       <assemblyIdentity name="QSP_Analyser" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>moLI6Ib1XlcPSbHLeYuvwQLN79I=</dsig:DigestValue>
+        <dsig:DigestValue>JCgnoa+Ykz2D9g81dP3nfePaH2Q=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/bin/Release/QSP_Analyser.pdb


BIN
QSP/qsp-analyser/QSP_Analyser/bin/Release/app.publish/QSP_Analyser.exe


+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/obj/Debug/CoreCompileInputs.cache

@@ -1 +1 @@
-58f8df29b193a22e0b3e789a3004b76cb7f6a0e1
+6b39dae190688a0d7d0a8aa691fdc86f8712d8c3

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>uP4mNa7X/HZJWIl1NrI2jAKEg3Y=</dsig:DigestValue>
+        <dsig:DigestValue>tEEMQVRC+oYQBvBWq1UpNy/9llU=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

+ 13 - 0
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csproj.FileListAbsolute.txt

@@ -25,3 +25,16 @@ C:\Temp\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.exe.manifest
 C:\Temp\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.application
 C:\Temp\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.exe
 C:\Temp\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.pdb
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\Analyser.MainForm.resources
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\Analyser.Properties.Resources.resources
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.csproj.GenerateResource.Cache
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.exe
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.pdb
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Debug\QSP_Analyser.exe.config
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Debug\QSP_Analyser.exe.manifest
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Debug\QSP_Analyser.application
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Debug\QSP_Analyser.exe
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Debug\QSP_Analyser.pdb
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.TrustInfo.xml
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.exe.manifest
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Debug\QSP_Analyser.application

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csproj.GenerateResource.Cache


BIN
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.csprojResolveAssemblyReference.cache


BIN
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.exe


+ 2 - 2
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.exe.manifest

@@ -41,14 +41,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="77824">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="79360">
       <assemblyIdentity name="QSP_Analyser" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>thJRT8L4ZkRToqtichfxQW989qE=</dsig:DigestValue>
+        <dsig:DigestValue>K+biMxjimIP/0cXS627dl5uQg8k=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Debug/QSP_Analyser.pdb


+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/obj/Release/CoreCompileInputs.cache

@@ -1 +1 @@
-18a2a3392e504c81a7d3f4ebb56ca57be4e67b4f
+6b39dae190688a0d7d0a8aa691fdc86f8712d8c3

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache


+ 1 - 1
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.application

@@ -11,7 +11,7 @@
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>lAPGr7Cf7vpNIJp5b1q55nXG27E=</dsig:DigestValue>
+        <dsig:DigestValue>evByPqrEzp0TcoZkc+QidviqCD8=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

+ 13 - 0
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.csproj.FileListAbsolute.txt

@@ -11,3 +11,16 @@ C:\Temp\qsp-analyser\trunk\QSP_Analyser\obj\Release\QSP_Analyser.exe.manifest
 C:\Temp\qsp-analyser\trunk\QSP_Analyser\obj\Release\QSP_Analyser.application
 C:\Temp\qsp-analyser\trunk\QSP_Analyser\obj\Release\QSP_Analyser.exe
 C:\Temp\qsp-analyser\trunk\QSP_Analyser\obj\Release\QSP_Analyser.pdb
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Release\QSP_Analyser.exe.config
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Release\QSP_Analyser.exe.manifest
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Release\QSP_Analyser.application
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Release\QSP_Analyser.exe
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\bin\Release\QSP_Analyser.pdb
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\Analyser.MainForm.resources
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\Analyser.Properties.Resources.resources
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.csproj.GenerateResource.Cache
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.TrustInfo.xml
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.exe.manifest
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.application
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.exe
+C:\Users\Marou\Downloads\girllife-ecv-master-e4406823fe9e57357c32ef7232267d23378e59a6\girllife-ecv\QSP\qsp-analyser\QSP_Analyser\obj\Release\QSP_Analyser.pdb

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.csproj.GenerateResource.Cache


BIN
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.exe


+ 2 - 2
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.exe.manifest

@@ -41,14 +41,14 @@
     </dependentAssembly>
   </dependency>
   <dependency>
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="70656">
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QSP_Analyser.exe" size="72192">
       <assemblyIdentity name="QSP_Analyser" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
       <hash>
         <dsig:Transforms>
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
         </dsig:Transforms>
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
-        <dsig:DigestValue>moLI6Ib1XlcPSbHLeYuvwQLN79I=</dsig:DigestValue>
+        <dsig:DigestValue>JCgnoa+Ykz2D9g81dP3nfePaH2Q=</dsig:DigestValue>
       </hash>
     </dependentAssembly>
   </dependency>

BIN
QSP/qsp-analyser/QSP_Analyser/obj/Release/QSP_Analyser.pdb