public async Task Initialize() { this.accessList = new MockStorageItemAccessList(); this.accessList.Add( new MockStorageFile { Name = "Some Metadata" }, "Some Metadata" ); this.accessList.Add( new MockStorageFile { Name = "Some more metadata" }, "Some more metadata" ); this.badFileToken = this.accessList.Add( null, "Bad" ); this.accessList.Add( new MockStorageFile { Name = "A test file" }, "A test file" ); this.proxyFileName = "temp.txt"; StorageFile proxy = await ApplicationData.Current.TemporaryFolder.CreateFileAsync(this.proxyFileName, CreationCollisionOption.OpenIfExists); this.accessList.Add( proxy.AsWrapper(), this.proxyFileName ); this.proxyProvider = new FileProxyProvider(ApplicationData.Current.TemporaryFolder); IFileAccessService fileService = new MockFileService(); this.promptingService = new MockUserPromptingService(); this.viewModel = new DashboardViewModel( this.accessList, new MockMotdProvider(), this.proxyProvider, new FileExportService(this.accessList, fileService), this.promptingService, this.promptingService, fileService ); }
private void Application_Startup(object sender, StartupEventArgs args) { ITelnetClient telnetClient = new TelnetClient(); model = new Model(telnetClient); model.Connect(ConfigurationManager.AppSettings.Get("DEFAULT_IP"), int.Parse(ConfigurationManager.AppSettings.Get("DEFAULT_PORT"))); model.Start(); dashboardViewModel = new DashboardViewModel(model); mapViewModel = new MapViewModel(model); connectionVM = new ConnectionPanelVM(model); errorsVM = new ErrorsPanelVM(model); controellsVM = new ControllersPanelVM(model); }
/// <summary> /// The constructor. /// </summary> /// <param name="viewModel"> The viewmodel associated with the dashboard. </param> public DashboardView(IDashboardViewModel viewModel) { InitializeComponent(); DataContext = viewModel; }
public async void RequestOpenFileHandler(IDashboardViewModel sender, StoredFileDescriptor eventArgs) { await AttemptToLoadRecentDatabase(eventArgs); }
/// <summary> /// Initializes the specified parent. /// </summary> /// <param name="parent">The parent.</param> /// <param name="page">The page.</param> public void Initialize(IDashboardViewModel parent, DashboardPageEdit page) { _model = page; RecreateGadgets(); }
public MainViewModel(IDashboardViewModel dashboard, IExercisesViewModel exercises) { Items.Add(dashboard); Items.Add(exercises); }
public DashboardPage() { InitializeComponent(); BindingContext = _viewModel = App.Services.GetRequiredService <IDashboardViewModel>(); _viewCoordinatesService = App.Services.GetRequiredService <IViewCoordinatesService>(); }
public DashboardCenter(IDashboardViewModel viewModel) : base(viewModel) { }