Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            saveUserSettings save       = new saveUserSettings();
            bool             isFilledIn = true;

            foreach (Control item in this.Controls)
            {
                if (item is TextBox)
                {
                    if (string.IsNullOrEmpty(((TextBox)item).Text))
                    {
                        isFilledIn = false;
                    }
                }
            }
            if (isFilledIn == false)
            {
                MessageBox.Show("Niet alle velden zijn ingevuld");
            }
            else
            {
                save.saveUser(textBoxName.Text, textBoxCity.Text, textBoxStreet.Text, textBoxSchool.Text, textBoxOpleiding.Text, textBoxHuur.Text);
                Properties.Settings.Default.hasStarted = 1.ToString();
                save.isInstalled();
                homePage home = new homePage();
                home.Show();
                this.Hide();
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            saveUserSettings save       = new saveUserSettings();
            bool             isFilledIn = true;

            foreach (Control item in this.Controls)
            {
                if (item is TextBox)
                {
                    if (string.IsNullOrEmpty(((TextBox)item).Text))
                    {
                        isFilledIn = false;
                    }
                }
            }
            if (isFilledIn == false)//als er iets niet is ingevuld geeft die een error message
            {
                MessageBox.Show("Niet alle velden zijn ingevuld");
            }
            else//anders slaat die alle ingevulde informatie op in de userSettings en gaat door naar de homepagina
            {
                save.saveUser(textBoxName.Text, textBoxCity.Text, textBoxStreet.Text, textBoxSchool.Text, textBoxOpleiding.Text, Convert.ToString(numericUpDown1.Value));
                Properties.Settings.Default.hasStarted = 1.ToString();
                save.isInstalled();
                homePage home = new homePage();
                home.Show();
                this.Hide();
            }
        }
Ejemplo n.º 3
0
        public poi2()
        {
            InitializeComponent();
            CenterToScreen();
            saveUserSettings settings = new saveUserSettings();

            city = settings.getCity();
            comboBox1.SelectedIndex = 0;
            InitializeChromium();
        }
Ejemplo n.º 4
0
        private void getSettings()
        {
            settings = new saveUserSettings();
            userSetting userSettings = settings.getSettings();

            textBoxName.Text      = userSettings.Name;
            textBoxHuur.Text      = userSettings.RentDay;
            textBoxCity.Text      = userSettings.City;
            textBoxOpleiding.Text = userSettings.Education;
            textBoxSchool.Text    = userSettings.School;
            textBoxStreet.Text    = userSettings.Street;
        }
Ejemplo n.º 5
0
        private void getSettings()//haalt de settings op uit een usersettings object
        {
            settings = new saveUserSettings();
            userSetting userSettings = settings.getSettings();

            textBoxName.Text      = userSettings.Name;
            numericUpDown1.Value  = Convert.ToDecimal(userSettings.RentDay);
            textBoxCity.Text      = userSettings.City;
            textBoxOpleiding.Text = userSettings.Education;
            textBoxSchool.Text    = userSettings.School;
            textBoxStreet.Text    = userSettings.Street;
        }
Ejemplo n.º 6
0
        public poi2()
        {
            InitializeComponent();
            CenterToScreen();
            try
            {
                AddFonts();
            }
            catch (Exception exception)
            {
                ExceptionToText ex = new ExceptionToText(exception.ToString());
            }
            setbackground();
            saveUserSettings settings = new saveUserSettings();

            city      = settings.getCity();
            this.Text = city;
            InitializeChromium();
        }