public Main() { //getting user LogSign log = new LogSign(); //user event log.getUser += HandleGetUser; //showing signin form first log.ShowDialog(); //setting form 1 InitializeComponent(); // window method HandleClientWindowSize(); //getting todays neos GetTodaysNeos(); //if user was signed in if (signedUser != null) { labelWelcome.Text = $"WELCOME {signedUser.Firstn.ToUpper()}!!"; dateTimePicker1.Text = signedUser.Dob.ToShortDateString(); } //tooltips for buttons toolTipDate.SetToolTip(dateTimePicker1, "Change date to populate the list of NEO'S for that date."); toolTipDate.InitialDelay = 350; toolTipOpen.SetToolTip(buttonOpen, "This will open The official Nasa page in your browser."); toolTipOpen.InitialDelay = 350; toolTipSave.SetToolTip(buttonSave, "This will save the current list to our database."); toolTipSave.InitialDelay = 350; }
//setting user thats signed in event public void HandleGetUser(object sender, EventArgs e) { LogSign log = sender as LogSign; signedUser = log.SignedUser; }