LinkLabel в TeacherControlPlugin

This commit is contained in:
Mikhalkovich Stanislav 2024-09-07 15:54:15 +03:00
parent 1835b811ef
commit 2365eb3633
7 changed files with 35 additions and 18 deletions

View file

@ -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 = "3535";
public const string Revision = "3536";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=10
%REVISION%=3535
%COREVERSION%=0
%REVISION%=3536
%MINOR%=10
%MAJOR%=3

View file

@ -1 +1 @@
3.10.0.3535
3.10.0.3536

View file

@ -1 +1 @@
!define VERSION '3.10.0.3535'
!define VERSION '3.10.0.3536'

View file

@ -43,9 +43,9 @@
this.PluginImageAuthorized = new System.Windows.Forms.PictureBox();
this.panelUnAuthorized = new System.Windows.Forms.Panel();
this.panelAuthorized = new System.Windows.Forms.Panel();
this.labelRating = new System.Windows.Forms.Label();
this.labelUserName = new System.Windows.Forms.Label();
this.labelRating = new System.Windows.Forms.LinkLabel();
this.labelDetails = new System.Windows.Forms.Label();
this.labelUserName = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.userImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.groupImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PluginImage)).BeginInit();
@ -204,15 +204,7 @@
this.labelRating.Size = new System.Drawing.Size(398, 26);
this.labelRating.TabIndex = 12;
this.labelRating.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labelUserName
//
this.labelUserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.labelUserName.Location = new System.Drawing.Point(0, 14);
this.labelUserName.Name = "labelUserName";
this.labelUserName.Size = new System.Drawing.Size(419, 26);
this.labelUserName.TabIndex = 11;
this.labelUserName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.labelRating.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.labelRating_LinkClicked);
//
// labelDetails
//
@ -223,6 +215,15 @@
this.labelDetails.TabIndex = 13;
this.labelDetails.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// labelUserName
//
this.labelUserName.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.labelUserName.Location = new System.Drawing.Point(0, 14);
this.labelUserName.Name = "labelUserName";
this.labelUserName.Size = new System.Drawing.Size(419, 26);
this.labelUserName.TabIndex = 11;
this.labelUserName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// LoginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -269,7 +270,7 @@
private System.Windows.Forms.Panel panelUnAuthorized;
private System.Windows.Forms.Label labelUserName;
private System.Windows.Forms.Panel panelAuthorized;
private System.Windows.Forms.Label labelRating;
private System.Windows.Forms.LinkLabel labelRating;
private System.Windows.Forms.Label labelDetails;
}
}

View file

@ -401,5 +401,15 @@ namespace DBAccessPluginNamespace
Close();
passwordBox.Text = "";
}
private void labelRating_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
this.labelRating.LinkVisited = true;
if (string.IsNullOrEmpty(SiteProvider.Group))
return;
var group = SiteProvider.Group.Replace(' ', '+');
System.Diagnostics.Process.Start("https://air.mmcs.sfedu.ru/pascalabc/index.php?groupName=" + group);
}
}
}

View file

@ -197,11 +197,17 @@ namespace DBAccessPluginNamespace
{
case "FIO" : FullFIO = pair[1]; break;
case "ShortFIO": ShortFIO = pair[1]; break;
case "type" : {
case "type":
{
if (pair[1] == "prepod") UserType = UserTypeEnum.Teacher;
else if (pair[1] == "student") UserType = UserTypeEnum.Student;
break;
}
case "group":
{
Group = pair[1];
break;
}
}
}