//----------------------Ende Valdierung------------//
 public AddTourViewModel()
 {
     itemFactory       = TourItemFactory.GetInstance();
     list_of_tourtypes = new ObservableCollection <TourType>();
     list_of_tourtypes.Add(new TourType()
     {
         Name = "Fastest"
     });
     list_of_tourtypes.Add(new TourType()
     {
         Name = "Shortest"
     });
     list_of_tourtypes.Add(new TourType()
     {
         Name = "Pedestrian"
     });
     list_of_tourtypes.Add(new TourType()
     {
         Name = "Bicycle"
     });
     list_of_tourtypes.Add(new TourType()
     {
         Name = "Multimodal"
     });
 }
 public MainViewModel()
 {
     this.tourItemFactory = TourItemFactory.GetInstance();
     Items = new ObservableCollection <TourItem>();
     Logs  = new ObservableCollection <DataGridItem>();
     FillListBox();
 }
Beispiel #3
0
 public static ITourItemFactory GetInstance()
 {
     if (instance == null)
     {
         instance = new TourItemFactoryImpl();
     }
     return(instance);
 }
Beispiel #4
0
 public static ITourItemFactory GetInstance()
 {
     if (tourItemFactory == null)
     {
         tourItemFactory = new TourItemFactoryImpl();
     }
     return(tourItemFactory);
 }
Beispiel #5
0
        /*public string CurrentTourDateLog
         * {
         *  get
         *  {
         *      CurrentTour.
         *  }
         * }*/


        public MainWindowViewModel()
        {
            addTourViewModel = new AddTourViewModel();
            addLogViewModel  = new AddLogViewModel();
            editLogViewModel = new EditLogsViewModel();

            importViewModel = new ImportViewModel();
            itemFactory     = TourItemFactory.GetInstance();

            ReadListBox();
        }
Beispiel #6
0
 public EditTourViewModel(Tour current_t)
 {
     CurrentTour = current_t;
     TourName    = current_t.Name;
     From        = current_t.From;
     To          = current_t.To;
     RouteType   = current_t.Route_Type;
     Description = current_t.Description;
     this.updateTourViewModel = new UpdateTourViewModel();
     this.itemFactory         = TourItemFactory.GetInstance();
 }
Beispiel #7
0
 public static ITourItemFactory GetInstance(bool mockDatabase = false)
 {
     if (manager == null && !mockDatabase)
     {
         manager = new TourManagerImp();
     }
     else if (manager == null && mockDatabase)
     {
         manager = new TourManagerImp(true);
     }
     return(manager);
 }
Beispiel #8
0
 public TourFolderVM()
 {
     try
     {
         this.tourItemFactory = TourItemFactory.GetInstance();
         log.Info("Started ItemFactory...");
     }
     catch (Exception e)
     {
         log.Error(e);
     }
     InitListbox();
 }
Beispiel #9
0
 public AddLogViewModel()
 {
     this.itemFactory = TourItemFactory.GetInstance();
 }
Beispiel #10
0
 public ImportViewModel()
 {
     itemFactory = TourItemFactory.GetInstance();
 }
Beispiel #11
0
 public ChangeTourViewModel()
 {
     this.tourItemFactory = TourItemFactory.GetInstance();
 }
 public EditLogsViewModel()
 {
     this.itemFactory        = TourItemFactory.GetInstance();
     this.updateLogViewModel = new UpdateLogViewModel();
 }
Beispiel #13
0
 public TourFolderVM()
 {
     _tourItemFactory = TourItemFactory.GetInstance();
     InitListBox();
 }
 public UpdateTourViewModel()
 {
     this.itemFactory = TourItemFactory.GetInstance();
 }