本文整理汇总了C#中IShellViewModel类的典型用法代码示例。如果您正苦于以下问题:C# IShellViewModel类的具体用法?C# IShellViewModel怎么用?C# IShellViewModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IShellViewModel类属于命名空间,在下文中一共展示了IShellViewModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShellView
public ShellView(
IShellViewModel viewModel)
{
InitializeComponent();
DataContext = viewModel;
viewModel.Dispatcher = Dispatcher;
}
示例2: CashFlowTypesViewModel
public CashFlowTypesViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator)
: base(shell, database, configuration, cashedService, eventAggregator)
{
SuppressEvent = false;
_cashFlows = new BindableCollectionExt<CashFlow>();
_cashFlows.PropertyChanged += (s, e) =>
{
OnPropertyChanged(s, e);
CachedService.Clear(CachedServiceKeys.AllCashFlows);
};
_cashFlowGroups = new BindableCollectionExt<CashFlowGroup>();
_cashFlowGroups.PropertyChanged += (s, e) =>
{
if (SuppressEvent == true)
{
return;
}
OnPropertyChanged(s, e);
CachedService.Clear(CachedServiceKeys.AllCashFlowGroups);
CachedService.Clear(CachedServiceKeys.AllCashFlows);
var cashFlowGroup = s as CashFlowGroup;
_cashFlows.Where(x => x.CashFlowGroupId == cashFlowGroup.Id)
.ForEach(x => x.Group = cashFlowGroup);
NewCashFlowGroup = null;
NewCashFlowGroup = CashFlowGroups.First();
};
}
示例3: DownloadAndUpgradeViewModel
public DownloadAndUpgradeViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator)
: base(shell, database, configuration, cashedService, eventAggregator)
{
_webClient = new WebClient();
_webClient.DownloadFileCompleted += OnDownloadFileCompleted;
_webClient.DownloadProgressChanged += OnDownloadProgressChanged;
}
示例4: ShellView
public ShellView(IShellViewModel vm)
{
vm.FileProgressStatusChanged += OnFileProgressStatusChanged;
vm.FileProgressChanged += OnFileProgressChanged;
DataContext = vm;
InitializeComponent();
}
示例5: ShellView
public ShellView(IShellViewModel model, IMessageBus bus)
: this()
{
_bus = bus;
DataContext = model;
Loaded += OnLoaded;
}
示例6: BudgetViewModel
public BudgetViewModel(IShellViewModel shell, IDatabase database, IConfigurationManager configuration, ICachedService cashedService, IEventAggregator eventAggregator)
: base(shell, database, configuration, cashedService, eventAggregator)
{
ExpensesViewModel = IoC.Get<ExpensesViewModel>();
RevenuesViewModel = IoC.Get<RevenuesViewModel>();
BudgetPlanViewModel = IoC.Get<BudgetPlanViewModel>();
BudgetCalculatorViewModel = IoC.Get<BudgetCalculationsViewModel>();
}
示例7: Shell
public Shell(IShellViewModel viewModel) {
InitializeComponent();
ViewModel = viewModel;
/*
MenuCanvas.SetValue(Canvas.LeftProperty, MainGrid.ActualWidth);
MenuCanvas.SetValue(Canvas.TopProperty, 15.0);
*/
}
示例8: ShellController
public ShellController(
IShellViewModel shellViewModel,
IShellView shellView,
IMainController mainController)
{
_shellViewModel = shellViewModel;
_shellView = shellView;
_mainController = mainController;
_shellView.ViewModel = _shellViewModel;
}
示例9: TestInitialize
public void TestInitialize()
{
shell = Substitute.For<IShellViewModel>();
serviceControl = Substitute.For<IServiceControl>();
settingsProvider = Substitute.For<ISettingsProvider>();
connection = Substitute.For<IServiceControlConnectionProvider>();
container = RegisterContainer();
storedSetting = GetReloadedSettings();
settingsProvider.GetSettings<ProfilerSettings>().Returns(storedSetting);
connectTo = new ServiceControlConnectionViewModel(settingsProvider, container) { Parent = shell }; //TODO: Do we need to pass the full container here?
}
示例10: ShellView
public ShellView(IShellViewModel vm, IToolbarView toolbarView, ITaskBoardView taskBoardView)
: this()
{
DataContext = vm;
mainGrid.Children.Add(toolbarView.Element);
Grid.SetRow(toolbarView.Element, 0);
mainGrid.Children.Add(taskBoardView.Element);
Grid.SetRow(taskBoardView.Element, 1);
}
示例11: DefaultExceptionHandler
public DefaultExceptionHandler(
IWindowManagerEx windowManager,
IViewModelFactory screenFactory,
IAppCommands appCommands,
IEventAggregator eventAggregator,
IShellViewModel shell)
: base(windowManager, screenFactory)
{
_windowManager = windowManager;
_appCommands = appCommands;
_eventAggregator = eventAggregator;
_shell = shell;
}
示例12: ShellView
public ShellView(IShellViewModel vm, IMessageBus bus, IModuleResolver resolver, ISettings settings)
: this()
{
_bus = bus;
_resolver = resolver;
_settings = settings;
DataContext = vm;
_bus.Listen<ActivateMainModuleMessage>().Subscribe(msg => ActivateMainModule(msg.ModuleName));
_bus.Listen<NavigateMainModuleMessage>().Subscribe(msg => NavigateMainModule(msg.ModuleName));
_bus.Listen<NavigateBackMainModuleMessage>().Where(_ => _navigationStack.Count > 0).Subscribe(
_ => NavigateBack());
_bus.Listen<SettingsChangedMessage>().Subscribe(OnSettingsChanged);
}
示例13: setup
private void setup()
{
var ns = new NavigationService(this, Resource.Id.content_frame);
navService = ns;
ns.RegisterFragment<ISettingsViewModel, SettingsFragment>();
ns.RegisterFragment<ILoginViewModel, LoginFragment>();
ns.RegisterFragment<IHomeViewModel, HomeFragment>();
ViewModelLocator.Container.RegisterInstance<INavigationService>(navService);
var container = ViewModelLocator.Container;
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(this);
var settings = new AppSettings(prefs);
settings.ServerUrl = null;
container.RegisterInstance<ISettings>(settings);
vm = container.Resolve<IShellViewModel>();
vm.PropertyChanged += vmPropertyChanged;
}
示例14: OptionsViewModel
/// <summary>
/// Initializes a new instance of the <see cref="OptionsViewModel"/> class.
/// </summary>
/// <param name="userSettingService">
/// The user Setting Service.
/// </param>
/// <param name="shellViewModel">
/// The shell View Model.
/// </param>
/// <param name="updateService">
/// The update Service.
/// </param>
public OptionsViewModel(IUserSettingService userSettingService, IShellViewModel shellViewModel, IUpdateService updateService)
{
this.Title = "Options";
this.userSettingService = userSettingService;
this.shellViewModel = shellViewModel;
this.updateService = updateService;
this.OnLoad();
this.SelectedTab = OptionsTab.General;
this.UpdateMessage = "Click 'Check for Updates' to check for new versions";
}
示例15: MainViewModel
/// <summary>
/// Initializes a new instance of the <see cref="MainViewModel"/> class.
/// The viewmodel for HandBrakes main window.
/// </summary>
/// <param name="userSettingService">
/// The User Setting Service
/// </param>
/// <param name="scanService">
/// The scan Service.
/// </param>
/// <param name="encodeService">
/// The encode Service.
/// </param>
/// <param name="presetService">
/// The preset Service.
/// </param>
/// <param name="errorService">
/// The Error Service
/// </param>
/// <param name="shellViewModel">
/// The shell View Model.
/// </param>
/// <param name="updateService">
/// The update Service.
/// </param>
/// <param name="notificationService">
/// The notification Service.
/// *** Leave in Constructor. ***
/// </param>
/// <param name="whenDoneService">
/// The when Done Service.
/// *** Leave in Constructor. ***
/// </param>
public MainViewModel(IUserSettingService userSettingService, IScanServiceWrapper scanService, IEncodeServiceWrapper encodeService, IPresetService presetService,
IErrorService errorService, IShellViewModel shellViewModel, IUpdateService updateService, INotificationService notificationService,
IPrePostActionService whenDoneService)
{
this.scanService = scanService;
this.encodeService = encodeService;
this.presetService = presetService;
this.errorService = errorService;
this.shellViewModel = shellViewModel;
this.updateService = updateService;
this.userSettingService = userSettingService;
this.queueProcessor = IoC.Get<IQueueProcessor>();
// Setup Properties
this.WindowTitle = "HandBrake";
this.CurrentTask = new EncodeTask();
this.CurrentTask.PropertyChanged += this.CurrentTask_PropertyChanged;
this.ScannedSource = new Source();
// Setup Events
this.scanService.ScanStared += this.ScanStared;
this.scanService.ScanCompleted += this.ScanCompleted;
this.scanService.ScanStatusChanged += this.ScanStatusChanged;
this.queueProcessor.JobProcessingStarted += this.QueueProcessorJobProcessingStarted;
this.queueProcessor.QueueCompleted += this.QueueCompleted;
this.queueProcessor.QueueChanged += this.QueueChanged;
this.queueProcessor.EncodeService.EncodeStatusChanged += this.EncodeStatusChanged;
this.userSettingService.SettingChanged += this.UserSettingServiceSettingChanged;
this.Presets = this.presetService.Presets;
this.CancelScanCommand = new CancelScanCommand(this.scanService);
}