public AddQuote(MainMenuForm mainMenuForm) { InitializeComponent(); mainMenu = mainMenuForm; this.SaveQuote.Enabled = false; //Assigns the current date without getting user input DateTime currentDate = new DateTime(); currentDate = DateTime.Now; string stringDate = currentDate.ToString("MM/dd/yyyy"); this.setDate(stringDate); //Sets ArrayList of DesktopMaterial ArrayList materials = new ArrayList(); int enumlen = Enum.GetValues(typeof(Desk.DesktopMaterial)).Length; Array materialNames = Enum.GetValues(typeof(Desk.DesktopMaterial)); for (int i = 0; i < enumlen; i++) { materials.Add(materialNames.GetValue(i)); } this.Material.DataSource = materials; }
private void MainMenuButton_Click(object sender, EventArgs e) { MainMenuForm mainMenuForm = new MainMenuForm(); mainMenuForm.Show(); this.Close(); }
public MainMenuForm() { InitializeComponent(); addQuote = new AddQuote(this); searchAllQuotes = new SearchAllQuotes(this); viewAllQuotes = new ViewAllQuotes(this); this.mainMenuForm = this; }
public SearchAllQuotes(MainMenuForm mainMenuForm) { InitializeComponent(); mainMenu = mainMenuForm; SearchComboBox.DataSource = Enum.GetValues(typeof(Desk.DesktopMaterial)); }
public ViewAllQuotes(MainMenuForm mainMenuForm) { InitializeComponent(); mainMenu = mainMenuForm; }