init
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Interop;
|
||||
|
||||
namespace DTS.Common.Dialogs
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for ConfirmationWindow.xaml
|
||||
/// </summary>
|
||||
public partial class ConfirmationWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// The content template to use when showing <see cref="DTS.Common.Interactivity.InteractionRequest.Confirmation"/> data.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ConfirmationTemplateProperty =
|
||||
DependencyProperty.Register(
|
||||
"ConfirmationTemplate",
|
||||
typeof(DataTemplate),
|
||||
typeof(ConfirmationWindow),
|
||||
new PropertyMetadata(null));
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of ConfirmationChildWindow.
|
||||
/// </summary>
|
||||
public ConfirmationWindow()
|
||||
{
|
||||
// Hook the SourceInitialized event and then using the SetWindowLong function to strip off the WS_SYSMENU bit.
|
||||
SourceInitialized += ConfirmationWindow_SourceInitialized;
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The content template to use when showing <see cref="DTS.Common.Interactivity.InteractionRequest.Confirmation"/> data.
|
||||
/// </summary>
|
||||
public DataTemplate ConfirmationTemplate
|
||||
{
|
||||
get => (DataTemplate)GetValue(ConfirmationTemplateProperty);
|
||||
set => SetValue(ConfirmationTemplateProperty, value);
|
||||
}
|
||||
|
||||
private void ConfirmationWindow_SourceInitialized(object sender, EventArgs e)
|
||||
{
|
||||
// Removing the Close Button on a WPF window.
|
||||
// The key here is hooking the SourceInitialized event and then using the SetWindowLong function to strip off the WS_SYSMENU bit.
|
||||
var wih = new WindowInteropHelper(this);
|
||||
var style = GetWindowLong(wih.Handle, GWL_STYLE);
|
||||
SetWindowLong(wih.Handle, GWL_STYLE, style & ~WS_SYSMENU);
|
||||
}
|
||||
|
||||
private const int GWL_STYLE = -16;
|
||||
private const int WS_SYSMENU = 0x00080000;
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int SetWindowLong(IntPtr hwnd, int index, int value);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int GetWindowLong(IntPtr hwnd, int index);
|
||||
|
||||
public void Connect(int connectionId, object target)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,85 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="CheckRadioFocusVisual">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="SliderCheckBox" TargetType="{x:Type CheckBox}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||
<ControlTemplate.Resources>
|
||||
<Storyboard x:Key="StoryboardIsChecked">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="CheckFlag">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="14"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
<Storyboard x:Key="StoryboardIsCheckedOff">
|
||||
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="CheckFlag">
|
||||
<EasingDoubleKeyFrame KeyTime="0" Value="14"/>
|
||||
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
|
||||
</DoubleAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<BulletDecorator Background="Transparent" SnapsToDevicePixels="true">
|
||||
<BulletDecorator.Bullet>
|
||||
<Border x:Name="ForegroundPanel" BorderThickness="1" Width="35" Height="20" CornerRadius="10">
|
||||
<Canvas>
|
||||
<Border Background="White" x:Name="CheckFlag" CornerRadius="10" VerticalAlignment="Center" BorderThickness="1" Width="19" Height="18" RenderTransformOrigin="0.5,0.5">
|
||||
<Border.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform/>
|
||||
<SkewTransform/>
|
||||
<RotateTransform/>
|
||||
<TranslateTransform/>
|
||||
</TransformGroup>
|
||||
</Border.RenderTransform>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="1" Direction="180" />
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
</Canvas>
|
||||
</Border>
|
||||
</BulletDecorator.Bullet>
|
||||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||
</BulletDecorator>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="true">
|
||||
<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
|
||||
<Setter Property="Padding" Value="4,0,0,0"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter TargetName="ForegroundPanel" Property="Background" Value="{DynamicResource Accent}" />
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard x:Name="BeginStoryboardCheckedTrue" Storyboard="{StaticResource StoryboardIsChecked}" />
|
||||
<RemoveStoryboard BeginStoryboardName="BeginStoryboardCheckedFalse" />
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
<Trigger Property="IsChecked" Value="False">
|
||||
<Setter TargetName="ForegroundPanel" Property="Background" Value="Gray" />
|
||||
<Trigger.EnterActions>
|
||||
<BeginStoryboard x:Name="BeginStoryboardCheckedFalse" Storyboard="{StaticResource StoryboardIsCheckedOff}" />
|
||||
<RemoveStoryboard BeginStoryboardName="BeginStoryboardCheckedTrue" />
|
||||
</Trigger.EnterActions>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,20 @@
|
||||
using DTS.Common.Converters;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace DTS.Common.Enums.Viewer.Reports
|
||||
{
|
||||
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
|
||||
public enum WindowWidth
|
||||
{
|
||||
[Description("512")]
|
||||
FiveTwelve = 512,
|
||||
[Description("1024")]
|
||||
TenTwentyFour = 1024,
|
||||
[Description("2048")]
|
||||
TwentyFortyEight = 2048,
|
||||
[Description("4096")]
|
||||
FortyNinetySix = 4096,
|
||||
[Description("8192")]
|
||||
EightyOneNinetyTwo = 8192,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Sensors;
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Sensors.SoftwareFilters
|
||||
{
|
||||
public interface ISoftwareFiltersView : IBaseView { }
|
||||
|
||||
/// <summary>
|
||||
/// FB 13120 Filter class interface
|
||||
/// </summary>
|
||||
[System.ComponentModel.TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))]
|
||||
public interface IFilterClass : IComparable
|
||||
{
|
||||
string FilterName { get; }
|
||||
FilterClassType FClass { get; set; }
|
||||
double Frequency { get; set; }
|
||||
int GetFilterClassNumericValue();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class HeightConverter : MarkupExtension, IValueConverter
|
||||
{
|
||||
private static HeightConverter _instance;
|
||||
|
||||
#region IValueConverter Members
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return System.Convert.ToDouble(value) - System.Convert.ToInt32(parameter);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override object ProvideValue(IServiceProvider serviceProvider)
|
||||
{
|
||||
return _instance ?? (_instance = new HeightConverter());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user