Compare commits

...

3 Commits

6 changed files with 70 additions and 31 deletions

View File

@@ -30,13 +30,13 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
this.kryptonPanel1 = new Krypton.Toolkit.KryptonPanel(); this.kryptonPanel1 = new Krypton.Toolkit.KryptonPanel();
this.gitLnk = new Krypton.Toolkit.KryptonLinkLabel();
this.versionLbl = new Krypton.Toolkit.KryptonLabel();
this.kryptonLabel3 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel3 = new Krypton.Toolkit.KryptonLabel();
this.storkUrl = new Krypton.Toolkit.KryptonLinkLabel(); this.storkUrl = new Krypton.Toolkit.KryptonLinkLabel();
this.kryptonLabel2 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel2 = new Krypton.Toolkit.KryptonLabel();
this.kryptonLabel1 = new Krypton.Toolkit.KryptonLabel(); this.kryptonLabel1 = new Krypton.Toolkit.KryptonLabel();
this.kryptonPictureBox1 = new Krypton.Toolkit.KryptonPictureBox(); this.kryptonPictureBox1 = new Krypton.Toolkit.KryptonPictureBox();
this.kryptonLabel4 = new Krypton.Toolkit.KryptonLabel();
this.gitLnk = new Krypton.Toolkit.KryptonLinkLabel();
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).BeginInit();
this.kryptonPanel1.SuspendLayout(); this.kryptonPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.kryptonPictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPictureBox1)).BeginInit();
@@ -45,7 +45,7 @@
// kryptonPanel1 // kryptonPanel1
// //
this.kryptonPanel1.Controls.Add(this.gitLnk); this.kryptonPanel1.Controls.Add(this.gitLnk);
this.kryptonPanel1.Controls.Add(this.kryptonLabel4); this.kryptonPanel1.Controls.Add(this.versionLbl);
this.kryptonPanel1.Controls.Add(this.kryptonLabel3); this.kryptonPanel1.Controls.Add(this.kryptonLabel3);
this.kryptonPanel1.Controls.Add(this.storkUrl); this.kryptonPanel1.Controls.Add(this.storkUrl);
this.kryptonPanel1.Controls.Add(this.kryptonLabel2); this.kryptonPanel1.Controls.Add(this.kryptonLabel2);
@@ -54,9 +54,27 @@
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0); this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1"; this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(499, 526); this.kryptonPanel1.Size = new System.Drawing.Size(496, 520);
this.kryptonPanel1.TabIndex = 0; this.kryptonPanel1.TabIndex = 0;
// //
// gitLnk
//
this.gitLnk.Location = new System.Drawing.Point(411, 494);
this.gitLnk.Name = "gitLnk";
this.gitLnk.Size = new System.Drawing.Size(73, 20);
this.gitLnk.TabIndex = 6;
this.gitLnk.Values.Text = "View on Git";
this.gitLnk.LinkClicked += new System.EventHandler(this.gitLnk_LinkClicked);
//
// versionLbl
//
this.versionLbl.LabelStyle = Krypton.Toolkit.LabelStyle.BoldPanel;
this.versionLbl.Location = new System.Drawing.Point(12, 345);
this.versionLbl.Name = "versionLbl";
this.versionLbl.Size = new System.Drawing.Size(62, 20);
this.versionLbl.TabIndex = 5;
this.versionLbl.Values.Text = "[version]";
//
// kryptonLabel3 // kryptonLabel3
// //
this.kryptonLabel3.Location = new System.Drawing.Point(12, 436); this.kryptonLabel3.Location = new System.Drawing.Point(12, 436);
@@ -102,29 +120,11 @@
this.kryptonPictureBox1.TabIndex = 0; this.kryptonPictureBox1.TabIndex = 0;
this.kryptonPictureBox1.TabStop = false; this.kryptonPictureBox1.TabStop = false;
// //
// kryptonLabel4
//
this.kryptonLabel4.LabelStyle = Krypton.Toolkit.LabelStyle.BoldPanel;
this.kryptonLabel4.Location = new System.Drawing.Point(12, 345);
this.kryptonLabel4.Name = "kryptonLabel4";
this.kryptonLabel4.Size = new System.Drawing.Size(114, 20);
this.kryptonLabel4.TabIndex = 5;
this.kryptonLabel4.Values.Text = "v1.1 (Castagnetti)";
//
// gitLnk
//
this.gitLnk.Location = new System.Drawing.Point(411, 494);
this.gitLnk.Name = "gitLnk";
this.gitLnk.Size = new System.Drawing.Size(73, 20);
this.gitLnk.TabIndex = 6;
this.gitLnk.Values.Text = "View on Git";
this.gitLnk.LinkClicked += new System.EventHandler(this.gitLnk_LinkClicked);
//
// AboutForm // AboutForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(499, 526); this.ClientSize = new System.Drawing.Size(496, 520);
this.Controls.Add(this.kryptonPanel1); this.Controls.Add(this.kryptonPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false; this.MaximizeBox = false;
@@ -132,6 +132,7 @@
this.Name = "AboutForm"; this.Name = "AboutForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "About SamaPager Server"; this.Text = "About SamaPager Server";
this.Load += new System.EventHandler(this.AboutForm_Load);
((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.kryptonPanel1)).EndInit();
this.kryptonPanel1.ResumeLayout(false); this.kryptonPanel1.ResumeLayout(false);
this.kryptonPanel1.PerformLayout(); this.kryptonPanel1.PerformLayout();
@@ -149,6 +150,6 @@
private Krypton.Toolkit.KryptonLabel kryptonLabel3; private Krypton.Toolkit.KryptonLabel kryptonLabel3;
private Krypton.Toolkit.KryptonLinkLabel storkUrl; private Krypton.Toolkit.KryptonLinkLabel storkUrl;
private Krypton.Toolkit.KryptonLinkLabel gitLnk; private Krypton.Toolkit.KryptonLinkLabel gitLnk;
private Krypton.Toolkit.KryptonLabel kryptonLabel4; private Krypton.Toolkit.KryptonLabel versionLbl;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using SamaPager_Server.Properties;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -27,5 +28,10 @@ namespace SamaPager_Server
{ {
Process.Start("https://git.fiorencis.eu/AndreStork/SamaPager"); Process.Start("https://git.fiorencis.eu/AndreStork/SamaPager");
} }
private void AboutForm_Load(object sender, EventArgs e)
{
versionLbl.Text = $"v.{Resources.currentVersion} ({Resources.versionCodename})";
}
} }
} }

View File

@@ -72,7 +72,7 @@
this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.kryptonPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.kryptonPanel1.Location = new System.Drawing.Point(0, 0); this.kryptonPanel1.Location = new System.Drawing.Point(0, 0);
this.kryptonPanel1.Name = "kryptonPanel1"; this.kryptonPanel1.Name = "kryptonPanel1";
this.kryptonPanel1.Size = new System.Drawing.Size(426, 383); this.kryptonPanel1.Size = new System.Drawing.Size(430, 384);
this.kryptonPanel1.TabIndex = 0; this.kryptonPanel1.TabIndex = 0;
// //
// logList // logList
@@ -89,11 +89,11 @@
this.kryptonStatusStrip1.Font = new System.Drawing.Font("Segoe UI", 9F); this.kryptonStatusStrip1.Font = new System.Drawing.Font("Segoe UI", 9F);
this.kryptonStatusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.kryptonStatusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statusLabel}); this.statusLabel});
this.kryptonStatusStrip1.Location = new System.Drawing.Point(0, 361); this.kryptonStatusStrip1.Location = new System.Drawing.Point(0, 362);
this.kryptonStatusStrip1.Name = "kryptonStatusStrip1"; this.kryptonStatusStrip1.Name = "kryptonStatusStrip1";
this.kryptonStatusStrip1.ProgressBars = null; this.kryptonStatusStrip1.ProgressBars = null;
this.kryptonStatusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode; this.kryptonStatusStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
this.kryptonStatusStrip1.Size = new System.Drawing.Size(426, 22); this.kryptonStatusStrip1.Size = new System.Drawing.Size(430, 22);
this.kryptonStatusStrip1.TabIndex = 3; this.kryptonStatusStrip1.TabIndex = 3;
this.kryptonStatusStrip1.Text = "kryptonStatusStrip1"; this.kryptonStatusStrip1.Text = "kryptonStatusStrip1";
// //
@@ -111,7 +111,7 @@
this.helpToolStripMenuItem}); this.helpToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1"; this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(426, 24); this.menuStrip1.Size = new System.Drawing.Size(430, 24);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
@@ -192,7 +192,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(426, 383); this.ClientSize = new System.Drawing.Size(430, 384);
this.Controls.Add(this.kryptonPanel1); this.Controls.Add(this.kryptonPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

View File

@@ -70,6 +70,15 @@ namespace SamaPager_Server.Properties {
} }
} }
/// <summary>
/// Cerca una stringa localizzata simile a 1.1.
/// </summary>
internal static string currentVersion {
get {
return ResourceManager.GetString("currentVersion", resourceCulture);
}
}
/// <summary> /// <summary>
/// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap. /// Cerca una risorsa localizzata di tipo System.Drawing.Bitmap.
/// </summary> /// </summary>
@@ -79,5 +88,14 @@ namespace SamaPager_Server.Properties {
return ((System.Drawing.Bitmap)(obj)); return ((System.Drawing.Bitmap)(obj));
} }
} }
/// <summary>
/// Cerca una stringa localizzata simile a Castagnetti.
/// </summary>
internal static string versionCodename {
get {
return ResourceManager.GetString("versionCodename", resourceCulture);
}
}
} }
} }

View File

@@ -124,4 +124,10 @@
<data name="5pagers1shalom" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="5pagers1shalom" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\5pagers1shalom.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\5pagers1shalom.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="currentVersion" xml:space="preserve">
<value>1.1</value>
</data>
<data name="versionCodename" xml:space="preserve">
<value>Castagnetti</value>
</data>
</root> </root>

View File

@@ -46,7 +46,15 @@ namespace SamaPager_Server
case "!getDateTime": case "!getDateTime":
bytesToSend = Encoding.UTF8.GetBytes($"Hi, it's {DateTime.Now}"); bytesToSend = Encoding.UTF8.GetBytes($"Hi, it's {DateTime.Now}");
this.UdpServer.Send(bytesToSend, bytesToSend.Length, receiveEndPoint); this.UdpServer.Send(bytesToSend, bytesToSend.Length, receiveEndPoint);
return $"Time command received by {receiveEndPoint}, sent local server time"; return $"Command \"!getDateTime\" received by {receiveEndPoint}, sent local server time";
case "!getCurrentDir":
bytesToSend = Encoding.UTF8.GetBytes($"I'm working in {Environment.CurrentDirectory}");
this.UdpServer.Send(bytesToSend, bytesToSend.Length, receiveEndPoint);
return $"Command \"!getCurrentDir\" received by {receiveEndPoint}, sent server working directory";
case "!getCurrentUser":
bytesToSend = Encoding.UTF8.GetBytes($"Hi, I'm running as {Environment.UserName}");
this.UdpServer.Send(bytesToSend, bytesToSend.Length, receiveEndPoint);
return $"Command \"!getCurrentUser\" received by {receiveEndPoint}, sent the username the server is running on";
default: default:
return $"[{DateTime.Now}] {receiveEndPoint}: {receivedMessage}"; return $"[{DateTime.Now}] {receiveEndPoint}: {receivedMessage}";
} }