Exemplo n.º 1
0
        public GraphWidget()
        {
            Title = "Graf";

            controller = NewController<GraphController>();
            settingsController = NewController<GraphSettingsController>();

            PropertyChanged += (o, e) =>
            {
                if (IsInSettingsMode)
                    controller.StopFetchingDataInBackground();
                else
                    controller.StartFetchingDataInBackground();
            };

            ConfigurationChanged += (o, e) =>
            {
                controller.UpdateConfiguration(Configuration);
                settingsController.UpdateConfiguration(Configuration);
            };

            View = new GraphView()
            {
                DataContext = controller.ViewModel
            };
            SettingsView = new GraphSettingsView()
            {
                DataContext = settingsController.GraphSettingsViewModel
            };
        }
 protected void NewController()
 {
     controller = new GraphSettingsController(graphSettingsViewModel, graphController.Object, configuration, downloadStringServiceFake.Object, configRepositoryFake.Object);
 }