/// <summary> /// Initialise a new instance of the <see cref="MileageDetailsViewModel"/> class. /// </summary> public MileageDetailsViewModel() { this.journeyController = JourneyIOController.Instance; routes = new ObservableCollection <RouteDetailsType>(); this.RefreshCmd = new CommonCommand(CalculateRoutes); InitialiseComboBoxPrimary(); }
public static JourneyIOController GetInstance() { if (instance == null) { instance = new JourneyIOController(); } return(instance); }
/// <summary> /// Creates a new instance of this class /// </summary> /// <param name="mainForm">main form</param> public EditMileageViewModel() { this.journeyController = JourneyIOController.GetInstance(); this.InitialiseAddFields(); this.InitialiseEditFields(); this.outIndex = 0; this.inIndex = 0; this.tabIndex = 0; this.editMode = false; this.CloseWindowCmd = new CommonCommand(this.CloseWindow); this.AddNewCmd = new CommonCommand(this.AddNewRoute); this.CompleteEditCmd = new CommonCommand(this.CompleteUpdate); this.RefreshCmd = new CommonCommand(this.InitialiseEditTab); this.SelectForEditCmd = new CommonCommand(this.SelectJourneyToEdit, this.CanJnyBeSelected); }