105040 Update 优化滚动效果
This commit is contained in:
parent
4be42fdc5c
commit
b7591e9cb2
|
|
@ -6,15 +6,19 @@
|
|||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:local="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.View"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:util="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.Utils"
|
||||
xmlns:viewmodel="clr-namespace:Sinvo.EplanHpD.Plugin.WPFUI.ViewModel"
|
||||
Title="CableLectotypeWindow"
|
||||
Width="800"
|
||||
Height="450"
|
||||
Width="1200"
|
||||
Height="800"
|
||||
d:DataContext="{d:DesignInstance Type=viewmodel:CableLectotypeViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/Sinvo.EplanHpD.Plugin.WPFUI;component/Themes/Theme.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<util:ConnectionTypeConverter x:Key="ConnectionTypeConverter" />
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
|
|
@ -23,122 +27,320 @@
|
|||
<RowDefinition Height="60" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="400" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<ScrollViewer
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Center"
|
||||
Panel.ZIndex="99"
|
||||
VerticalScrollBarVisibility="Hidden">
|
||||
<StackPanel
|
||||
x:Name="GrowlParent"
|
||||
Margin="0,10,10,10"
|
||||
VerticalAlignment="Top"
|
||||
Panel.ZIndex="99" />
|
||||
</ScrollViewer>
|
||||
<hc:Card
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Effect="{DynamicResource EffectShadow2}">
|
||||
<hc:SimpleStackPanel Orientation="Vertical">
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
Effect="{DynamicResource EffectShadow2}"
|
||||
FontSize="14">
|
||||
<hc:SimpleStackPanel
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
Orientation="Vertical">
|
||||
<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="电机ID:" />
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机功率"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
VerticalAlignment="Center"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource TextBoxPlusBaseStyle}"
|
||||
Text="{Binding Motor.OccPartId}" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock VerticalAlignment="Center" Text="电机型号:" />
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource TextBoxPlusBaseStyle}"
|
||||
Text="{Binding Motor.MotorModelStr}" />
|
||||
<TextBlock VerticalAlignment="Center" Text="电机功率:" />
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Width="118"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机功率"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
VerticalAlignment="Center"
|
||||
IsReadOnly="True"
|
||||
Style="{StaticResource TextBoxPlusBaseStyle}"
|
||||
Text="{Binding Motor.MotorPower}" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Vertical">
|
||||
<hc:TextBox
|
||||
Width="240"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
<hc:TextBox
|
||||
Width="240"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
hc:TitleElement.Title="电机功率"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
<hc:SimpleStackPanel
|
||||
Margin="0,10,0,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="线材链接方式:" />
|
||||
<hc:ButtonGroup Width="263" Style="{StaticResource ButtonGroupSolid}">
|
||||
<RadioButton Content="直通" IsChecked="{Binding CableConnectionType, Converter={StaticResource ConnectionTypeConverter}, ConverterParameter={x:Static util:ConnectionType.Passthrough}}" />
|
||||
<RadioButton Content="全段" IsChecked="{Binding CableConnectionType, Converter={StaticResource ConnectionTypeConverter}, ConverterParameter={x:Static util:ConnectionType.FullParagraph}}" />
|
||||
</hc:ButtonGroup>
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Vertical">
|
||||
<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="轴号:" />
|
||||
<hc:TextBox
|
||||
Width="240"
|
||||
Width="263"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
<hc:TextBox
|
||||
Width="240"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
hc:TitleElement.TitleWidth="120"
|
||||
Text="{Binding AxisNo, Mode=TwoWay}" />
|
||||
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="线材类型:" />
|
||||
<hc:ComboBox
|
||||
Width="263"
|
||||
DisplayMemberPath="ItemName"
|
||||
ItemsSource="{Binding CableTypes}"
|
||||
SelectedIndex="0"
|
||||
SelectedValue="{Binding CableType}"
|
||||
SelectedValuePath="ItemValue" />
|
||||
</hc:SimpleStackPanel>
|
||||
<!--<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Vertical">
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<TextBlock Width="100" Text="编码器线长度:" VerticalAlignment="Center"/>
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机型号"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
Width="263"
|
||||
Height="30" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<TextBlock Width="100" Text="动力线长度:" VerticalAlignment="Center"/>
|
||||
<hc:TextBox
|
||||
Width="140"
|
||||
Height="30"
|
||||
Margin="5,0,0,0"
|
||||
hc:TitleElement.Title="电机功率"
|
||||
hc:TitleElement.TitlePlacement="Left"
|
||||
hc:TitleElement.VerticalAlignment="Center"
|
||||
IsReadOnly="True" />
|
||||
Width="263"
|
||||
Height="30" />
|
||||
</hc:SimpleStackPanel>
|
||||
</hc:SimpleStackPanel>-->
|
||||
<hc:SimpleStackPanel Margin="0,10,0,0" Orientation="Vertical">
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="编码器线段数:" />
|
||||
<hc:TextBox
|
||||
Width="263"
|
||||
Height="30"
|
||||
IsEnabled="{Binding IsEnableParagraph}"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding EncoderLineParagraph, Mode=TwoWay}" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="动力线段数:" />
|
||||
<hc:TextBox
|
||||
Width="263"
|
||||
Height="30"
|
||||
IsEnabled="{Binding IsEnableParagraph}"
|
||||
IsReadOnly="False"
|
||||
Text="{Binding PowerLineParagraph, Mode=TwoWay}" />
|
||||
</hc:SimpleStackPanel>
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel Margin="0,10" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="100"
|
||||
VerticalAlignment="Center"
|
||||
Text="型号:" />
|
||||
<hc:TextBox
|
||||
Width="233"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding CableModelStr}" />
|
||||
<Button hc:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:SimpleStackPanel>
|
||||
<hc:ButtonGroup>
|
||||
<Button
|
||||
Background="{StaticResource LightPrimaryBrush}"
|
||||
Content="查看图纸"
|
||||
Foreground="{StaticResource PrimaryTextBrush}"
|
||||
Style="{StaticResource ButtonGroupItemBaseStyle}" />
|
||||
<Button
|
||||
Background="{StaticResource LightPrimaryBrush}"
|
||||
Content="查看BOM"
|
||||
Foreground="{StaticResource PrimaryTextBrush}"
|
||||
Style="{StaticResource ButtonGroupItemBaseStyle}" />
|
||||
<Button
|
||||
x:Name="CableratorBtn"
|
||||
Background="{StaticResource LightPrimaryBrush}"
|
||||
Click="CableratorBtn_Click"
|
||||
Content="生成线材列表"
|
||||
Foreground="{StaticResource PrimaryTextBrush}"
|
||||
Style="{StaticResource ButtonGroupItemBaseStyle}" />
|
||||
</hc:ButtonGroup>
|
||||
</hc:SimpleStackPanel>
|
||||
</hc:SimpleStackPanel>
|
||||
</hc:Card>
|
||||
<hc:Card
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Effect="{DynamicResource EffectShadow2}">
|
||||
|
||||
<DataGrid
|
||||
MinHeight="200"
|
||||
AutoGenerateColumns="False"
|
||||
Background="{StaticResource BackgroundBrush}"
|
||||
CanUserAddRows="False"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding SelectedLines}"
|
||||
RowDetailsVisibilityMode="Visible"
|
||||
RowHeight="NaN"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
VirtualizingPanel.ScrollUnit="Pixel">
|
||||
<DataGrid.RowStyle>
|
||||
<Style BasedOn="{StaticResource DataGridRowStyle}" TargetType="DataGridRow">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="Background" Value="#18a05d" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DrawingNo}" Value="">
|
||||
<Setter Property="Background" Value="#dc4d41" />
|
||||
</DataTrigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#88326cf3" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style BasedOn="{StaticResource DataGridCellStyle}" TargetType="DataGridCell">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="Black" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="Auto"
|
||||
Binding="{Binding SeqNo}"
|
||||
Header="序号" />
|
||||
<DataGridTextColumn Binding="{Binding AxisNo}" Header="轴号" />
|
||||
<DataGridTextColumn Binding="{Binding CurrentLine}" Header="段" />
|
||||
<DataGridTextColumn Binding="{Binding CableType}" Header="线类型" />
|
||||
<DataGridTextColumn Binding="{Binding CableConnectionClass}" Header="连接类型" />
|
||||
<DataGridTemplateColumn Header="是否高柔">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="{Binding IsFlexibility, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="True" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding DrawingNo}" Header="图号" />
|
||||
<DataGridTemplateColumn Width="300" Header="操作">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel MinWidth="300" Orientation="Horizontal">
|
||||
<Button Content="查看图纸" />
|
||||
<Button Margin="10,0,0,0" Content="查看BOM" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="是否布线完成">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<CheckBox
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="{Binding IsComplete, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsEnabled="True" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding CableModelNo}"
|
||||
Header="型号"
|
||||
Visibility="Collapsed" />
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.RowDetailsTemplate>
|
||||
<DataTemplate>
|
||||
<ListView
|
||||
Margin="30,0,0,0"
|
||||
hc:BorderElement.CornerRadius="0"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="2,0,2,2"
|
||||
ItemsSource="{Binding SubLines}"
|
||||
PreviewMouseWheel="ListView_PreviewMouseWheel"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
SelectionMode="Single"
|
||||
VirtualizingPanel.ScrollUnit="Pixel">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<!--<GridViewColumn DisplayMemberBinding="{Binding SeqNo}" Header="序号" />-->
|
||||
<GridViewColumn
|
||||
Width="100"
|
||||
DisplayMemberBinding="{Binding CableType}"
|
||||
Header="线类型" />
|
||||
<!--<GridViewColumn DisplayMemberBinding="{Binding CableModel}" Header="可用的线型号" />-->
|
||||
<GridViewColumn Width="420" Header="可用的线型号">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<hc:TextBox
|
||||
MinWidth="400"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding CableModel}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</DataTemplate>
|
||||
</DataGrid.RowDetailsTemplate>
|
||||
</DataGrid>
|
||||
|
||||
</hc:Card>
|
||||
<hc:SimpleStackPanel
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Text="Hello World!" />
|
||||
Grid.ColumnSpan="2"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Margin="10,0,0,0"
|
||||
hc:IconElement.Geometry="{StaticResource DialogBoxLauncherGeometry}"
|
||||
Content="置顶显示"
|
||||
FontSize="14"
|
||||
Style="{StaticResource ButtonSuccess}" />
|
||||
<Button
|
||||
Margin="10,0,0,0"
|
||||
hc:IconElement.Geometry="{StaticResource SaveGeometry}"
|
||||
Content="保存"
|
||||
FontSize="14"
|
||||
Style="{StaticResource ButtonPrimary}" />
|
||||
<Button
|
||||
Margin="10,0,10,0"
|
||||
hc:IconElement.Geometry="{StaticResource CloseGeometry}"
|
||||
Content="关闭"
|
||||
FontSize="14"
|
||||
Style="{StaticResource ButtonDanger}" />
|
||||
</hc:SimpleStackPanel>
|
||||
<hc:Card Grid.Row="0" Grid.Column="1">
|
||||
<ListView />
|
||||
</hc:Card>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -1,27 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HandyControl.Controls;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.Models;
|
||||
using Sinvo.EplanHpD.Plugin.WPFUI.ViewModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI.View
|
||||
{
|
||||
/// <summary>
|
||||
/// CableLectotypeWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CableLectotypeWindow : Window
|
||||
public partial class CableLectotypeWindow : System.Windows.Window
|
||||
{
|
||||
public CableLectotypeWindow()
|
||||
private MotorModel _motor;
|
||||
private CableLectotypeViewModel ViewModel;
|
||||
public CableLectotypeWindow(MotorModel motor)
|
||||
{
|
||||
InitializeComponent();
|
||||
_motor = motor;
|
||||
this.DataContext = ViewModel = new CableLectotypeViewModel(motor);
|
||||
Growl.Register("CableLectotypeMessage", GrowlParent);
|
||||
}
|
||||
|
||||
private void CableratorBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.Cablerator();
|
||||
}
|
||||
|
||||
private void ListView_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||
{
|
||||
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
|
||||
eventArg.RoutedEvent = UIElement.MouseWheelEvent;
|
||||
eventArg.Source = sender;
|
||||
(sender as ListView).RaiseEvent(eventArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,6 +382,7 @@
|
|||
BorderBrush="Gray"
|
||||
BorderThickness="2,0,0,0"
|
||||
ItemsSource="{Binding SubLines}"
|
||||
PreviewMouseWheel="ListView_PreviewMouseWheel"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectionChanged="SubDetailsDataGrid_SelectionChanged"
|
||||
SelectionMode="Single">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Forms.Integration;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Sinvo.EplanHpD.Plugin.WPFUI
|
||||
{
|
||||
|
|
@ -357,7 +359,21 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI
|
|||
|
||||
private void MotorDataGridToCableLectotype_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
new CableLectotypeWindow().Show();
|
||||
if (MotorDataGrid.SelectedItem != null)
|
||||
{
|
||||
var window = new CableLectotypeWindow(MotorDataGrid.SelectedItem as MotorModel);
|
||||
ElementHost.EnableModelessKeyboardInterop(window);
|
||||
window.Show();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ListView_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
|
||||
{
|
||||
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta);
|
||||
eventArg.RoutedEvent = UIElement.MouseWheelEvent;
|
||||
eventArg.Source = sender;
|
||||
(sender as ListView).RaiseEvent(eventArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue