프로젝트

일반

사용자정보

개정판 2c634aed

ID2c634aed27d15f7d745fbff66504f7ac05633a9d
상위 3bde451b
하위 5feff9f0, d4552deb

semi 이(가) 약 5년 전에 추가함

popup style 변경 & 프로젝트 정리

Change-Id: I708256b20df780f169e92b020919b436152a07c9

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/Behaviors/StatusTypeSet.cs
21 21
        {
22 22
            if (AssociatedObject is UserControl)
23 23
            {
24
                if ((AssociatedObject as UserControl).DataContext is ViewModel.DataBaseByStatusViewModel)
25
                {
26
                    ((AssociatedObject as UserControl).DataContext as ViewModel.DataBaseByStatusViewModel).StatusType
27
                            = (StatusTypeList)this.GetValue(StatusTypesProperty);
28
                }
24
                //if ((AssociatedObject as UserControl).DataContext is ViewModel.DataBaseByStatusViewModel)
25
                //{
26
                //    ((AssociatedObject as UserControl).DataContext as ViewModel.DataBaseByStatusViewModel).StatusType
27
                //            = (StatusTypeList)this.GetValue(StatusTypesProperty);
28
                //}
29 29
            }
30 30
        }
31 31

  
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj
196 196
    <Compile Include="SELECT_FINAL_PDF_Result.cs">
197 197
      <DependentUpon>MarkusModel.tt</DependentUpon>
198 198
    </Compile>
199
    <Compile Include="ViewModel\AliveViewModel.cs" />
200 199
    <Compile Include="ViewModel\FinalPDFViewModel.cs" />
201 200
    <Compile Include="ViewModel\FinalPDFAddDialogViewModel.cs" />
202 201
    <Compile Include="ViewModel\ConvertAddDialogViewModel.cs" />
203
    <Compile Include="ViewModel\DataBaseByStatusViewModel.cs" />
204 202
    <Compile Include="ViewModel\DataBaseItemsModel.cs" />
205
    <Compile Include="ViewModel\MergeDataViewModel.cs" />
206 203
    <Compile Include="ViewModel\MainViewModel.cs" />
207
    <Compile Include="ViewModel\TotalStatusViewModel.cs" />
208 204
    <Compile Include="Views\ConvertAddDialog.xaml.cs">
209 205
      <DependentUpon>ConvertAddDialog.xaml</DependentUpon>
210 206
    </Compile>
......
214 210
    <Compile Include="Views\DataBaseViewInfo.xaml.cs">
215 211
      <DependentUpon>DataBaseViewInfo.xaml</DependentUpon>
216 212
    </Compile>
217
    <Compile Include="Views\MergeDataView.xaml.cs">
218
      <DependentUpon>MergeDataView.xaml</DependentUpon>
219
    </Compile>
220
    <Compile Include="ViewModel\SettingsViewModel.cs" />
221
    <Compile Include="Views\DataBaseByStatusView.xaml.cs">
222
      <DependentUpon>DataBaseByStatusView.xaml</DependentUpon>
223
    </Compile>
224
    <Compile Include="Views\AliveView.xaml.cs">
225
      <DependentUpon>AliveView.xaml</DependentUpon>
226
    </Compile>
227 213
    <Compile Include="Views\FinalPDFAddDialog.xaml.cs">
228 214
      <DependentUpon>FinalPDFAddDialog.xaml</DependentUpon>
229 215
    </Compile>
230
    <Compile Include="Views\SettiingServiceLocation.xaml.cs">
231
      <DependentUpon>SettiingServiceLocation.xaml</DependentUpon>
232
    </Compile>
233
    <Compile Include="Views\SettingsView.xaml.cs">
234
      <DependentUpon>SettingsView.xaml</DependentUpon>
235
    </Compile>
236
    <Compile Include="Views\TotalStatusView.xaml.cs">
237
      <DependentUpon>TotalStatusView.xaml</DependentUpon>
238
    </Compile>
239 216
    <Compile Include="Views\FinalPDFViewInfo.xaml.cs">
240 217
      <DependentUpon>FinalPDFViewInfo.xaml</DependentUpon>
241 218
    </Compile>
......
286 263
      <SubType>Designer</SubType>
287 264
      <Generator>MSBuild:Compile</Generator>
288 265
    </Page>
289
    <Page Include="Views\MergeDataView.xaml">
290
      <SubType>Designer</SubType>
291
      <Generator>MSBuild:Compile</Generator>
292
    </Page>
293
    <Page Include="Views\DataBaseByStatusView.xaml">
294
      <Generator>MSBuild:Compile</Generator>
295
      <SubType>Designer</SubType>
296
    </Page>
297
    <Page Include="Views\AliveView.xaml">
298
      <SubType>Designer</SubType>
299
      <Generator>MSBuild:Compile</Generator>
300
    </Page>
301 266
    <Page Include="Views\FinalPDFAddDialog.xaml">
302 267
      <Generator>MSBuild:Compile</Generator>
303 268
      <SubType>Designer</SubType>
304 269
    </Page>
305
    <Page Include="Views\SettiingServiceLocation.xaml">
306
      <SubType>Designer</SubType>
307
      <Generator>MSBuild:Compile</Generator>
308
    </Page>
309
    <Page Include="Views\SettingsView.xaml">
310
      <SubType>Designer</SubType>
311
      <Generator>MSBuild:Compile</Generator>
312
    </Page>
313
    <Page Include="Views\TotalStatusView.xaml">
314
      <SubType>Designer</SubType>
315
      <Generator>MSBuild:Compile</Generator>
316
    </Page>
317 270
    <Page Include="Views\FinalPDFViewInfo.xaml">
318 271
      <SubType>Designer</SubType>
319 272
      <Generator>MSBuild:Compile</Generator>
......
382 335
      <Project>{9efe95d6-9985-422a-a76f-285c8cf73617}</Project>
383 336
      <Name>Markus.Mvvm.ToolKit</Name>
384 337
    </ProjectReference>
385
    <ProjectReference Include="..\Markus.Service.DataBase\Markus.Service.DataBase.csproj">
386
      <Project>{400736fb-92c9-4bc0-b447-e8274103d813}</Project>
387
      <Name>Markus.Service.DataBase</Name>
388
    </ProjectReference>
389 338
    <ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj">
390 339
      <Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project>
391 340
      <Name>Markus.Service.Extensions</Name>
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/AliveViewModel.cs
1
using Markus.Service.WcfClient.StationServiceTask;
2
using System;
3
using System.Collections.Generic;
4
using System.ComponentModel;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using Markus.Service.Extensions;
9
using Markus.Service.Helper;
10
using Markus.Service.StationController.Extensions;
11
using System.Web;
12

  
13
namespace Markus.Service.StationController.ViewModel
14
{
15
    public class AliveViewModel : Mvvm.ToolKit.ViewModelBase
16
    {
17
        BackgroundWorker backgroundWorker;
18

  
19
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> aliveItems;
20
        private bool isLoading;
21
        private System.Windows.Documents.FlowDocument connectionLog;
22

  
23
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> AliveItems
24
        {
25
            get => aliveItems; set
26
            {
27
                aliveItems = value;
28
                OnPropertyChanged(() => AliveItems);
29
            }
30
        }
31

  
32
        public bool IsLoading
33
        {
34
            get => isLoading; set
35
            {
36
                if (isLoading != value)
37
                {
38
                    isLoading = value;
39
                    OnPropertyChanged(() => IsLoading);
40
                }
41
            }
42
        }
43

  
44

  
45
        public System.Windows.Documents.FlowDocument ConnectionLog
46
        {
47
            get => connectionLog;
48
            set
49
            {
50
                if (connectionLog != value)
51
                {
52
                    connectionLog = value;
53
                    OnPropertyChanged(() => ConnectionLog);
54
                }
55
            }
56
        }
57

  
58
        public AliveViewModel()
59
        {
60
        }
61

  
62
        // 진행률에 변화가 있을때 이벤트가 발생
63
        private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
64
        {
65
        }
66

  
67
        // 일이 모두 마쳤을때 수행되어야할 코드
68
        private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
69
        {
70
        }
71

  
72
        // BackgroundWorker에서 수행할 일을 정의.
73
        private async void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
74
        {
75
            while (IsAcitve)
76
            {
77

  
78
                if (!IsLoading)
79
                {
80
                    IsLoading = true;
81

  
82
                    try
83
                    {
84

  
85
                        List<ConvertItem> newitems = new List<ConvertItem>();
86

  
87
                        foreach (var client in App.StationClientList)
88
                        {
89
                            if (await SimplePingAsync(client.Endpoint.Address.ToString()))
90
                            {
91
                                try
92
                                {
93
                                    var items = await client.AliveConvertListAsync();
94
                                    newitems.AddRange(items);
95
                                    System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} ping");
96

  
97
                                    if (items.Count() == 0)
98
                                    {
99
                                        System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} Alive Items is zero.");
100
                                    }
101
                                }
102
                                catch (Exception ex)
103
                                {
104
                                    System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} {ex.Message}");
105
                                }
106
                            }
107
                            else
108
                            {
109
                                System.Diagnostics.Trace.Fail($"{client.Endpoint.Address} ping Error");
110
                            }
111
                        }
112

  
113
                        await System.Windows.Application.Current.Dispatcher.InvokeAsync(() => ItemsUpdate(newitems));
114
                    }
115
                    catch (Exception ex)
116
                    {
117
                        System.Diagnostics.Debug.WriteLine(ex.ToString());
118
                    }
119

  
120
                    IsLoading = false;
121
                }
122

  
123
            }
124
        }
125

  
126

  
127

  
128
        private void ItemsUpdate(List<ConvertItem> newitems)
129
        {
130

  
131
            foreach (var item in newitems)
132
            {
133
                item.OriginfilePath = HttpUtility.UrlDecode(item.OriginfilePath);
134
            }
135

  
136
            if (AliveItems == null)
137
            {
138
                AliveItems = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
139

  
140
                foreach (var item in newitems)
141
                {
142
                    AliveItems.Add(item);
143
                }
144
            }
145
            else
146
            {
147
                /// 데이터 업데이트
148
                newitems.ForEach(newitem =>
149
                {
150
                    AliveItems.UpdateWhere(changeitem => ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
151
                });
152

  
153
                // 추가
154
                foreach (var item in newitems)
155
                {
156
                    if (AliveItems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
157
                    {
158
                        AliveItems.Add(item);
159
                    }
160
                }
161

  
162
                /// 삭제
163

  
164
                for (int i = AliveItems.Count() - 1; i > -1; --i)
165
                {
166
                    var item = AliveItems[i];
167

  
168
                    if (newitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
169
                    {
170
                        try
171
                        {
172
                            AliveItems.RemoveAt(i);
173
                        }
174
                        catch (Exception ex)
175
                        {
176
                            System.Diagnostics.Debug.WriteLine(ex.ToString());
177
                        }
178
                    }
179
                }
180
            }
181
        }
182

  
183
        private void LogWrite(string log, bool IsError)
184
        {
185
            if (IsError)
186
            {
187
                System.Diagnostics.Trace.Fail(log);
188
            }
189
            else
190
            {
191
                System.Diagnostics.Trace.TraceInformation(log);
192
            }
193
        }
194

  
195

  
196
        public static async Task<bool> SimplePingAsync(string uri)
197
        {
198
            bool result = false;
199

  
200
            try
201
            {
202
                using (System.Net.Http.HttpClient Client = new System.Net.Http.HttpClient())
203
                {
204
                    Client.Timeout = new TimeSpan(0, 0, 60);
205

  
206
                    var message = await Client.GetAsync(uri);
207

  
208
                    System.Net.HttpStatusCode StatusCode = message.StatusCode;
209

  
210
                    switch (StatusCode)
211
                    {
212

  
213
                        case System.Net.HttpStatusCode.Accepted:
214
                        case System.Net.HttpStatusCode.OK:
215
                            result = true;
216
                            break;
217
                    }
218
                }
219
            }
220
            catch (Exception ex)
221
            {
222
                result = false;
223
                System.Diagnostics.Debug.WriteLine(ex.ToString());
224
            }
225

  
226
            return result;
227
        }
228

  
229
        public override void Loaded()
230
        {
231
            base.Loaded();
232

  
233
            if (!App.IsDesignMode)
234
            {
235
                backgroundWorker = new BackgroundWorker();
236
                backgroundWorker.DoWork += backgroundWorker_DoWork;
237
                backgroundWorker.RunWorkerCompleted += backgroundWorker_RunWorkerCompleted;
238
                backgroundWorker.WorkerReportsProgress = false;
239
                backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
240

  
241
                backgroundWorker.RunWorkerAsync();
242
            }
243
        }
244

  
245
        public override void Closed()
246
        {
247
            if (backgroundWorker != null)
248
            {
249
                backgroundWorker.DoWork -= backgroundWorker_DoWork;
250
                backgroundWorker.RunWorkerCompleted -= backgroundWorker_RunWorkerCompleted;
251
                backgroundWorker.WorkerReportsProgress = false;
252
                backgroundWorker.ProgressChanged -= new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
253

  
254
                backgroundWorker.Dispose();
255
            }
256

  
257
            base.Closed();
258
        }
259
    }
260
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseByStatusViewModel.cs
1

2
using System;
3
using System.Collections.Generic;
4
using System.ComponentModel;
5
using System.Linq;
6
using System.Text;
7
using System.Threading.Tasks;
8
using Markus.Service.Extensions;
9
using Markus.Message;
10
using Markus.Service.StationController.Extensions;
11
using Markus.Service.Interface;
12
using Markus.Service.StationController.Behaviors;
13

  
14
namespace Markus.Service.StationController.ViewModel
15
{
16
    public class DataBaseByStatusViewModel : Mvvm.ToolKit.ViewModelBase
17
    {
18
        BackgroundWorker backgroundWorker;
19

  
20
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> items;
21
        private ConvertItem selectItem;
22

  
23
        private StatusTypeList statusType;
24
        private bool isLoading;
25

  
26
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> Items
27
        {
28
            get => items; set
29
            {
30
                items = value;
31
                OnPropertyChanged(() => Items);
32
            }
33
        }
34

  
35
        public ConvertItem SelectItem
36
        {
37
            get => selectItem; set
38
            {
39
                selectItem = value;
40
                OnPropertyChanged(() => SelectItem);
41
            }
42
        }
43

  
44

  
45
        public StatusTypeList StatusType
46
        {
47
            get => statusType; set
48
            {
49
                statusType = value;
50
                OnPropertyChanged(() => StatusType);
51
            }
52
        }
53

  
54
        public bool IsLoading
55
        {
56
            get => isLoading; set
57
            {
58
                if (isLoading != value)
59
                {
60
                    isLoading = value;
61
                    OnPropertyChanged(() => IsLoading);
62
                }
63
            }
64
        }
65

  
66

  
67

  
68
        public DataBaseByStatusViewModel()
69
        {
70
        }
71

  
72
        // 진행률에 변화가 있을때 이벤트가 발생
73
        private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
74
        {
75
        }
76

  
77
        // 일이 모두 마쳤을때 수행되어야할 코드
78
        private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
79
        {
80
        }
81

  
82
        // BackgroundWorker에서 수행할 일을 정의.
83
        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
84
        {
85
            while (IsAcitve)
86
            {
87
                System.Threading.Thread.Sleep(1000);
88

  
89
                try
90
                {
91
                    IsLoading = true;
92

  
93
                    List<ConvertItem> newitems = new List<ConvertItem>();
94

  
95
                    using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
96
                    {
97
                        foreach (var status in statusType)
98
                        {
99
                            newitems.AddRange(database.GetConvertItems(status, x => x.TOTAL_PAGE > 100, 10));
100
                        }
101
                    }
102

  
103
                    if (Items == null)
104
                    {
105
                        Items = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
106

  
107
                        foreach (var item in newitems)
108
                        {
109
                            Items.Add(item);
110
                        }
111
                    }
112
                    else
113
                    {
114
                        /// 데이터 업데이트
115
                        newitems.ForEach(newitem =>
116
                        {
117
                            Items.UpdateWhere(changeitem => ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
118
                        });
119

  
120
                        // 추가
121
                        foreach (var item in newitems)
122
                        {
123
                            if (Items.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
124
                            {
125
                                Items.Add(item);
126
                            }
127
                        }
128

  
129
                        /// 삭제
130

  
131
                        for (int i = Items.Count() - 1; i > -1; --i)
132
                        {
133
                            var item = Items[i];
134

  
135
                            if (newitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
136
                            {
137
                                Items.RemoveAt(i);
138
                            }
139
                        }
140
                    }
141
                }
142
                catch (Exception ex)
143
                {
144
                    System.Diagnostics.Debug.WriteLine(ex.ToString());
145
                }
146
            }
147

  
148
        }
149

  
150
        public override void Loaded()
151
        {
152
            base.Loaded();
153

  
154
            if (!App.IsDesignMode)
155
            {
156
                backgroundWorker = new BackgroundWorker();
157
                backgroundWorker.DoWork += backgroundWorker_DoWork;
158
                backgroundWorker.RunWorkerCompleted += backgroundWorker_RunWorkerCompleted;
159
                backgroundWorker.WorkerReportsProgress = false;
160
                backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
161

  
162
                backgroundWorker.RunWorkerAsync();
163
            }
164
        }
165

  
166
        public override void Closed()
167
        {
168
            if (!App.IsDesignMode)
169
            {
170
                backgroundWorker.DoWork -= backgroundWorker_DoWork;
171
                backgroundWorker.RunWorkerCompleted -= backgroundWorker_RunWorkerCompleted;
172
                backgroundWorker.WorkerReportsProgress = false;
173
                backgroundWorker.ProgressChanged -= new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
174

  
175
                backgroundWorker.Dispose();
176
            }
177

  
178
            base.Closed();
179
        }
180
    }
181
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
1 1
using Markus.Message;
2
using Markus.Service.DataBase;
3 2
using Markus.Service.Extensions;
4 3
using Markus.Service.StationController.Data;
5 4
using Markus.Service.StationController.Behaviors;
......
24 23
using System.Windows.Data;
25 24
using System.Windows.Controls;
26 25
using System.IO;
26
using Newtonsoft.Json;
27 27

  
28 28
namespace Markus.Service.StationController.ViewModel
29 29
{
......
1228 1228
        {
1229 1229
            string[] ConvertPath = new string[2];
1230 1230
            ConvertPath[0] = GetConvertPath(PROJECT_NO, DOCUMENT_ID);
1231
            ConvertPath[1] = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech");
1231
            ConvertPath[1] = "kcom://" + CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech");
1232 1232

  
1233 1233
            return ConvertPath;
1234 1234
        }
......
1271 1271
            }
1272 1272
        }
1273 1273

  
1274
        public static string CreateMarkusParam(string projectNo, string documentID, string userID)
1275
        {
1276
            ViewInfo viewInfo = new ViewInfo();
1277

  
1278
            viewInfo.DocumentItemID = documentID;
1279
            viewInfo.ProjectNO = projectNo;
1280
            viewInfo.UserID = userID;
1281

  
1282
            return ParamEncoding(JsonConvert.SerializeObject(viewInfo));
1283

  
1284
        }
1285

  
1286
        public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null)
1287
        {
1288

  
1289
            if (oEncoding == null)
1290
                oEncoding = System.Text.Encoding.UTF8;
1291

  
1292
            return Convert.ToBase64String(oEncoding.GetBytes(EncodingText));
1293

  
1294
        }
1295

  
1274 1296
        #endregion
1275 1297

  
1276 1298
        #endregion
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/FinalPDFViewModel.cs
1 1
using Markus.Message;
2
using Markus.Service.DataBase;
3 2
using Markus.Service.Extensions;
4 3
using Markus.Service.StationController.Data;
5 4
using Markus.Service.StationController.Behaviors;
......
24 23
using System.Windows.Data;
25 24
using System.Windows.Controls;
26 25
using System.IO;
26
using Newtonsoft.Json;
27 27

  
28 28
namespace Markus.Service.StationController.ViewModel
29 29
{
......
1174 1174
        {
1175 1175
            string[] ConvertPath = new string[2];
1176 1176
            ConvertPath[0] = GetConvertPath(PROJECT_NO, DOCUMENT_ID);
1177
            ConvertPath[1] = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech");
1177
            ConvertPath[1] = "kcom://" + CreateMarkusParam(PROJECT_NO, DOCUMENT_ID, "doftech");
1178 1178

  
1179 1179
            return ConvertPath;
1180 1180
        }
1181 1181

  
1182
        public static string CreateMarkusParam(string projectNo, string documentID, string userID)
1183
        {
1184
            ViewInfo viewInfo = new ViewInfo();
1185

  
1186
            viewInfo.DocumentItemID = documentID;
1187
            viewInfo.ProjectNO = projectNo;
1188
            viewInfo.UserID = userID;
1189

  
1190
            return ParamEncoding(JsonConvert.SerializeObject(viewInfo));
1191

  
1192
        }
1193

  
1194
        public static string ParamEncoding(string EncodingText, System.Text.Encoding oEncoding = null)
1195
        {
1196

  
1197
            if (oEncoding == null)
1198
                oEncoding = System.Text.Encoding.UTF8;
1199

  
1200
            return Convert.ToBase64String(oEncoding.GetBytes(EncodingText));
1201

  
1202
        }
1203

  
1182 1204
        #region Convert Path
1183 1205

  
1184 1206
        private string GetConvertPath(string ProjectNo, string DocumentID)
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/MainViewModel.cs
87 87
                    Description = "FinalPDF Items",
88 88
                    Content = new Views.FinalPDFView()
89 89
                },
90

  
91
                //new MenuItem
92
                //{
93
                //    Name = "Process Alive Items",
94
                //    Description = "Convert Station Alive Items",
95
                //    Content = new Views.AliveView()
96
                //},
97

  
98
                //new MenuItem
99
                //{
100
                //    Name = "Convert Items",
101
                //    Description = "Convert Items",
102
                //    Content = new Views.MergeDataView()
103
                //},
104
                  new MenuItem
105
                {
106
                    Name = "Settings",
107
                    Description = "Convert Station Settings",
108
                    Content = new Views.SettingsView()
109
                }
110 90
            };
111 91

  
112 92
            SelectNavigationItem = NavigationItems.First();
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/ViewModel/SettingsViewModel.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Markus.Service.StationController.ViewModel
8
{
9
    public class SettingsViewModel : Mvvm.ToolKit.ViewModelBase
10
    {
11
        public SettingsViewModel()
12
        {
13
         
14
        }
15
    }
16
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/TotalStatusViewModel.cs
1
using Markus.Service.WcfClient.StationServiceTask;
2
using System;
3
using System.Collections.Generic;
4
using System.Collections.ObjectModel;
5
using System.ComponentModel;
6
using System.Linq;
7
using System.Text;
8
using System.Threading.Tasks;
9
using System.Web;
10

  
11
namespace Markus.Service.StationController.ViewModel
12
{
13
    public class TotalStatusViewModel : Mvvm.ToolKit.ViewModelBase
14
    {
15

  
16
        BackgroundWorker backgroundWorker;
17
        private System.Windows.Documents.FlowDocument connectionLog;
18
        private bool isLoading;
19

  
20
        public ObservableCollection<Data.StatusViewItem> items;
21

  
22
        public System.Collections.ObjectModel.ObservableCollection<Data.StatusViewItem> Items
23
        {
24
            get => items; set
25
            {
26
                items = value;
27
                OnPropertyChanged(() => Items);
28
            }
29
        }
30

  
31
        public bool IsLoading
32
        {
33
            get => isLoading; set
34
            {
35
                if (isLoading != value)
36
                {
37
                    isLoading = value;
38
                    OnPropertyChanged(() => IsLoading);
39
                }
40
            }
41
        }
42

  
43

  
44
        public System.Windows.Documents.FlowDocument ConnectionLog
45
        {
46
            get => connectionLog;
47
            set
48
            {
49
                if (connectionLog != value)
50
                {
51
                    connectionLog = value;
52
                    OnPropertyChanged(() => ConnectionLog);
53
                }
54
            }
55
        }
56

  
57
        public TotalStatusViewModel()
58
        {
59
        }
60

  
61
        // 진행률에 변화가 있을때 이벤트가 발생
62
        private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
63
        {
64
        }
65

  
66
        // 일이 모두 마쳤을때 수행되어야할 코드
67
        private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
68
        {
69
        }
70

  
71
        // BackgroundWorker에서 수행할 일을 정의.
72
        private async void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
73
        {
74
            while (IsAcitve)
75
            {
76
                System.Threading.Thread.Sleep(new TimeSpan(0, 0, 3));
77

  
78
                if (!IsLoading)
79
                {
80
                    IsLoading = true;
81

  
82
                    try
83
                    {
84

  
85
                        List<ConvertItem> newitems = new List<ConvertItem>();
86

  
87
                        foreach (var client in App.StationClientList)
88
                        {
89
                            if (await SimplePingAsync(client.Endpoint.Address.ToString()))
90
                            {
91
                                try
92
                                {
93
                                    var items = await client.AliveConvertListAsync();
94
                                    newitems.AddRange(items);
95
                                    System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} ping");
96

  
97
                                    if (items.Count() == 0)
98
                                    {
99
                                        System.Diagnostics.Trace.WriteLine($"{client.Endpoint.Address} Alive Items is zero.");
100
                                    }
101
                                }
102
                                catch (Exception ex)
103
                                {
104
                                    System.Diagnostics.Trace.TraceError($"{client.Endpoint.Address} {ex.Message}");
105
                                }
106
                            }
107
                            else
108
                            {
109
                                System.Diagnostics.Trace.TraceError($"{client.Endpoint.Address} ping Error");
110
                            }
111
                        }
112

  
113
                    }
114
                    catch (Exception ex)
115
                    {
116
                        System.Diagnostics.Debug.WriteLine(ex.ToString());
117
                    }
118

  
119
                    IsLoading = false;
120
                }
121

  
122
            }
123
        }
124

  
125

  
126
        private void LogWrite(string log, bool IsError)
127
        {
128
            if (IsError)
129
            {
130
                System.Diagnostics.Trace.Fail(log);
131
            }
132
            else
133
            {
134
                System.Diagnostics.Trace.TraceInformation(log);
135
            }
136
        }
137

  
138

  
139
        public static async Task<bool> SimplePingAsync(string uri)
140
        {
141
            bool result = false;
142

  
143
            try
144
            {
145
                using (System.Net.Http.HttpClient Client = new System.Net.Http.HttpClient())
146
                {
147
                    Client.Timeout = new TimeSpan(0, 5, 0);
148

  
149
                    var message = await Client.GetAsync(uri);
150

  
151
                    System.Net.HttpStatusCode StatusCode = message.StatusCode;
152

  
153
                    switch (StatusCode)
154
                    {
155

  
156
                        case System.Net.HttpStatusCode.Accepted:
157
                        case System.Net.HttpStatusCode.OK:
158
                            result = true;
159
                            break;
160
                    }
161
                }
162
            }
163
            catch (Exception ex)
164
            {
165
                result = false;
166
                System.Diagnostics.Debug.WriteLine(ex.ToString());
167
            }
168

  
169
            return result;
170
        }
171

  
172
        public override void Loaded()
173
        {
174
            base.Loaded();
175

  
176
            if (!App.IsDesignMode)
177
            {
178
                backgroundWorker = new BackgroundWorker();
179
                backgroundWorker.DoWork += backgroundWorker_DoWork;
180
                backgroundWorker.RunWorkerCompleted += backgroundWorker_RunWorkerCompleted;
181
                backgroundWorker.WorkerReportsProgress = false;
182
                backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
183

  
184
                backgroundWorker.RunWorkerAsync();
185
            }
186
        }
187

  
188
        public override void Closed()
189
        {
190
            if (backgroundWorker != null)
191
            {
192
                backgroundWorker.DoWork -= backgroundWorker_DoWork;
193
                backgroundWorker.RunWorkerCompleted -= backgroundWorker_RunWorkerCompleted;
194
                backgroundWorker.WorkerReportsProgress = false;
195
                backgroundWorker.ProgressChanged -= new ProgressChangedEventHandler(backgroundWorker_ProgressChanged);
196

  
197
                backgroundWorker.Dispose();
198
            }
199

  
200
            base.Closed();
201
        }
202
    }
203
}
ConvertService/ServiceBase/Markus.Service.StationController/Views/AliveView.xaml
1
<UserControl x:Class="Markus.Service.StationController.Views.AliveView"
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6
             mc:Ignorable="d" 
7
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
8
              xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
9
              xmlns:vm="clr-namespace:Markus.Service.StationController.ViewModel"
10
             xmlns:Behaviors="clr-namespace:Markus.Service.StationController.Behaviors"
11
             xmlns:controls="clr-namespace:Markus.Service.StationController.Controls"
12
             Background="White"
13
             d:DesignHeight="800" d:DesignWidth="800">
14
    <UserControl.DataContext>
15
        <vm:AliveViewModel/>
16
    </UserControl.DataContext>
17
    <i:Interaction.Triggers>
18
        <i:EventTrigger  EventName="Loaded">
19
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
20
        </i:EventTrigger>
21
        <i:EventTrigger  EventName="Unloaded">
22
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
23
        </i:EventTrigger>
24
    </i:Interaction.Triggers>
25
    <Grid>
26
        <Grid.RowDefinitions>
27
            <RowDefinition Height="Auto"/>
28
            <RowDefinition Height="7*"/>
29
            <RowDefinition Height="Auto" MinHeight="150" MaxHeight="200"/>
30
            <RowDefinition Height="Auto"/>
31
        </Grid.RowDefinitions>
32
        <Grid>
33
            <Grid.RowDefinitions>
34
                <RowDefinition Height="Auto"/>
35
                <RowDefinition Height="Auto"/>
36
            </Grid.RowDefinitions>
37
            <Grid.ColumnDefinitions>
38
                <ColumnDefinition Width="Auto"/>
39
                <ColumnDefinition Width="Auto"/>
40
            </Grid.ColumnDefinitions>
41
        </Grid>
42
        <Grid>
43
            <Grid.ColumnDefinitions>
44
                <ColumnDefinition/>
45
                <ColumnDefinition/>
46
                <ColumnDefinition/>
47
                <ColumnDefinition/>
48
                <ColumnDefinition/>
49
            </Grid.ColumnDefinitions>
50
            <GroupBox Header="" Margin="3" BorderThickness="0">
51
                <TextBlock/>
52
            </GroupBox>
53
            <GroupBox Header="" Grid.Column="1" Margin="3" BorderThickness="0">
54
                <TextBlock/>
55
            </GroupBox>
56
            <GroupBox Header="" Grid.Column="2" Margin="3" BorderThickness="0">
57
                <TextBlock/>
58
            </GroupBox>
59
            <GroupBox Header="" Grid.Column="3" Margin="3" BorderThickness="0">
60
                <TextBlock/>
61
            </GroupBox>
62
            <GroupBox Header="" Grid.Column="4" Margin="3" BorderThickness="0">
63
                <TextBlock/>
64
            </GroupBox>
65
        </Grid>
66
        <GroupBox Grid.Row="1"
67
                  Header="Alive Items" Margin="3" BorderThickness="0" 
68
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
69
            <telerik:RadGridView ItemsSource="{Binding AliveItems}" AutoGenerateColumns="False"
70
                  x:Name="DataGrid" ScrollViewer.CanContentScroll="False">
71
                <telerik:RadGridView.Columns>
72
                    <controls:RowIndexColumn Header="#" Width="30" CellStyle="{StaticResource RowNumberStyle}" />
73
                    <telerik:GridViewDataColumn  Header="Service ID" DataMemberBinding="{Binding ServiceID}"/>
74
                    <telerik:GridViewDataColumn  Header="Convert ID" DataMemberBinding="{Binding ConvertID}"/>
75
                    <telerik:GridViewDataColumn  Header="Project No" DataMemberBinding="{Binding ProjectNumber}"/>
76
                    <telerik:GridViewDataColumn  Header="Status" DataMemberBinding="{Binding ConvertState}"/>
77
                    <telerik:GridViewDataColumn  Header="Current Page" DataMemberBinding="{Binding CurrentPageNo}"/>
78
                    <telerik:GridViewDataColumn  Header="TotalPage" DataMemberBinding="{Binding TotalPage}"/>
79
                    <telerik:GridViewDataColumn  Header="Originfile" DataMemberBinding="{Binding OriginfilePath}"/>
80
                    <telerik:GridViewDataColumn  Header="Output Path" DataMemberBinding="{Binding ConvertPath}"/>
81
                </telerik:RadGridView.Columns>
82
            </telerik:RadGridView>
83
        </GroupBox>
84

  
85
        <Grid  Grid.Row="2">
86
            <RichTextBox IsReadOnly="True" AllowDrop="False" VerticalScrollBarVisibility="Visible"
87
                         IsUndoEnabled="False" HorizontalScrollBarVisibility="Auto"
88
                         Height="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}"
89
                         Width="{Binding ActualWidth, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}">
90
                <controls:TraceDocument PageWidth="{Binding ActualWidth, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}"
91
                                        PageHeight="{Binding ActualHeight, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}"/>
92
            </RichTextBox>
93
        </Grid>
94

  
95
        <ProgressBar Grid.Row="3" IsIndeterminate="{Binding IsLoading}" Height="5"/>
96
    </Grid>
97
</UserControl>
98
    <!--
99
<UserControl x:Class="Markus.Service.StationController.Views.AliveView"
100
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
101
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
102
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
103
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
104
             mc:Ignorable="d" 
105
             Background="White"
106
             d:DesignHeight="800" d:DesignWidth="800">
107
    <Grid>
108

  
109
    </Grid>
110
</UserControl>
111
    -->
ConvertService/ServiceBase/Markus.Service.StationController/Views/AliveView.xaml.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Windows;
7
using System.Windows.Controls;
8
using System.Windows.Data;
9
using System.Windows.Documents;
10
using System.Windows.Input;
11
using System.Windows.Media;
12
using System.Windows.Media.Imaging;
13
using System.Windows.Navigation;
14
using System.Windows.Shapes;
15

  
16
namespace Markus.Service.StationController.Views
17
{
18
    /// <summary>
19
    /// AliveView.xaml에 대한 상호 작용 논리
20
    /// </summary>
21
    public partial class AliveView : UserControl
22
    {
23
        public AliveView()
24
        {
25
            InitializeComponent();
26
        }
27
    }
28
}
ConvertService/ServiceBase/Markus.Service.StationController/Views/ConvertAddDialog.xaml
3 3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
5 5
        xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel"
6
        Header="Convert Items Insert" Height="300" Width="500" >
6
        Header="Convert Items Insert" Height="300" Width="500" telerik:StyleManager.Theme="VisualStudio2013" >
7 7
    <telerik:RadWindow.DataContext>
8 8
        <VM:ConvertAddDialogViewModel/>
9 9
    </telerik:RadWindow.DataContext>
......
52 52
        </Grid.Resources>
53 53

  
54 54
        <Grid x:Name="LayoutRoot" Background="White">
55
            <Grid.ColumnDefinitions>
56
                <ColumnDefinition Width="128*"/>
57
                <ColumnDefinition Width="353*"/>
58
            </Grid.ColumnDefinitions>
55 59
            <Grid.RowDefinitions>
56 60
                <RowDefinition />
57 61
                <RowDefinition Height="Auto" />
58 62
                <RowDefinition Height="Auto" />
59 63
            </Grid.RowDefinitions>
60 64

  
61
            <Grid Grid.Row="0" Margin="10">
65
            <Grid Grid.Row="0" Margin="10" Grid.ColumnSpan="2">
62 66
                <Grid.ColumnDefinitions>
63 67
                    <ColumnDefinition Width="90" />
64 68
                    <ColumnDefinition Width="10" />
......
72 76
                    <RowDefinition Height="25"/>
73 77
                    <RowDefinition Height="25"/>
74 78
                </Grid.RowDefinitions>
75
                    <TextBlock Grid.Row="0" Text="Project NO" />
79
                <TextBlock Grid.Row="0" Text="Project NO" />
76 80
                <TextBlock Grid.Row="0" Grid.Column="4" Text="DOCUMENT ID" />
77 81
                <TextBlock Grid.Row="1" Grid.Column="0" Text="Document URL" />
78
 
82

  
79 83
                <TextBox Text="{Binding ConverAdd_Project_NO, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="2" />
80 84
                <TextBox Text="{Binding ConverAdd_DOCUMENT_ID, Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="0" Grid.Column="6" />
81 85
                <TextBox Text="{Binding ConverAdd_DOCUMENT_URL,  Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="5"/>
82 86
            </Grid>
83
            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0 0 0 10">
87
            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0 0 0 10" Grid.Column="1">
84 88

  
85 89
                <telerik:RadButton Content=" SEND" MinWidth="50" Margin="8 0" VerticalAlignment="Center"
86 90
							   Command="{Binding ConverAdd_OKCommand , Mode=TwoWay}" />
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseByStatusView.xaml
1
<UserControl x:Name="userControl" x:Class="Markus.Service.StationController.Views.DataBaseByStatusView"
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6
             mc:Ignorable="d" 
7
             xmlns:markusMsg="clr-namespace:Markus.Message;assembly=Markus.Message"
8
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
9
              xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
10
              xmlns:vm="clr-namespace:Markus.Service.StationController.ViewModel"
11
             d:DesignHeight="450" d:DesignWidth="800">
12
    <UserControl.DataContext>
13
        <vm:DataBaseByStatusViewModel/>
14
    </UserControl.DataContext>
15
    <i:Interaction.Triggers>
16
        <i:EventTrigger  EventName="Loaded">
17
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
18
        </i:EventTrigger>
19
        <i:EventTrigger  EventName="Unloaded">
20
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
21
        </i:EventTrigger>
22
    </i:Interaction.Triggers>
23
    <Grid>
24

  
25
        <Grid.RowDefinitions>
26
            <RowDefinition Height="*"/>
27
            <RowDefinition Height="Auto"/>
28
        </Grid.RowDefinitions>
29
        <telerik:RadGridView ItemsSource="{Binding Items}" AutoGenerateColumns="False"
30
                             SelectedItem="{Binding SelectedItem,Mode=TwoWay, ElementName=userControl}"
31
                  x:Name="DataGrid" ScrollViewer.CanContentScroll="False">
32
            <telerik:RadGridView.Columns>
33
                <telerik:GridViewDataColumn  Header="Service ID" DataMemberBinding="{Binding ServiceID}"/>
34
                <telerik:GridViewDataColumn  Header="Convert ID" DataMemberBinding="{Binding ConvertID}"/>
35
                <telerik:GridViewDataColumn  Header="Project No" DataMemberBinding="{Binding ProjectNumber}"/>
36
                <telerik:GridViewDataColumn  Header="Status" DataMemberBinding="{Binding ConvertState}"/>
37
                <telerik:GridViewDataColumn  Header="Current Page" DataMemberBinding="{Binding CurrentPageNo}"/>
38
                <telerik:GridViewDataColumn  Header="TotalPage" DataMemberBinding="{Binding TotalPage}"/>
39
                <telerik:GridViewDataColumn  Header="Originfile" DataMemberBinding="{Binding OriginfilePath}"/>
40
                <telerik:GridViewDataColumn  Header="Output Path" DataMemberBinding="{Binding ConvertPath}"/>
41
            </telerik:RadGridView.Columns>
42
        </telerik:RadGridView>
43
        <ProgressBar Grid.Row="1" IsIndeterminate="{Binding IsLoading}" Height="5"/>
44
    </Grid>
45
</UserControl>
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseByStatusView.xaml.cs
1
using Markus.Message;
2
using System;
3
using System.Collections.Generic;
4
using System.Linq;
5
using System.Text;
6
using System.Threading.Tasks;
7
using System.Windows;
8
using System.Windows.Controls;
9
using System.Windows.Data;
10
using System.Windows.Documents;
11
using System.Windows.Input;
12
using System.Windows.Media;
13
using System.Windows.Media.Imaging;
14
using System.Windows.Navigation;
15
using System.Windows.Shapes;
16

  
17
namespace Markus.Service.StationController.Views
18
{
19
    /// <summary>
20
    /// AliveView.xaml에 대한 상호 작용 논리
21
    /// </summary>
22
    public partial class DataBaseByStatusView : UserControl
23
    {
24
        public DataBaseByStatusView()
25
        {
26
            InitializeComponent();
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
42
    }
43
}
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseView.xaml
28 28
        <Style TargetType="{x:Type controls:RowIndexColumn}">
29 29
            <Setter Property="TextAlignment" Value="Center"/>
30 30
        </Style>
31
        <Style TargetType="{x:Type TextBox}">
32
            <Setter Property="Margin" Value="5,5,0,0"/>
33
            <Setter Property="VerticalAlignment" Value="Center"/>
34
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
35
            <Setter Property="Foreground" Value="Black"/>
36
            <Setter Property="Background" Value="Transparent"/>
37
            <Setter Property="BorderBrush" Value="Transparent"/>
38
            <Setter Property="BorderThickness" Value="0"/>
39
            <Setter Property="IsReadOnly" Value="true"/>
40
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
41
            <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
42
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
43
            <Setter Property="Template">
44
                <Setter.Value>
45
                    <ControlTemplate TargetType="{x:Type TextBox}">
46
                        <Border x:Name="Bd" 
47
                    BorderThickness="{TemplateBinding BorderThickness}" 
48
                    SnapsToDevicePixels="true">
49
                            <ScrollViewer x:Name="PART_ContentHost" BorderThickness="{TemplateBinding BorderThickness}"
50
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
51
                        </Border>
52
                    </ControlTemplate>
53
                </Setter.Value>
54
            </Setter>
55
        </Style>
31 56
        <VM:DataBaseItemsModel x:Key="DataBaseItemsModel"/>
32 57
        <DataTemplate x:Key="RowDetailsTemplate">
33 58
            <local:DataBaseViewInfo />
......
81 106

  
82 107
                <DockPanel LastChildFill="True">
83 108
                    <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" Grid.Row="1" MaxHeight="{Binding DataBase_ItemsHeight, Mode=OneWay}"
84
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"  ScrollViewer.VerticalScrollBarVisibility="Auto"  IsExpanded="True" 
109
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"  ScrollViewer.VerticalScrollBarVisibility="Auto"  IsExpanded="True" HorizontalAlignment="Stretch"
110
                                         VerticalAlignment="Stretch"
85 111
                             telerik:AnimationManager.IsAnimationEnabled="False" >
86 112
                        <telerik:RadExpander.Header>
87 113
                            <Grid>
......
98 124
							 ItemsSource="{Binding FilterConvertSourceView}" 
99 125
                             SelectedItem="{Binding SelectFilterConvert, Mode=TwoWay}"
100 126
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"  
101
							 AutoGenerateColumns="False"
127
							 AutoGenerateColumns="False" 
102 128
                             ColumnWidth="*" CanUserFreezeColumns="False"
103 129
                             Grid.Row="1"  ScrollViewer.CanContentScroll="True" IsFilteringAllowed="True"
104 130
                             LeftFrozenColumnCount="6" 
......
158 184
                </DockPanel>
159 185
                
160 186
                <telerik:RadExpander Grid.Row="2" ExpandDirection="Down" BorderThickness="0"  MaxHeight="{Binding RealConvert_Height,Mode=OneWay}"
161
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
187
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch"
188
                                         VerticalAlignment="Stretch"
162 189
                             telerik:AnimationManager.IsAnimationEnabled="False" IsExpanded ="{Binding ConvertShow, Mode=TwoWay}">
163 190
                    <telerik:RadExpander.Header>
164 191
                        <Grid>
......
233 260
                    </telerik:RadGridView>
234 261
                </telerik:RadExpander>
235 262

  
236
                <telerik:RadExpander Grid.Row="3" ExpandDirection="Down" BorderThickness="0"  VerticalAlignment="Stretch"
263
                <telerik:RadExpander Grid.Row="3" ExpandDirection="Down" BorderThickness="0"  VerticalAlignment="Stretch" 
237 264
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"  MaxHeight="{Binding Alive_Height,Mode=OneWay}"
238 265
                             telerik:AnimationManager.IsAnimationEnabled="False"  IsExpanded ="False">
239 266
                    <telerik:RadExpander.Header>
ConvertService/ServiceBase/Markus.Service.StationController/Views/FinalPDFAddDialog.xaml
3 3
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
5 5
        xmlns:VM="clr-namespace:Markus.Service.StationController.ViewModel" 
6
        Header="FinalPDFAddDialog" Height="300" Width="500">
6
        Header="FinalPDFAddDialog" Height="300" Width="500" telerik:StyleManager.Theme="VisualStudio2013">
7 7
    <telerik:RadWindow.DataContext>
8 8
        <VM:FinalPDFAddDialogViewModel/>
9 9
    </telerik:RadWindow.DataContext>
ConvertService/ServiceBase/Markus.Service.StationController/Views/FinalPDFView.xaml
27 27
        <Style TargetType="{x:Type controls:RowIndexColumn}">
28 28
            <Setter Property="TextAlignment" Value="Center"/>
29 29
        </Style>
30
        <Style TargetType="{x:Type TextBox}">
31
            <Setter Property="Margin" Value="5,5,0,0"/>
32
            <Setter Property="VerticalAlignment" Value="Center"/>
33
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
34
            <Setter Property="Foreground" Value="Black"/>
35
            <Setter Property="Background" Value="Transparent"/>
36
            <Setter Property="BorderBrush" Value="Transparent"/>
37
            <Setter Property="BorderThickness" Value="0"/>
38
            <Setter Property="IsReadOnly" Value="true"/>
39
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
40
            <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
41
            <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
42
            <Setter Property="Template">
43
                <Setter.Value>
44
                    <ControlTemplate TargetType="{x:Type TextBox}">
45
                        <Border x:Name="Bd" 
46
                    BorderThickness="{TemplateBinding BorderThickness}" 
47
                    SnapsToDevicePixels="true">
48
                            <ScrollViewer x:Name="PART_ContentHost" BorderThickness="{TemplateBinding BorderThickness}"
49
                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
50
                        </Border>
51
                    </ControlTemplate>
52
                </Setter.Value>
53
            </Setter>
54
        </Style>
55
     
30 56
        <VM:FinalPDFViewModel x:Key="FinalPDFViewModel"/>
31 57
        <DataTemplate x:Key="RowDetailsTemplate">
32 58
            <local:FinalPDFInfo />
......
243 269
                                <telerik:GridViewDataColumn Header=" ConvertPath"
244 270
											DataMemberBinding="{Binding ConvertPath}" Width="2.5*" />
245 271
                                <telerik:GridViewDataColumn Header="CreateTime" 
246
											DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
272
											DataMemberBinding="{Binding CreateTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*"  />
247 273
                                <telerik:GridViewDataColumn Header="StartTime" 
248 274
											DataMemberBinding="{Binding StartTime, Mode=TwoWay, StringFormat=\{0:yyyy.MM.dd HH:mm:ss\}}" Width="*" />
249 275
                                <telerik:GridViewDataColumn Header="EndTime" 
ConvertService/ServiceBase/Markus.Service.StationController/Views/MergeDataView.xaml
1
<UserControl xmlns:Views="clr-namespace:Markus.Service.StationController.Views" 
2
             x:Class="Markus.Service.StationController.Views.MergeDataView"
3
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
6
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
7
             xmlns:markus="clr-namespace:Markus.Message;assembly=Markus.Message"
8
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
9
             xmlns:local="clr-namespace:Markus.Service.StationController.ViewModel"
10
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
11
             xmlns:Behaviors="clr-namespace:Markus.Service.StationController.Behaviors"
12
             mc:Ignorable="d" Background="White"
13
             xmlns:viewmodel="clr-namespace:Markus.Service.StationController.ViewModel"
14
             d:DesignHeight="450" d:DesignWidth="800">
15
    <UserControl.Resources>
16
        <viewmodel:MergeDataViewModel x:Key="ViewModel"/>
17
        <Behaviors:StatusTypeList x:Key="ErrorFilter">
18
            <markus:StatusCodeType>Error</markus:StatusCodeType>
19
            <markus:StatusCodeType>FileError</markus:StatusCodeType>
20
            <markus:StatusCodeType>PageError</markus:StatusCodeType>
21
        </Behaviors:StatusTypeList>
22
        <Behaviors:StatusTypeList x:Key="ComplatedFilter">
23
            <markus:StatusCodeType>Completed</markus:StatusCodeType>
24
        </Behaviors:StatusTypeList>
25
    </UserControl.Resources>
26
    <Grid>
27
        <Grid.RowDefinitions>
28
            <RowDefinition Height="3.5*"/>
29
            <RowDefinition Height="3.5*"/>
30
            <RowDefinition Height="3.5*"/>
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)