Beispiel #1
0
        public MainWindow()
        {
            InitializeComponent();
            sphereDrawService   = new SphereDrawService();
            sphereClientService = new SphereClientService();



            this.DataContext = new MainWindowViewModel(DialogCoordinator.Instance, group.Children, details_group.Children);
        }
Beispiel #2
0
        //Constructor
        public MainWindowViewModel(IDialogCoordinator dialogCoordinator, Model3DCollection sphereContainer, Model3DCollection detailsSphereContainer)
        {
            // Dialog coordinator provided by Mahapps framework
            // Either passed into MainViewModel constructor to conform to MVVM:-

            _dialogCoordinator          = dialogCoordinator;
            sphereService               = new SphereClientService();
            sphereDrawService           = new SphereDrawService();
            persistanceService          = new PersistanceService();
            this.sphereContainer        = sphereContainer;
            this.detailsSphereContainer = detailsSphereContainer;

            initSpheresFromApplicationState(PersistanceService.getApplicationState().Spheres);

            // if was loaded from state
        }