|
@@ -5,7 +5,7 @@ using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
-namespace ErgometerApplication
|
|
|
|
|
|
|
+namespace ErgometerDoctorApplication
|
|
|
{
|
|
{
|
|
|
public class PanelClientSteps : Panel
|
|
public class PanelClientSteps : Panel
|
|
|
{
|
|
{
|
|
@@ -30,6 +30,7 @@ namespace ErgometerApplication
|
|
|
this.Location = new System.Drawing.Point(0, 0);
|
|
this.Location = new System.Drawing.Point(0, 0);
|
|
|
this.Name = "PanelClientSteps";
|
|
this.Name = "PanelClientSteps";
|
|
|
this.Size = new System.Drawing.Size(284, 150);
|
|
this.Size = new System.Drawing.Size(284, 150);
|
|
|
|
|
+ this.Resize += PanelClientSteps_Resize;
|
|
|
//
|
|
//
|
|
|
// HeaderLabel
|
|
// HeaderLabel
|
|
|
//
|
|
//
|
|
@@ -48,10 +49,22 @@ namespace ErgometerApplication
|
|
|
this.UitlegText.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
this.UitlegText.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
|
this.UitlegText.Location = new System.Drawing.Point(12, 35);
|
|
this.UitlegText.Location = new System.Drawing.Point(12, 35);
|
|
|
this.UitlegText.Name = "UitlegText";
|
|
this.UitlegText.Name = "UitlegText";
|
|
|
- this.UitlegText.MaximumSize = new System.Drawing.Size(400, 0);
|
|
|
|
|
this.UitlegText.Size = new System.Drawing.Size(800, 32);
|
|
this.UitlegText.Size = new System.Drawing.Size(800, 32);
|
|
|
|
|
+ this.UitlegText.MaximumSize = new System.Drawing.Size(400, 0);
|
|
|
this.UitlegText.TabIndex = 2;
|
|
this.UitlegText.TabIndex = 2;
|
|
|
this.UitlegText.Text = text;
|
|
this.UitlegText.Text = text;
|
|
|
|
|
+ this.UitlegText.TextChanged += UitlegText_TextChanged;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void UitlegText_TextChanged(object sender, EventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ if(UitlegText.Size.Height + UitlegText.Location.Y + 10 > this.Size.Height)
|
|
|
|
|
+ this.Size = new System.Drawing.Size(this.Size.Width, UitlegText.Size.Height + UitlegText.Location.Y + 10);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void PanelClientSteps_Resize(object sender, EventArgs e)
|
|
|
|
|
+ {
|
|
|
|
|
+ UitlegText.MaximumSize = new System.Drawing.Size(this.Size.Width - 20, 0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setText(string text)
|
|
public void setText(string text)
|