C# Class Zetbox.Client.WPF.WpfModelFactory

Inheritance: ViewModelFactory
显示文件 Open project: daszat/zetbox

Public Methods

Method Description
CreateDelayedTask ( Zetbox.Client.Presentables.ViewModel displayer, System.Action loadAction ) : IDelayedTask
CreateTimer ( System.TimeSpan tickLength, System.Action action ) : void
GetDecisionFromUser ( string message, string caption ) : bool
GetDestinationFileNameFromUser ( string filename ) : string
GetSourceFileNameFromUser ( ) : string
ShowMessage ( string message, string caption ) : void
WpfModelFactory ( ILifetimeScopeFactory scopeFactory, Autofac scope, IFrozenContext frozenCtx, ZetboxConfig cfg, IPerfCounter perfCounter, DialogCreator dialogFactory ) : System

Protected Methods

Method Description
CreateDefaultView ( Zetbox.Client.Presentables.ViewModel mdl ) : object
CreateSpecificView ( Zetbox.Client.Presentables.ViewModel mdl, Zetbox kind ) : object
ShowInView ( Zetbox.Client.Presentables.ViewModel mdl, object view, bool activate, bool asDialog, Zetbox.Client.Presentables.ViewModel ownerMdl ) : void

Private Methods

Method Description
window_Activated ( object sender, EventArgs e ) : void
window_Closed ( object sender, EventArgs e ) : void

Implemented explicit application shutdown

In BasicAuth scenarios the Password Dialog is shown first and closed before the Main Application Window is created. This will let WPF think that the Application should shut down.

Method Details

CreateDefaultView() protected method

protected CreateDefaultView ( Zetbox.Client.Presentables.ViewModel mdl ) : object
mdl Zetbox.Client.Presentables.ViewModel
return object

CreateDelayedTask() public method

public CreateDelayedTask ( Zetbox.Client.Presentables.ViewModel displayer, System.Action loadAction ) : IDelayedTask
displayer Zetbox.Client.Presentables.ViewModel
loadAction System.Action
return IDelayedTask

CreateSpecificView() protected method

protected CreateSpecificView ( Zetbox.Client.Presentables.ViewModel mdl, Zetbox kind ) : object
mdl Zetbox.Client.Presentables.ViewModel
kind Zetbox
return object

CreateTimer() public method

public CreateTimer ( System.TimeSpan tickLength, System.Action action ) : void
tickLength System.TimeSpan
action System.Action
return void

GetDecisionFromUser() public method

public GetDecisionFromUser ( string message, string caption ) : bool
message string
caption string
return bool

GetDestinationFileNameFromUser() public method

public GetDestinationFileNameFromUser ( string filename ) : string
filename string
return string

GetSourceFileNameFromUser() public method

public GetSourceFileNameFromUser ( ) : string
return string

ShowInView() protected method

protected ShowInView ( Zetbox.Client.Presentables.ViewModel mdl, object view, bool activate, bool asDialog, Zetbox.Client.Presentables.ViewModel ownerMdl ) : void
mdl Zetbox.Client.Presentables.ViewModel
view object
activate bool
asDialog bool
ownerMdl Zetbox.Client.Presentables.ViewModel
return void

ShowMessage() public method

public ShowMessage ( string message, string caption ) : void
message string
caption string
return void

WpfModelFactory() public method

public WpfModelFactory ( ILifetimeScopeFactory scopeFactory, Autofac scope, IFrozenContext frozenCtx, ZetboxConfig cfg, IPerfCounter perfCounter, DialogCreator dialogFactory ) : System
scopeFactory ILifetimeScopeFactory
scope Autofac
frozenCtx IFrozenContext
cfg Zetbox.API.Configuration.ZetboxConfig
perfCounter IPerfCounter
dialogFactory Zetbox.Client.GUI.DialogCreator
return System