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

            CheckCanSwag();
        }
Esempio n. 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();
        }
Esempio n. 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();
        }
Esempio n. 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());
        }
Esempio n. 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);
        }
        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();
        }
Esempio n. 7
0
        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;
        }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 11
0
        internal static SettingsDialog Create(IList <SwagBase> swag, IList <AttendeeBase> attendees, IAttendeeSource attendeeSource, ISwagSource swagSource)
        {
            var newDialog = new SettingsDialog(attendeeSource, swagSource);

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