Skip to content

Commit fec2de9

Browse files
authored
add the deprecation banner (#1646)
1 parent a84f54d commit fec2de9

4 files changed

Lines changed: 53 additions & 6 deletions

File tree

src/ServiceInsight/Shell/About.xaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,19 @@
6868
<Run Text="www.particular.net" />
6969
</Hyperlink>
7070
</TextBlock>
71-
72-
<TextBlock Text="{Binding CopyrightText}" Canvas.Left="38" Canvas.Top="262" />
71+
<TextBlock Canvas.Left="38"
72+
Canvas.Top="262"
73+
FontFamily="Tahoma"
74+
FontSize="10"
75+
FontWeight="Bold"
76+
>
77+
<Run Text="Serviceinsight will be" />
78+
<Hyperlink Command="{Binding NavigateToServiceInsightSupportPolicyCommand}">
79+
<Run Text="deprecated" />
80+
</Hyperlink>
81+
<Run Text="as of February 10 2027." />
82+
</TextBlock>
83+
<TextBlock Text="{Binding CopyrightText}" Canvas.Left="38" Canvas.Top="282" />
7384
</Canvas>
7485
</Grid>
7586
</Window>

src/ServiceInsight/Shell/AboutViewModel.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace ServiceInsight.Shell
22
{
3-
using System.Linq;
4-
using ServiceInsight.ServiceControl;
53
using System;
64
using System.ComponentModel;
5+
using System.Linq;
76
using System.Threading.Tasks;
87
using System.Windows.Input;
98
using Caliburn.Micro;
109
using ServiceInsight.Framework;
1110
using ServiceInsight.Framework.Licensing;
11+
using ServiceInsight.ServiceControl;
1212

1313
public class AboutViewModel : INotifyPropertyChanged, IActivate, IHaveDisplayName
1414
{
@@ -35,15 +35,15 @@ public class AboutViewModel : INotifyPropertyChanged, IActivate, IHaveDisplayNam
3535
public string ServiceControlVersion { get; private set; }
3636

3737
public string CopyrightText { get; private set; }
38-
38+
public ICommand NavigateToServiceInsightSupportPolicyCommand { get; }
3939
public string DisplayName { get; set; }
4040

4141
public string CommitHash { get; private set; }
4242

4343
public bool IsActive { get; private set; }
4444

4545
public ICommand NavigateToSiteCommand { get; }
46-
46+
public string SupportPolicyUrl => "https://docs.particular.net/serviceinsight/support-policy";
4747
public AboutViewModel(
4848
NetworkOperations networkOperations,
4949
IApplicationVersionService applicationVersionService,
@@ -57,6 +57,8 @@ public AboutViewModel(
5757
DisplayName = "About";
5858

5959
NavigateToSiteCommand = Command.Create(() => networkOperations.Browse("http://www.particular.net"));
60+
NavigateToServiceInsightSupportPolicyCommand = Command.Create(() => networkOperations.Browse(SupportPolicyUrl));
61+
6062
}
6163

6264
AboutViewModel(IApplicationVersionService applicationVersionService)

src/ServiceInsight/Shell/Shell.xaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,30 @@
167167
Command="{Binding ResetLayoutCommand}"
168168
CustomizationContent="Reset Layout"
169169
Content="Restore default layout" />
170+
<dxb:BarStaticItem x:Name="SunsetBanner"
171+
AutoSizeMode="Content"
172+
CustomizationContent="Sunset Banner"
173+
CategoryName="Status"
174+
ShowBorder="False"
175+
Content="{Binding}">
176+
<dxb:BarStaticItem.ContentTemplate>
177+
<DataTemplate>
178+
<Border Background="#FFF9C400" BorderBrush="#FFDFA600" BorderThickness="1" Padding="4,0,4,0" Height="28">
179+
<Grid HorizontalAlignment="Center">
180+
<TextBlock FontWeight="Bold" FontSize="12" VerticalAlignment="Center">
181+
<Run Text="Serviceinsight will be" />
182+
<Hyperlink NavigateUri="https://docs.particular.net/serviceinsight/support-policy"
183+
ToolTip="View support policy"
184+
RequestNavigate="Hyperlink_RequestNavigate">
185+
<Run Text="deprecated" />
186+
</Hyperlink>
187+
<Run Text="as of February 10 2027" />
188+
</TextBlock>
189+
</Grid>
190+
</Border>
191+
</DataTemplate>
192+
</dxb:BarStaticItem.ContentTemplate>
193+
</dxb:BarStaticItem>
170194
<dxb:BarButtonItem x:Name="ProvideFeedback"
171195
AutomationProperties.AutomationId="ProvideFeedbackMenuItem"
172196
CategoryName="Help"
@@ -195,6 +219,7 @@
195219
</DataTemplate>
196220
</dxb:BarButtonItem.ContentTemplate>
197221
</dxb:BarButtonItem>
222+
198223
<dxb:BarCheckItem Name="DataAutoRefresh"
199224
AutomationProperties.AutomationId="DataAutoRefreshMenuItem"
200225
CustomizationContent="Auto Data Refresh"
@@ -409,7 +434,9 @@
409434
<dxb:BarItemLinkSeparator />
410435
<dxb:BarCheckItemLink BarItemName="DataAutoRefresh" />
411436
<dxb:BarCheckItemLink BarItemName="RetryMessage" />
437+
<dxb:BarStaticItemLink BarItemName="SunsetBanner" Alignment="Far" />
412438
<dxb:BarButtonItemLink BarItemName="ProvideFeedbackToolbar" Alignment="Far" />
439+
413440
</dxb:Bar>
414441
<dxb:Bar x:Name="StatusBar"
415442
AllowCollapse="True"

src/ServiceInsight/Shell/Shell.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
namespace ServiceInsight.Shell
22
{
3+
using System.Diagnostics;
34
using System.Windows;
5+
using System.Windows.Navigation;
46
using DevExpress.Xpf.Bars;
57
using DevExpress.Xpf.Core;
68
using DevExpress.Xpf.Core.Serialization;
@@ -19,6 +21,11 @@ public ShellView()
1921
BarManager.CheckBarItemNames = false;
2022
Loaded += OnShellLoaded;
2123
}
24+
void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
25+
{
26+
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
27+
e.Handled = true;
28+
}
2229

2330
void OnShellLoaded(object sender, RoutedEventArgs e)
2431
{

0 commit comments

Comments
 (0)