Beispiel #1
0
        public MainWindowViewModel(Frame CurrentFrame, Dispatcher mainWindowDispatcher)
        {
            this.currentFrame = CurrentFrame;
            this.mainWindowDispatcher = mainWindowDispatcher;

            // Initialize Agle as soon as possible
            MyAgle = Agle.Agle.GetAgleInstance;
            MyAgle.InitializeAgle(this.mainWindowDispatcher);


            // Creating ViewModel for all related pages
            aglePageVM = new AglePageViewModel();

            selfCheckingPageVM = new SelfCheckingPageViewModel();

            titlePageVM = new TitlePageViewModel();
            titlePageVM.VideoFinishedEvent += this.OnTitlePageFinished;

            selfCheckingPageVM.AgleSystemStart += this.OnAgleSystemStart;

            // Ready navigating to title page, show starting movie
            TitlePage titlePage = new TitlePage();
            titlePage.InitializeTitlePage(this.titlePageVM);
            this.currentFrame.NavigationService.Navigate(titlePage);


           
        }
        internal void InitializeSelfChekingPage(SelfCheckingPageViewModel SelfCheckingPageVM)
        {
            this.selfCheckingPageVM            = SelfCheckingPageVM;
            this.CheckingPageBackground.Source = new BitmapImage(new Uri(@"\Asset\asurada .jpg", UriKind.Relative));
            //MyAgle = Agle.Agle.GetAgleInstance;

            // Checking Modules needed
            //MyAgle.CheckingModule();
            this.selfCheckingPageVM.PopulateCheckingList();
            this.checkingResultVM             = new CheckingResultViewModel(this.selfCheckingPageVM.CheckingInfoList);
            this.AgleCheckingList.DataContext = this.checkingResultVM;
            this.FinalDecision.DataContext    = this.checkingResultVM;
        }
        internal void InitializeSelfChekingPage(SelfCheckingPageViewModel SelfCheckingPageVM)
        {
            this.selfCheckingPageVM = SelfCheckingPageVM;
            this.CheckingPageBackground.Source = new BitmapImage(new Uri(@"\Asset\asurada .jpg", UriKind.Relative));
            //MyAgle = Agle.Agle.GetAgleInstance;

            // Checking Modules needed
            //MyAgle.CheckingModule();
            this.selfCheckingPageVM.PopulateCheckingList();
            this.checkingResultVM = new CheckingResultViewModel(this.selfCheckingPageVM.CheckingInfoList);
            this.AgleCheckingList.DataContext = this.checkingResultVM;
            this.FinalDecision.DataContext = this.checkingResultVM;

        }