개정판 5113a44c
issue #11011 convert service Controller 수정
Change-Id: I0d8557315efb30c2e57a90f04ae409155ebe484f
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj | ||
---|---|---|
156 | 156 |
<Compile Include="Extensions\VisualTreeHelper.cs" /> |
157 | 157 |
<Compile Include="ViewModel\DataBaseByStatusViewModel.cs" /> |
158 | 158 |
<Compile Include="ViewModel\AliveViewModel.cs" /> |
159 |
<Compile Include="ViewModel\MergeDataViewModel.cs" /> |
|
159 | 160 |
<Compile Include="ViewModel\MainViewModel.cs" /> |
160 | 161 |
<Compile Include="ViewModel\TotalStatusViewModel.cs" /> |
161 | 162 |
<Compile Include="Views\MergeDataView.xaml.cs"> |
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/MergeDataViewModel.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.ServiceModel; |
|
5 |
using System.Text; |
|
6 |
using System.Threading.Tasks; |
|
7 |
using System.Windows; |
|
8 |
using System.Windows.Controls.Primitives; |
|
9 |
using System.Windows.Input; |
|
10 |
using System.Windows.Media; |
|
11 |
using Markus.Mvvm.ToolKit; |
|
12 |
using Markus.Service.Helper; |
|
13 |
using Markus.Service.Interface; |
|
14 |
using Markus.Service.StationController.Data; |
|
15 |
using Markus.Service.WcfClient.StationServiceTask; |
|
16 |
|
|
17 |
namespace Markus.Service.StationController.ViewModel |
|
18 |
{ |
|
19 |
public class MergeDataViewModel : ViewModelBase |
|
20 |
{ |
|
21 |
#region 프로퍼티 |
|
22 |
|
|
23 |
private string id; |
|
24 |
|
|
25 |
public string Id |
|
26 |
{ |
|
27 |
get => id; set |
|
28 |
{ |
|
29 |
id = value; |
|
30 |
OnPropertyChanged(() => Id); |
|
31 |
} |
|
32 |
} |
|
33 |
|
|
34 |
|
|
35 |
Interface.ConvertItem errorViewSelectItem; |
|
36 |
|
|
37 |
public Interface.ConvertItem ErrorViewSelectItem |
|
38 |
{ |
|
39 |
get => errorViewSelectItem; |
|
40 |
set |
|
41 |
{ |
|
42 |
if (errorViewSelectItem != value) |
|
43 |
{ |
|
44 |
errorViewSelectItem = value; |
|
45 |
OnPropertyChanged(() => ErrorViewSelectItem); |
|
46 |
} |
|
47 |
} |
|
48 |
} |
|
49 |
#endregion 프로퍼티 |
|
50 |
|
|
51 |
public override void Loaded() |
|
52 |
{ |
|
53 |
base.Loaded(); |
|
54 |
} |
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
#region Command |
|
59 |
|
|
60 |
private ICommand _RestartConvertCommand; |
|
61 |
public ICommand RestartConvertCommand |
|
62 |
{ |
|
63 |
get => _RestartConvertCommand ?? (_RestartConvertCommand = new RelayCommand(param => OnRestartConvertCommand(param))); |
|
64 |
} |
|
65 |
|
|
66 |
|
|
67 |
private void OnRestartConvertCommand(object param) |
|
68 |
{ |
|
69 |
throw new NotImplementedException(); |
|
70 |
} |
|
71 |
|
|
72 |
#endregion |
|
73 |
|
|
74 |
} |
|
75 |
} |
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseByStatusView.xaml | ||
---|---|---|
1 |
<UserControl x:Class="Markus.Service.StationController.Views.DataBaseByStatusView" |
|
1 |
<UserControl x:Name="userControl" x:Class="Markus.Service.StationController.Views.DataBaseByStatusView"
|
|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
... | ... | |
21 | 21 |
</i:EventTrigger> |
22 | 22 |
</i:Interaction.Triggers> |
23 | 23 |
<Grid> |
24 |
|
|
24 |
|
|
25 | 25 |
<Grid.RowDefinitions> |
26 | 26 |
<RowDefinition Height="*"/> |
27 | 27 |
<RowDefinition Height="Auto"/> |
28 | 28 |
</Grid.RowDefinitions> |
29 |
<telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False" SelectedItem="{Binding SelectItem}" |
|
29 |
<telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False" |
|
30 |
SelectedItem="{Binding SelectedItem, ElementName=userControl}" |
|
30 | 31 |
x:Name="DataGrid" ScrollViewer.CanContentScroll="False"> |
31 | 32 |
<telerik:RadGridView.Columns> |
32 | 33 |
<telerik:GridViewDataColumn Header="Service ID" DataMemberBinding="{Binding ServiceID}"/> |
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseByStatusView.xaml.cs | ||
---|---|---|
25 | 25 |
{ |
26 | 26 |
InitializeComponent(); |
27 | 27 |
} |
28 |
|
|
29 |
|
|
30 |
#region Static Property Defines |
|
31 |
public static readonly DependencyProperty SelectedItemProperty = |
|
32 |
DependencyProperty.RegisterAttached("SelectedItem", typeof(Interface.ConvertItem), typeof(DataBaseByStatusView)); |
|
33 |
#endregion |
|
34 |
|
|
35 |
#region Property |
|
36 |
public Interface.ConvertItem SelectedItem |
|
37 |
{ |
|
38 |
get { return (Interface.ConvertItem)GetValue(SelectedItemProperty); } |
|
39 |
set { SetValue(SelectedItemProperty, value); } |
|
40 |
} |
|
41 |
#endregion |
|
28 | 42 |
} |
29 | 43 |
} |
ConvertService/ServiceBase/Markus.Service.StationController/Views/MergeDataView.xaml | ||
---|---|---|
10 | 10 |
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
11 | 11 |
xmlns:Behaviors="clr-namespace:Markus.Service.StationController.Behaviors" |
12 | 12 |
mc:Ignorable="d" Background="White" |
13 |
xmlns:viewmodel="clr-namespace:Markus.Service.StationController.ViewModel" |
|
13 | 14 |
d:DesignHeight="450" d:DesignWidth="800"> |
14 | 15 |
<UserControl.Resources> |
16 |
<viewmodel:MergeDataViewModel x:Key="ViewModel"/> |
|
15 | 17 |
<Behaviors:StatusTypeList x:Key="ErrorFilter"> |
16 | 18 |
<markus:StatusCodeType>Error</markus:StatusCodeType> |
17 |
<!--<markus:StatusCodeType>Completed</markus:StatusCodeType>--> |
|
18 |
</Behaviors:StatusTypeList> |
|
19 |
<markus:StatusCodeType>FileError</markus:StatusCodeType> |
|
20 |
<markus:StatusCodeType>PageError</markus:StatusCodeType> |
|
21 |
</Behaviors:StatusTypeList> |
|
19 | 22 |
<Behaviors:StatusTypeList x:Key="ComplatedFilter"> |
20 | 23 |
<markus:StatusCodeType>Completed</markus:StatusCodeType> |
21 | 24 |
</Behaviors:StatusTypeList> |
... | ... | |
29 | 32 |
<GroupBox Header="Service Alive Items" Margin="3" BorderThickness="0"> |
30 | 33 |
<Views:AliveView /> |
31 | 34 |
</GroupBox> |
32 |
<GroupBox Header="Error Items" Grid.Row="1" Margin="3" BorderThickness="0"> |
|
33 |
<Views:DataBaseByStatusView> |
|
35 |
<GroupBox Grid.Row="1" Margin="3" BorderThickness="0"> |
|
36 |
<GroupBox.HeaderTemplate> |
|
37 |
<DataTemplate> |
|
38 |
<Grid> |
|
39 |
<Grid.ColumnDefinitions> |
|
40 |
<ColumnDefinition/> |
|
41 |
<ColumnDefinition/> |
|
42 |
</Grid.ColumnDefinitions> |
|
43 |
<TextBlock Text="Error Items" Foreground="White"/> |
|
44 |
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right"> |
|
45 |
<telerik:RadToggleButton Content="ReStart Convert" Margin="2,0" |
|
46 |
Command="{Binding RestartConvertCommand, Source={StaticResource ViewModel}}" |
|
47 |
telerik:StyleManager.Theme="Office2016" |
|
48 |
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}" |
|
49 |
/> |
|
50 |
<telerik:RadToggleButton Content="OriginFile Open" Margin="2,0"/> |
|
51 |
<telerik:RadToggleButton Content="Output Path Open" Margin="2,0"/> |
|
52 |
</StackPanel> |
|
53 |
</Grid> |
|
54 |
</DataTemplate> |
|
55 |
</GroupBox.HeaderTemplate> |
|
56 |
<Views:DataBaseByStatusView SelectedItem="{Binding ErrorViewSelectItem}"> |
|
34 | 57 |
<i:Interaction.Behaviors> |
35 | 58 |
<Behaviors:StatusTypeSet StatusTypes="{StaticResource ErrorFilter}"/> |
36 | 59 |
</i:Interaction.Behaviors> |
내보내기 Unified diff