public SwagOMeterAwardEngine(IAttendeeSource attendeeSource, ISwagSource swagSource)
        {
            _attendees = attendeeSource.Load(Properties.Settings.Default.FileLocation);
            _swag = swagSource.Load(Properties.Settings.Default.FileLocation);

            CheckCanSwag();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }
Пример #4
0
        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());
        }
Пример #5
0
        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);
        }
Пример #6
0
        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();
        }
Пример #7
0
        private SettingsDialog(IAttendeeSource attendeeSource, ISwagSource swagSource)
        {
            _viewModel = new SettingsViewModel(attendeeSource, swagSource);

            DataContext       = _viewModel;
            _viewModel.Close += (e, o) =>
            {
                DialogResult = true;
                Close();
            };

            InitializeComponent();
        }
Пример #8
0
        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;
        }
Пример #9
0
        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;
        }
Пример #10
0
        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;
        }
Пример #11
0
        internal static SettingsDialog Create(IList <SwagBase> swag, IList <AttendeeBase> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource)
        {
            var newDialog = new SettingsDialog(attendeeSource, swagSource);

            return(newDialog);
        }
Пример #12
0
        internal static SettingsDialog Create(IList<ISwag> swag, IList<IAttendee> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource)
        {
            var newDialog = new SettingsDialog(swag, attendees, attendeeSource, swagSource);

            return newDialog;
        }
Пример #13
0
 public void RefreshData(IAttendeeSource attendeeSource, ISwagSource swagSource)
 {
     _winners.Clear();
     _swag = swagSource.Load(Properties.Settings.Default.FileLocation);
     _attendees = attendeeSource.Load(Properties.Settings.Default.FileLocation);
 }
Пример #14
0
 public void RefreshData(string attendeesFile, string swagFile, IAttendeeSource attendeeSource, ISwagSource swagSource)
 {
     _winners.Clear();
     _swag      = swagSource.Load(swagFile);
     _attendees = attendeeSource.Load(attendeesFile);
 }
Пример #15
0
 public Model(IAttendeeSource attendeeSource, ISwagSource swagSource, IWinnersSource winnersSource, string fileLocation)
 {
     _winnersSource         = winnersSource;
     _swagOMeterAwardEngine = new SwagOMeterAwardEngine(fileLocation, attendeeSource, swagSource, "attendees.xml", "swag.xml");
 }
Пример #16
0
 public void RefreshData(string attendeesFile, string swagFile, IAttendeeSource attendeeSource, ISwagSource swagSource)
 {
     _winners.Clear();
     _swag = swagSource.Load(swagFile);
     _attendees = attendeeSource.Load(attendeesFile);
 }
Пример #17
0
 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);
        }
Пример #19
0
 private static SwagOMeterAwardEngine BuildAwardEngine(IAttendeeSource x, ISwagSource y)
 {
     var awardEngine = new SwagOMeterAwardEngine("", x, y, "", "");
     return awardEngine;
 }