Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-DeForrest-Reynolds committed Dec 4, 2023
1 parent 742ef6c commit 6683a27
Show file tree
Hide file tree
Showing 8 changed files with 3,660 additions and 20 deletions.
4 changes: 3 additions & 1 deletion Forms/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private void Search_Text_Changed(object Sender, EventArgs E)
{

}
private void Add_Ingredient_Click(object Sender, EventArgs Event)
private void Add_Recipe_Ingredient_Click(object Sender, EventArgs Event)
{
RecipeIngredientForm AIF = new(this, Manager);
AIF.ShowDialog(this);
Expand All @@ -179,6 +179,18 @@ private void Remove_Ingredient_Click(object Sender, EventArgs Event)
RecipeIngredients.Items.Remove(RecipeIngredients.SelectedItem);
}
}
private void Add_Recipe_Description_Click(object sender, EventArgs e)
{
RecipeDirectionForm RDF = new(this, Manager);
RDF.ShowDialog(this);
}
private void Remove_Recipe_Description_Click(object sender, EventArgs e)
{
if (RecipeDirections.SelectedItem != null)
{
RecipeDirections.Items.Remove(RecipeDirections.SelectedItem);
}
}
}
public partial class Toolbox
{
Expand Down
96 changes: 96 additions & 0 deletions Forms/RecipeDirectionForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions Forms/RecipeDirectionForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Diagnostics;
using System.Windows.Forms;

namespace Recipsio
{
public partial class RecipeDirectionForm : Form
{
public MainForm MF;
public Toolbox TB;
public RecipeDirectionForm(MainForm MF, Toolbox TB)
{
this.MF = MF;
this.TB = TB;
InitializeComponent();
KeyPreview = true;
}
private void Form_KeyDown(object Sender, KeyEventArgs KeyEvent)
{
if (KeyEvent.KeyCode == Keys.Escape)
{
Close();
}
}

private void Submit_Recipe_Direction_Click(object sender, System.EventArgs e)
{
MF.RecipeDirections.Items.Add(RecipeDirection.Text);
Close();
}
}
}
Loading

0 comments on commit 6683a27

Please sign in to comment.