Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Exploring a Model-View-ViewModel Application; WPF Password Manager, Cipher Text

, 28 Dec 2008
An article exploring Model-View-ViewModel (MVVM) WPF UI Design Pattern as leveraged in a WPF Password Manager. Password Manager allows user to modify the shape and behavior of a record at run-time.
CipherText-Release-v1.zip
CipherText-Release.zip
CipherText-Source-v1.zip
CipherText
CipherText
bin
Debug
Release
CipherText.csi
CipherText.vbproj.user
Class Diagram
CommandViewClassDiagram.cd
FieldEditorClassDiagram.cd
RelayCommandClassDiagram.cd
Command
Converter
DataTemplateSelector
Deep Copy
EventArgs
Fonts
OCRAEXT.TTF
Model
My Project
MyExtensions
Settings.settings
Random Password
Resources
Images
add.png
allRecords.png
bank.png
creditCards.png
delete.png
edit.png
email.png
engineer.png
firewall.png
hardware.png
key.png
keyPad.png
LockedUser.ico
server.png
softwareLicense.png
visa.png
vpn.png
webSite.png
String Formatting
SubsetFont.targets
SubsetFontTask.dll
Validation Rules - Helper
View
ViewModel
XAML Shield
CipherText.sln.cache
CipherText.suo
CipherText-Source.zip
CipherText.csi
CipherText.vbproj.user
CommandViewClassDiagram.cd
FieldEditorClassDiagram.cd
RelayCommandClassDiagram.cd
OCRAEXT.TTF
Settings.settings
obj
add.png
allRecords.png
bank.png
creditCards.png
delete.png
edit.png
email.png
engineer.png
firewall.png
hardware.png
key.png
keyPad.png
LockedUser.ico
server.png
softwareLicense.png
visa.png
vpn.png
webSite.png
SubsetFont.targets
SubsetFontTask.dll
CipherText.sln.cache
CipherText.suo
Imports System.Collections.ObjectModel
'
<Serializable()> Public Class Cards
    Inherits ObservableCollection(Of Card)

#Region " Constructors "

    Public Sub New()
    End Sub

#End Region

#Region " Methods "

    Public Sub Sort()

        'this was writen this way because, we always want the data sorted and stored, ordered by FileAs Ascending.
        'no reason to implement sorting by overriding methods in the base class for this one simple requirement
        If Me.Count > 0 Then

            Dim obj As List(Of Card) = CType(Me.Items, List(Of Card))
            'this uses the default comparer interface that was programmed in the CardField class.  i.e. sorts by FieldSortOrder
            obj.Sort()
            MyBase.OnCollectionChanged(New System.Collections.Specialized.NotifyCollectionChangedEventArgs(Specialized.NotifyCollectionChangedAction.Reset))
        End If

    End Sub

#End Region

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Karl Shifflett
Architect Gayle Manufacturing Company
United States United States
Karl loves .NET, WPF, WCF, ASP.NET, VB.NET and C#.
 
Awards:
 
  • December 2008 VB.NET Code Project Article Award
  • 2009 Code Project MVP
  • 2008 Code Project MVP
  • 2008 Microsoft MVP - Client App Dev
  • December 2007 VB.NET Code Project Article Award
  • Gold Medal Winner at IBM's 1998 PROIV Programming Contest in Las Vegas
Click here to check out my Blog
 
Click here to learn about Mole 2010 debugging tool for Visual Studio 2010
 
Click here to read about XAML Power Toys
 

Just a grain of sand on the worlds beaches.

Follow on   Twitter

| Advertise | Privacy | Mobile
Web03 | 2.8.140821.2 | Last Updated 29 Dec 2008
Article Copyright 2008 by Karl Shifflett
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid