public SwagOMeterAwardEngine(IAttendeeSource attendeeSource, ISwagSource swagSource) { _attendees = attendeeSource.Load(Properties.Settings.Default.FileLocation); _swag = swagSource.Load(Properties.Settings.Default.FileLocation); CheckCanSwag(); }
public SwagOMeterAwardEngine(string fileLocation, IAttendeeSource attendeeSource, ISwagSource swagSource, string attendeeFile, string swagFile) { _attendees = attendeeSource.Load(Path.Combine(fileLocation ?? string.Empty, attendeeFile)); _swag = swagSource.Load(Path.Combine(fileLocation ?? string.Empty, swagFile)); CheckCanSwag(); }
public SettingsViewModel(IAttendeeSource attendeeSource, ISwagSource swagSource) { _swagSource = swagSource; _attendeeSource = attendeeSource; EditSwagCommand = new DelegateCommand((_) => ExecuteEditSwag()); EditAttendeesCommand = new DelegateCommand((_) => ExecuteEditAttendees()); SetFileLocationCommand = new DelegateCommand((_) => ExecuteSetFileLocation()); CloseCommand = new DelegateCommand((_) => ExecuteClose()); }
public SettingsViewModel(IAttendeeSource attendeeSource, ISwagSource swagSource) { _swagSource = swagSource; _attendeeSource = attendeeSource; EditSwagCommand = new DelegateCommand(ExecuteEditSwag); EditAttendeesCommand = new DelegateCommand(ExecuteEditAttendees); SetFileLocationCommand = new DelegateCommand(ExecuteSetFileLocation); CloseCommand = new DelegateCommand(ExecuteClose); }
private SettingsDialog(IList<ISwag> swag, IList<IAttendee> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource) { _viewModel = new SettingsViewModel(attendeeSource, swagSource); DataContext = _viewModel; _viewModel.Close += (e, o) => { DialogResult = true; Close(); }; InitializeComponent(); }
private SettingsDialog(IAttendeeSource attendeeSource, ISwagSource swagSource) { _viewModel = new SettingsViewModel(attendeeSource, swagSource); DataContext = _viewModel; _viewModel.Close += (e, o) => { DialogResult = true; Close(); }; InitializeComponent(); }
public SwagOMeterViewModel(IAttendeeSource attendeeSource, ISwagSource swagSource, IWinnersSource winnersSource, ISwagOMeterAwardEngine swagOMeterAwardEngine) { _swagOMeterAwardEngine = swagOMeterAwardEngine; _swagSource = swagSource; _attendeeSource = attendeeSource; _winnersSource = winnersSource; AwardSwagCommand = new DelegateCommand((_) => ExecuteAwardSwag()); AttendeeNotPresentCommand = new DelegateCommand((_) => ExecuteAttendeeNotPresent()); AlreadyGotSwagCommand = new DelegateCommand((_) => ExecuteAttendeeDoesNotWantSwag()); CloseCommand = new DelegateCommand((_) => ExecuteClose()); SettingsCommand = new DelegateCommand((_) => ExecuteOpenSettings()); PlayMusicCommand = new DelegateCommand((_) => ExecutePlayMusic()); Music = new Uri("Resources\\Music.mp3", UriKind.Relative); SwagText = Properties.Resources.CantSwag; }
public SwagOMeterViewModel(IAttendeeSource attendeeSource, ISwagSource swagSource, IWinnersSource winnersSource, ISwagOMeterAwardEngine swagOMeterAwardEngine, bool saveWinnersOnExit = true) { _swagOMeterAwardEngine = swagOMeterAwardEngine; _swagSource = swagSource; _attendeeSource = attendeeSource; _winnersSource = winnersSource; _saveWinnersOnExit = saveWinnersOnExit; AwardSwagCommand = new DelegateCommand(ExecuteAwardSwag); AttendeeNotPresentCommand = new DelegateCommand(ExecuteAttendeeNotPresent); AlreadyGotSwagCommand = new DelegateCommand(ExecuteAttendeeDoesNotWantSwag); CloseCommand = new DelegateCommand(ExecuteClose); SettingsCommand = new DelegateCommand(ExecuteOpenSettings); PlayMusicCommand = new DelegateCommand(ExecutePlayMusic); Music = new Uri("Resources\\Music.mp3", UriKind.Relative); SwagText = Resources.CantSwag; }
internal static SettingsDialog Create(IList <SwagBase> swag, IList <AttendeeBase> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource) { var newDialog = new SettingsDialog(attendeeSource, swagSource); return(newDialog); }
internal static SettingsDialog Create(IList<ISwag> swag, IList<IAttendee> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource) { var newDialog = new SettingsDialog(swag, attendees, attendeeSource, swagSource); return newDialog; }
public void RefreshData(IAttendeeSource attendeeSource, ISwagSource swagSource) { _winners.Clear(); _swag = swagSource.Load(Properties.Settings.Default.FileLocation); _attendees = attendeeSource.Load(Properties.Settings.Default.FileLocation); }
public void RefreshData(string attendeesFile, string swagFile, IAttendeeSource attendeeSource, ISwagSource swagSource) { _winners.Clear(); _swag = swagSource.Load(swagFile); _attendees = attendeeSource.Load(attendeesFile); }
public Model(IAttendeeSource attendeeSource, ISwagSource swagSource, IWinnersSource winnersSource, string fileLocation) { _winnersSource = winnersSource; _swagOMeterAwardEngine = new SwagOMeterAwardEngine(fileLocation, attendeeSource, swagSource, "attendees.xml", "swag.xml"); }
private static SwagOMeterAwardEngine BuildAwardEngine(IAttendeeSource x, ISwagSource y) { var awardEngine = new SwagOMeterAwardEngine("", x, y, "", ""); return(awardEngine); }
private static SwagOMeterAwardEngine BuildAwardEngine(IAttendeeSource x, ISwagSource y) { var awardEngine = new SwagOMeterAwardEngine("", x, y, "", ""); return awardEngine; }