개정판 69ef0800
CheckList Status 팝업창 추가
프로그램 종료시 Confirm창 추가
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
287 | 287 |
} |
288 | 288 |
} |
289 | 289 |
|
290 |
private string _CheckStatus { get; set; } |
|
291 |
public string CheckStatus |
|
292 |
{ |
|
293 |
get |
|
294 |
{ |
|
295 |
return _CheckStatus; |
|
296 |
} |
|
297 |
set |
|
298 |
{ |
|
299 |
_CheckStatus = value; |
|
300 |
OnPropertyChanged("CheckStatus"); |
|
301 |
} |
|
302 |
} |
|
303 |
|
|
304 |
|
|
305 |
|
|
290 | 306 |
//private bool _IsPageChanged { get; set; } |
291 | 307 |
//public bool IsPageChanged |
292 | 308 |
//{ |
KCOM/Controls/CheckList.xaml.cs | ||
---|---|---|
86 | 86 |
int Current_Slip = 0; |
87 | 87 |
bool Isinit = false; |
88 | 88 |
int rev_cnt = 1; |
89 |
bool isCheck_Status = false; |
|
90 |
string Select_StatusID = ""; |
|
89 | 91 |
#endregion |
90 | 92 |
|
91 | 93 |
#region 생성자 |
... | ... | |
859 | 861 |
|
860 | 862 |
private void Radio_Close_Checked(object sender, RoutedEventArgs e) |
861 | 863 |
{ |
862 |
//if (tb.FilterDescriptors.Count > 0) |
|
863 |
//{ |
|
864 |
// Filter_Set(); |
|
865 |
//} |
|
864 |
if (Isinit) |
|
865 |
{ |
|
866 |
if (!isCheck_Status) |
|
867 |
{ |
|
868 |
Select_StatusID = ((e.Source as RadioButton).DataContext as Customer).ID; |
|
869 |
|
|
870 |
isCheck_Status = true; |
|
871 |
|
|
872 |
RadWindow CheckPop = new RadWindow(); |
|
873 |
|
|
874 |
CheckList_Status check = new CheckList_Status(); |
|
875 |
|
|
876 |
CheckPop = new RadWindow |
|
877 |
{ |
|
878 |
MinWidth = 350, |
|
879 |
MinHeight = 150, |
|
880 |
Header = "Status Description을 입력하세요", |
|
881 |
Content = check, |
|
882 |
ResizeMode = System.Windows.ResizeMode.NoResize, |
|
883 |
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen, |
|
884 |
IsTopmost = true, |
|
885 |
}; |
|
886 |
StyleManager.SetTheme(CheckPop, new Office2013Theme()); |
|
887 |
CheckPop.Closed += CheckPop_Closed; |
|
888 |
CheckPop.Show(); |
|
889 |
|
|
890 |
Isinit = false; |
|
891 |
tb.Rebind(); |
|
892 |
} |
|
893 |
} |
|
866 | 894 |
|
867 | 895 |
(e.Source as RadioButton).FontWeight = FontWeights.Bold; |
868 | 896 |
|
... | ... | |
870 | 898 |
{ |
871 | 899 |
((((e.OriginalSource as RadioButton).Parent as StackPanel).Parent as GridViewCell).ParentRow.Item as Customer)._STATUS = "Close"; |
872 | 900 |
} |
901 |
} |
|
873 | 902 |
|
874 |
if (Isinit) |
|
903 |
private void CheckPop_Closed(object sender, WindowClosedEventArgs e) |
|
904 |
{ |
|
905 |
isCheck_Status = false; |
|
906 |
|
|
907 |
foreach(var item in tb.Items) |
|
875 | 908 |
{ |
876 |
Isinit = false; |
|
877 |
if ((e.Source as RadioButton).DataContext != null) |
|
909 |
if(Select_StatusID == (item as Customer).ID.ToString()) |
|
878 | 910 |
{ |
879 |
if (((e.Source as RadioButton).DataContext as Customer).STATUS_DESC != "Vendor 반영 확인")
|
|
911 |
if (ViewerDataModel.Instance.CheckStatus != "" && ViewerDataModel.Instance.CheckStatus != null)
|
|
880 | 912 |
{ |
881 |
((e.Source as RadioButton).DataContext as Customer).STATUS_DESC = "Vendor 반영 확인"; |
|
882 |
//tb.ItemsSource = null; |
|
883 |
//tb.ItemsSource = Lists; |
|
884 |
tb.Rebind(); |
|
913 |
(item as Customer).STATUS_DESC = ViewerDataModel.Instance.CheckStatus; |
|
914 |
} |
|
915 |
else |
|
916 |
{ |
|
917 |
(item as Customer).STATUS = "False"; |
|
918 |
(item as Customer)._STATUS = "Open"; |
|
919 |
(item as Customer).STATUS_ = "True"; |
|
885 | 920 |
} |
921 |
|
|
922 |
ViewerDataModel.Instance.CheckStatus = ""; |
|
923 |
Select_StatusID = ""; |
|
924 |
tb.Rebind(); |
|
925 |
return; |
|
886 | 926 |
} |
887 | 927 |
} |
888 |
this.Focus(); |
|
928 |
|
|
889 | 929 |
} |
890 | 930 |
|
891 | 931 |
private void Radio_Unchecked(object sender, RoutedEventArgs e) |
... | ... | |
999 | 1039 |
} |
1000 | 1040 |
|
1001 | 1041 |
#endregion |
1002 |
|
|
1003 |
#region 불필요 해짐 |
|
1004 |
|
|
1005 |
//private void RadGridView1_Loaded(object sender, RoutedEventArgs e) |
|
1006 |
//{ |
|
1007 |
// (sender as Telerik.Windows.Controls.RadGridView).ItemsSource = Lists; |
|
1008 |
//} |
|
1009 |
|
|
1010 |
//private void Tb1_ScrollEvent(object sender, ScrollChangedEventArgs e) |
|
1011 |
//{ |
|
1012 |
// if ((e.Source as GridViewScrollViewer) == null) |
|
1013 |
// return; |
|
1014 |
|
|
1015 |
// if (this.tb1.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault() != null) |
|
1016 |
// { |
|
1017 |
// this.tb1.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset((e.Source as GridViewScrollViewer).VerticalOffset); |
|
1018 |
// } |
|
1019 |
//} |
|
1020 |
|
|
1021 |
//private void Tb2_ScrollEvent(object sender, ScrollChangedEventArgs e) |
|
1022 |
//{ |
|
1023 |
// if ((e.Source as GridViewScrollViewer) == null) |
|
1024 |
// return; |
|
1025 |
|
|
1026 |
// this.tb.ChildrenOfType<GridViewScrollViewer>().FirstOrDefault().ScrollToVerticalOffset((e.Source as GridViewScrollViewer).VerticalOffset); |
|
1027 |
//} |
|
1028 |
|
|
1029 |
//private void tb_Sorted(object sender, GridViewSortedEventArgs e) |
|
1030 |
//{ |
|
1031 |
// Sort_Set(); |
|
1032 |
//} |
|
1033 |
|
|
1034 |
//private void tb_Filtered(object sender, GridViewFilteredEventArgs e) |
|
1035 |
//{ |
|
1036 |
|
|
1037 |
//} |
|
1038 |
|
|
1039 |
//private void Filter_Set() |
|
1040 |
//{ |
|
1041 |
// if (tb.FilterDescriptors.ToString().ToLower().Contains("open") || tb.FilterDescriptors.ToString().ToLower().Contains("close")) |
|
1042 |
// { |
|
1043 |
// if (tb.FilterDescriptors.ToString().ToLower().Contains("open") && tb.FilterDescriptors.ToString().ToLower().Contains("close")) |
|
1044 |
// { |
|
1045 |
// Lists = tb.ItemsSource as List<Customer>; |
|
1046 |
// } |
|
1047 |
// else if (tb.FilterDescriptors.ToString().ToLower().Contains("open")) |
|
1048 |
// { |
|
1049 |
// Lists = Lists.Where(data => data._STATUS.ToLower() == "open").ToList(); |
|
1050 |
// } |
|
1051 |
// else |
|
1052 |
// { |
|
1053 |
// Lists = Lists.Where(data => data._STATUS.ToLower() == "close").ToList(); |
|
1054 |
// } |
|
1055 |
// } |
|
1056 |
// else |
|
1057 |
// { |
|
1058 |
// Lists = tb.ItemsSource as List<Customer>; |
|
1059 |
// } |
|
1060 |
|
|
1061 |
// tb1.ItemsSource = null; |
|
1062 |
// tb1.ItemsSource = Lists; |
|
1063 |
//} |
|
1064 |
|
|
1065 |
//private void Sort_Set() |
|
1066 |
//{ |
|
1067 |
// if (tb.SortDescriptors.Count > 0) |
|
1068 |
// { |
|
1069 |
// string Orderby = tb.SortDescriptors.FirstOrDefault().SortDirection.ToString(); |
|
1070 |
|
|
1071 |
// if (Orderby.ToLower() == "ascending") |
|
1072 |
// { |
|
1073 |
// switch ((tb.SortDescriptors.FirstOrDefault() as ColumnSortDescriptor).Column.UniqueName) |
|
1074 |
// { |
|
1075 |
// case ("PAGENUMBER"): |
|
1076 |
// { |
|
1077 |
// Lists = Lists.OrderBy(info => info.PAGENUMBER).ToList(); |
|
1078 |
// } |
|
1079 |
// break; |
|
1080 |
// case ("REVISION"): |
|
1081 |
// { |
|
1082 |
// Lists = Lists.OrderBy(info => info.REVISION).ToList(); |
|
1083 |
// } |
|
1084 |
// break; |
|
1085 |
// case ("TODOLIST"): |
|
1086 |
// { |
|
1087 |
// Lists = Lists.OrderBy(info => info.TODOLIST).ToList(); |
|
1088 |
// } |
|
1089 |
// break; |
|
1090 |
// case ("STATUS_DESC"): |
|
1091 |
// { |
|
1092 |
// Lists = Lists.OrderBy(info => info.STATUS_DESC).ToList(); |
|
1093 |
// } |
|
1094 |
// break; |
|
1095 |
// case ("_STATUS"): |
|
1096 |
// { |
|
1097 |
// Lists = Lists.OrderBy(info => info._STATUS).ToList(); |
|
1098 |
// } |
|
1099 |
// break; |
|
1100 |
// } |
|
1101 |
// } |
|
1102 |
// else |
|
1103 |
// { |
|
1104 |
// switch ((tb.SortDescriptors.FirstOrDefault() as ColumnSortDescriptor).Column.UniqueName) |
|
1105 |
// { |
|
1106 |
// case ("PAGENUMBER"): |
|
1107 |
// { |
|
1108 |
// Lists = Lists.OrderByDescending(info => info.PAGENUMBER).ToList(); |
|
1109 |
// } |
|
1110 |
// break; |
|
1111 |
// case ("REVISION"): |
|
1112 |
// { |
|
1113 |
// Lists = Lists.OrderByDescending(info => info.REVISION).ToList(); |
|
1114 |
// } |
|
1115 |
// break; |
|
1116 |
// case ("TODOLIST"): |
|
1117 |
// { |
|
1118 |
// Lists = Lists.OrderByDescending(info => info.TODOLIST).ToList(); |
|
1119 |
// } |
|
1120 |
// break; |
|
1121 |
// case ("STATUS_DESC"): |
|
1122 |
// { |
|
1123 |
// Lists = Lists.OrderByDescending(info => info.STATUS_DESC).ToList(); |
|
1124 |
// } |
|
1125 |
// break; |
|
1126 |
// case ("_STATUS"): |
|
1127 |
// { |
|
1128 |
// Lists = Lists.OrderByDescending(info => info._STATUS).ToList(); |
|
1129 |
// } |
|
1130 |
// break; |
|
1131 |
// } |
|
1132 |
// } |
|
1133 |
// } |
|
1134 |
// else |
|
1135 |
// { |
|
1136 |
// Lists = Lists.OrderBy(p => p.CREATE_TIME).ToList(); |
|
1137 |
// } |
|
1138 |
|
|
1139 |
// tb1.ItemsSource = null; |
|
1140 |
// tb1.ItemsSource = Lists; |
|
1141 |
// //tb1.Rebind(); |
|
1142 |
//} |
|
1143 |
|
|
1144 |
//private void tb_RowValidating(object sender, GridViewRowValidatingEventArgs e) |
|
1145 |
//{ |
|
1146 |
// if (tb.SortDescriptors.Count > 0) |
|
1147 |
// { |
|
1148 |
// Sort_Set(); |
|
1149 |
// } |
|
1150 |
//} |
|
1151 |
|
|
1152 |
#endregion |
|
1153 | 1042 |
} |
1154 | 1043 |
} |
KCOM/Controls/CheckList_Status.xaml | ||
---|---|---|
1 |
<UserControl x:Class="KCOM.Controls.CheckList_Status" |
|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
3 |
xmlns:telerik="http://schemas.telerik.com/2008/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:local="clr-namespace:KCOM.Controls" |
|
8 |
mc:Ignorable="d" |
|
9 |
d:DesignHeight="300" d:DesignWidth="300"> |
|
10 |
<Grid Background="White"> |
|
11 |
<Grid> |
|
12 |
<Grid.RowDefinitions> |
|
13 |
<RowDefinition Height ="*" /> |
|
14 |
<RowDefinition Height ="40" /> |
|
15 |
</Grid.RowDefinitions> |
|
16 |
|
|
17 |
<telerik:RadButtonGroup Grid.Row="0" Height="30" HorizontalAlignment="Center" |
|
18 |
BorderThickness="1" |
|
19 |
telerik:StyleManager.Theme="Windows8"> |
|
20 |
<TextBlock Width="50" |
|
21 |
Margin="2" |
|
22 |
HorizontalAlignment="Center" |
|
23 |
VerticalAlignment="Center" |
|
24 |
FontSize="10" |
|
25 |
Text="Description" |
|
26 |
TextAlignment="Center" /> |
|
27 |
<telerik:RadComboBox x:Name="cbDashStyle" |
|
28 |
IsEditable="True" |
|
29 |
Width="200" Margin="5,0,5,0" |
|
30 |
SelectedIndex="0" Background="Transparent" |
|
31 |
telerik:StyleManager.Theme="Office2016"> |
|
32 |
</telerik:RadComboBox> |
|
33 |
|
|
34 |
</telerik:RadButtonGroup> |
|
35 |
<Grid Grid.Row="1"> |
|
36 |
<Grid.ColumnDefinitions> |
|
37 |
<ColumnDefinition /> |
|
38 |
<ColumnDefinition /> |
|
39 |
</Grid.ColumnDefinitions> |
|
40 |
<telerik:RadButton Grid.Column="0" Width="100" Height="30" Click="AddEvent">등록</telerik:RadButton> |
|
41 |
<telerik:RadButton Grid.Column="1" Width="100" Height="30" Click="CancelEvent">취소</telerik:RadButton> |
|
42 |
</Grid> |
|
43 |
</Grid> |
|
44 |
</Grid> |
|
45 |
</UserControl> |
KCOM/Controls/CheckList_Status.xaml.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Windows; |
|
6 |
using System.Windows.Controls; |
|
7 |
using System.Windows.Data; |
|
8 |
using System.Windows.Documents; |
|
9 |
using System.Windows.Input; |
|
10 |
using System.Windows.Media; |
|
11 |
using System.Windows.Media.Imaging; |
|
12 |
using System.Windows.Navigation; |
|
13 |
using System.Windows.Shapes; |
|
14 |
using KCOM.Common; |
|
15 |
using KCOMDataModel.DataModel; |
|
16 |
using KCOMDataModel.Common; |
|
17 |
using System.Configuration; |
|
18 |
|
|
19 |
namespace KCOM.Controls |
|
20 |
{ |
|
21 |
/// <summary> |
|
22 |
/// CheckList_Status.xaml에 대한 상호 작용 논리 |
|
23 |
/// </summary> |
|
24 |
public partial class CheckList_Status : UserControl |
|
25 |
{ |
|
26 |
public CheckList_Status() |
|
27 |
{ |
|
28 |
InitializeComponent(); |
|
29 |
|
|
30 |
DataBind(); |
|
31 |
|
|
32 |
var STATUS = Properties.Settings.Default.STATUS_DISCRIPTION.Split(new char[] { ';' }); |
|
33 |
|
|
34 |
//var STATUS = new List<string>(ConfigurationManager.AppSettings["STATUS"].Split(new char[] { ';' })); |
|
35 |
|
|
36 |
foreach (var item in STATUS) |
|
37 |
{ |
|
38 |
this.cbDashStyle.Items.Add(item); |
|
39 |
} |
|
40 |
} |
|
41 |
|
|
42 |
private void DataBind() |
|
43 |
{ |
|
44 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
|
45 |
{ |
|
46 |
|
|
47 |
} |
|
48 |
} |
|
49 |
|
|
50 |
private void AddEvent(object sender, RoutedEventArgs e) |
|
51 |
{ |
|
52 |
ViewerDataModel.Instance.CheckStatus = this.cbDashStyle.Text; |
|
53 |
|
|
54 |
Window window = Window.GetWindow(this); |
|
55 |
window.Close(); |
|
56 |
} |
|
57 |
private void CancelEvent(object sender, RoutedEventArgs e) |
|
58 |
{ |
|
59 |
Window window = Window.GetWindow(this); |
|
60 |
window.Close(); |
|
61 |
} |
|
62 |
} |
|
63 |
} |
KCOM/MainWindow.xaml.cs | ||
---|---|---|
237 | 237 |
break; |
238 | 238 |
case ("X"): |
239 | 239 |
{ |
240 |
DateTime undoTime = DateTime.Parse(ViewerDataModel.Instance.UndoDataList.OrderByDescending(order => order.EventTime).FirstOrDefault().EventTime.ToLongTimeString()); |
|
241 |
DateTime updatetime = DateTime.Parse(ViewerDataModel.Instance._markupInfoList.OrderByDescending(order => order.UpdateTime).FirstOrDefault().UpdateTime.ToLongTimeString()); |
|
242 |
|
|
243 |
if(undoTime > updatetime) |
|
244 |
{ |
|
245 |
var box = new TextBlock(); |
|
246 |
box.MinWidth = 400; |
|
247 |
box.FontSize = 11; |
|
248 |
box.Text = "저장되지 않은 코멘트가 있습니다. 저장 하시겠습니까?"; |
|
249 |
box.TextWrapping = System.Windows.TextWrapping.Wrap; |
|
250 |
|
|
251 |
DialogParameters parameters = new DialogParameters() |
|
252 |
{ |
|
253 |
Content = box, |
|
254 |
Header = "Confirm", |
|
255 |
Theme = new VisualStudio2013Theme(), |
|
256 |
ModalBackground = new SolidColorBrush { Color = Colors.Black, Opacity = 0.6 }, |
|
257 |
Closed = Onclose, |
|
258 |
}; |
|
259 |
RadWindow.Confirm(parameters); |
|
260 |
} |
|
261 |
|
|
240 | 262 |
this.Close(); |
241 | 263 |
} |
242 | 264 |
break; |
243 | 265 |
} |
244 | 266 |
} |
245 | 267 |
|
246 |
// RasterSupport.SetLicense( |
|
247 |
// @"C:\LEADTOOLS 19\Common\License\LEADTOOLS.LIC", |
|
248 |
// File.ReadAllText(@"C:\LEADTOOLS 19\Common\License\LEADTOOLS.LIC.KEY") |
|
249 |
//); |
|
250 |
|
|
251 |
// codec = new RasterCodecs(); |
|
252 |
// string filePath = @"F:\Dummy\demo.cmp"; |
|
253 |
// //BitmapImage bitmap = new BitmapImage(); |
|
254 |
// //bitmap.BeginInit(); |
|
255 |
// //bitmap.UriSource = new Uri(filePath); |
|
256 |
// //bitmap.EndInit(); |
|
257 |
|
|
258 |
// //viewer.Source = bitmap; |
|
259 |
// //viewer.ScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden; |
|
260 |
// //viewer.ScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden; |
|
261 |
// //viewer.ScrollViewer.Visibility = Visibility.Hidden; |
|
262 |
// viewer.Image = codec.Load(filePath, 0, CodecsLoadByteOrder.RgbOrGray, 1, 1); |
|
263 |
// viewer.SizeMode = Leadtools.Windows.Controls.SizeMode.FitAlways; |
|
268 |
private void Onclose(object sender, WindowClosedEventArgs e) |
|
269 |
{ |
|
270 |
if (e.DialogResult == true) |
|
271 |
{ |
|
272 |
dzTopMenu.SaveEvent(null, null); |
|
273 |
} |
|
274 |
} |
|
264 | 275 |
} |
265 | 276 |
} |
KCOM/Properties/Settings.Designer.cs | ||
---|---|---|
63 | 63 |
return ((string)(this["mainServerImageWebPath"])); |
64 | 64 |
} |
65 | 65 |
} |
66 |
|
|
67 |
[global::System.Configuration.ApplicationScopedSettingAttribute()] |
|
68 |
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
|
69 |
[global::System.Configuration.DefaultSettingValueAttribute("Vendor확인완료;Vendor적용완료;프로젝트 종료")] |
|
70 |
public string STATUS_DISCRIPTION { |
|
71 |
get { |
|
72 |
return ((string)(this["STATUS_DISCRIPTION"])); |
|
73 |
} |
|
74 |
} |
|
66 | 75 |
} |
67 | 76 |
} |
KCOM/Properties/Settings.settings | ||
---|---|---|
19 | 19 |
</Setting> |
20 | 20 |
<Setting Name="excelFilePath" Type="System.String" Scope="Application"> |
21 | 21 |
<Value Profile="(Default)">http://cloud.devdoftech.co.kr:5977/TileSource/Check_Test/CheckList_T.xlsx</Value> |
22 |
<Setting Name="STATUS_DISCRIPTION" Type="System.String" Scope="Application"> |
|
23 |
<Value Profile="(Default)">Vendor확인완료;Vendor적용완료;프로젝트 종료</Value> |
|
22 | 24 |
</Setting> |
23 | 25 |
</Settings> |
24 | 26 |
</SettingsFile> |
KCOM/app.config | ||
---|---|---|
83 | 83 |
<setting name="mainServerImageWebPath" serializeAs="String"> |
84 | 84 |
<value>http://cloud.devdoftech.co.kr:5977/TileSource/{0}_Tile/{1}/{2}/{3}.png</value> |
85 | 85 |
</setting> |
86 |
<setting name="STATUS_DISCRIPTION" serializeAs="String"> |
|
87 |
<value>Vendor확인완료;Vendor적용완료;프로젝트 종료</value> |
|
86 | 88 |
<setting name="subServerImageWebPath" serializeAs="String"> |
87 | 89 |
<value>http://cloud.devdoftech.co.kr:5977/TileSource/{0}_Tile/{1}/{2}/{3}.png</value> |
88 | 90 |
</setting> |
내보내기 Unified diff