comparison Chronosv2/source/Presentation/ViewModel/InternalShortcutViewModel.cs @ 10:443821e55f06

Initial cleaned up add from Codeplex files
author stevenh7776 stevenhollidge@hotmail.com
date Tue, 21 Feb 2012 17:25:44 +0700
parents
children
comparison
equal deleted inserted replaced
9:904a9faadf8b 10:443821e55f06
1 /*
2 The MIT License
3
4 Copyright (c) 2009-2010. Carlos Guzmán Álvarez. http://chronoswpf.codeplex.com/
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 THE SOFTWARE.
23 */
24
25 using System;
26 using Chronos.Presentation.Core.Navigation;
27 using NLog;
28
29 namespace Chronos.Presentation.ViewModel
30 {
31 /// <summary>
32 /// Internal shortcut viewmodel class
33 /// </summary>
34 public sealed class InternalShortcutViewModel
35 : ShortcutViewModel
36 {
37 #region · Logger ·
38
39 private static Logger Logger = LogManager.GetCurrentClassLogger();
40
41 #endregion
42
43 #region · Consts ·
44
45 private static readonly string DefaultIconStyle = "WindowIconStyle";
46
47 #endregion
48
49 #region · Properties ·
50
51 /// <summary>
52 /// Gets or sets the shortcut icon style.
53 /// </summary>
54 /// <value>The icon style.</value>
55 public override string IconStyle
56 {
57 get
58 {
59 if (String.IsNullOrWhiteSpace(base.IconStyle))
60 {
61 return DefaultIconStyle;
62 }
63
64 return base.IconStyle;
65 }
66 set { base.IconStyle = value; }
67 }
68
69 #endregion
70
71 #region · Constructors ·
72
73 /// <summary>
74 /// Initializes a new instance of the <see cref="InternalShortcutViewModel"/> class.
75 /// </summary>
76 public InternalShortcutViewModel()
77 : base()
78 {
79 }
80
81 #endregion
82
83 #region · Command Execution ·
84
85 /// <summary>
86 /// Called when the <see cref="OpenCommand"/> is executed.
87 /// </summary>
88 protected override void OnOpen()
89 {
90 Logger.Debug("Ejecución de un acceso directo ({0})", this.Target);
91
92 this.GetService<INavigationService>().Navigate(this.Target, 10, 20, "BBB");
93 }
94
95 #endregion
96 }
97 }