# HG changeset patch # User cavaliet # Date 1257423232 -3600 # Node ID b266af50744c96bc8e9212fdd661da2a3c0f9bef # Parent 83615722dbaba1e61b7954fce91e8decfd34e12c Change file and event names for code to be clearer and more coherent with the project and cuttings organisation diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.Screen/UserControlScreen.xaml.cs --- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Wed Nov 04 16:28:01 2009 +0100 +++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -87,10 +87,10 @@ try { existingProjects = LoadProjects(MainViewModel.Project.VideoPath); - UserControlListSession listProject = new UserControlListSession(existingProjects); + UserControlListProject listProject = new UserControlListProject(existingProjects); listProject.Name = "ListProject"; LayoutRoot.Children.Add(listProject); - listProject.EH_List_ContactDown += new EventHandler(listProject_EH_List_ContactDown); + listProject.EH_ListProject_ContactDown += new EventHandler(listProject_EH_ListProject_ContactDown); } catch (Exception) { @@ -113,23 +113,23 @@ } } - void listProject_EH_List_ContactDown(object sender, EventArgs e) + void listProject_EH_ListProject_ContactDown(object sender, EventArgs e) { try { - LayoutRoot.Children.Remove((UserControlListSession)sender); - if (((UserControlListSession)sender).SelectedItem.Equals("New Project")) + LayoutRoot.Children.Remove((UserControlListProject)sender); + if (((UserControlListProject)sender).SelectedItem.Equals("New Project")) { - UserControlSessionInput ProjectInput = new UserControlSessionInput(); + UserControlNewProjectForm ProjectInput = new UserControlNewProjectForm(); ProjectInput.Name = "ProjectInput"; LayoutRoot.Children.Add(ProjectInput); - ProjectInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.ProjectInput_EH_SurfaceButtonSubmit_ContactDown); + ProjectInput.EH_NewProjectForm_ContactDown += new System.EventHandler(this.ProjectInput_EH_NewProjectForm_ContactDown); } else { foreach (Project elt in existingProjects) { - if (elt.Name.Equals(((UserControlListSession)sender).SelectedItem)) + if (elt.Name.Equals(((UserControlListProject)sender).SelectedItem)) { MainViewModel.Project.Project = elt; OpenProject(); @@ -146,18 +146,18 @@ } } - private void ProjectInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e) + private void ProjectInput_EH_NewProjectForm_ContactDown(object sender, EventArgs e) { try { - //MainViewModel.Project.Alias = ((UserControlSessionInput)sender).Alias; - //MainViewModel.Project.Email = ((UserControlSessionInput)sender).Email; - MainViewModel.Project.Description = ((UserControlSessionInput)sender).Description; - MainViewModel.Project.Name = ((UserControlSessionInput)sender).SessionName; + //MainViewModel.Project.Alias = ((UserControlNewProjectForm)sender).Alias; + //MainViewModel.Project.Email = ((UserControlNewProjectForm)sender).Email; + MainViewModel.Project.Description = ((UserControlNewProjectForm)sender).Description; + MainViewModel.Project.Name = ((UserControlNewProjectForm)sender).SessionName; //2-Suppression UCSession Input - LayoutRoot.Children.Remove((UserControlSessionInput)sender); + LayoutRoot.Children.Remove((UserControlNewProjectForm)sender); OpenProject(); } catch (Exception ex) @@ -172,7 +172,7 @@ { try { - UserControlListProject listCuttings = new UserControlListProject(MainViewModel.Project.CuttingsDict); + UserControlListCutting listCuttings = new UserControlListCutting(MainViewModel.Project.CuttingsDict); listCuttings.Name = "listCuttings"; LayoutRoot.Children.Add(listCuttings); listCuttings.EH_Item_ContactDown += new EventHandler(listCuttings_EH_Item_ContactDown); @@ -189,18 +189,18 @@ { try { - LayoutRoot.Children.Remove((UserControlListProject)sender); - if (((UserControlListProject)sender).SelectedItem.Equals("New Cutting")) + LayoutRoot.Children.Remove((UserControlListCutting)sender); + if (((UserControlListCutting)sender).SelectedItem.Equals("New Cutting")) { - UserControlNewProject newCutting = new UserControlNewProject(User); + UserControlNewCuttingForm newCutting = new UserControlNewCuttingForm(User); newCutting.Name = "newCutting"; LayoutRoot.Children.Add(newCutting); - newCutting.EH_NewCutting_ContactDown += new EventHandler(newCutting_EH_ContactDown); + newCutting.EH_NewCuttingForm_ContactDown += new EventHandler(newCutting_EH_ContactDown); } else { foreach(KeyValuePair elt in MainViewModel.Project.CuttingsDict) - if (elt.Key.Equals(((UserControlListProject)sender).SelectedItem)) + if (elt.Key.Equals(((UserControlListCutting)sender).SelectedItem)) { CuttingVM = new CuttingViewModel(elt.Value, 815); if (UC_Screen_NewCutting != null) @@ -221,9 +221,9 @@ { try { - LayoutRoot.Children.Remove((UserControlNewProject)sender); - CuttingVM = new CuttingViewModel(((UserControlNewProject)sender).Cutting, 850); - MainViewModel.Project.CuttingsDict.Add(CuttingVM.Title, ((UserControlNewProject)sender).Cutting); + LayoutRoot.Children.Remove((UserControlNewCuttingForm)sender); + CuttingVM = new CuttingViewModel(((UserControlNewCuttingForm)sender).Cutting, 850); + MainViewModel.Project.CuttingsDict.Add(CuttingVM.Title, ((UserControlNewCuttingForm)sender).Cutting); if (UC_Screen_NewCutting != null) UC_Screen_NewCutting(this, new EventArgs()); } diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/FingersDance.Control.SessionInput.csproj --- a/src/FingersDance.Control.SessionInput/FingersDance.Control.SessionInput.csproj Wed Nov 04 16:28:01 2009 +0100 +++ b/src/FingersDance.Control.SessionInput/FingersDance.Control.SessionInput.csproj Thu Nov 05 13:13:52 2009 +0100 @@ -89,25 +89,22 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile - - Designer - MSBuild:Compile - - + Designer MSBuild:Compile - + + Designer MSBuild:Compile - Designer - - UserControlSessionInput.xaml - @@ -130,14 +127,17 @@ True Settings.settings + + UserControlListCutting.xaml + UserControlListProject.xaml - - UserControlListSession.xaml + + UserControlNewCuttingForm.xaml - - UserControlNewProject.xaml + + UserControlNewProjectForm.xaml diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListCutting.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlListCutting.xaml Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListCutting.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlListCutting.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using FingersDance.Data; +using FingersDance.Control; + +namespace FingersDance.Control.SessionInput +{ + /// + /// Interaction logic for UserControlListCutting.xaml + /// + public partial class UserControlListCutting : UserControl + { + //Creation d'un Event pour Chaque Item Video + public event EventHandler EH_Item_ContactDown; + public string SelectedItem = ""; + + public UserControlListCutting(Dictionary cuttings) + { + InitializeComponent(); + OpenSessions(cuttings); + } + + private void OpenSessions(Dictionary cuttings) + { + try + { + CustomListBoxItem Contener = new CustomListBoxItem(); + Contener.Name = "New Cutting"; + UserControlCustomLabel l = new UserControlCustomLabel("New Cutting"); + Contener.Content = l; + stackPanel.Children.Add(Contener); + Contener.ContactTapGesture += Item_ContactTapGesture; + foreach (KeyValuePair elt in cuttings) + { + Contener = new CustomListBoxItem(); + Contener.Name = elt.Key; + l = new UserControlCustomLabel(elt.Key); + Contener.Content = l; + stackPanel.Children.Add(Contener); + Contener.ContactTapGesture += Item_ContactTapGesture; + } + } + catch (Exception) { } + } + + //Event appelé lors de la selection d'un Item dans la Liste + private void Item_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) + { + SelectedItem = ((CustomListBoxItem)sender).Name; + if (EH_Item_ContactDown != null) + EH_Item_ContactDown(this, new EventArgs()); + } + + + } +} diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListProject.xaml.cs --- a/src/FingersDance.Control.SessionInput/UserControlListProject.xaml.cs Wed Nov 04 16:28:01 2009 +0100 +++ b/src/FingersDance.Control.SessionInput/UserControlListProject.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -19,47 +19,43 @@ /// /// Interaction logic for UserControlListProject.xaml /// - public partial class UserControlListProject + public partial class UserControlListProject : UserControl { //Creation d'un Event pour Chaque Item Video - public event EventHandler EH_Item_ContactDown; + public event EventHandler EH_ListProject_ContactDown; public string SelectedItem = ""; - public UserControlListProject(Dictionary cuttings) + public UserControlListProject(List projects) { InitializeComponent(); - OpenSessions(cuttings); + OpenProjects(projects); } - private void OpenSessions(Dictionary cuttings) + private void OpenProjects(List projects) { - try + CustomListBoxItem Contener = new CustomListBoxItem(); + Contener.Name = "New Project"; + UserControlCustomLabel l = new UserControlCustomLabel("New Project"); + Contener.Content = l; + stackPanel.Children.Add(Contener); + Contener.ContactTapGesture += Item_ContactTapGesture; + foreach (Project elt in projects) { - CustomListBoxItem Contener = new CustomListBoxItem(); - Contener.Name = "New Cutting"; - UserControlCustomLabel l = new UserControlCustomLabel("New Cutting"); + Contener = new CustomListBoxItem(); + Contener.Name = elt.Name; + l = new UserControlCustomLabel(elt.Name); Contener.Content = l; stackPanel.Children.Add(Contener); Contener.ContactTapGesture += Item_ContactTapGesture; - foreach (KeyValuePair elt in cuttings) - { - Contener = new CustomListBoxItem(); - Contener.Name = elt.Key; - l = new UserControlCustomLabel(elt.Key); - Contener.Content = l; - stackPanel.Children.Add(Contener); - Contener.ContactTapGesture += Item_ContactTapGesture; - } } - catch (Exception) { } } //Event appelé lors de la selection d'un Item dans la Liste private void Item_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) { SelectedItem = ((CustomListBoxItem)sender).Name; - if (EH_Item_ContactDown != null) - EH_Item_ContactDown(this, new EventArgs()); + if (EH_ListProject_ContactDown != null) + EH_ListProject_ContactDown(this, new EventArgs()); } } } diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListSession.xaml --- a/src/FingersDance.Control.SessionInput/UserControlListSession.xaml Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlListSession.xaml.cs --- a/src/FingersDance.Control.SessionInput/UserControlListSession.xaml.cs Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using FingersDance.Data; -using FingersDance.Control; - -namespace FingersDance.Control.SessionInput -{ - /// - /// Interaction logic for UserControlListSession.xaml - /// - public partial class UserControlListSession - { - //Creation d'un Event pour Chaque Item Video - public event EventHandler EH_List_ContactDown; - public string SelectedItem = ""; - - public UserControlListSession(List projects) - { - InitializeComponent(); - OpenProjects(projects); - } - - private void OpenProjects(List projects) - { - CustomListBoxItem Contener = new CustomListBoxItem(); - Contener.Name = "New Project"; - UserControlCustomLabel l = new UserControlCustomLabel("New Project"); - Contener.Content = l; - stackPanel.Children.Add(Contener); - Contener.ContactTapGesture += Item_ContactTapGesture; - foreach (Project elt in projects) - { - Contener = new CustomListBoxItem(); - Contener.Name = elt.Name; - l = new UserControlCustomLabel(elt.Name); - Contener.Content = l; - stackPanel.Children.Add(Contener); - Contener.ContactTapGesture += Item_ContactTapGesture; - } - } - - //Event appelé lors de la selection d'un Item dans la Liste - private void Item_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) - { - SelectedItem = ((CustomListBoxItem)sender).Name; - if (EH_List_ContactDown != null) - EH_List_ContactDown(this, new EventArgs()); - } - } -} diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlNewCuttingForm.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using FingersDance.Data; + +namespace FingersDance.Control.SessionInput +{ + /// + /// Interaction logic for UserControlNewCuttingForm.xaml + /// + public partial class UserControlNewCuttingForm : UserControl + { + public event EventHandler EH_NewCuttingForm_ContactDown; + public Cutting Cutting = new Cutting(); + User _User = new User(); + + public UserControlNewCuttingForm(User u) + { + InitializeComponent(); + ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); + _User = u; + + + } + + #region Actions + + private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) + { + Cutting = new Cutting(_User.Name, new List()); + if (EH_NewCuttingForm_ContactDown != null) + EH_NewCuttingForm_ContactDown(this, new EventArgs()); + } + + private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) + { + //Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting()); + Cutting = new Cutting(_User.Name, new List()); + if (EH_NewCuttingForm_ContactDown != null) + EH_NewCuttingForm_ContactDown(this, new EventArgs()); + } + + #endregion + } +} diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewProject.xaml --- a/src/FingersDance.Control.SessionInput/UserControlNewProject.xaml Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,341 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewProject.xaml.cs --- a/src/FingersDance.Control.SessionInput/UserControlNewProject.xaml.cs Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using FingersDance.Data; - -namespace FingersDance.Control.SessionInput -{ - /// - /// Interaction logic for UserControlNewProject.xaml - /// - public partial class UserControlNewProject : UserControl - { - public event EventHandler EH_NewCutting_ContactDown; - public Cutting Cutting = new Cutting(); - User _User = new User(); - - public UserControlNewProject(User u) - { - InitializeComponent(); - ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); - _User = u; - - - } - - #region Actions - - private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) - { - Cutting = new Cutting(_User.Name, new List()); - if (EH_NewCutting_ContactDown != null) - EH_NewCutting_ContactDown(this, new EventArgs()); - } - - private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) - { - //Project = new Project(ST_ProjectName.Text, ST_Date.Text, ST_Desc.Text, _User, new Cutting()); - Cutting = new Cutting(_User.Name, new List()); - if (EH_NewCutting_ContactDown != null) - EH_NewCutting_ContactDown(this, new EventArgs()); - } - - #endregion - } -} diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewProjectForm.xaml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlNewProjectForm.xaml Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlNewProjectForm.xaml.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/FingersDance.Control.SessionInput/UserControlNewProjectForm.xaml.cs Thu Nov 05 13:13:52 2009 +0100 @@ -0,0 +1,63 @@ +using System; +using System.IO; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Navigation; +using FingersDance.Data; + +namespace FingersDance.Control.SessionInput +{ + /// + /// Interaction logic for UserControlNewProjectForm.xaml + /// + public partial class UserControlNewProjectForm : UserControl + { + public event EventHandler EH_NewProjectForm_ContactDown; + public string SessionName = ""; + public string Email = ""; + public string Alias = ""; + public string Description = ""; + + public UserControlNewProjectForm() + { + this.InitializeComponent(); + ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); + } + + #region Actions + + private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) + { + //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) + if (!ST_Name.Text.Equals("")) + { + SessionName = ST_Name.Text; + Email= ST_Email.Text; + Alias = ST_Alias.Text; + Description = ST_Desc.Text; + if (EH_NewProjectForm_ContactDown != null) + EH_NewProjectForm_ContactDown(this, new EventArgs()); + } + } + + private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) + { + //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) + if (!ST_Name.Text.Equals("")) + { + SessionName = ST_Name.Text; + Email = ST_Email.Text; + Alias = ST_Alias.Text; + Description = ST_Desc.Text; + if (EH_NewProjectForm_ContactDown != null) + EH_NewProjectForm_ContactDown(this, new EventArgs()); + } + } + + #endregion + } +} diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml --- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -r 83615722dbab -r b266af50744c src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs --- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs Wed Nov 04 16:28:01 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -using System; -using System.IO; -using System.Net; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Navigation; -using FingersDance.Data; - -namespace FingersDance.Control.SessionInput -{ - public partial class UserControlSessionInput - { - public event EventHandler EH_SurfaceButtonSubmit_ContactDown; - public string SessionName = ""; - public string Email = ""; - public string Alias = ""; - public string Description = ""; - - public UserControlSessionInput() - { - this.InitializeComponent(); - ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString(); - } - - #region Actions - - private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e) - { - //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) - if (!ST_Name.Text.Equals("")) - { - SessionName = ST_Name.Text; - Email= ST_Email.Text; - Alias = ST_Alias.Text; - Description = ST_Desc.Text; - if (EH_SurfaceButtonSubmit_ContactDown != null) - EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); - } - } - - private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e) - { - //if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals("")) - if (!ST_Name.Text.Equals("")) - { - SessionName = ST_Name.Text; - Email = ST_Email.Text; - Alias = ST_Alias.Text; - Description = ST_Desc.Text; - if (EH_SurfaceButtonSubmit_ContactDown != null) - EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs()); - } - } - - #endregion - - } -} \ No newline at end of file