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

Silverlight Attendance Demo Using Sterling Silverlight Database

, 14 Nov 2010 Ms-PL
A demo application using the Silverlight Sterling database using View Model (MVVM).
SimpleAttendance.zip
SilmpleAttendanace
SilmpleAttendanace.Web
bin
SilmpleAttendanace.Web.dll
ClientBin
SimpleAttendance.xap
obj
Debug
Package
PackageTmp
bin
ClientBin
TempPE
TransformWebConfig
original
transformed
Properties
SimpleAttendance.Web.csproj.user
Assets
Bin
Debug
ar
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
bg
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
ca
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
cs
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
da
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
de
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
el
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
es
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
et
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
eu
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
fi
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
fr
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
he
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
hr
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
hu
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
id
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
it
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
ja
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
ko
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
lt
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
lv
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
ms
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
nl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
no
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
pl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
pt
pt-BR
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
ro
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
ru
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
SimpleAttendance.dll
SimpleAttendance.xap
sk
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
sl
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
sr-Cyrl-CS
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
sr-Latn-CS
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
sv
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
System.ComponentModel.DataAnnotations.dll
System.Windows.Controls.Data.dll
System.Windows.Controls.Data.Input.dll
System.Windows.Controls.dll
System.Windows.Controls.Input.dll
System.Windows.Controls.Navigation.dll
System.Windows.Data.dll
System.Windows.Interactivity.dll
th
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
tr
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
uk
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
vi
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.resources.dll
Wintellect.Sterling.dll
Wintellect.Sterling.pdb
zh-Hans
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
zh-Hant
System.ComponentModel.DataAnnotations.resources.dll
System.Windows.Controls.Data.Input.resources.dll
System.Windows.Controls.Data.resources.dll
System.Windows.Controls.Input.resources.dll
System.Windows.Controls.Navigation.resources.dll
System.Windows.Controls.resources.dll
System.Windows.Data.resources.dll
Release
Classes
Controls
Converters
Database
Images
backgroundshadow.png
backgroundtexture.png
obj
Debug
Assets
TempPE
Views
Properties
SimpleAttendance.csproj.user
ViewModels
Views
Wintellect.Sterling
Bin
Debug
Wintellect.Sterling.dll
Wintellect.Sterling.pdb
Database
Events
Exceptions
Indexes
IsolatedStorage
Keys
obj
Debug
TempPE
Properties
Serialization
Wintellect.Sterling.csproj.user
Wintellect.Sterling.csproj.vspscc
using System;
using System.Diagnostics;
using System.Text;

namespace Wintellect.Sterling
{
    /// <summary>
    ///     Default logger (debug) for Sterling
    /// </summary>
    public class SterlingDefaultLogger
    {
        private Guid _guid = Guid.Empty;
        private readonly SterlingLogLevel _minimumLevel;

        /// <summary>
        ///     Create 
        /// </summary>
        /// <param name="minimumLevel">Minimum level to debug</param>
        public SterlingDefaultLogger(SterlingLogLevel minimumLevel)
        {
            _minimumLevel = minimumLevel;

            if (Debugger.IsAttached)
            {
                _guid = SterlingFactory.GetLogger().RegisterLogger(_Log);
            }
        }

        /// <summary>
        ///     Detach the logger
        /// </summary>
        public void Detach()
        {
            if (!_guid.Equals(Guid.Empty))
            {
                SterlingFactory.GetLogger().UnhookLogger(_guid);
            }
        }

        /// <summary>
        ///     
        /// </summary>
        /// <param name="logLevel"></param>
        /// <param name="message"></param>
        /// <param name="exception"></param>
        private void _Log(SterlingLogLevel logLevel, string message, Exception exception)
        {
            if (!Debugger.IsAttached || (int) logLevel < (int) _minimumLevel) return;

            var sb = new StringBuilder(string.Format("{0}::Sterling::{1}::{2}",
                                                     DateTime.Now, 
                                                     logLevel,
                                                     message));

            var local = exception; 

            while (local != null)
            {
                sb.Append(local);
                local = local.InnerException; 
            }

            Debug.WriteLine(sb.ToString());
        }
    }
}

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 Microsoft Public License (Ms-PL)

Share

About the Author

defwebserver
Software Developer (Senior) http://ADefWebserver.com
United States United States
Michael Washington is a Microsoft MVP. He is a ASP.NET and
C# programmer.
He is the founder of
LightSwitchHelpWebsite.com

He has a son, Zachary and resides in Los Angeles with his wife Valerie.

He is the Author of:
Follow on   Twitter

| Advertise | Privacy | Mobile
Web04 | 2.8.141022.2 | Last Updated 14 Nov 2010
Article Copyright 2010 by defwebserver
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid