forked from ni/nidevlabs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some renames of folders and files for consistency Adding more comments
- Loading branch information
Showing
29 changed files
with
1,073 additions
and
1,050 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 60 additions & 53 deletions
113
...ram/Design/ExampleDiagramNodeViewModel.cs → ...ampleDiagram/Design/BasicNodeViewModel.cs
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,60 @@ | ||
using System; | ||
using System.Linq; | ||
using NationalInstruments.Composition; | ||
using NationalInstruments.Core; | ||
using NationalInstruments.Controls.Shell; | ||
using NationalInstruments.Design; | ||
using NationalInstruments.SourceModel; | ||
using NationalInstruments.Shell; | ||
using ExamplePlugins.ExampleNode.Model; | ||
|
||
namespace ExamplePlugins.ExampleDiagram.Design | ||
{ | ||
/// <summary> | ||
/// The ViewModel for the Example Diagram Node | ||
/// The ViewModel controls the interaction with the user | ||
/// </summary> | ||
public class ExampleDiagramNodeViewModel : NodeViewModel | ||
{ | ||
/// <summary> | ||
/// Constructs a new instance | ||
/// </summary> | ||
/// <param name="model">The model element we are bound to</param> | ||
public ExampleDiagramNodeViewModel(Node model) : | ||
base(model) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Returns the Uri (resource location) for our node foreground image | ||
/// </summary> | ||
protected override ViewModelUri ForegroundUri | ||
{ | ||
get { return new ViewModelUri(GetType(), "Resources/Cow"); } | ||
} | ||
|
||
/// <summary> | ||
/// Returns the render data for our node's foreground image | ||
/// </summary> | ||
public override NineGridData ForegroundImageData | ||
{ | ||
get { return new ViewModelIconData(this) { ImageUri = ForegroundUri }; } | ||
} | ||
|
||
/// <summary> | ||
/// Creates the content to put into the command bar when the node is selected | ||
/// </summary> | ||
/// <param name="context">The current presentation context</param> | ||
public override void CreateCommandContent(ICommandPresentationContext context) | ||
{ | ||
base.CreateCommandContent(context); | ||
} | ||
} | ||
} | ||
using System; | ||
using System.Linq; | ||
using NationalInstruments.Composition; | ||
using NationalInstruments.Core; | ||
using NationalInstruments.Controls.Shell; | ||
using NationalInstruments.Design; | ||
using NationalInstruments.SourceModel; | ||
using NationalInstruments.Shell; | ||
using ExamplePlugins.ExampleNode.Model; | ||
|
||
namespace ExamplePlugins.ExampleDiagram.Design | ||
{ | ||
/// <summary> | ||
/// The ViewModel for the Basic Diagram Node | ||
/// The ViewModel controls the interaction with the user | ||
/// This node uses the standard static node view for the actual UI so there is not | ||
/// a UI class that needs to be implemented. | ||
/// </summary> | ||
public class BasicNodeViewModel : NodeViewModel | ||
{ | ||
/// <summary> | ||
/// Constructs a new instance | ||
/// </summary> | ||
/// <param name="model">The model element we are bound to</param> | ||
public BasicNodeViewModel(Node model) : | ||
base(model) | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Returns the Uri (resource location) for our node foreground image | ||
/// </summary> | ||
protected override ViewModelUri ForegroundUri | ||
{ | ||
get | ||
{ | ||
// We are loading the vector ninegrid out of a resource | ||
// this will be rendered on the default node visual. | ||
return new ViewModelUri(GetType(), "Resources/Cow"); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Returns the render data for our node's foreground image | ||
/// </summary> | ||
public override NineGridData ForegroundImageData | ||
{ | ||
get { return new ViewModelIconData(this) { ImageUri = ForegroundUri }; } | ||
} | ||
|
||
/// <summary> | ||
/// Creates the content to put into the command bar when the node is selected | ||
/// </summary> | ||
/// <param name="context">The current presentation context</param> | ||
public override void CreateCommandContent(ICommandPresentationContext context) | ||
{ | ||
base.CreateCommandContent(context); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.