개정판 63a36cc0
오픈시 파라미터에 CommentID가 있으면 해당 CommentID로 포커스됨
Change-Id: I2180594fa4f20d50699ce4bb081b335bda5657e5
IKCOM/Interface.cs | ||
---|---|---|
58 | 58 |
public class PEMSSInfo |
59 | 59 |
{ |
60 | 60 |
public string UserID { get; set; } |
61 |
public string CommentID { get; set; } |
|
61 | 62 |
} |
62 | 63 |
|
63 | 64 |
public class DisplayColorInfo |
KCOM.sln | ||
---|---|---|
238 | 238 |
GlobalSection(Performance) = preSolution |
239 | 239 |
HasPerformanceSessions = true |
240 | 240 |
EndGlobalSection |
241 |
GlobalSection(Performance) = preSolution |
|
242 |
HasPerformanceSessions = true |
|
243 |
EndGlobalSection |
|
244 |
GlobalSection(Performance) = preSolution |
|
245 |
HasPerformanceSessions = true |
|
246 |
EndGlobalSection |
|
247 |
GlobalSection(Performance) = preSolution |
|
248 |
HasPerformanceSessions = true |
|
249 |
EndGlobalSection |
|
250 |
GlobalSection(Performance) = preSolution |
|
251 |
HasPerformanceSessions = true |
|
252 |
EndGlobalSection |
|
253 |
GlobalSection(Performance) = preSolution |
|
254 |
HasPerformanceSessions = true |
|
255 |
EndGlobalSection |
|
241 | 256 |
EndGlobal |
KCOM/App.xaml.cs | ||
---|---|---|
43 | 43 |
/// pemss에서 전달되는 ID |
44 | 44 |
/// </summary> |
45 | 45 |
public string uId { get; set; } |
46 |
|
|
47 |
public string cId { get; set; } |
|
46 | 48 |
} |
47 | 49 |
/// <summary> |
48 | 50 |
/// App.xaml에 대한 상호 작용 논리 |
... | ... | |
181 | 183 |
|
182 | 184 |
App.PEMSSInfo = new IKCOM.PEMSSInfo |
183 | 185 |
{ |
184 |
UserID = result.uId |
|
186 |
UserID = result.uId, |
|
187 |
CommentID = result.cId |
|
185 | 188 |
}; |
186 | 189 |
|
187 | 190 |
ParameterMode = true; |
KCOM/Behaviors/ColumnFilterBehavior.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.Linq.Expressions; |
|
7 |
using System.Reflection; |
|
8 |
using System.Windows; |
|
9 |
using System.Windows.Media; |
|
10 |
using System.Windows.Shapes; |
|
11 |
using Telerik.Windows.Controls.GridView; |
|
12 |
|
|
13 |
namespace KCOM.Behaviors |
|
14 |
{ |
|
15 |
public class ColumnFilterBehavior : System.Windows.Interactivity.Behavior<Telerik.Windows.Controls.RadGridView> |
|
16 |
{ |
|
17 |
protected override void OnAttached() |
|
18 |
{ |
|
19 |
AssociatedObject.FilterOperatorsLoading += AssociatedObject_FilterOperatorsLoading; |
|
20 |
base.OnAttached(); |
|
21 |
} |
|
22 |
|
|
23 |
private void AssociatedObject_FilterOperatorsLoading(object sender, FilterOperatorsLoadingEventArgs e) |
|
24 |
{ |
|
25 |
e.DefaultOperator1 = GetDefaultOperator(AssociatedObject); |
|
26 |
} |
|
27 |
|
|
28 |
protected override void OnDetaching() |
|
29 |
{ |
|
30 |
base.OnDetaching(); |
|
31 |
} |
|
32 |
|
|
33 |
public static Telerik.Windows.Data.FilterOperator GetDefaultOperator(DependencyObject obj) |
|
34 |
{ |
|
35 |
return (Telerik.Windows.Data.FilterOperator)obj.GetValue(DefaultOperatorProperty); |
|
36 |
} |
|
37 |
public static void SetDefaultOperator(DependencyObject obj, Telerik.Windows.Data.FilterOperator value) |
|
38 |
{ |
|
39 |
obj.SetValue(DefaultOperatorProperty, value); |
|
40 |
} |
|
41 |
|
|
42 |
public static readonly DependencyProperty DefaultOperatorProperty = DependencyProperty.RegisterAttached("DefaultOperator", typeof(Telerik.Windows.Data.FilterOperator), |
|
43 |
typeof(ColumnFilterBehavior), new FrameworkPropertyMetadata(Telerik.Windows.Data.FilterOperator.Contains, new PropertyChangedCallback(DefaultOperatorPropertyChanged))); |
|
44 |
|
|
45 |
private static void DefaultOperatorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
46 |
{ |
|
47 |
|
|
48 |
} |
|
49 |
} |
|
50 |
} |
KCOM/Common/ViewerDataModel.cs | ||
---|---|---|
85 | 85 |
|
86 | 86 |
private ImageBrush backgroundImage; |
87 | 87 |
|
88 |
// ViewModel.RequirementViewModel에서 페이지가 모두 로딩되는 시점을 가져오기 위해서 추가 |
|
89 |
// 김태성 |
|
90 |
#region |
|
91 |
|
|
92 |
public event EventHandler<EventArgs> OnLoadPaged; |
|
93 |
|
|
94 |
public void OnLoadPage() |
|
95 |
{ |
|
96 |
if(OnLoadPaged != null) |
|
97 |
{ |
|
98 |
OnLoadPaged(this, new EventArgs()); |
|
99 |
} |
|
100 |
} |
|
101 |
#endregion |
|
102 |
|
|
88 | 103 |
//private RasterImage _rasterimage; |
89 | 104 |
|
90 | 105 |
|
KCOM/Controls/ExtendTextBox.xaml | ||
---|---|---|
1 |
<UserControl x:Class="KCOM.Controls.ExtendTextBox" |
|
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 |
xmlns:local="clr-namespace:KCOM.Controls" |
|
7 |
mc:Ignorable="d" |
|
8 |
d:DesignHeight="450" d:DesignWidth="800"> |
|
9 |
<Grid> |
|
10 |
<Grid.ColumnDefinitions> |
|
11 |
<ColumnDefinition/> |
|
12 |
<ColumnDefinition Width="Auto"/> |
|
13 |
</Grid.ColumnDefinitions> |
|
14 |
<TextBlock x:Name="txtBox" TextWrapping="WrapWithOverflow"/> |
|
15 |
<Button Content="+" Width="15" x:Name="btExtend" Click="Button_Click" Grid.Column="1"/> |
|
16 |
</Grid> |
|
17 |
</UserControl> |
KCOM/Controls/ExtendTextBox.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 KCOM.Controls |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// UseLInesTextBox.xaml에 대한 상호 작용 논리 |
|
20 |
/// </summary> |
|
21 |
public partial class ExtendTextBox : UserControl |
|
22 |
{ |
|
23 |
public ExtendTextBox() |
|
24 |
{ |
|
25 |
InitializeComponent(); |
|
26 |
} |
|
27 |
|
|
28 |
private string tempString; |
|
29 |
|
|
30 |
public bool IsExtend |
|
31 |
{ |
|
32 |
get { return (bool)GetValue(IsExtendProperty); } |
|
33 |
set { SetValue(IsExtendProperty, value); } |
|
34 |
} |
|
35 |
|
|
36 |
public static readonly DependencyProperty IsExtendProperty = |
|
37 |
DependencyProperty.RegisterAttached("IsExtend", typeof(bool), typeof(ExtendTextBox), new PropertyMetadata(false, IsExtendPropertyChanged)); |
|
38 |
|
|
39 |
private static void IsExtendPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
40 |
{ |
|
41 |
var owner = d as ExtendTextBox; |
|
42 |
owner.SetTextBox(); |
|
43 |
} |
|
44 |
|
|
45 |
public string Text |
|
46 |
{ |
|
47 |
get { return (string)GetValue(TextProperty); } |
|
48 |
set { SetValue(TextProperty, value); } |
|
49 |
} |
|
50 |
|
|
51 |
public static readonly DependencyProperty TextProperty = |
|
52 |
DependencyProperty.RegisterAttached("Text", typeof(string), typeof(ExtendTextBox), new PropertyMetadata(null, TextPropertyChanged)); |
|
53 |
|
|
54 |
private static void TextPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) |
|
55 |
{ |
|
56 |
var owner = d as ExtendTextBox; |
|
57 |
|
|
58 |
owner.tempString = (string)e.NewValue; |
|
59 |
owner.SetTextBox(); |
|
60 |
} |
|
61 |
|
|
62 |
private void SetTextBox() |
|
63 |
{ |
|
64 |
if (!IsExtend) |
|
65 |
{ |
|
66 |
btExtend.Content = "+"; |
|
67 |
txtBox.Text = tempString?.Split(System.Environment.NewLine.ToCharArray()).First(); |
|
68 |
} |
|
69 |
else |
|
70 |
{ |
|
71 |
btExtend.Content = "-"; |
|
72 |
txtBox.Text = tempString; |
|
73 |
} |
|
74 |
} |
|
75 |
|
|
76 |
|
|
77 |
public override void OnApplyTemplate() |
|
78 |
{ |
|
79 |
base.OnApplyTemplate(); |
|
80 |
} |
|
81 |
|
|
82 |
private void Button_Click(object sender, RoutedEventArgs e) |
|
83 |
{ |
|
84 |
IsExtend = !IsExtend; |
|
85 |
} |
|
86 |
} |
|
87 |
} |
KCOM/Controls/Sample.xaml.cs | ||
---|---|---|
482 | 482 |
|
483 | 483 |
Logger.sendCheckLog("SetComme6ntList_ImgListbox 설정", 1); |
484 | 484 |
|
485 |
|
|
486 | 485 |
//var template = this.ImgListbox.ItemTemplate; |
487 | 486 |
//this.ImgListbox.ItemTemplate = null; |
488 | 487 |
//this.ImgListbox.ItemTemplate = template; |
KCOM/Extensions/MatrixHelper.cs | ||
---|---|---|
1 |
// Copyright (c) Wiesław Šoltés. All rights reserved. |
|
2 |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. |
|
3 |
using System.Windows; |
|
4 |
using System.Windows.Media; |
|
5 |
using static System.Math; |
|
6 |
|
|
7 |
namespace KCOM |
|
8 |
{ |
|
9 |
/// <summary> |
|
10 |
/// WPF Matrix helper methods. |
|
11 |
/// </summary> |
|
12 |
public static class MatrixHelper |
|
13 |
{ |
|
14 |
/// <summary> |
|
15 |
/// Creates a translation matrix using the specified offsets. |
|
16 |
/// </summary> |
|
17 |
/// <param name="offsetX">X-coordinate offset.</param> |
|
18 |
/// <param name="offsetY">Y-coordinate offset.</param> |
|
19 |
/// <returns>The created translation matrix.</returns> |
|
20 |
public static Matrix Translate(double offsetX, double offsetY) |
|
21 |
{ |
|
22 |
return new Matrix(1.0, 0.0, 0.0, 1.0, offsetX, offsetY); |
|
23 |
} |
|
24 |
|
|
25 |
/// <summary> |
|
26 |
/// Prepends a translation around the center of provided matrix. |
|
27 |
/// </summary> |
|
28 |
/// <param name="matrix">The matrix to prepend translation.</param> |
|
29 |
/// <param name="offsetX">X-coordinate offset.</param> |
|
30 |
/// <param name="offsetY">Y-coordinate offset.</param> |
|
31 |
/// <returns>The created translation matrix.</returns> |
|
32 |
public static Matrix TranslatePrepend(Matrix matrix, double offsetX, double offsetY) |
|
33 |
{ |
|
34 |
return Translate(offsetX, offsetY) * matrix; |
|
35 |
} |
|
36 |
|
|
37 |
/// <summary> |
|
38 |
/// Creates a matrix that scales along the x-axis and y-axis. |
|
39 |
/// </summary> |
|
40 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
41 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
42 |
/// <returns>The created scaling matrix.</returns> |
|
43 |
public static Matrix Scale(double scaleX, double scaleY) |
|
44 |
{ |
|
45 |
return new Matrix(scaleX, 0, 0, scaleY, 0.0, 0.0); |
|
46 |
} |
|
47 |
|
|
48 |
/// <summary> |
|
49 |
/// Creates a matrix that is scaling from a specified center. |
|
50 |
/// </summary> |
|
51 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
52 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
53 |
/// <param name="centerX">The center X-coordinate of the scaling.</param> |
|
54 |
/// <param name="centerY">The center Y-coordinate of the scaling.</param> |
|
55 |
/// <returns>The created scaling matrix.</returns> |
|
56 |
public static Matrix ScaleAt(double scaleX, double scaleY, double centerX, double centerY) |
|
57 |
{ |
|
58 |
return new Matrix(scaleX, 0, 0, scaleY, centerX - (scaleX * centerX), centerY - (scaleY * centerY)); |
|
59 |
} |
|
60 |
|
|
61 |
/// <summary> |
|
62 |
/// Prepends a scale around the center of provided matrix. |
|
63 |
/// </summary> |
|
64 |
/// <param name="matrix">The matrix to prepend scale.</param> |
|
65 |
/// <param name="scaleX">Scaling factor that is applied along the x-axis.</param> |
|
66 |
/// <param name="scaleY">Scaling factor that is applied along the y-axis.</param> |
|
67 |
/// <param name="centerX">The center X-coordinate of the scaling.</param> |
|
68 |
/// <param name="centerY">The center Y-coordinate of the scaling.</param> |
|
69 |
/// <returns>The created scaling matrix.</returns> |
|
70 |
public static Matrix ScaleAtPrepend(Matrix matrix, double scaleX, double scaleY, double centerX, double centerY) |
|
71 |
{ |
|
72 |
return ScaleAt(scaleX, scaleY, centerX, centerY) * matrix; |
|
73 |
} |
|
74 |
|
|
75 |
/// <summary> |
|
76 |
/// Creates a skew matrix. |
|
77 |
/// </summary> |
|
78 |
/// <param name="angleX">Angle of skew along the X-axis in radians.</param> |
|
79 |
/// <param name="angleY">Angle of skew along the Y-axis in radians.</param> |
|
80 |
/// <returns>When the method completes, contains the created skew matrix.</returns> |
|
81 |
public static Matrix Skew(float angleX, float angleY) |
|
82 |
{ |
|
83 |
return new Matrix(1.0, Tan(angleX), Tan(angleY), 1.0, 0.0, 0.0); |
|
84 |
} |
|
85 |
|
|
86 |
/// <summary> |
|
87 |
/// Creates a matrix that rotates. |
|
88 |
/// </summary> |
|
89 |
/// <param name="radians">Angle of rotation in radians. Angles are measured clockwise when looking along the rotation axis.</param> |
|
90 |
/// <returns>The created rotation matrix.</returns> |
|
91 |
public static Matrix Rotation(double radians) |
|
92 |
{ |
|
93 |
double cos = Cos(radians); |
|
94 |
double sin = Sin(radians); |
|
95 |
return new Matrix(cos, sin, -sin, cos, 0, 0); |
|
96 |
} |
|
97 |
|
|
98 |
/// <summary> |
|
99 |
/// Creates a matrix that rotates about a specified center. |
|
100 |
/// </summary> |
|
101 |
/// <param name="angle">Angle of rotation in radians.</param> |
|
102 |
/// <param name="centerX">The center X-coordinate of the rotation.</param> |
|
103 |
/// <param name="centerY">The center Y-coordinate of the rotation.</param> |
|
104 |
/// <returns>The created rotation matrix.</returns> |
|
105 |
public static Matrix Rotation(double angle, double centerX, double centerY) |
|
106 |
{ |
|
107 |
return Translate(-centerX, -centerY) * Rotation(angle) * Translate(centerX, centerY); |
|
108 |
} |
|
109 |
|
|
110 |
/// <summary> |
|
111 |
/// Creates a matrix that rotates about a specified center. |
|
112 |
/// </summary> |
|
113 |
/// <param name="angle">Angle of rotation in radians.</param> |
|
114 |
/// <param name="center">The center of the rotation.</param> |
|
115 |
/// <returns>The created rotation matrix.</returns> |
|
116 |
public static Matrix Rotation(double angle, Vector center) |
|
117 |
{ |
|
118 |
return Translate(-center.X, -center.Y) * Rotation(angle) * Translate(center.X, center.Y); |
|
119 |
} |
|
120 |
|
|
121 |
/// <summary> |
|
122 |
/// Transforms a point by this matrix. |
|
123 |
/// </summary> |
|
124 |
/// <param name="matrix">The matrix to use as a transformation matrix.</param> |
|
125 |
/// <param name="point">>The original point to apply the transformation.</param> |
|
126 |
/// <returns>The result of the transformation for the input point.</returns> |
|
127 |
public static Point TransformPoint(Matrix matrix, Point point) |
|
128 |
{ |
|
129 |
return new Point( |
|
130 |
(point.X * matrix.M11) + (point.Y * matrix.M21) + matrix.OffsetX, |
|
131 |
(point.X * matrix.M12) + (point.Y * matrix.M22) + matrix.OffsetY); |
|
132 |
} |
|
133 |
} |
|
134 |
} |
KCOM/KCOM.csproj | ||
---|---|---|
258 | 258 |
</ApplicationDefinition> |
259 | 259 |
<Compile Include="AbstractDatabase.cs" /> |
260 | 260 |
<Compile Include="AppSQLiteDatabase.cs" /> |
261 |
<Compile Include="Behaviors\ColumnFilterBehavior.cs" /> |
|
261 | 262 |
<Compile Include="Behaviors\GridViewAutoWidthBehavior.cs" /> |
262 | 263 |
<Compile Include="Behaviors\WidthProxy.cs" /> |
263 | 264 |
<Compile Include="Behaviors\WindowBehavior.cs" /> |
... | ... | |
290 | 291 |
<Compile Include="Controls\addToFavoriteWindow_Internal.xaml.cs"> |
291 | 292 |
<DependentUpon>addToFavoriteWindow_Internal.xaml</DependentUpon> |
292 | 293 |
</Compile> |
294 |
<Compile Include="Controls\ExtendTextBox.xaml.cs"> |
|
295 |
<DependentUpon>ExtendTextBox.xaml</DependentUpon> |
|
296 |
</Compile> |
|
293 | 297 |
<Compile Include="Converters\StringMultiLineConvert.cs" /> |
294 | 298 |
<Compile Include="Extensions\CollectionExtenstions.cs" /> |
299 |
<Compile Include="Extensions\MatrixHelper.cs" /> |
|
295 | 300 |
<Compile Include="Extensions\VectorExtentions.cs" /> |
296 | 301 |
<Compile Include="Views\AddRequirement.xaml.cs"> |
297 | 302 |
<DependentUpon>AddRequirement.xaml</DependentUpon> |
... | ... | |
385 | 390 |
<Generator>MSBuild:Compile</Generator> |
386 | 391 |
<SubType>Designer</SubType> |
387 | 392 |
</Page> |
393 |
<Page Include="Controls\ExtendTextBox.xaml"> |
|
394 |
<SubType>Designer</SubType> |
|
395 |
<Generator>MSBuild:Compile</Generator> |
|
396 |
</Page> |
|
388 | 397 |
<Page Include="Views\AddRequirement.xaml"> |
389 | 398 |
<SubType>Designer</SubType> |
390 | 399 |
<Generator>MSBuild:Compile</Generator> |
KCOM/ViewModel/RequirementViewModel.cs | ||
---|---|---|
127 | 127 |
if (IsInit) |
128 | 128 |
{ |
129 | 129 |
requirementList.Clear(); |
130 |
|
|
131 |
if (!string.IsNullOrWhiteSpace(App.PEMSSInfo.CommentID)) |
|
132 |
{ |
|
133 |
Common.ViewerDataModel.Instance.OnLoadPaged += Instance_OnLoadPaged; |
|
134 |
} |
|
130 | 135 |
} |
131 | 136 |
|
132 | 137 |
result.ForEach(newItem => |
133 | 138 |
{ |
134 | 139 |
newItem.IsExpanded = true; |
135 |
newItem.IsExpandable = false;
|
|
140 |
newItem.IsExpandable = true;
|
|
136 | 141 |
|
137 | 142 |
if (IsInit) |
138 | 143 |
{ |
... | ... | |
143 | 148 |
RequirementList.UpdateWhere(changeitem => CollectionExtensions.ChangeValues(changeitem, newItem), x => x.mdId == newItem.mdId); |
144 | 149 |
} |
145 | 150 |
}); |
146 |
} |
|
147 | 151 |
|
152 |
IsInit = true; |
|
153 |
} |
|
154 |
private void Instance_OnLoadPaged(object sender, EventArgs e) |
|
155 |
{ |
|
156 |
GotoMarkup(new[] { App.PEMSSInfo.CommentID }); |
|
157 |
Common.ViewerDataModel.Instance.OnLoadPaged -= Instance_OnLoadPaged; |
|
158 |
} |
|
148 | 159 |
|
149 | 160 |
private void OnAddVPCommentCommand(object obj) |
150 | 161 |
{ |
... | ... | |
228 | 239 |
{ |
229 | 240 |
var iditems = SelectVPComment.commentId.Split(','); |
230 | 241 |
|
231 |
var selectComments = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(x=>iditems.Count(y=> y == x.CommentID) > 0).ToList(); |
|
232 |
|
|
233 |
if (selectComments.Count() > 0) |
|
234 |
{ |
|
235 |
var infoList = Common.ViewerDataModel.Instance.MyMarkupList.Where(f => f.MarkupInfoID == selectComments.First().MarkupInfoID); |
|
236 |
|
|
237 |
if (infoList.Count() > 0) |
|
238 |
{ |
|
239 |
Common.ViewerDataModel.Instance.PageBalanceNumber = infoList.First().PageNumber; |
|
240 |
selectComments.First().IsSelected = true; |
|
241 |
GotoMarkup(selectComments); |
|
242 |
|
|
243 |
} |
|
244 |
} |
|
242 |
GotoMarkup(iditems); |
|
245 | 243 |
|
246 | 244 |
//selectedComment |
247 | 245 |
//SelectionSet.Instance.SelectControl = selectedComment; |
... | ... | |
257 | 255 |
} |
258 | 256 |
} |
259 | 257 |
|
258 |
private void GotoMarkup(IEnumerable<string> CommentIdList) |
|
259 |
{ |
|
260 |
var selectComments = Common.ViewerDataModel.Instance.MarkupControls_USER.Where(x=> CommentIdList.Count(y=> y == x.CommentID) > 0).ToList(); |
|
261 |
|
|
262 |
if (selectComments.Count() > 0) |
|
263 |
{ |
|
264 |
var infoList = Common.ViewerDataModel.Instance.MyMarkupList.Where(f => f.MarkupInfoID == selectComments.First().MarkupInfoID); |
|
265 |
|
|
266 |
if (infoList.Count() > 0) |
|
267 |
{ |
|
268 |
Common.ViewerDataModel.Instance.PageBalanceNumber = infoList.First().PageNumber; |
|
269 |
selectComments.First().IsSelected = true; |
|
270 |
GotoMarkup(selectComments); |
|
271 |
|
|
272 |
selectComments.First().IsSelected =false; |
|
273 |
} |
|
274 |
} |
|
275 |
} |
|
276 |
|
|
260 | 277 |
private void GotoMarkup(IEnumerable<MarkupToPDF.Common.CommentUserInfo> commentUserInfo) |
261 | 278 |
{ |
262 | 279 |
if (commentUserInfo?.Count() > 0) |
... | ... | |
269 | 286 |
|
270 | 287 |
foreach (var instance in commentUserInfo) |
271 | 288 |
{ |
272 |
rect = Rect.Union(rect,instance.ItemRect); |
|
289 |
rect = Rect.Union(rect, instance.ItemRect);
|
|
273 | 290 |
|
274 | 291 |
} |
275 |
|
|
292 |
|
|
276 | 293 |
SelectionSet.Instance.SelectItemByRect(rect, main); |
277 | 294 |
|
278 | 295 |
|
... | ... | |
289 | 306 |
////} |
290 | 307 |
|
291 | 308 |
//rect.Transform(matrix); |
309 |
//if (Math.Abs(Common.ViewerDataModel.Instance.Angle) == 90) |
|
310 |
//{ |
|
311 |
// var matrix = new System.Windows.Media.Matrix(); |
|
312 |
// matrix.RotateAt(Common.ViewerDataModel.Instance.Angle, Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
|
313 |
// rect.Transform(matrix); |
|
314 |
//} |
|
315 |
|
|
316 |
//double centerX = rect.Left + rect.Width / 2; |
|
317 |
//double centerY = rect.Top + rect.Height / 2; |
|
318 |
|
|
319 |
|
|
320 |
var center = new Vector(Common.ViewerDataModel.Instance.ImageViewWidth / 2, Common.ViewerDataModel.Instance.ImageViewHeight / 2); |
|
321 |
var matrix = MatrixHelper.Rotation(Common.ViewerDataModel.Instance.Angle, center); |
|
322 |
rect.Transform(matrix); |
|
323 |
|
|
324 |
double scaleX = Common.ViewerDataModel.Instance.ImageViewWidth / rect.Width; |
|
325 |
double scaleY = Common.ViewerDataModel.Instance.ImageViewHeight / rect.Height; |
|
326 |
double newScale = main.zoomAndPanControl.ContentScale * Math.Min(scaleX, scaleY); |
|
327 |
double positionX = 0; |
|
328 |
double positionY = 0; |
|
329 |
|
|
330 |
if (Common.ViewerDataModel.Instance.Angle == 90) |
|
331 |
{ |
|
332 |
positionX = Common.ViewerDataModel.Instance.ImageViewHeight - rect.X; |
|
333 |
positionY = Common.ViewerDataModel.Instance.ImageViewWidth - rect.Y; |
|
334 |
} |
|
335 |
|
|
336 |
main.zoomAndPanControl.ContentScale = newScale; |
|
337 |
main.zoomAndPanControl.ContentOffsetX = positionX; |
|
338 |
main.zoomAndPanControl.ContentOffsetY = positionY; |
|
292 | 339 |
|
293 | 340 |
main.zoomAndPanControl.ZoomTo(rect); |
294 | 341 |
|
295 |
double centerX = rect.Left + rect.Width / 2; |
|
296 |
double centerY = rect.Top + rect.Height / 2; |
|
297 | 342 |
|
298 |
main.zoomAndPanControl.ZoomAboutPoint(main.zoomAndPanControl.ContentScale/3, new Point(centerX, centerY)); |
|
343 |
//double centerX = rect.Left + rect.Width / 2; |
|
344 |
//double centerY = rect.Top + rect.Height / 2; |
|
345 |
|
|
346 |
//main.zoomAndPanControl.ZoomAboutPoint(main.zoomAndPanControl.ContentScale, new Point(centerX, centerY)); |
|
299 | 347 |
} |
300 | 348 |
catch (Exception ex) |
301 | 349 |
{ |
KCOM/Views/MainMenu.xaml | ||
---|---|---|
6 | 6 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:common="clr-namespace:KCOM.Common" |
7 | 7 |
xmlns:controls="clr-namespace:KCOM.Controls" xmlns:ZoomAndPan="clr-namespace:ZoomAndPan;assembly=ZoomAndPan" |
8 | 8 |
xmlns:view="clr-namespace:KCOM.Views" |
9 |
mc:Ignorable="d"
|
|
10 |
d:DesignHeight="768" d:DesignWidth="1080" IsTabStop="True" xmlns:messanger="clr-namespace:KCOM.Messenger"
|
|
11 |
xmlns:Angle="clr-namespace:MarkupToPDF.Controls.Angle;assembly=MarkupToPDF"> |
|
9 |
mc:Ignorable="d" |
|
10 |
d:DesignWidth="1080" IsTabStop="True" xmlns:messanger="clr-namespace:KCOM.Messenger" |
|
11 |
xmlns:Angle="clr-namespace:MarkupToPDF.Controls.Angle;assembly=MarkupToPDF" LayoutUpdated="UserControl_LayoutUpdated">
|
|
12 | 12 |
<UserControl.Resources> |
13 | 13 |
<Style TargetType="telerik:GridViewHeaderCell" x:Key="GridViewHeaderStyle"> |
14 | 14 |
<Setter Property="VerticalContentAlignment" Value="Center"/> |
KCOM/Views/MainMenu.xaml.cs | ||
---|---|---|
561 | 561 |
try |
562 | 562 |
{ |
563 | 563 |
ViewerDataModel.Instance.ImageViewPath = await ImageSourceHelper.GetDownloadImageAsync(pageUri, pageWidth, pageHeight); |
564 |
|
|
564 |
|
|
565 | 565 |
} |
566 | 566 |
catch (Exception ex) |
567 | 567 |
{ |
... | ... | |
702 | 702 |
Common.ViewerDataModel.Instance.MarkupControls_USER.Clear(); //전체 제거 |
703 | 703 |
Common.ViewerDataModel.Instance.MarkupControls.Clear(); //전체 제거 |
704 | 704 |
foreach (var markup in ViewerDataModel.Instance.MyMarkupList.Where(param => param.PageNumber == ViewerDataModel.Instance.PageNumber)) |
705 |
{
|
|
705 |
{ |
|
706 | 706 |
var info = ViewerDataModel.Instance._markupInfoList.Where(param => param.MarkupInfoID == markup.MarkupInfoID).FirstOrDefault(); |
707 | 707 |
if (info != null) |
708 | 708 |
{ |
... | ... | |
754 | 754 |
instanceMain.dzTopMenu.rotateOffSet = 0; |
755 | 755 |
var pageinfo = this.CurrentDoc.docInfo.DOCPAGE.Where(p => p.PAGE_NUMBER == e.CurrentPage.PAGE_NUMBER).FirstOrDefault(); |
756 | 756 |
drawingPannelRotate(pageinfo.PAGE_ANGLE); |
757 |
|
|
757 |
|
|
758 | 758 |
SetCommentPages(true); |
759 | 759 |
} |
760 | 760 |
|
... | ... | |
787 | 787 |
} |
788 | 788 |
|
789 | 789 |
this.pageNavigator.SetCommentList(_pages.ToList()); |
790 |
|
|
790 | 791 |
} |
791 | 792 |
|
792 | 793 |
public void MarkupitemViewUpdate(string markupinfo_id) |
... | ... | |
821 | 822 |
if (e.Delta > 0) |
822 | 823 |
{ |
823 | 824 |
Point currentContentMousePoint = e.GetPosition(zoomAndPanCanvas); |
825 |
System.Diagnostics.Debug.WriteLine($"Zoom : {currentContentMousePoint.X} {currentContentMousePoint.Y}"); |
|
824 | 826 |
ZoomIn(currentContentMousePoint); |
825 | 827 |
} |
826 | 828 |
else |
827 | 829 |
{ |
828 | 830 |
Point currentContentMousePoint = e.GetPosition(zoomAndPanCanvas); |
831 |
System.Diagnostics.Debug.WriteLine($"Zoom : {currentContentMousePoint.X} {currentContentMousePoint.Y}"); |
|
829 | 832 |
ZoomOut(currentContentMousePoint); |
830 | 833 |
} |
831 | 834 |
} |
... | ... | |
5345 | 5348 |
CommonLib.Common.WriteConfigString("SetThumbnail", "WIDTH", thumbnailPanel.Width.ToString()); |
5346 | 5349 |
} |
5347 | 5350 |
|
5351 |
private void UserControl_LayoutUpdated(object sender, EventArgs e) |
|
5352 |
{ |
|
5353 |
System.Diagnostics.Debug.WriteLine("layupdated"); |
|
5354 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER?.Count() > 0) |
|
5355 |
{ |
|
5356 |
ViewerDataModel.Instance.OnLoadPage(); |
|
5357 |
} |
|
5358 |
} |
|
5359 |
|
|
5348 | 5360 |
|
5349 | 5361 |
|
5350 | 5362 |
/* |
KCOM/Views/RequirementView.xaml | ||
---|---|---|
7 | 7 |
xmlns:local="clr-namespace:KCOM.Controls" FontSize="12" |
8 | 8 |
xmlns:behavior="clr-namespace:KCOM.Behaviors" |
9 | 9 |
xmlns:viewmodel="clr-namespace:KCOM.ViewModel" |
10 |
xmlns:controls ="clr-namespace:KCOM.Controls" |
|
10 | 11 |
xmlns:convert="clr-namespace:KCOM.Converters" |
11 | 12 |
xmlns:Behaviors="clr-namespace:KCOM.Behaviors" |
12 | 13 |
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
... | ... | |
32 | 33 |
<RowDefinition Height="Auto"/> |
33 | 34 |
<RowDefinition/> |
34 | 35 |
</Grid.RowDefinitions> |
35 |
<Grid HorizontalAlignment="Right"> |
|
36 |
<Grid HorizontalAlignment="Right" Visibility="Collapsed">
|
|
36 | 37 |
<Grid.ColumnDefinitions> |
37 | 38 |
<ColumnDefinition/> |
38 | 39 |
<ColumnDefinition Width="4"/> |
... | ... | |
40 | 41 |
<ColumnDefinition Width="4"/> |
41 | 42 |
<ColumnDefinition/> |
42 | 43 |
</Grid.ColumnDefinitions> |
43 |
<WrapPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Visibility="Collapsed">
|
|
44 |
<WrapPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal"> |
|
44 | 45 |
<telerik:RadButton Content="추가" Background="#3d3d3d" Foreground="White" Margin="5,0" MinWidth="60" Command="{Binding AddVPCommentCommand}"/> |
45 | 46 |
<telerik:RadToggleButton Width="20" Height="20" Command="{Binding RefreshCommand}" Margin="3"> |
46 | 47 |
<Image Stretch="Fill" Source="/KCOM;component/Resources/Images/MenuImage/Refresh.png"/> |
... | ... | |
56 | 57 |
RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ColumnWidth="*" |
57 | 58 |
IsExpandedBinding="{Binding IsExpanded,Mode=TwoWay}" IsExpandableBinding="{Binding IsExpandable, Mode=TwoWay}" |
58 | 59 |
GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Orange"> |
60 |
<i:Interaction.Behaviors> |
|
61 |
<Behaviors:ColumnFilterBehavior DefaultOperator="Contains"/> |
|
62 |
</i:Interaction.Behaviors> |
|
59 | 63 |
<telerik:RadGridView.ChildTableDefinitions> |
60 | 64 |
<telerik:GridViewTableDefinition/> |
61 | 65 |
</telerik:RadGridView.ChildTableDefinitions> |
62 | 66 |
<telerik:RadGridView.Columns> |
63 | 67 |
<telerik:GridViewDataColumn Header="Commant" IsReadOnly="True" IsFilterable="True" |
64 | 68 |
TextAlignment="Left" TextWrapping="WrapWithOverflow" |
65 |
DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}"/> |
|
69 |
DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}"> |
|
70 |
<telerik:GridViewDataColumn.CellTemplate> |
|
71 |
<DataTemplate> |
|
72 |
<controls:ExtendTextBox Text="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}"/> |
|
73 |
</DataTemplate> |
|
74 |
</telerik:GridViewDataColumn.CellTemplate> |
|
75 |
</telerik:GridViewDataColumn> |
|
66 | 76 |
</telerik:RadGridView.Columns> |
67 | 77 |
<telerik:RadGridView.HierarchyChildTemplate> |
68 | 78 |
<DataTemplate> |
... | ... | |
110 | 120 |
Header="Create User" /> |
111 | 121 |
<telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" |
112 | 122 |
Header="Comment" /> |
113 |
<telerik:GridViewDataColumn DataMemberBinding="{Binding condition}" Header="Condition" Width="64" IsReadOnly="True"> |
|
114 |
<telerik:GridViewDataColumn.CellTemplate> |
|
115 |
<DataTemplate> |
|
116 |
<CheckBox IsChecked="{Binding condition, Mode=TwoWay}"/> |
|
117 |
</DataTemplate> |
|
118 |
</telerik:GridViewDataColumn.CellTemplate> |
|
119 |
</telerik:GridViewDataColumn> |
|
123 |
<telerik:GridViewDataColumn DataMemberBinding="{Binding condition,Mode=TwoWay}" Header="Condition" Width="64" IsReadOnly="True"/> |
|
120 | 124 |
<telerik:GridViewDataColumn Width="24" IsFilterable="False" IsReadOnly="True"> |
121 | 125 |
<telerik:GridViewDataColumn.CellTemplate> |
122 | 126 |
<DataTemplate> |
PemssAPI/PemssApi.cs | ||
---|---|---|
62 | 62 |
created = comment["created"]?.ToObject<string>(), |
63 | 63 |
comment = comment["comment"]?.ToObject<string>(), |
64 | 64 |
commentId = comment["commentId"]?.ToObject<string>(), |
65 |
condition = comment["condition"].HasValues ? comment["condition"].ToObject<bool>() : false,
|
|
65 |
condition = comment["condition"]?.ToObject<bool>() != null ? comment["condition"].ToObject<bool>() : false,
|
|
66 | 66 |
createdBy = comment["createdBy"]?.ToObject<string>(), |
67 | 67 |
createdByName = comment["createdByName"]?.ToObject<string>(), |
68 | 68 |
}); |
... | ... | |
209 | 209 |
result = new DocumentInfo |
210 | 210 |
{ |
211 | 211 |
slipNo = jObject.Property("slipNo")?.Value?.ToString(), |
212 |
dId = jObject.Property("dId").HasValues ? jObject.Property("dId").ToObject<int>() : -1,
|
|
212 |
dId = jObject.Property("dId")?.ToObject<int>() != null ? jObject.Property("dId").ToObject<int>() : -1,
|
|
213 | 213 |
docName = jObject.Property("docName")?.Value?.ToString(), |
214 | 214 |
fileName = jObject.Property("fileName")?.Value?.ToString(), |
215 | 215 |
revision = jObject.Property("revision")?.Value?.ToString() |
내보내기 Unified diff