diff --git a/EgwControlCenter/App.config b/EgwControlCenter/App.config
index d8710dc..b9ef052 100644
--- a/EgwControlCenter/App.config
+++ b/EgwControlCenter/App.config
@@ -2,71 +2,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/EgwControlCenter/ControlCenter.Designer.cs b/EgwControlCenter/ControlCenter.Designer.cs
index 1f8a24a..dd89805 100644
--- a/EgwControlCenter/ControlCenter.Designer.cs
+++ b/EgwControlCenter/ControlCenter.Designer.cs
@@ -148,6 +148,7 @@
Controls.Add(btnSetup);
Controls.Add(label1);
Icon = (Icon)resources.GetObject("$this.Icon");
+ MaximizeBox = false;
Name = "ControlCenter";
Text = "Egalware AppControlCenter";
FormClosing += ControlCenter_FormClosing;
diff --git a/EgwControlCenter/ControlCenter.cs b/EgwControlCenter/ControlCenter.cs
index f892bca..3cc4614 100644
--- a/EgwControlCenter/ControlCenter.cs
+++ b/EgwControlCenter/ControlCenter.cs
@@ -44,11 +44,6 @@ namespace EgwControlCenter
#region Protected Fields
- ///
- /// Modalità di avvio
- ///
- protected AccEnum.StartMode ModoAvvio = AccEnum.StartMode.STD;
-
#endregion Protected Fields
#region Private Fields
@@ -92,24 +87,11 @@ namespace EgwControlCenter
///
private void CheckFormVisibility()
{
- // se non può massimizzare imposto COMUNQUE a minimized...
- if (!AccUtils.CRB("windowCanMax"))
+ // controllo cosa devo mostrare...
+ if (WindowState == FormWindowState.Minimized)
{
- WindowState = FormWindowState.Minimized;
- }
- // SOLO SE se sono in modo STD
- if (ModoAvvio == AccEnum.StartMode.STD)
- {
- // controllo cosa devo mostrare...
- if (WindowState == FormWindowState.Minimized)
- {
- notifyIcon1.Visible = false;
- sendToTray();
- }
- else
- {
- notifyIcon1.Visible = false;
- }
+ notifyIcon1.Visible = false;
+ sendToTray();
}
else
{
@@ -129,6 +111,11 @@ namespace EgwControlCenter
}
private void ControlCenter_Load(object sender, EventArgs e)
+ {
+ SetPosition();
+ }
+
+ private void SetPosition()
{
// posiziono in basso a sx...
Rectangle workArea = Screen.GetWorkingArea(this);
@@ -152,16 +139,8 @@ namespace EgwControlCenter
///
private void ControlCenter_Shown(object sender, EventArgs e)
{
- // SOLO SE se sono in modo STD
- if (ModoAvvio == StartMode.STD)
- {
- // avvio minimizzato se richiesto
- if (AccUtils.CRB("startMinimized"))
- {
- // controllo e mando a tray...
- sendToTray();
- }
- }
+ // avvio minimizzato
+ sendToTray();
}
///
@@ -210,7 +189,6 @@ namespace EgwControlCenter
DataDir = Environment.GetEnvironmentVariable("ClickOnce_DataDirectory") ?? AccUtils.dataDir;
CurrCheck = new ReleaseChecker(ConfDir, DataDir, "ConfPatrol.json");
Log.Trace($"Folder Setup | {ConfDir} | {DataDir}");
- //timerCheck.Interval = AccUtils.CRI("timerCheckMs");
timerCheck.Interval = (CurrCheck.CurrPatrolCont.RefreshIntSec * 1000);
// sistemo grafica TRAY ICON
SetupTrayIcon();
@@ -240,6 +218,8 @@ namespace EgwControlCenter
WindowState = FormWindowState.Normal;
}
+ private string AppName = "EgalWare ACC"; //= AccUtils.CRS("appName");
+
///
/// Gestisce "andata nel tray" della form
///
@@ -247,8 +227,8 @@ namespace EgwControlCenter
{
if (!notifyIcon1.Visible)
{
- notifyIcon1.BalloonTipTitle = AccUtils.CRS("appName");
- notifyIcon1.BalloonTipText = $"{AccUtils.CRS("appName")} running on tray";
+ notifyIcon1.BalloonTipTitle = AppName;
+ notifyIcon1.BalloonTipText = $"{AppName} running on tray";
notifyIcon1.BalloonTipIcon = ToolTipIcon.Info;
notifyIcon1.BalloonTipClicked += NotifyIcon1_BalloonTipClicked;
notifyIcon1.Visible = true;
diff --git a/EgwControlCenter/Properties/PublishProfiles/ClickOnceProfile.pubxml.user b/EgwControlCenter/Properties/PublishProfiles/ClickOnceProfile.pubxml.user
index 632fcc7..1d72641 100644
--- a/EgwControlCenter/Properties/PublishProfiles/ClickOnceProfile.pubxml.user
+++ b/EgwControlCenter/Properties/PublishProfiles/ClickOnceProfile.pubxml.user
@@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
- True|2024-09-19T15:08:51.1944045Z||;True|2024-09-19T17:06:47.5482142+02:00||;True|2024-09-19T16:16:06.4269267+02:00||;True|2024-09-19T15:43:14.5803096+02:00||;
+ True|2024-09-19T15:19:00.2993133Z||;True|2024-09-19T17:08:51.1944045+02:00||;True|2024-09-19T17:06:47.5482142+02:00||;True|2024-09-19T16:16:06.4269267+02:00||;True|2024-09-19T15:43:14.5803096+02:00||;
\ No newline at end of file