public LoginDialogView(ILoginDialogViewModel viewModel) { LoginCommand = new AsyncDelegatingCommand(viewModel.ConnectToCloudFoundry, viewModel.CanConnectToCloudFoundry); viewModel.GetPassword = GetPassword; DataContext = viewModel; InitializeComponent(); }
public AddCloudDialogView(IAddCloudDialogViewModel viewModel) { AddCloudCommand = new AsyncDelegatingCommand(viewModel.AddCloudFoundryInstance, viewModel.CanAddCloudFoundryInstance); viewModel.GetPassword = GetPassword; DataContext = viewModel; InitializeComponent(); }
public CloudExplorerView(ICloudExplorerViewModel viewModel) { OpenLoginFormCommand = new DelegatingCommand(viewModel.OpenLoginView, viewModel.CanOpenLoginView); StopCfAppCommand = new AsyncDelegatingCommand(viewModel.StopCfApp, viewModel.CanStopCfApp); StartCfAppCommand = new AsyncDelegatingCommand(viewModel.StartCfApp, viewModel.CanStartCfApp); DeleteCfAppCommand = new AsyncDelegatingCommand(viewModel.DeleteCfApp, viewModel.CanDeleteCfApp); RefreshSpaceCommand = new AsyncDelegatingCommand(viewModel.RefreshSpace, viewModel.CanRefreshSpace); RefreshAllCommand = new AsyncDelegatingCommand(viewModel.RefreshAllCloudConnections, viewModel.CanRefreshAllCloudConnections); DataContext = viewModel; InitializeComponent(); }
public LoginView(ILoginViewModel viewModel, IThemeService themeService) { System.Predicate <object> alwaysTrue = (object arg) => { return(true); }; AddCloudCommand = new AsyncDelegatingCommand(viewModel.LogIn, viewModel.CanLogIn); SsoCommand = new AsyncDelegatingCommand(viewModel.OpenSsoDialog, viewModel.CanOpenSsoDialog); IncrementPageCommand = new AsyncDelegatingCommand(viewModel.NavigateToAuthPage, viewModel.CanProceedToAuthentication); DecrementPageCommand = new DelegatingCommand(viewModel.NavigateToTargetPage, alwaysTrue); viewModel.GetPassword = GetPassword; viewModel.PasswordEmpty = PasswordBoxEmpty; viewModel.ClearPassword = ClearPassword; DataContext = viewModel; _viewModel = viewModel; themeService.SetTheme(this); InitializeComponent(); MouseDown += Window_MouseDown; }