markus / KCOM / Controls / test.xaml.cs @ ffcc8124
이력 | 보기 | 이력해설 | 다운로드 (4.17 KB)
1 |
using KCOMDataModel.Common; |
---|---|
2 |
using KCOMDataModel.DataModel; |
3 |
using System; |
4 |
using System.Collections.Generic; |
5 |
using System.Linq; |
6 |
using System.Text; |
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 |
using Telerik.Windows.Controls; |
17 |
|
18 |
namespace KCOM.Controls |
19 |
{ |
20 |
/// <summary> |
21 |
/// test.xaml에 대한 상호 작용 논리 |
22 |
/// </summary> |
23 |
public partial class test : UserControl |
24 |
{ |
25 |
List<MARKUP_CHECKLIST> items = new List<MARKUP_CHECKLIST>(); |
26 |
double orginalWidth, originalHeight; |
27 |
ScaleTransform scale = new ScaleTransform(); |
28 |
|
29 |
public test() |
30 |
{ |
31 |
InitializeComponent(); |
32 |
this.Loaded += Test_Loaded; |
33 |
} |
34 |
|
35 |
private void Test_Loaded(object sender, RoutedEventArgs e) |
36 |
{ |
37 |
} |
38 |
|
39 |
private void RadGridView_Loaded(object sender, RoutedEventArgs e) |
40 |
{ |
41 |
using (CIEntities Entity = new CIEntities(ConnectStringBuilder.ProjectCIConnectString(App.ViewInfo.ProjectNO).ToString())) |
42 |
{ |
43 |
items = Entity.MARKUP_CHECKLIST.ToList(); |
44 |
(sender as Telerik.Windows.Controls.RadGridView).ItemsSource = items; |
45 |
foreach (var item in (sender as Telerik.Windows.Controls.RadGridView).Items) |
46 |
{ |
47 |
|
48 |
} |
49 |
} |
50 |
|
51 |
orginalWidth = this.Width; |
52 |
originalHeight = this.Height; |
53 |
ChangeSize(this.ActualWidth, this.ActualHeight); |
54 |
this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged); |
55 |
} |
56 |
|
57 |
private void tb_CellLoaded(object sender, Telerik.Windows.Controls.GridView.CellEventArgs e) |
58 |
{ |
59 |
if(e.Cell.Column.Header.ToString().ToUpper() == "STATUS") |
60 |
{ |
61 |
//if(((Telerik.Windows.Controls.RadGridView)e.Cell).Value.ToString().ToUpper() == "OPEN") |
62 |
{ |
63 |
|
64 |
//if(((Telerik.Windows.Controls.GridView.GridViewCellBase)e.Cell).GetValue(.ToString().ToUpper() != "OPEN") |
65 |
//{ |
66 |
|
67 |
//} |
68 |
e.Cell.Foreground = System.Windows.Media.Brushes.Red; |
69 |
} |
70 |
} |
71 |
} |
72 |
|
73 |
private void ExportEvent(object sender, RoutedEventArgs e) |
74 |
{ |
75 |
MessageBox.Show("미 구현 기능입니다."); |
76 |
} |
77 |
|
78 |
private void CampareEvent(object sender, RoutedEventArgs e) |
79 |
{ |
80 |
|
81 |
//grid1.Visibility = Visibility.Visible; |
82 |
//grid2.Visibility = Visibility.Visible; |
83 |
|
84 |
|
85 |
//IKCOM.VPRevision VP = new IKCOM.VPRevision(); |
86 |
//VP.DOCUMENT_ID = "11111112"; |
87 |
//VP.RevNo = "1"; |
88 |
|
89 |
//KCOM.Views.MainMenu main = new Views.MainMenu(); |
90 |
//main.SyncEvent(VP); |
91 |
|
92 |
} |
93 |
|
94 |
void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e) |
95 |
{ |
96 |
ChangeSize(e.NewSize.Width, e.NewSize.Height); |
97 |
} |
98 |
|
99 |
private void ChangeSize(double width, double height) |
100 |
{ |
101 |
scale.ScaleX = width / orginalWidth; |
102 |
scale.ScaleY = height / originalHeight; |
103 |
|
104 |
FrameworkElement rootElement = this.Content as FrameworkElement; |
105 |
|
106 |
rootElement.LayoutTransform = scale; |
107 |
} |
108 |
|
109 |
private void TextBlock_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
110 |
{ |
111 |
|
112 |
if (grid1.Visibility == Visibility.Visible) |
113 |
{ |
114 |
//Application.Current.MainWindow.Width -= 400; |
115 |
//ChangeSize(orginalWidth, this.ActualHeight); |
116 |
grid1.Visibility = Visibility.Collapsed; |
117 |
grid2.Visibility = Visibility.Collapsed; |
118 |
} |
119 |
else |
120 |
{ |
121 |
//Application.Current.MainWindow.Width += 400; |
122 |
//ChangeSize(orginalWidth + 400, this.ActualHeight); |
123 |
grid1.Visibility = Visibility.Visible; |
124 |
grid2.Visibility = Visibility.Visible; |
125 |
} |
126 |
|
127 |
} |
128 |
|
129 |
private void RadButton_Click_1(object sender, RoutedEventArgs e) |
130 |
{ |
131 |
|
132 |
} |
133 |
} |
134 |
} |