개정판 1c7f408a
mainWindow를 RadWindow로 변경
Change-Id: I0ac468f572b53cd39e832aed20e7d350b5c03d42
KCOM/App.xaml | ||
---|---|---|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:local="clr-namespace:KCOM" |
5 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="KCOM.App" |
|
6 |
StartupUri="MainWindow.xaml"> |
|
5 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="KCOM.App"> |
|
7 | 6 |
<Application.Resources> |
8 | 7 |
<ResourceDictionary> |
9 | 8 |
<ResourceDictionary.MergedDictionaries> |
... | ... | |
11 | 10 |
<ResourceDictionary/> |
12 | 11 |
<ResourceDictionary Source="Resources\DecodeImageTemplate.xaml"/> |
13 | 12 |
<ResourceDictionary Source="Resources\Theme_CustomControl.xaml"/> |
13 |
<ResourceDictionary Source="Resources\MainWindowStyle.xaml"/> |
|
14 | 14 |
<ResourceDictionary Source="Assets\RadGridViewStyleResourceDictionary.xaml"/> |
15 | 15 |
<ResourceDictionary Source="Messenger\StyleDictionary.xaml"/> |
16 | 16 |
<ResourceDictionary Source="/MarkupToPDF;component/themes/generic.xaml"/> |
KCOM/App.xaml.cs | ||
---|---|---|
20 | 20 |
using System.Runtime.InteropServices; |
21 | 21 |
using KCOM.Views; |
22 | 22 |
using System.Threading.Tasks; |
23 |
using Telerik.Windows.Controls; |
|
23 | 24 |
|
24 | 25 |
[assembly: log4net.Config.XmlConfigurator(Watch = true)] |
25 | 26 |
namespace KCOM |
... | ... | |
134 | 135 |
try |
135 | 136 |
{ |
136 | 137 |
|
138 |
Current.ShutdownMode = ShutdownMode.OnExplicitShutdown; |
|
137 | 139 |
|
138 | 140 |
splashScreen.Show(); |
139 | 141 |
|
... | ... | |
260 | 262 |
#endif |
261 | 263 |
|
262 | 264 |
await SplashScreenAsnyc(); |
265 |
|
|
263 | 266 |
base.OnStartup(e); |
267 |
|
|
268 |
Current.ShutdownMode = ShutdownMode.OnMainWindowClose; |
|
269 |
|
|
270 |
|
|
271 |
(new MainWindow()).Show(); |
|
272 |
//this.MainWindow.Show(); |
|
273 |
//KeyValuePair<bool, string> updatecheck = UpdateCheck(e); |
|
264 | 274 |
|
265 |
//this.MainWindow = new MainWindow(); |
|
266 | 275 |
|
267 | 276 |
} |
268 | 277 |
catch (Exception ex) |
... | ... | |
275 | 284 |
} |
276 | 285 |
} |
277 | 286 |
|
287 |
private void CallUpdateProcess(string updateurl) |
|
288 |
{ |
|
289 |
ProcessStartInfo proInfo = new ProcessStartInfo(); |
|
290 |
string smartupdaterpath = string.Empty; |
|
291 |
smartupdaterpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmartUpdate.exe"); |
|
292 |
Process.Start(smartupdaterpath, updateurl); |
|
293 |
} |
|
294 |
|
|
295 |
private KeyValuePair<bool, string> UpdateCheck(StartupEventArgs startupEvents) |
|
296 |
{ |
|
297 |
bool isUpdateCheck = false; |
|
298 |
string updateurl = string.Empty; |
|
299 |
try |
|
300 |
{ |
|
301 |
bool is64bit = Environment.Is64BitProcess; |
|
302 |
string clientversion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); |
|
303 |
ServiceDeepViewClient BaseClient = new ServiceDeepViewClient(_binding, _EndPoint); |
|
304 |
updateurl = BaseClient.GetVersionData(is64bit, clientversion); |
|
305 |
|
|
306 |
var result = MessageBox.Show("test","test",MessageBoxButton.OKCancel); |
|
307 |
|
|
308 |
if (result == MessageBoxResult.Cancel) |
|
309 |
{ |
|
310 |
return new KeyValuePair<bool, string>(); |
|
311 |
} |
|
312 |
|
|
313 |
if (Check_Uri.isUri(updateurl)) |
|
314 |
{ |
|
315 |
DialogParameters parameters = new DialogParameters() |
|
316 |
{ |
|
317 |
//Owner = Application.Current.MainWindow, |
|
318 |
Content = new System.Windows.Controls.TextBlock() |
|
319 |
{ |
|
320 |
MinWidth = 400, |
|
321 |
FontSize = 11, |
|
322 |
Text = "새로운 버전이 있습니다. \n업데이트 하시겠습니까?", |
|
323 |
TextWrapping = System.Windows.TextWrapping.Wrap |
|
324 |
}, |
|
325 |
Header = "Confirm", |
|
326 |
Theme = new Telerik.Windows.Controls.VisualStudio2013Theme(), |
|
327 |
ModalBackground = new System.Windows.Media.SolidColorBrush { Color = System.Windows.Media.Colors.Black, Opacity = 0.6 }, |
|
328 |
Closed = delegate (object windowSender, WindowClosedEventArgs e) |
|
329 |
{ |
|
330 |
if (e.DialogResult == true) |
|
331 |
{ |
|
332 |
CallUpdateProcess(updateurl); |
|
333 |
} |
|
334 |
|
|
335 |
base.OnStartup(startupEvents); |
|
336 |
(new MainWindow()).Show(); |
|
337 |
} |
|
338 |
}; |
|
339 |
Telerik.Windows.Controls.RadWindow.Confirm(parameters); |
|
340 |
|
|
341 |
} |
|
342 |
else |
|
343 |
{ |
|
344 |
base.OnStartup(startupEvents); |
|
345 |
(new MainWindow()).Show(); |
|
346 |
} |
|
347 |
} |
|
348 |
catch (Exception) |
|
349 |
{ |
|
350 |
throw; |
|
351 |
} |
|
352 |
return new KeyValuePair<bool, string>(isUpdateCheck, updateurl); |
|
353 |
} |
|
354 |
|
|
355 |
|
|
278 | 356 |
private async Task<bool> SplashScreenAsnyc() |
279 | 357 |
{ |
280 | 358 |
int value = 100 / ISplashMessage.SplashMessageCnt; |
KCOM/Controls/PrintControl.xaml.cs | ||
---|---|---|
22 | 22 |
using iTextSharp.text.pdf; |
23 | 23 |
using Microsoft.Office.Core; |
24 | 24 |
using System.Net; |
25 |
using KCOM; |
|
25 | 26 |
|
26 | 27 |
namespace KCOM.Control |
27 | 28 |
{ |
... | ... | |
597 | 598 |
} |
598 | 599 |
|
599 | 600 |
SaveDig.Title = "Save an PDF File"; |
600 |
if(SaveDig.ShowDialog().Value) |
|
601 |
var mainwindow = (RadWindowManager.Current.GetWindows().Find(x => x is MainWindow) as MainWindow); |
|
602 |
|
|
603 |
if (SaveDig.ShowDialog().Value) |
|
601 | 604 |
{ |
602 | 605 |
Printimg_List = new Dictionary<int, System.Drawing.Image>(); |
603 | 606 |
|
... | ... | |
688 | 691 |
})); |
689 | 692 |
PageChanged(_StartPageNo); |
690 | 693 |
|
691 |
(Application.Current.MainWindow as MainWindow).dzMainMenu.DialogMessage_Alert("Success", "Alert");
|
|
694 |
(RadWindowManager.Current.GetWindows().Find(x=>x is MainWindow) as MainWindow).dzMainMenu.DialogMessage_Alert("Success", "Alert");
|
|
692 | 695 |
}else |
693 | 696 |
{ |
694 | 697 |
Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate |
... | ... | |
696 | 699 |
printIndy.IsBusy = false; |
697 | 700 |
})); |
698 | 701 |
|
699 |
(Application.Current.MainWindow as MainWindow).dzMainMenu.DialogMessage_Alert("Cancel", "Alert");
|
|
702 |
mainwindow.dzMainMenu.DialogMessage_Alert("Cancel", "Alert");
|
|
700 | 703 |
} |
701 | 704 |
} |
702 | 705 |
catch (Exception ex) |
KCOM/Controls/Symbol.xaml.cs | ||
---|---|---|
94 | 94 |
//lstSymbolPublic.ItemsSource = null; |
95 | 95 |
|
96 | 96 |
Symbol_Custom Custom = new Symbol_Custom(); |
97 |
List<Symbol_Custom> Custom_List = new List<Symbol_Custom>(); |
|
98 |
|
|
99 |
var symbol_Private = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetSymbolList(App.ViewInfo.UserID); |
|
100 |
foreach (var item in symbol_Private) |
|
101 |
{ |
|
102 |
Custom.Name = item.NAME; |
|
103 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal); |
|
104 |
Custom.ID = item.ID; |
|
105 |
Custom_List.Add(Custom); |
|
106 |
Custom = new Symbol_Custom(); |
|
107 |
} |
|
108 |
lstSymbolPrivate.ItemsSource = Custom_List; |
|
109 |
|
|
110 |
Custom = new Symbol_Custom(); |
|
111 |
Custom_List = new List<Symbol_Custom>(); |
|
97 |
List<Symbol_Custom> Custom_List = new List<Symbol_Custom>(); |
|
112 | 98 |
|
113 |
deptlist.ItemsSource = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolDeptList();
|
|
99 |
var mainwindow = (RadWindowManager.Current.GetWindows().Find(x => x is MainWindow) as MainWindow);
|
|
114 | 100 |
|
115 |
List<SYMBOL_PUBLIC> symbol_Public; |
|
101 |
if (mainwindow.dzMainMenu.BaseClient != null) |
|
102 |
{ |
|
103 |
var symbol_Private = mainwindow.dzMainMenu.BaseClient.GetSymbolList(App.ViewInfo.UserID); |
|
116 | 104 |
|
105 |
foreach (var item in symbol_Private) |
|
106 |
{ |
|
107 |
Custom.Name = item.NAME; |
|
108 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal); |
|
109 |
Custom.ID = item.ID; |
|
110 |
Custom_List.Add(Custom); |
|
111 |
Custom = new Symbol_Custom(); |
|
112 |
} |
|
113 |
lstSymbolPrivate.ItemsSource = Custom_List; |
|
117 | 114 |
|
118 |
if (deptlist.SelectedValue != null) |
|
119 |
{ |
|
120 |
symbol_Public = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolList(deptlist.SelectedValue.ToString()); |
|
121 |
} |
|
122 |
else |
|
123 |
{ |
|
124 |
symbol_Public = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolList(null); |
|
125 |
} |
|
126 |
foreach (var item in symbol_Public) |
|
127 |
{ |
|
128 |
Custom.Name = item.NAME; |
|
129 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal); |
|
130 |
Custom.ID = item.ID; |
|
131 |
Custom_List.Add(Custom); |
|
132 | 115 |
Custom = new Symbol_Custom(); |
116 |
Custom_List = new List<Symbol_Custom>(); |
|
117 |
|
|
118 |
deptlist.ItemsSource = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolDeptList(); |
|
119 |
|
|
120 |
List<SYMBOL_PUBLIC> symbol_Public; |
|
121 |
|
|
122 |
|
|
123 |
if (deptlist.SelectedValue != null) |
|
124 |
{ |
|
125 |
symbol_Public = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolList(deptlist.SelectedValue.ToString()); |
|
126 |
} |
|
127 |
else |
|
128 |
{ |
|
129 |
symbol_Public = ViewerDataModel.Instance.SystemMain.dzMainMenu.BaseClient.GetPublicSymbolList(null); |
|
130 |
} |
|
131 |
foreach (var item in symbol_Public) |
|
132 |
{ |
|
133 |
Custom.Name = item.NAME; |
|
134 |
Custom.ImageUri = CommonLib.Common.IPReplace(item.IMAGE_URL, App.isExternal); |
|
135 |
Custom.ID = item.ID; |
|
136 |
Custom_List.Add(Custom); |
|
137 |
Custom = new Symbol_Custom(); |
|
138 |
} |
|
139 |
lstSymbolPublic.ItemsSource = Custom_List; |
|
133 | 140 |
} |
134 |
lstSymbolPublic.ItemsSource = Custom_List; |
|
135 | 141 |
} |
136 | 142 |
|
137 | 143 |
public PngBitmapEncoder symImage(string data) |
... | ... | |
864 | 870 |
SyncInit(); |
865 | 871 |
ViewerDataModel.Instance.SystemMain.dzMainMenu.controlType = MarkupToPDF.Controls.Common.ControlType.ImgControl; |
866 | 872 |
//캡쳐 하기 전에 코멘트 저장 |
867 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Count > 0 || (Application.Current.MainWindow as MainWindow).dzMainMenu.SelectLayer.Children.Count > 0) |
|
873 |
var mainwindow = (RadWindowManager.Current.GetWindows().Find(x => x is MainWindow) as MainWindow); |
|
874 |
|
|
875 |
if (Common.ViewerDataModel.Instance.MarkupControls_USER.Count > 0 || mainwindow.dzMainMenu.SelectLayer.Children.Count > 0) |
|
868 | 876 |
{ |
869 |
var menu = (Application.Current.MainWindow as MainWindow).dzMainMenu;
|
|
877 |
var menu = mainwindow.dzMainMenu;
|
|
870 | 878 |
SelectionSet.Instance.UnSelect(menu); |
871 | 879 |
if (menu.PreviewUserMarkupInfoItem != null && menu.PreviewUserMarkupInfoItem.IsPreviewUser == true) |
872 | 880 |
{ |
873 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
|
|
881 |
mainwindow.dzTopMenu.SaveEventCallback(null, null);
|
|
874 | 882 |
} |
875 | 883 |
else if (menu.gridViewMarkup.SelectedItems.Count == 0 || (menu.gridViewMarkup.SelectedItems.FirstOrDefault() as IKCOM.MarkupInfoItem).UserID != App.ViewInfo.UserID) |
876 | 884 |
{ |
... | ... | |
878 | 886 |
} |
879 | 887 |
else |
880 | 888 |
{ |
881 |
(Application.Current.MainWindow as MainWindow).dzTopMenu.SaveEventCallback(null, null);
|
|
889 |
mainwindow.dzTopMenu.SaveEventCallback(null, null);
|
|
882 | 890 |
} |
883 | 891 |
} |
884 | 892 |
Application.Current.MainWindow.Focus(); |
885 | 893 |
Common.ViewerDataModel.Instance.Capture_Opacity = 0.49; |
886 |
(Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
|
|
894 |
mainwindow.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture;
|
|
887 | 895 |
} |
888 | 896 |
|
889 | 897 |
|
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
18 | 18 |
|
19 | 19 |
namespace KCOM |
20 | 20 |
{ |
21 |
public partial class MainWindow : Window
|
|
21 |
public partial class MainWindow : RadWindow, System.Windows.Markup.IComponentConnector
|
|
22 | 22 |
{ |
23 | 23 |
public double CumulativeWheel = 0; |
24 | 24 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
2278 | 2278 |
//Common.ViewerDataModel.Instance.PageNumber = ((e.Source as Image).DataContext as Customer).PAGENUMBER; |
2279 | 2279 |
Application.Current.MainWindow.Focus(); |
2280 | 2280 |
Common.ViewerDataModel.Instance.Capture_Opacity = 0.49; |
2281 |
(Application.Current.MainWindow as MainWindow).dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture; |
|
2281 |
|
|
2282 |
var mainwindow = (RadWindowManager.Current.GetWindows().Find(x => x is MainWindow) as MainWindow); |
|
2283 |
if (mainwindow != null) |
|
2284 |
{ |
|
2285 |
mainwindow.dzMainMenu.mouseHandlingMode = IKCOM.MouseHandlingMode.Capture; |
|
2286 |
} |
|
2287 |
|
|
2282 | 2288 |
break; |
2283 | 2289 |
#endregion |
2284 | 2290 |
//#region Cad |
KCOM/Extensions/CollectionExtenstions.cs | ||
---|---|---|
171 | 171 |
|
172 | 172 |
/// <summary> |
173 | 173 |
/// Update all elements of IEnumerable by the update function (only works with reference types) |
174 |
/// where the where function returns true |
|
175 | 174 |
/// </summary> |
176 | 175 |
/// <param name="enumerable">The enumerable where you want to change stuff</param> |
177 |
/// <param name="update">The way you want to change the stuff</param> |
|
178 |
/// <param name="where">The function to check where updates should be made</param> |
|
176 |
/// <param name="Find">T와 동일한 첫번째 Item을 찾는다. 없으면 null을 반환</param> |
|
179 | 177 |
/// <returns> |
180 | 178 |
/// The same enumerable you passed in |
181 | 179 |
/// </returns> |
182 |
public static IEnumerable<T> UpdateWhere<T>(this IEnumerable<T> enumerable, |
|
180 |
public static T Find<T>(this IEnumerable<T> enumerable, Func<T, bool> where) where T : class |
|
181 |
{ |
|
182 |
T result = null; |
|
183 |
|
|
184 |
foreach (var item in enumerable) |
|
185 |
{ |
|
186 |
if (where(item)) |
|
187 |
{ |
|
188 |
result = item; |
|
189 |
} |
|
190 |
} |
|
191 |
|
|
192 |
return result; |
|
193 |
} |
|
194 |
|
|
195 |
/// <summary> |
|
196 |
/// Update all elements of IEnumerable by the update function (only works with reference types) |
|
197 |
/// where the where function returns true |
|
198 |
/// </summary> |
|
199 |
/// <param name="enumerable">The enumerable where you want to change stuff</param> |
|
200 |
/// <param name="update">The way you want to change the stuff</param> |
|
201 |
/// <param name="where">The function to check where updates should be made</param> |
|
202 |
/// <returns> |
|
203 |
/// The same enumerable you passed in |
|
204 |
/// </returns> |
|
205 |
public static IEnumerable<T> UpdateWhere<T>(this IEnumerable<T> enumerable, |
|
183 | 206 |
Action<T> update, Func<T, bool> where) where T : class |
184 | 207 |
{ |
185 | 208 |
ArgumentCheck.IsNullorWhiteSpace(enumerable, "enumerable"); |
KCOM/KCOM.csproj | ||
---|---|---|
420 | 420 |
<SubType>Designer</SubType> |
421 | 421 |
<Generator>MSBuild:Compile</Generator> |
422 | 422 |
</Page> |
423 |
<Page Include="Resources\MainWindowStyle.xaml"> |
|
424 |
<SubType>Designer</SubType> |
|
425 |
<Generator>MSBuild:Compile</Generator> |
|
426 |
</Page> |
|
423 | 427 |
<Page Include="Views\AddRequirement.xaml"> |
424 | 428 |
<SubType>Designer</SubType> |
425 | 429 |
<Generator>MSBuild:Compile</Generator> |
KCOM/MainWindow.xaml | ||
---|---|---|
1 |
<Window x:Class="KCOM.MainWindow" |
|
1 |
<telerik:RadWindow x:Class="KCOM.MainWindow"
|
|
2 | 2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
... | ... | |
7 | 7 |
xmlns:control="clr-namespace:KCOM.Controls" |
8 | 8 |
xmlns:view="clr-namespace:KCOM.Views" |
9 | 9 |
mc:Ignorable="d" |
10 |
WindowStyle="None" WindowStartupLocation="CenterScreen" ResizeMode="CanResizeWithGrip" AllowsTransparency="True" |
|
10 |
d:DesignHeight="800" d:DesignWidth="1600" |
|
11 |
xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation" |
|
12 |
WindowStartupLocation="CenterScreen" |
|
13 |
navigation:RadWindowInteropHelper.ShowInTaskbar="True" |
|
14 |
Style="{StaticResource MainWindowStyle}" BorderBrush="#FF007ACC" |
|
15 |
navigation:RadWindowInteropHelper.Icon="markup.ico" |
|
11 | 16 |
Background="{DynamicResource KCOMColor_TopMenubackgroundBrush}" |
12 |
Title="MARKUS" >
|
|
13 |
<Window.Resources> |
|
17 |
Header="MARKUS" Foreground="White" >
|
|
18 |
<telerik:RadWindow.Resources>
|
|
14 | 19 |
<Style x:Key="NoMarginGrid" TargetType="{x:Type Grid}"> |
15 | 20 |
<Setter Property="Margin" Value="5,5,5,5"/> |
16 | 21 |
</Style> |
17 |
</Window.Resources> |
|
22 |
</telerik:RadWindow.Resources>
|
|
18 | 23 |
<Grid Style="{StaticResource NoMarginGrid}"> |
19 | 24 |
<Grid.RowDefinitions> |
20 | 25 |
<RowDefinition Height="Auto"/> |
... | ... | |
22 | 27 |
<RowDefinition Height="Auto"/> |
23 | 28 |
<RowDefinition Height="*"/> |
24 | 29 |
</Grid.RowDefinitions> |
25 |
<Border VerticalAlignment="Stretch" MouseLeftButtonDown="WindowDragEvent" Background="{DynamicResource KCOMColor_TopMenubackgroundBrush}" |
|
30 |
<!--<Border VerticalAlignment="Stretch" MouseLeftButtonDown="WindowDragEvent" Background="{DynamicResource KCOMColor_TopMenubackgroundBrush}"
|
|
26 | 31 |
MouseLeftButtonUp="WindowDragEventUp" MouseMove="WindowDragEventMove"> |
27 | 32 |
<Grid> |
28 |
<!--<StackPanel Orientation="Horizontal" Opacity="0.6" Margin="5,0" Visibility="Collapsed">
|
|
33 |
<StackPanel Orientation="Horizontal" Opacity="0.6" Margin="5,0" Visibility="Collapsed"> |
|
29 | 34 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/save.png" telerik:StyleManager.Theme="Office2016"/> |
30 | 35 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/printer.png" telerik:StyleManager.Theme="Office2016"/> |
31 | 36 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/pdf.png" telerik:StyleManager.Theme="Office2016"/> |
32 | 37 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/undo.png" telerik:StyleManager.Theme="Office2016"/> |
33 | 38 |
<telerik:RadRibbonButton SmallImage="/KCOM;component/Resources/Images/MenuImage/redo.png" telerik:StyleManager.Theme="Office2016"/> |
34 |
</StackPanel>-->
|
|
39 |
</StackPanel> |
|
35 | 40 |
<TextBlock Text="MARKUS" Foreground="White" Margin="355,0,355,4" HorizontalAlignment="Center" VerticalAlignment="Bottom" x:Name="TitleText"/> |
36 | 41 |
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Stretch"> |
37 | 42 |
<Image Visibility="Visible" Source="/KCOM;component/Resources/Images/MenuImage_New/minimize-window.png" Width="24" Height="24" MouseDown="WinState" x:Name="Win_min"/> |
... | ... | |
39 | 44 |
<Image Visibility="Visible" Source="/KCOM;component/Resources/Images/MenuImage_New/close-window.png" Width="24" Height="24" MouseDown="WinState" x:Name="Win_Close"/> |
40 | 45 |
</StackPanel> |
41 | 46 |
</Grid> |
42 |
</Border> |
|
47 |
</Border>-->
|
|
43 | 48 |
<view:TopMenu x:Name="dzTopMenu" Grid.Row="1" VerticalAlignment="Top"/> |
44 | 49 |
<view:MainMenu x:Name="dzMainMenu" Grid.Row="3" VerticalAlignment="Stretch"/> |
45 | 50 |
<Border Grid.Row="2" Background="#f1f1f1" MinHeight="30" Visibility="Collapsed"> |
... | ... | |
55 | 60 |
</StackPanel> |
56 | 61 |
</Border> |
57 | 62 |
</Grid> |
58 |
</Window> |
|
63 |
</telerik:RadWindow> |
KCOM/MainWindow.xaml.cs | ||
---|---|---|
37 | 37 |
/// <summary> |
38 | 38 |
/// MainWindow.xaml에 대한 상호 작용 논리 |
39 | 39 |
/// </summary> |
40 |
public partial class MainWindow : Window
|
|
40 |
public partial class MainWindow : RadWindow, System.Windows.Markup.IComponentConnector
|
|
41 | 41 |
{ |
42 | 42 |
bool isSaveCheck = false; |
43 | 43 |
|
... | ... | |
54 | 54 |
App.splashString(ISplashMessage.MAINWINDOW); |
55 | 55 |
this.Loaded += MainWindow_Loaded; |
56 | 56 |
this.KeyDown += new KeyEventHandler(KeyEventDownAction); |
57 |
this.SourceInitialized += new EventHandler(win_SourceInitialized); |
|
57 |
//this.SourceInitialized += new EventHandler(win_SourceInitialized);
|
|
58 | 58 |
} |
59 | 59 |
|
60 | 60 |
public static BitmapImage CursorChange() |
... | ... | |
91 | 91 |
//cursor change |
92 | 92 |
this.Cursor = new Cursor(CursorChange().StreamSource); |
93 | 93 |
|
94 |
double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth; |
|
95 |
double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight; |
|
96 |
//this.Width += 40; |
|
97 |
double windowWidth = this.Width; |
|
98 |
double windowHeight = this.Height; |
|
99 |
this.Left = (screenWidth / 2) - (windowWidth / 2); |
|
100 |
this.Top = (screenHeight / 2) - (windowHeight / 2); |
|
101 |
|
|
102 | 94 |
ViewerDataModel.Instance.SystemMain = this; |
103 | 95 |
|
104 | 96 |
if (!App.ParameterMode) |
... | ... | |
172 | 164 |
} |
173 | 165 |
} |
174 | 166 |
|
167 |
//double screenWidth = System.Windows.SystemParameters.PrimaryScreenWidth; |
|
168 |
//double screenHeight = System.Windows.SystemParameters.PrimaryScreenHeight; |
|
169 |
////this.Width += 40; |
|
170 |
|
|
171 |
var graphics = System.Drawing.Graphics.FromHwnd(IntPtr.Zero); |
|
172 |
var screenWidth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width; |
|
173 |
var screenHeight = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height; |
|
174 |
var pixelToDPI = 96.0 / graphics.DpiX; |
|
175 |
this.Width = screenWidth * pixelToDPI; |
|
176 |
this.Height = screenHeight * pixelToDPI; |
|
177 |
|
|
178 |
//double windowWidth = this.Width; |
|
179 |
//double windowHeight = this.Height; |
|
180 |
|
|
181 |
this.Left = (screenWidth / 2) - (this.Width / 2); |
|
182 |
this.Top = (screenHeight / 2) - (this.Height / 2); |
|
183 |
|
|
184 |
|
|
175 | 185 |
//App.ViewInfo = new IKCOM.ViewInfo |
176 | 186 |
//{ |
177 | 187 |
// DocumentItemID = "11111112", |
... | ... | |
189 | 199 |
//this.dzMainMenu.SetView(App.ViewInfo); |
190 | 200 |
} |
191 | 201 |
|
192 |
|
|
202 |
|
|
193 | 203 |
bool restoreIfMove = false; |
194 | 204 |
|
195 | 205 |
private void WindowDragEvent(object sender, MouseButtonEventArgs e) |
196 | 206 |
{ |
197 |
if(string.IsNullOrEmpty(destfilepath)) |
|
198 |
{ |
|
199 |
if (e.ClickCount == 2) |
|
200 |
{ |
|
201 |
if ((ResizeMode == ResizeMode.CanResize) || |
|
202 |
(ResizeMode == ResizeMode.CanResizeWithGrip)) |
|
203 |
{ |
|
204 |
SwitchState(); |
|
205 |
} |
|
206 |
} |
|
207 |
else |
|
208 |
{ |
|
209 |
if (WindowState == WindowState.Maximized) |
|
210 |
{ |
|
211 |
restoreIfMove = true; |
|
212 |
} |
|
213 |
|
|
214 |
this.DragMove(); |
|
215 |
} |
|
216 |
} |
|
207 |
//if(string.IsNullOrEmpty(destfilepath))
|
|
208 |
//{
|
|
209 |
// if (e.ClickCount == 2)
|
|
210 |
// {
|
|
211 |
// if ((ResizeMode == ResizeMode.CanResize) ||
|
|
212 |
// (ResizeMode == ResizeMode.CanResizeWithGrip))
|
|
213 |
// {
|
|
214 |
// SwitchState();
|
|
215 |
// }
|
|
216 |
// }
|
|
217 |
// else
|
|
218 |
// {
|
|
219 |
// if (WindowState == WindowState.Maximized)
|
|
220 |
// {
|
|
221 |
// restoreIfMove = true;
|
|
222 |
// }
|
|
223 |
|
|
224 |
// this.DragMove();
|
|
225 |
// }
|
|
226 |
//}
|
|
217 | 227 |
} |
218 | 228 |
|
219 | 229 |
private void WindowDragEventUp(object sender, MouseButtonEventArgs e) |
... | ... | |
223 | 233 |
|
224 | 234 |
private void WindowDragEventMove(object sender, MouseEventArgs e) |
225 | 235 |
{ |
226 |
if (restoreIfMove) |
|
227 |
{ |
|
228 |
if (Mouse.LeftButton == MouseButtonState.Pressed) |
|
229 |
{ |
|
230 |
//this.WindowState = WindowState.Normal; |
|
236 |
//if (restoreIfMove)
|
|
237 |
//{
|
|
238 |
// if (Mouse.LeftButton == MouseButtonState.Pressed)
|
|
239 |
// {
|
|
240 |
// //this.WindowState = WindowState.Normal;
|
|
231 | 241 |
|
232 |
restoreIfMove = false; |
|
242 |
// restoreIfMove = false;
|
|
233 | 243 |
|
234 |
double percentHorizontal = e.GetPosition(this).X / ActualWidth; |
|
235 |
double targetHorizontal = RestoreBounds.Width * percentHorizontal; |
|
244 |
// double percentHorizontal = e.GetPosition(this).X / ActualWidth;
|
|
245 |
// double targetHorizontal = RestoreBounds.Width * percentHorizontal;
|
|
236 | 246 |
|
237 |
double percentVertical = e.GetPosition(this).Y / ActualHeight; |
|
238 |
double targetVertical = RestoreBounds.Height * percentVertical; |
|
247 |
// double percentVertical = e.GetPosition(this).Y / ActualHeight;
|
|
248 |
// double targetVertical = RestoreBounds.Height * percentVertical;
|
|
239 | 249 |
|
240 |
POINT lMousePosition; |
|
241 |
GetCursorPos(out lMousePosition); |
|
250 |
// POINT lMousePosition;
|
|
251 |
// GetCursorPos(out lMousePosition);
|
|
242 | 252 |
|
243 |
Left = lMousePosition.X - targetHorizontal; |
|
244 |
double top = lMousePosition.Y - targetVertical; |
|
245 |
if(top < 10) |
|
246 |
{ |
|
247 |
top = 10; |
|
248 |
} |
|
249 |
Top = lMousePosition.Y; |
|
253 |
// Left = lMousePosition.X - targetHorizontal;
|
|
254 |
// double top = lMousePosition.Y - targetVertical;
|
|
255 |
// if(top < 10)
|
|
256 |
// {
|
|
257 |
// top = 10;
|
|
258 |
// }
|
|
259 |
// Top = lMousePosition.Y;
|
|
250 | 260 |
|
251 | 261 |
|
252 |
WindowState = WindowState.Normal; |
|
262 |
// WindowState = WindowState.Normal;
|
|
253 | 263 |
|
254 |
this.DragMove(); |
|
255 |
} |
|
256 |
} |
|
264 |
// this.DragMove();
|
|
265 |
// }
|
|
266 |
//}
|
|
257 | 267 |
} |
258 | 268 |
|
259 | 269 |
[DllImport("user32.dll")] |
... | ... | |
509 | 519 |
|
510 | 520 |
void win_SourceInitialized(object sender, EventArgs e) |
511 | 521 |
{ |
512 |
System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle; |
|
513 |
WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc)); |
|
522 |
//System.IntPtr handle = (new WinInterop.WindowInteropHelper(this)).Handle;
|
|
523 |
//WinInterop.HwndSource.FromHwnd(handle).AddHook(new WinInterop.HwndSourceHook(WindowProc));
|
|
514 | 524 |
} |
515 | 525 |
|
516 | 526 |
private static System.IntPtr WindowProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) |
KCOM/Resources/MainWindowStyle.xaml | ||
---|---|---|
1 |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
2 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
3 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
|
4 |
xmlns:animation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" |
|
5 |
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" |
|
6 |
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" |
|
7 |
xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation" |
|
8 |
xmlns:local="clr-namespace:KCOM.Resources" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"> |
|
9 |
<SolidColorBrush x:Key="WindowBorderBackground" Color="#FFCCE4FC"/> |
|
10 |
<SolidColorBrush x:Key="WindowModalBackground" Color="#333333FF"/> |
|
11 |
<ControlTemplate x:Key="RadWindowTemplate" TargetType="{x:Type telerikNavigation:RadWindow}"> |
|
12 |
<ControlTemplate.Resources> |
|
13 |
<telerik1:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/> |
|
14 |
<Style x:Key="WindowResizeThumbStyle" TargetType="{x:Type Thumb}"> |
|
15 |
<Setter Property="MinWidth" Value="5"/> |
|
16 |
<Setter Property="MinHeight" Value="5"/> |
|
17 |
<Setter Property="Template"> |
|
18 |
<Setter.Value> |
|
19 |
<ControlTemplate TargetType="{x:Type Thumb}"> |
|
20 |
<Rectangle Fill="Transparent"/> |
|
21 |
</ControlTemplate> |
|
22 |
</Setter.Value> |
|
23 |
</Setter> |
|
24 |
</Style> |
|
25 |
<Style x:Key="WindowButtonStyle" TargetType="{x:Type telerik1:RadButton}"> |
|
26 |
<Setter Property="MinHeight" Value="18"/> |
|
27 |
<Setter Property="MinWidth" Value="18"/> |
|
28 |
<Setter Property="Padding" Value="0"/> |
|
29 |
<Setter Property="Margin" Value="0"/> |
|
30 |
<Setter Property="VerticalAlignment" Value="Center"/> |
|
31 |
<Setter Property="VerticalContentAlignment" Value="Bottom"/> |
|
32 |
<Setter Property="IsTabStop" Value="False"/> |
|
33 |
<Setter Property="Template"> |
|
34 |
<Setter.Value> |
|
35 |
<ControlTemplate TargetType="{x:Type telerik1:RadButton}"> |
|
36 |
<Grid> |
|
37 |
<VisualStateManager.VisualStateGroups> |
|
38 |
<VisualStateGroup x:Name="CommonStates"> |
|
39 |
<VisualState x:Name="Normal"> |
|
40 |
<Storyboard/> |
|
41 |
</VisualState> |
|
42 |
<VisualState x:Name="Disabled"> |
|
43 |
<Storyboard> |
|
44 |
<DoubleAnimation Duration="0" Storyboard.TargetName="Content" Storyboard.TargetProperty="Opacity" To="0.3"/> |
|
45 |
</Storyboard> |
|
46 |
</VisualState> |
|
47 |
<VisualState x:Name="MouseOver"> |
|
48 |
<Storyboard> |
|
49 |
<ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Rectangle" Storyboard.TargetProperty="Fill"> |
|
50 |
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik1:VisualStudio2013Resource ResourceKey=SemiBasicBrush}"/> |
|
51 |
</ObjectAnimationUsingKeyFrames> |
|
52 |
</Storyboard> |
|
53 |
</VisualState> |
|
54 |
<VisualState x:Name="Pressed"> |
|
55 |
<Storyboard> |
|
56 |
<ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="Rectangle" Storyboard.TargetProperty="Fill"> |
|
57 |
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{telerik1:VisualStudio2013Resource ResourceKey=AccentMainBrush}"/> |
|
58 |
</ObjectAnimationUsingKeyFrames> |
|
59 |
</Storyboard> |
|
60 |
</VisualState> |
|
61 |
</VisualStateGroup> |
|
62 |
</VisualStateManager.VisualStateGroups> |
|
63 |
<Rectangle Fill="Transparent" x:Name="Rectangle"/> |
|
64 |
<ContentPresenter x:Name="Content" Margin="{TemplateBinding Padding}"/> |
|
65 |
</Grid> |
|
66 |
</ControlTemplate> |
|
67 |
</Setter.Value> |
|
68 |
</Setter> |
|
69 |
</Style> |
|
70 |
</ControlTemplate.Resources> |
|
71 |
<Grid x:Name="LayoutRoot"> |
|
72 |
<VisualStateManager.VisualStateGroups> |
|
73 |
<VisualStateGroup x:Name="CommonStates"> |
|
74 |
<VisualState x:Name="Normal"/> |
|
75 |
<VisualState x:Name="Disabled"/> |
|
76 |
</VisualStateGroup> |
|
77 |
<VisualStateGroup x:Name="FocusStates"> |
|
78 |
<VisualState x:Name="Focused"/> |
|
79 |
<VisualState x:Name="Unfocused"/> |
|
80 |
</VisualStateGroup> |
|
81 |
<VisualStateGroup x:Name="DragStates"> |
|
82 |
<VisualState x:Name="NotDragging"/> |
|
83 |
<VisualState x:Name="Dragging"/> |
|
84 |
<VisualState x:Name="Resizing"/> |
|
85 |
</VisualStateGroup> |
|
86 |
<VisualStateGroup x:Name="WindowStates"> |
|
87 |
<VisualState x:Name="NormalWindow"/> |
|
88 |
<VisualState x:Name="MaximizedRestricted"/> |
|
89 |
<VisualState x:Name="Maximized"> |
|
90 |
<Storyboard> |
|
91 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Margin"> |
|
92 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
93 |
<DiscreteObjectKeyFrame.Value> |
|
94 |
<Thickness>-1 0 -1 0</Thickness> |
|
95 |
</DiscreteObjectKeyFrame.Value> |
|
96 |
</DiscreteObjectKeyFrame> |
|
97 |
</ObjectAnimationUsingKeyFrames> |
|
98 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder" Storyboard.TargetProperty="Margin"> |
|
99 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
100 |
<DiscreteObjectKeyFrame.Value> |
|
101 |
<Thickness>0</Thickness> |
|
102 |
</DiscreteObjectKeyFrame.Value> |
|
103 |
</DiscreteObjectKeyFrame> |
|
104 |
</ObjectAnimationUsingKeyFrames> |
|
105 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder" Storyboard.TargetProperty="BorderThickness"> |
|
106 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
107 |
<DiscreteObjectKeyFrame.Value> |
|
108 |
<Thickness>0</Thickness> |
|
109 |
</DiscreteObjectKeyFrame.Value> |
|
110 |
</DiscreteObjectKeyFrame> |
|
111 |
</ObjectAnimationUsingKeyFrames> |
|
112 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="WindowOuterBorder" Storyboard.TargetProperty="Margin"> |
|
113 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
114 |
<DiscreteObjectKeyFrame.Value> |
|
115 |
<Thickness>0</Thickness> |
|
116 |
</DiscreteObjectKeyFrame.Value> |
|
117 |
</DiscreteObjectKeyFrame> |
|
118 |
</ObjectAnimationUsingKeyFrames> |
|
119 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons" Storyboard.TargetProperty="Margin"> |
|
120 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
121 |
<DiscreteObjectKeyFrame.Value> |
|
122 |
<Thickness>0 0 3 0</Thickness> |
|
123 |
</DiscreteObjectKeyFrame.Value> |
|
124 |
</DiscreteObjectKeyFrame> |
|
125 |
</ObjectAnimationUsingKeyFrames> |
|
126 |
</Storyboard> |
|
127 |
</VisualState> |
|
128 |
<VisualState x:Name="Minimized"> |
|
129 |
<Storyboard> |
|
130 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentOuterBorder" Storyboard.TargetProperty="Margin"> |
|
131 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
132 |
<DiscreteObjectKeyFrame.Value> |
|
133 |
<Thickness>0</Thickness> |
|
134 |
</DiscreteObjectKeyFrame.Value> |
|
135 |
</DiscreteObjectKeyFrame> |
|
136 |
</ObjectAnimationUsingKeyFrames> |
|
137 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderButtons" Storyboard.TargetProperty="Margin"> |
|
138 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
139 |
<DiscreteObjectKeyFrame.Value> |
|
140 |
<Thickness>0 0 3 0</Thickness> |
|
141 |
</DiscreteObjectKeyFrame.Value> |
|
142 |
</DiscreteObjectKeyFrame> |
|
143 |
</ObjectAnimationUsingKeyFrames> |
|
144 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="HorizontalAlignment"> |
|
145 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
146 |
<DiscreteObjectKeyFrame.Value> |
|
147 |
<HorizontalAlignment>Left</HorizontalAlignment> |
|
148 |
</DiscreteObjectKeyFrame.Value> |
|
149 |
</DiscreteObjectKeyFrame> |
|
150 |
</ObjectAnimationUsingKeyFrames> |
|
151 |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="VerticalAlignment"> |
|
152 |
<DiscreteObjectKeyFrame KeyTime="0"> |
|
153 |
<DiscreteObjectKeyFrame.Value> |
|
154 |
<VerticalAlignment>Top</VerticalAlignment> |
|
155 |
</DiscreteObjectKeyFrame.Value> |
|
156 |
</DiscreteObjectKeyFrame> |
|
157 |
</ObjectAnimationUsingKeyFrames> |
|
158 |
</Storyboard> |
|
159 |
</VisualState> |
|
160 |
</VisualStateGroup> |
|
161 |
</VisualStateManager.VisualStateGroups> |
|
162 |
<Grid x:Name="Shadow" Opacity="0.3"> |
|
163 |
<Rectangle Margin="1 1 -1 -1" Opacity="0.05" Stroke="Black" StrokeThickness="1" RadiusX="4" RadiusY="3"/> |
|
164 |
<Rectangle Margin="1 1 0 0" Opacity="0.1" Stroke="Black" StrokeThickness="1" RadiusX="3" RadiusY="2"/> |
|
165 |
<Rectangle Margin="2 2 1 1" Fill="Black" RadiusX="2" RadiusY="1" Opacity="0.3" StrokeThickness="1"/> |
|
166 |
</Grid> |
|
167 |
<Border x:Name="WindowOuterBorder" Grid.RowSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" Margin="0 0 2 2"> |
|
168 |
<AdornerDecorator> |
|
169 |
<Grid> |
|
170 |
<Grid.RowDefinitions> |
|
171 |
<RowDefinition Height="Auto" MinHeight="28"/> |
|
172 |
<RowDefinition Height="*"/> |
|
173 |
</Grid.RowDefinitions> |
|
174 |
<Grid x:Name="Header" Margin="1 0" Background="{TemplateBinding BorderBrush}"> |
|
175 |
<Grid.ColumnDefinitions> |
|
176 |
<ColumnDefinition Width="*"/> |
|
177 |
<ColumnDefinition Width="Auto"/> |
|
178 |
</Grid.ColumnDefinitions> |
|
179 |
<Thumb x:Name="titleThumb" Grid.ColumnSpan="2" Style="{StaticResource WindowResizeThumbStyle}"/> |
|
180 |
<Grid Grid.Column="0" Margin="4 0 4 0"> |
|
181 |
<Grid.ColumnDefinitions> |
|
182 |
<ColumnDefinition Width="Auto"/> |
|
183 |
<ColumnDefinition Width="*"/> |
|
184 |
<ColumnDefinition Width="Auto"/> |
|
185 |
<ColumnDefinition Width="*"/> |
|
186 |
</Grid.ColumnDefinitions> |
|
187 |
<ContentPresenter x:Name="IconContent" |
|
188 |
Grid.Column="0" |
|
189 |
HorizontalAlignment="Left" |
|
190 |
VerticalAlignment="Center" |
|
191 |
Content="{TemplateBinding Icon}" |
|
192 |
ContentTemplate="{TemplateBinding IconTemplate}" |
|
193 |
Margin="2"/> |
|
194 |
<ContentControl x:Name="HeaderContent" |
|
195 |
Grid.Column="2" |
|
196 |
IsTabStop="False" |
|
197 |
HorizontalAlignment="Stretch" |
|
198 |
VerticalAlignment="Center" |
|
199 |
HorizontalContentAlignment="Stretch" |
|
200 |
Content="{TemplateBinding Header}" |
|
201 |
ContentTemplate="{TemplateBinding HeaderTemplate}" |
|
202 |
SnapsToDevicePixels="True" |
|
203 |
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
|
204 |
FontSize="{telerik1:VisualStudio2013Resource ResourceKey=FontSize}" |
|
205 |
FontFamily="{telerik1:VisualStudio2013Resource ResourceKey=FontFamily}" |
|
206 |
Foreground="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}"/> |
|
207 |
</Grid> |
|
208 |
<Border x:Name="PART_HeaderButtonsBorder" Grid.Column="1"> |
|
209 |
<StackPanel x:Name="HeaderButtons" Grid.Column="1" Orientation="Horizontal" Margin="0 0 6 0"> |
|
210 |
<telerik1:RadButton x:Name="PART_MinimizeButton" |
|
211 |
Command="{x:Static telerik1:WindowCommands.Minimize}" |
|
212 |
Style="{StaticResource WindowButtonStyle}" |
|
213 |
Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource Self}}"> |
|
214 |
<ToolTipService.ToolTip> |
|
215 |
<ToolTip telerik1:LocalizationManager.ResourceKey="Minimize"/> |
|
216 |
</ToolTipService.ToolTip> |
|
217 |
<Path Data="M0,0 L10,0 L10,2 L0,2 z" Height="2" Width="10" VerticalAlignment="Bottom" Margin="0 0 0 4" Fill="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}"/> |
|
218 |
</telerik1:RadButton> |
|
219 |
<telerik1:RadButton x:Name="PART_RestoreButton" |
|
220 |
Command="{x:Static telerik1:WindowCommands.Restore}" |
|
221 |
Style="{StaticResource WindowButtonStyle}" |
|
222 |
Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource Self}}"> |
|
223 |
<ToolTipService.ToolTip> |
|
224 |
<ToolTip telerik1:LocalizationManager.ResourceKey="Restore"/> |
|
225 |
</ToolTipService.ToolTip> |
|
226 |
<Path |
|
227 |
Fill="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}" |
|
228 |
Width="10" |
|
229 |
Height="10" |
|
230 |
Data="M1,5 L1,9 L7,9 L7,5 z M3,2 L3,3 L8,3 L8,6 L9,6 L9,2 z M2,0 L10,0 L10,7 L8,7 L8,10 L0,10 L0,3 L2,3 z"/> |
|
231 |
</telerik1:RadButton> |
|
232 |
<telerik1:RadButton x:Name="PART_MaximizeButton" |
|
233 |
Command="{x:Static telerik1:WindowCommands.Maximize}" |
|
234 |
Style="{StaticResource WindowButtonStyle}" |
|
235 |
Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource Self}}"> |
|
236 |
<ToolTipService.ToolTip> |
|
237 |
<ToolTip telerik1:LocalizationManager.ResourceKey="Maximize"/> |
|
238 |
</ToolTipService.ToolTip> |
|
239 |
<Path Fill="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}" Width="10" Height="10" Data="M0,0 L10,0 10,10 0,10 z M1,3 L9,3 9,9 1,9 z"/> |
|
240 |
</telerik1:RadButton> |
|
241 |
<telerik1:RadButton x:Name="PART_CloseButton" |
|
242 |
Command="{x:Static telerik1:WindowCommands.Close}" |
|
243 |
Style="{StaticResource WindowButtonStyle}" |
|
244 |
Visibility="{Binding IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource Self}}"> |
|
245 |
<ToolTipService.ToolTip> |
|
246 |
<ToolTip telerik1:LocalizationManager.ResourceKey="Close"/> |
|
247 |
</ToolTipService.ToolTip> |
|
248 |
<Path |
|
249 |
Fill="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}" |
|
250 |
Width="10" |
|
251 |
Height="10" |
|
252 |
Data="M1,0 L5,4 L9,0 L10,1 L6,5 L10,9 L9,10 L5,6 L1,10 L0,9 L4,5 L0,1 z" |
|
253 |
Stretch="Fill"/> |
|
254 |
</telerik1:RadButton> |
|
255 |
</StackPanel> |
|
256 |
</Border> |
|
257 |
</Grid> |
|
258 |
<Border x:Name="ContentOuterBorder" |
|
259 |
Grid.Row="1" |
|
260 |
Margin="{TemplateBinding BorderThickness}" |
|
261 |
BorderThickness="1 0 1 1" |
|
262 |
BorderBrush="{TemplateBinding BorderBrush}" |
|
263 |
Background="{TemplateBinding Background}"> |
|
264 |
<ContentPresenter x:Name="ContentElement" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/> |
|
265 |
</Border> |
|
266 |
</Grid> |
|
267 |
</AdornerDecorator> |
|
268 |
</Border> |
|
269 |
</Grid> |
|
270 |
<ControlTemplate.Triggers> |
|
271 |
<Trigger Property="IsInActiveState" Value="False"> |
|
272 |
<Setter TargetName="HeaderContent" Property="Opacity" Value="0.7"/> |
|
273 |
<Setter TargetName="PART_HeaderButtonsBorder" Property="Opacity" Value="0.7"/> |
|
274 |
<Setter TargetName="Shadow" Property="Opacity" Value="0.5"/> |
|
275 |
</Trigger> |
|
276 |
</ControlTemplate.Triggers> |
|
277 |
</ControlTemplate> |
|
278 |
<Style x:Key="MainWindowStyle" TargetType="{x:Type telerikNavigation:RadWindow}"> |
|
279 |
<Setter Property="IsTabStop" Value="false"/> |
|
280 |
<Setter Property="KeyboardNavigation.IsTabStop" Value="False"/> |
|
281 |
<Setter Property="SnapsToDevicePixels" Value="True"/> |
|
282 |
<Setter Property="FocusVisualStyle" Value="{x:Null}"/> |
|
283 |
<Setter Property="Background" Value="{telerik1:VisualStudio2013Resource ResourceKey=PrimaryBrush}"/> |
|
284 |
<Setter Property="BorderBrush" Value="{telerik1:VisualStudio2013Resource ResourceKey=BasicBrush}"/> |
|
285 |
<Setter Property="BorderThickness" Value="1 0 1 1"/> |
|
286 |
<Setter Property="MinHeight" Value="28"/> |
|
287 |
<Setter Property="Foreground" Value="{telerik1:VisualStudio2013Resource ResourceKey=MarkerBrush}"/> |
|
288 |
<Setter Property="FontSize" Value="{telerik1:VisualStudio2013Resource ResourceKey=FontSize}"/> |
|
289 |
<Setter Property="FontFamily" Value="{telerik1:VisualStudio2013Resource ResourceKey=FontFamily}"/> |
|
290 |
<Setter Property="BorderBackground" Value="{StaticResource WindowBorderBackground}"/> |
|
291 |
<Setter Property="MinWidth" Value="100"/> |
|
292 |
<Setter Property="HorizontalAlignment" Value="Left"/> |
|
293 |
<Setter Property="VerticalAlignment" Value="Top"/> |
|
294 |
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
|
295 |
<Setter Property="VerticalContentAlignment" Value="Stretch"/> |
|
296 |
<Setter Property="Header" Value="RadWindow"/> |
|
297 |
<Setter Property="WindowStartupLocation" Value="Manual"/> |
|
298 |
<Setter Property="WindowState" Value="Normal"/> |
|
299 |
<Setter Property="Template" Value="{StaticResource RadWindowTemplate}"/> |
|
300 |
<Setter Property="CaptionHeight" Value="28"/> |
|
301 |
<Setter Property="ResizeBorder" Value="5"/> |
|
302 |
<Setter Property="ModalBackground" Value="{StaticResource WindowModalBackground}"/> |
|
303 |
<Setter Property="animation:AnimationManager.AnimationSelector"> |
|
304 |
<Setter.Value> |
|
305 |
<animation:AnimationSelector> |
|
306 |
<animation:AnimationGroup AnimationName="Show"> |
|
307 |
<animation:FadeAnimation Direction="In" TargetElementName="LayoutRoot"/> |
|
308 |
<animation:ScaleAnimation Direction="In" TargetElementName="LayoutRoot" MinScale="0.9"/> |
|
309 |
</animation:AnimationGroup> |
|
310 |
<animation:AnimationGroup AnimationName="Hide"> |
|
311 |
<animation:FadeAnimation Direction="Out" TargetElementName="LayoutRoot"/> |
|
312 |
<animation:ScaleAnimation Direction="Out" TargetElementName="LayoutRoot" MinScale="0.9"/> |
|
313 |
</animation:AnimationGroup> |
|
314 |
</animation:AnimationSelector> |
|
315 |
</Setter.Value> |
|
316 |
</Setter> |
|
317 |
<Setter Property="navigation:RadWindowInteropHelper.OpaqueWindowBackground" Value="{StaticResource WindowBorderBackground}"/> |
|
318 |
<Style.Triggers> |
|
319 |
<Trigger Property="navigation:RadWindowInteropHelper.AllowTransparency" Value="False"> |
|
320 |
<Setter Property="animation:AnimationManager.IsAnimationEnabled" Value="False"/> |
|
321 |
</Trigger> |
|
322 |
</Style.Triggers> |
|
323 |
</Style> |
|
324 |
</ResourceDictionary> |
KCOM/Services/BaseServices.cs | ||
---|---|---|
244 | 244 |
instanceMain.dzTopMenu.tlcurrentPage.Text = firstpage; |
245 | 245 |
instanceMain.dzTopMenu.tlcurrentPage_readonly.Text = lastpage; |
246 | 246 |
string apptitle = string.Format("MARKUS(ver.{2}) - {0}(Rev.{1})", _DocItem.DOCUMENT_NO, _DocItem.REVISION, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString()); |
247 |
instanceMain.TitleText.Text = apptitle; |
|
248 |
instanceMain.Title = apptitle; |
|
247 |
instanceMain.Header = apptitle; |
|
248 |
//instanceMain.Title = apptitle; |
|
249 |
|
|
249 | 250 |
this.pageNavigator.SetPageNavi(CurrentDoc.docInfo.DOCPAGE.ToList(), MainUrl); |
250 | 251 |
|
251 | 252 |
ViewerDataModel.Instance.MarkupControls_USER.Clear(); |
KCOM/Views/TopMenu.xaml.cs | ||
---|---|---|
120 | 120 |
return; |
121 | 121 |
} |
122 | 122 |
|
123 |
var windows = App.Current.Windows.OfType<MainWindow>();
|
|
123 |
var windows = (RadWindowManager.Current.GetWindows().Find(x => x is MainWindow) as MainWindow);
|
|
124 | 124 |
|
125 | 125 |
if (windows != null) |
126 | 126 |
{ |
127 |
var grid = windows.First().FindChildByType<Grid>();
|
|
127 |
var grid = windows.FindChildByType<Grid>(); |
|
128 | 128 |
|
129 | 129 |
if(grid != null) |
130 | 130 |
{ |
내보내기 Unified diff