- WpfProgressDemo.zip
- WpfProgressDemo
- _ReSharper.WpfProgressDemo
- BuildScriptCache
- .crc
- .version
- 4
- 20bcce1c.dat
- 5
- 6
- DecompilerCache
- ModuleIds.xml
- NamedArguments
- .crc
- .version
- 2
- 29a60d99.dat
- PdbInfo
- ProjectModel
- ProjectModel.dat
- Resources
- .crc
- .version
- 3
- 35ef083f.dat
- SymbolCache.bin
- TagPrefixes
- .crc
- .version
- TodoCache
- .crc
- .version
- 3
- 35ef083f.dat
- WebsiteFileReferences
- .crc
- .version
- WordIndex
- .crc
- .version
- 2
- 29a60d99.dat
- WpfProgressDemo.1.1.dotCover
- WpfProgressDemo.5.1.ReSharper
- WpfProgressDemo.5.1.ReSharper.user
- WpfProgressDemo.sln
- WpfProgressDemo
|
#region Copyright Notice
// Distributed under the Code Project Open License
// ****************************************************
//
// Copyright � 2011. David C. Veeneman
// All rights reserved
//
// Redistribution and use on source and binary forms, with or without modification
// are permitted provided that the following conditions are met:
//
// � Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimers.
//
// � Redistributions on binary form must reproduce the above copyright notice, this
// list of conditions and the following disclaimer in the documentation anclior other
// materials provided with the distribution.
//
// � Neither the name of David C. Veeneman nor Foresight Systems may be used to endorse
// or promote products derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID C VEENEMAN OR FORERSIGHT SYSTEMS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSITTUIE GOODS OR SERVICES: LOSS OF USE, DATA OR PROFITS; OR
// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT.
#endregion
using System;
using System.Windows;
using System.Windows.Controls;
using WpfProgressDemo.ViewModel;
namespace WpfProgressDemo.View.Services
{
/// <summary>
/// Provides services for the View.
/// </summary>
public static class ViewServices
{
#region Fields
// Member variables
private static ProgressDialog m_ProgressDialog;
#endregion
#region Service Methods
/// <summary>
/// Hides the Progress dialog.
/// </summary>
internal static void CloseProgressDialog()
{
m_ProgressDialog.Close();
}
/// <summary>
/// Shows the Progress dialog.
/// </summary>
internal static void ShowProgressDialog(Window mainWindow, ProgressDialogViewModel viewModel)
{
m_ProgressDialog = new ProgressDialog();
m_ProgressDialog.Owner = mainWindow;
m_ProgressDialog.DataContext = viewModel;
m_ProgressDialog.Show();
}
#endregion
}
}
|
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.
David Veeneman is a financial planner and software developer. He is the author of "The Fortune in Your Future" (McGraw-Hill 1998). His company, Foresight Systems, develops planning and financial software.