- dataobjectbase_2.1.0.zip
- doc
- lib
- CatenaLogic.BlogArticles.dll
- output
- Release
- CatenaLogic.BlogArticles.dll
- CatenaLogic.Examples.exe
- Data
- Example 01 - Simple object
- Example 02 - Error validation
- Example 03 - Serialization
- Example 04 - Nested objects
- Example 05 - Backward compatibility
- Example 06 - Revert and apply
- screenshots
- Example 02 - Error validation.png
- snippets
- dataobject.snippet
- propdata.snippet
- src
- CatenaLogic.Examples
- App.xaml
- App.xaml.cs
- CatenaLogic.Examples.csproj
- Data
- Example 01 - Simple object
- Example 02 - Error validation
- Example 03 - Serialization
- Example 04 - Nested objects
- Example 05 - Backward compatibility
- Example 06 - Revert and apply
- Properties
- UI
- Input
- Windows
- Example 02 - Error validation
- Example 03 - Serialization
- Example 05 - Backward compatibility
- Example 06 - Revert and apply
- CatenaLogic.Test
- CatenaLogic
- DataObjectBase.sln
- DataObjectBase.vsmdi
- LocalTestRun.testrunconfig
- dataobjectbase.zip
|
using System.Windows;
using CatenaLogic.Data;
using CatenaLogic.Examples.UI.Windows;
using CatenaLogic.Windows;
namespace CatenaLogic.Examples
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
/// <summary>
/// Raises the <see cref="E:System.Windows.Application.Startup"/> event.
/// </summary>
/// <param name="e">A <see cref="T:System.Windows.StartupEventArgs"/> that contains the event data.</param>
protected override void OnStartup(StartupEventArgs e)
{
// Style helper
CatenaLogic.Windows.StyleHelper.CreateStyleForwardersForDefaultStyles();
// Call base
base.OnStartup(e);
// Initialize example window
ExamplesWindow examplesWindow = new ExamplesWindow("Data object base examples");
examplesWindow.Description = "This demo application shows some capabilities of the DataObjectBase class.";
// Example 1
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 01 - Simple object",
"A simple object without any special hassles",
"Data/Example 01 - Simple object/SimpleObject.cs"));
// Example 2
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 02 - Error validation",
"Basic object validation with errors and warnings",
"Data/Example 02 - Error validation/ErrorValidationObject.cs",
delegate()
{
var window = new ErrorValidationWindow();
window.ShowDialog();
}));
// Example 3
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 03 - Serialization",
"Basic object serialization in xml and binary mode",
"Data/Example 03 - Serialization/SerializableObject.cs",
delegate()
{
var window = new SerializationWindow();
window.ShowDialog();
}));
// Example 4
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 04 - Nested objects",
"Shows the ability to nest classes which can be (de)serialized easily",
"Data/Example 04 - Nested objects/NestedObjects.cs"));
// Example 5
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 05 - Backward compatibility",
"Converting \"old\" style classes into the new DataObjectBase class",
"Data/Example 05 - Backward compatibility/BackwardCompatibility.cs",
delegate()
{
var window = new BackwardCompatibilityWindow();
window.ShowDialog();
}));
// Example 6
examplesWindow.ExampleCollection.Add(new ExampleInfo("Example 06 - Revert and apply",
"Create states in your object that you can revert or apply",
"Data/Example 06 - Revert and apply/RevertAndApplyObject.cs",
delegate()
{
var window = new RevertAndApplyWindow();
window.ShowDialog();
}));
// Show example window
examplesWindow.ShowDialog();
}
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.