Esempio n. 1
0
 public RankingDialog(TriviaApp pTriviaApp)
 {
     this.Build();
     this._triviaApp = pTriviaApp;
     this.BuildTree();
     this.LoadData();
 }
Esempio n. 2
0
 public SessionDialog(TriviaApp pTriviaApp)
 {
     this.Build();
     this._triviaApp       = pTriviaApp;
     this.cbbAnswers.Model = new ListStore(typeof(string));
     this.SetAnswerLimitTimer();
     this.LoadNextQuestion();
 }
Esempio n. 3
0
        public SettingsDialog(TriviaApp pTriviaApp)
        {
            this.Build();
            this._triviaApp = pTriviaApp;

            _selectedQuestionsSetBackUp     = this._triviaApp.SelectedQuestionsSet;
            this.lblQuestionSetName.Text    = this._triviaApp.SelectedQuestionsSet.Name;
            this.entExpectedAnswerTime.Text = this._triviaApp.SelectedQuestionsSet.ExpectedAnswerTime.ToString();
        }
Esempio n. 4
0
 public MainWindow(TriviaApp pTriviaApp) : base(Gtk.WindowType.Toplevel)
 {
     this._triviaApp = pTriviaApp;
     if (_triviaApp.LoggedUser == null)
     {
         this.Hide();
         ModalMessage.Error(this, "Permission denied");
     }
     this.Build();
     this.lblUsername.Text    = _triviaApp.LoggedUser.Username;
     this.btnSettings.Visible = _triviaApp.LoggedUser.IsAdmin;
     this.LoadQuestionsSets();
 }
Esempio n. 5
0
        public static void Main(string[] args)
        {
            LogConfig.Init();
            // add the framework services
            var services = new ServiceCollection();

            services.AddSingleton <IMapperFactory, TriviaMapperFactory>();

            // add StructureMap
            var container = new StructureMap.Container();

            container.Configure(config =>
            {
                // Register stuff in container, using the StructureMap APIs...
                config.Scan(_ =>
                {
                    _.AssemblyContainingType(typeof(Program));
                    _.WithDefaultConventions();
                });
                // Populate the container using the service collection
                config.Populate(services);
            });

            var serviceProvider = container.GetInstance <IServiceProvider>();

            Application.Init();

            var operativeServices  = serviceProvider.GetService <IOperativeServices>();
            var backOfficeServices = serviceProvider.GetService <IBackOfficeServices>();

            TriviaApp   triviaApp   = new TriviaApp(operativeServices, backOfficeServices);
            LogInDialog logInDialog = new LogInDialog(triviaApp);

            logInDialog.Show();
            Application.Run();
        }
Esempio n. 6
0
 public NewSessionDialog(TriviaApp pTriviaApp)
 {
     this._triviaApp = pTriviaApp;
     this.Build();
     this.InitializeData();
 }
Esempio n. 7
0
 public LogInDialog(TriviaApp pTriviaApp)
 {
     this._triviaApp = pTriviaApp;
     this.Build();
 }
Esempio n. 8
0
 public SignUpDialog(TriviaApp pTrivia)
 {
     this._triviaApp = pTrivia;
     this.Build();
 }