[longomatch] Handle correctly back button for fake live projects



commit 2a330f7f11a3895a5def51982a0d4713093cef14
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Oct 28 10:39:18 2014 +0100

    Handle correctly back button for fake live projects

 LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
index 8f00738..3823cec 100644
--- a/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
+++ b/LongoMatch.GUI/Gui/Panel/NewProjectPanel.cs
@@ -45,6 +45,7 @@ namespace LongoMatch.Gui.Panel
                const int PROJECT_TYPE = 0;
                const int PROJECT_DETAILS = 1;
                const int PROJECT_PERIODS = 2;
+               int firstPage;
                Project project;
                ProjectType projectType;
                CaptureSettings captureSettings;
@@ -77,11 +78,11 @@ namespace LongoMatch.Gui.Panel
                        FillDevices (mtoolkit.VideoDevices);
                        LoadTeams ();
                        if (project == null) {
-                               notebook1.Page = 0;
+                               notebook1.Page = firstPage = 0;
                                datepicker1.Date = DateTime.Now;
                                mediafilesetselection1.FileSet = new MediaFileSet ();
                        } else {
-                               notebook1.Page = 1;
+                               notebook1.Page = firstPage = 1;
                                this.project = project;
                                projectType = ProjectType.EditProject;
                                SetProjectType ();
@@ -412,7 +413,7 @@ namespace LongoMatch.Gui.Panel
 
                void HandleBackClicked (object sender, EventArgs e)
                {
-                       if (notebook1.Page == PROJECT_TYPE) {
+                       if (notebook1.Page == firstPage) {
                                if (BackEvent != null) {
                                        BackEvent ();
                                }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]