private Func <Task> onCloseLambda;   // lambda from Main Menu to avoid flicker

        /* **************************** Constructors **************************** */

        public InstructionsForm(Func <Task> onCloseLambda)
        {
            InitializeComponent();
            InitViews();

            soundControl       = SoundControl.Instance;
            this.onCloseLambda = onCloseLambda;
        }
 public GameForm(GridButton[,] gridButtons, Settings.GameType type, int cluesNum, Clue[] clues)
 {
     InitializeComponent();
     soundControl     = SoundControl.Instance;
     this.gridButtons = gridButtons;
     this.type        = type;
     this.cluesNum    = cluesNum;
     timeRemaining    = totalAllowedTime = 194;
     InitScanalyzer(clues);
     InitViews();
 }
        /* **************************** Constructors **************************** */

        public SettingsForm(Func <Task> onCloseLambda)
        {
            InitializeComponent();
            soundControl       = SoundControl.Instance;
            settings           = Settings.Instance;
            this.onCloseLambda = onCloseLambda;
            settingUp          = true;
            InitViews();
            RetrieveSettings();
            settingUp = false;
        }
        /* **************************** Constructors **************************** */

        public MainMenuForm()
        {
            InitializeComponent();
            soundControl = SoundControl.Instance;
            // Back Button lambda
            formClosedEventHandler = async() => { Show();  await Task.Delay(100); };
            Utilities.SetDoubleBuffering(Controls, true);
            TopMost         = true;
            FormBorderStyle = FormBorderStyle.None;
            WindowState     = FormWindowState.Maximized;
            initViews();
        }
Example #5
0
        /* **************************** Constructors **************************** */

        public EvidenceTypeForm()
        {
            InitializeComponent();
            soundControl = SoundControl.Instance;
            InitViews();
        }