private void findRecipesTile_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e) { RecipesControl recipesControl = (RecipesControl)existingControls["find_recipes"]; Dock = DockStyle.Fill; Controls.Add(recipesControl); recipesControl.BringToFront(); ShowButton(); string message = "Press \"Buy Missing Ingredients\" to buy all the unchecked ingredients automatically"; string caption = "Hint!"; MessageBoxButtons buttons = MessageBoxButtons.OK; DialogResult result; // Displays the MessageBox. if (!wasRecipeHintShown) { result = MessageBox.Show(message, caption, buttons); if (result == DialogResult.OK) { wasRecipeHintShown = true; } } }
private void simpleButton1_Click(object sender, EventArgs e) { RecipesControl recipesControl = (RecipesControl)MainForm.existingControls["find_recipes"]; Dock = DockStyle.Fill; Controls.Add(recipesControl); recipesControl.BringToFront(); string message = "Press \"Buy Missing Ingredients\" to buy all the unchecked ingredients automatically"; string caption = "Hint!"; MessageBoxButtons buttons = MessageBoxButtons.OK; DialogResult result; // Displays the MessageBox. if (!MainForm.wasRecipeHintShown) { result = MessageBox.Show(message, caption, buttons); if (result == DialogResult.OK) { MainForm.wasRecipeHintShown = true; } } }