Skip to content

Commit

Permalink
Merge branch 'pascalabcnet:master' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
spectatorBH authored Sep 7, 2024
2 parents c9ce511 + a6f6d8a commit 19be1ff
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Configuration/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Configuration/Version.defs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%COREVERSION%=0
%REVISION%=3536
%MINOR%=10
%REVISION%=3537
%COREVERSION%=0
%MAJOR%=3
2 changes: 1 addition & 1 deletion Release/pabcversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.0.3536
3.10.0.3537
2 changes: 1 addition & 1 deletion ReleaseGenerators/PascalABCNET_version.nsh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!define VERSION '3.10.0.3536'
!define VERSION '3.10.0.3537'
9 changes: 5 additions & 4 deletions VisualPlugins/TraningControlPlugin/LoginForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down
13 changes: 9 additions & 4 deletions VisualPlugins/TraningControlPlugin/SiteAccessInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ async public Task<string> 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)
Expand All @@ -247,7 +248,7 @@ async public Task<string> 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":
Expand All @@ -258,13 +259,17 @@ async public Task<string> 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)
{
Expand Down

0 comments on commit 19be1ff

Please sign in to comment.