From a6f6d8a90b06fcf65a4f9c320c3593a6fbd2b5f3 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sat, 7 Sep 2024 23:11:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D1=80?= =?UTF-8?q?=D0=B5=D0=B9=D1=82=D0=B8=D0=BD=D0=B3=D0=B0=20=D0=B2=20TeacherPl?= =?UTF-8?q?ugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 ++-- Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- VisualPlugins/TraningControlPlugin/LoginForm.cs | 9 +++++---- .../TraningControlPlugin/SiteAccessInfo.cs | 13 +++++++++---- 6 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index a5fab4416..cc7c119ad 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "10"; public const string Build = "0"; - public const string Revision = "3536"; + public const string Revision = "3537"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index d3cc65e9d..378b391bc 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=3536 %MINOR%=10 +%REVISION%=3537 +%COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index a17084f41..5a834536e 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.10.0.3536 +3.10.0.3537 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 02d75de30..52bcc371e 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.10.0.3536' +!define VERSION '3.10.0.3537' diff --git a/VisualPlugins/TraningControlPlugin/LoginForm.cs b/VisualPlugins/TraningControlPlugin/LoginForm.cs index 6797cb592..49eb191bc 100644 --- a/VisualPlugins/TraningControlPlugin/LoginForm.cs +++ b/VisualPlugins/TraningControlPlugin/LoginForm.cs @@ -240,9 +240,10 @@ public void WriteLoginPassToAuthDat(string login, string pass) public void SetRating(string rating) { - var ss = rating.Split('|'); + /*var ss = rating.Split('|'); labelRating.Text = $"Рейтинг: {ss[0]} баллов"; - labelDetails.Text = ss[1]; + labelDetails.Text = ss[1];*/ + labelRating.Text = $"Рейтинг: {rating} баллов"; } public void ChangeControlsAfterLogin(string login) { @@ -260,12 +261,12 @@ public void ChangeControlsAfterLogin(string login) usersNamesBox.Enabled = false; Authorized = true; Plugin.toolStripButton.ToolTipText = "Авторизация выполнена: " + login; - Plugin.toolStripButton.Image = PluginImageAuthorized.Image; - Plugin.menuItem.Image = PluginImageAuthorized.Image; this.Icon = VisualPascalABCPlugins.Properties.Resources.IconAuthorized; closeButton.Focus(); panelUnAuthorized.SendToBack(); labelUserName.Text = login; + Plugin.toolStripButton.Image = PluginImageAuthorized.Image; + Plugin.menuItem.Image = PluginImageAuthorized.Image; //labelRating.Text = "Рейтинг: "; } catch (Exception e) diff --git a/VisualPlugins/TraningControlPlugin/SiteAccessInfo.cs b/VisualPlugins/TraningControlPlugin/SiteAccessInfo.cs index 5d2e52212..07c47d81d 100644 --- a/VisualPlugins/TraningControlPlugin/SiteAccessInfo.cs +++ b/VisualPlugins/TraningControlPlugin/SiteAccessInfo.cs @@ -239,6 +239,7 @@ async public Task GetRating(string shortFIO, string fullFIO, string pass var ControlTasksSolved = 0; var HomeworkTasksSolved = 0; var AdditionalTasksSolved = 0; + var totalRating = 0; try { foreach (var s in pieces) @@ -247,7 +248,7 @@ async public Task GetRating(string shortFIO, string fullFIO, string pass var pair = s.Split(':'); switch (pair[0]) { - case "ClassTasks": + /*case "ClassTasks": ClassTasksSolved = int.Parse(pair[2]); break; case "ControlTasks": @@ -258,13 +259,17 @@ async public Task GetRating(string shortFIO, string fullFIO, string pass break; case "AdditionalTasks": AdditionalTasksSolved = int.Parse(pair[2]); + break;*/ + case "Total": + totalRating = int.Parse(pair[1]); break; } } // великая формула !!! - var Rating = ClassTasksSolved * 1 + ControlTasksSolved * 5 + HomeworkTasksSolved * 3 + AdditionalTasksSolved * 2; - var Details = $" (Осн: {ClassTasksSolved}×1, Доп: {AdditionalTasksSolved}×2, ДЗ: {HomeworkTasksSolved}×3, КР: {ControlTasksSolved}×5)"; - res = Rating.ToString() + '|' + Details; + //var Rating = ClassTasksSolved * 1 + ControlTasksSolved * 5 + HomeworkTasksSolved * 3 + AdditionalTasksSolved * 2; + var Rating = totalRating; + //var Details = $" (Осн: {ClassTasksSolved}×1, Доп: {AdditionalTasksSolved}×2, ДЗ: {HomeworkTasksSolved}×3, КР: {ControlTasksSolved}×5)"; + res = Rating.ToString(); // + '|' + Details; } catch (Exception e) {