Skip to content

Commit

Permalink
Forma unosa
Browse files Browse the repository at this point in the history
Dodao sam stvari za gum odustani
  • Loading branch information
Juric22 committed Jun 12, 2024
1 parent 0d6aaa1 commit e338328
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Software/SZUUP/SZUUP/FrmPrijava.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;

namespace SZUUP
{
Expand Down Expand Up @@ -41,6 +39,11 @@ private void btnLogin_Click(object sender, EventArgs e)
{
MessageBox.Show("Dobrodošli!", "Prijavljeni ste",
MessageBoxButtons.OK, MessageBoxIcon.Information);

// Open the FrmUnos form
FrmUnos frmUnos = new FrmUnos();
frmUnos.Show();
this.Hide(); // Hide the current login form
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Software/SZUUP/SZUUP/FrmUnos.Designer.cs

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

13 changes: 12 additions & 1 deletion Software/SZUUP/SZUUP/FrmUnos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ private void btnSpremi_Click(object sender, EventArgs e)

private void btnOdustani_Click(object sender, EventArgs e)
{
// Cancel button click event handler
// Show a confirmation dialog
var result = MessageBox.Show("Odustajete od unosa jela?", "Potvrda",
MessageBoxButtons.YesNo, MessageBoxIcon.Question);

// If the user clicks "Yes," close the current form and show the login form
if (result == DialogResult.Yes)
{
FrmPrijava frmPrijava = new FrmPrijava();
frmPrijava.Show();
this.Close(); // Close the current form
}
// If the user clicks "No," do nothing and return to the current form
}

private void btnUredi_Click(object sender, EventArgs e)
Expand Down

0 comments on commit e338328

Please sign in to comment.