Unify offline startup state and strengthen empty-state cards
This commit is contained in:
@@ -662,12 +662,25 @@ namespace C4IT_CustomerPanel
|
||||
{
|
||||
var TopMarginCount = 0;
|
||||
const double railTopOffset = 14.5;
|
||||
|
||||
foreach (var navButton in new[] { BtnAnnouncements, BtnIncident, BtnSsp, BtnCustomLink, BtnInfo })
|
||||
{
|
||||
if (navButton != null)
|
||||
navButton.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
if (OnlineState != enumOnlineState.Online && ActiveButton != BtnInfo)
|
||||
ActivateFirstEntry = true;
|
||||
|
||||
foreach (var entry in MainFunctionButtons)
|
||||
{
|
||||
try
|
||||
{
|
||||
var Info = entry.Value;
|
||||
var isVisible = ConfigSettings.GetConfig().MainFunctionActivation[entry.Key];
|
||||
var isVisible = OnlineState == enumOnlineState.Online
|
||||
? ConfigSettings.GetConfig().MainFunctionActivation[entry.Key]
|
||||
: entry.Key == enumMainFunctions.Information;
|
||||
|
||||
if (isVisible)
|
||||
{
|
||||
Info.button.Visibility = Visibility.Visible;
|
||||
@@ -680,8 +693,12 @@ namespace C4IT_CustomerPanel
|
||||
if (Info.button == ActiveButton)
|
||||
ActivateFirstEntry = true;
|
||||
}
|
||||
entry.Value.MenuStrip.Enabled = true;
|
||||
entry.Value.MenuStrip.Visible = ConfigSettings.GetConfig().MainFunctionActivation[entry.Key];
|
||||
|
||||
if (entry.Value.MenuStrip != null)
|
||||
{
|
||||
entry.Value.MenuStrip.Enabled = isVisible;
|
||||
entry.Value.MenuStrip.Visible = isVisible;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user