コード例 #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         CottonDBMS.Logging.Logger.Log("INFO", "FEEDER APPLICATION LAUNCH");
         Application.Current.ShutdownMode = ShutdownMode.OnMainWindowClose;
         Messenger.Default.Register <ContentPageChangedMessage>(this, handleContentPageChanged);
         TagDataProvider.SetSettingsPath(FolderConstants.FEEDER_BRIDGE_APP_DATA_FOLDER);
         INavigationService navService = SimpleIoc.Default.GetInstance <INavigationService>();
         shellVM = new ShellViewModel(navService);
         shellVM.AllowBarcoderConnect   = false;
         shellVM.AllowRFIDReaderConnect = true;
         shellVM.AllowScaleConnect      = false;
         shellVM.AllowWeighInTimeOut    = false;
         this.DataContext = shellVM;
         shellVM.Initialize();
     }
     catch (Exception exc)
     {
         Logging.Logger.Log(exc);
         Logging.Logger.CleanUp();
     }
 }