// // Copyright 2014 Perforce Software Inc. // using Perforce.ViewModel; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace Perforce.View { /// /// Interaction logic for SelectWorkspaceForm.xaml /// public partial class SelectWorkspaceForm : UserControl { private SelectWorkspaceFormViewModel _model; public SelectWorkspaceForm() { InitializeComponent(); _model = new SelectWorkspaceFormViewModel(); _model.Init(); this.DataContext = _model; } public SelectWorkspaceFormViewModel Model { get { return _model; } } public Technewlogic.WpfDialogManagement.Contracts.ICustomContentDialog ParentDialog { get; set; } private void WorkspaceChoice_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (WorkspaceChoice.SelectedIndex >= 0) { ParentDialog.CanYes = true; } else { ParentDialog.CanYes = false; } } } }