212 lines · 14.7 KB · Text
RawDownload
<UserControl x:Class="GSF.TimeSeries.Transport.UI.UserControls.InternalSubscriptionUserControl"             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"             mc:Ignorable="d" d:DesignHeight="650" d:DesignWidth="850"             xmlns:p="clr-namespace:GSF.TimeSeries.Transport.UI.Properties"             xmlns:vm="clr-namespace:GSF.TimeSeries.Transport.UI.ViewModels"             Background="Transparent"             Unloaded="InternalSubscriptionUserControl_Unloaded">     <UserControl.Resources>        <ResourceDictionary>            <ResourceDictionary.MergedDictionaries>                <ResourceDictionary Source="/GSF.TimeSeries.UI.WPF;Component/Resources/CommonResource.xaml" />                <ResourceDictionary Source="/GSF.TimeSeries.UI.WPF;Component/Resources/StyleResource.xaml" />            </ResourceDictionary.MergedDictionaries>             <vm:SubscriberRequestViewModel x:Key="ViewModel" SecurityMode="None" />        </ResourceDictionary>    </UserControl.Resources>     <StackPanel Orientation="Vertical" HorizontalAlignment="Center" DataContext="{StaticResource ViewModel}">        <GroupBox Header="Publisher Info">            <Grid HorizontalAlignment="Center">                <Grid.RowDefinitions>                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                </Grid.RowDefinitions>                 <Grid.ColumnDefinitions>                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                </Grid.ColumnDefinitions>                 <Label Grid.Row="0" Grid.Column="0" Content="Acronym" />                <TextBox Name="Acronym" Grid.Row="0" Grid.Column="1" Text="{Binding Mode=TwoWay, Path=PublisherAcronym}" CharacterCasing="Upper" PreviewTextInput="Acronym_PreviewTextInput" TextChanged="Acronym_TextChanged" />                <Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.InternalSubscriptionUserControl_NameLabel}" />                <TextBox Grid.Row="0" Grid.Column="3" Text="{Binding Mode=TwoWay, Path=PublisherName}" />                 <Label Grid.Row="1" Grid.Column="0" Content="Hostname" />                <Label Grid.Row="1" Grid.Column="0" VerticalAlignment="Bottom" Margin="6,0,0,-2" Padding="0" Content="Protocol" />                <TextBox Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Text="{Binding Mode=TwoWay, Path=Hostname}" />                <TextBlock Name="HostNameNote" Grid.Row="1" Grid.Column="1" FontSize="10" FontStyle="Italic" Margin="0,14,6,0">                    Leave blank for server-based connection.                </TextBlock>                 <Label Grid.Row="1" Grid.Column="2" Content="Port" />                <StackPanel Grid.Row="1" Grid.Column="3" Orientation="Horizontal">                    <TextBox Name="Port" Width="{StaticResource XXSmallItemSize}" VerticalAlignment="Top" Text="{Binding Mode=TwoWay, Path=PublisherPort}" PreviewTextInput="PortRange_PreviewTextInput" />                    <TextBlock FontSize="10" FontStyle="Italic" TextAlignment="Left">                        Common ports:<LineBreak />                        openPDC - <Label Name="openPDCPort" Content="6165" Margin="0,0,0,-3" Padding="0" />, openHistorian - <Label Name="openHistorianPort" Content="6175" Margin="0,0,0,-3" Padding="0" /><LineBreak />                        SIEGate - <Label Name="SIEGatePort" Content="6170" Margin="0,0,0,-3" Padding="0" />, openMIC - <Label Name="openMICPort" Content="6195" Margin="0,0,0,-3" Padding="0" />                    </TextBlock>                </StackPanel>                 <StackPanel Grid.Row="2" Grid.Column="0">                    <RadioButton Name="STTP" Margin="5,5,5,0" Content="STTP" IsChecked="{Binding Mode=TwoWay, Path=UseSTTP}" Checked="STTP_Checked" />                    <RadioButton Name="GEP" Margin="5,1,5,5" Content="GEP" IsChecked="{Binding Mode=TwoWay, Path=UseGEP}" Checked="GEP_Checked" />                </StackPanel>                 <StackPanel Grid.Row="2" Grid.Column="1">                    <CheckBox Name="SourcePrefix" Margin="5,-5,0,-4" Content="Use Source Prefix: &quot;!&quot;" IsChecked="{Binding Mode=TwoWay, Path=UseSourcePrefix}" />                    <CheckBox Margin="5,5,5,2" Content="Receive Internal Metadata" IsChecked="{Binding Mode=TwoWay, Path=ReceiveInternalMetadata}" />                    <CheckBox Margin="5,0,5,5" Content="Receive External Metadata" IsChecked="{Binding Mode=TwoWay, Path=ReceiveExternalMetadata}" />                </StackPanel>                 <Label Grid.Row="2" Grid.Column="2" Content="UDP Port" />                <StackPanel Grid.Row="2" Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Top">                    <TextBox Name="UdpPort" Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=UdpDataChannelPort}" IsEnabled="{Binding ElementName=UdpCheckBox, Path=IsChecked}" PreviewTextInput="PortRange_PreviewTextInput" />                    <CheckBox Name="UdpCheckBox" IsChecked="{Binding Mode=TwoWay, Path=UseUdpDataChannel}">                        <TextBlock FontSize="10" FontStyle="Italic" Margin="0,2">                            Leave unchecked for TCP only.                        </TextBlock>                    </CheckBox>                </StackPanel>            </Grid>        </GroupBox>         <CheckBox Name="EnableDataGapRecovery" StackPanel.ZIndex="2" Margin="10,10,0,-25" Content="Enable Automated Data Gap Recovery" VerticalContentAlignment="Center" IsChecked="{Binding Mode=TwoWay, Path=EnableDataGapRecovery}" Checked="EnableDataGapRecovery_Checked" />         <GroupBox StackPanel.ZIndex="1" IsEnabled="{Binding ElementName=EnableDataGapRecovery, Path=IsChecked}"  Header="                                                                   ">            <Grid HorizontalAlignment="Center">                <Grid.RowDefinitions>                    <RowDefinition Height="5" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                </Grid.RowDefinitions>                 <Grid.ColumnDefinitions>                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                </Grid.ColumnDefinitions>                 <Label Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" Content="Recovery Start Delay" ToolTip="Defines the minimum time delay, in seconds, to wait before starting a data gap recovery" Height="32" VerticalAlignment="Bottom" />                <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">                    <TextBox Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=RecoveryStartDelay}" PreviewTextInput="PositiveFloat_PreviewTextInput" />                    <Label Content="seconds" />                </StackPanel>                <Label Grid.Row="1" Grid.Column="2" HorizontalAlignment="Right" Content="Data Monitoring Interval" ToolTip="Defines the interval, in seconds, over which the data monitor will check for new data" />                <StackPanel Grid.Row="1" Grid.Column="3" Orientation="Horizontal">                    <TextBox Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=DataMonitoringInterval}" PreviewTextInput="PositiveFloat_PreviewTextInput" />                    <Label Content="seconds" />                </StackPanel>                <Label Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Content="Minimum Recovery Span" ToolTip="Defines the minimum time span, in seconds, for which a data recovery will be attempted - set to zero for no minimum" />                <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">                    <TextBox Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=MinimumRecoverySpan}" PreviewTextInput="PositiveFloat_PreviewTextInput" />                    <Label Content="seconds" />                </StackPanel>                <Label Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" Content="Maximum Recovery Span" ToolTip="Defines the maximum time span, in days, for which a data recovery will be attempted" />                <StackPanel Grid.Row="2" Grid.Column="3" Orientation="Horizontal">                    <TextBox Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=MaximumRecoverySpan}" PreviewTextInput="PositiveFloat_PreviewTextInput" />                    <Label Content="days" />                </StackPanel>                <Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Recovery Processing Interval" ToolTip="Defines the data recovery processing interval, in whole milliseconds, to use when recovering data - set to zero to recover as fast as possible" />                <StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">                    <TextBox Width="{StaticResource XXSmallItemSize}" Text="{Binding Mode=TwoWay, Path=RecoveryProcessingInterval}" PreviewTextInput="PositiveInt_PreviewTextInput" />                    <Label Content="milliseconds" />                </StackPanel>                <Label Grid.Row="3" Grid.Column="2" HorizontalAlignment="Right" Content="Logging Path" ToolTip="Defines the path for runtime and outage logs for this subscriber used for recovering data - leave blank for default folder. Can be a relative path to installation, e.g., ConfigurationCache" />                <TextBox Grid.Row="3" Grid.Column="3"  Width="{StaticResource LargeItemSize}" Text="{Binding Mode=TwoWay, Path=LoggingPath}" />            </Grid>        </GroupBox>         <Button Content="Next" HorizontalAlignment="Right" Margin="10,10,10,-25" Padding="2" Command="{Binding NextCommand}" />         <StackPanel HorizontalAlignment="Center">            <TextBlock TextAlignment="Center" FontSize="14" FontWeight="Bold">                Common Subscriber<LineBreak />                "Receive Metadata" Settings:            </TextBlock>             <Grid HorizontalAlignment="Center">                <Grid.RowDefinitions>                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                    <RowDefinition Height="Auto" />                </Grid.RowDefinitions>                 <Grid.ColumnDefinitions>                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                    <ColumnDefinition Width="Auto" />                </Grid.ColumnDefinitions>                 <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" Source="/GSF.TimeSeries.UI;component/images/ArrowCurved.png" />                <Label Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="0,0,8,0" FontSize="10" Content="connecting to" >                    <Label.LayoutTransform>                        <RotateTransform Angle="-28" />                    </Label.LayoutTransform>                </Label>                 <Border Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" BorderBrush="Black" BorderThickness="1,1,1,0">                    <Label FontWeight="Bold" HorizontalAlignment="Center" Content="Publisher" />                </Border>                <Border Grid.Row="1" Grid.Column="2" BorderBrush="Black" BorderThickness="1,0,0,1">                    <Label FontWeight="Bold" HorizontalContentAlignment="Center" Content="PDC" />                </Border>                <Border Grid.Row="1" Grid.Column="3" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label FontWeight="Bold" HorizontalContentAlignment="Center" Content="Gateway" />                </Border>                 <Border Grid.Row="2" Grid.Column="0" Grid.RowSpan="3" BorderBrush="Black" BorderThickness="1,1,0,1">                    <Label FontWeight="Bold" VerticalAlignment="Center" Content="Subscriber">                        <Label.LayoutTransform>                            <RotateTransform Angle="-90" />                        </Label.LayoutTransform>                    </Label>                </Border>                <Border Grid.Row="2" Grid.Column="1" BorderBrush="Black" BorderThickness="0,1,1,0">                    <Label FontWeight="Bold" HorizontalContentAlignment="Right" Content="PDC" />                </Border>                <Border Grid.Row="3" Grid.Column="1" BorderBrush="Black" BorderThickness="0,0,1,0">                    <Label FontWeight="Bold" HorizontalContentAlignment="Right" Content="Gateway" />                </Border>                <Border Grid.Row="4" Grid.Column="1" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label FontWeight="Bold" HorizontalContentAlignment="Right" Content="Historian" />                </Border>                 <Border Grid.Row="2" Grid.Column="2" BorderBrush="Black" BorderThickness="0,0,1,1" >                    <Label HorizontalContentAlignment="Center" Content="Internal" />                </Border>                <Border Grid.Row="3" Grid.Column="2" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label HorizontalContentAlignment="Center" Content="Internal" />                </Border>                <Border Grid.Row="4" Grid.Column="2" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label HorizontalContentAlignment="Center" Content="Both" />                </Border>                 <Border Grid.Row="2" Grid.Column="3" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label HorizontalContentAlignment="Center" Content="External" />                </Border>                <Border Grid.Row="3" Grid.Column="3" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label HorizontalContentAlignment="Center" Content="Internal" />                </Border>                <Border Grid.Row="4" Grid.Column="3" BorderBrush="Black" BorderThickness="0,0,1,1">                    <Label HorizontalContentAlignment="Center" Content="Both" />                </Border>            </Grid>        </StackPanel>    </StackPanel></UserControl>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t