equal
deleted
inserted
replaced
8 using System.Windows.Media.Animation; |
8 using System.Windows.Media.Animation; |
9 using System.Windows.Navigation; |
9 using System.Windows.Navigation; |
10 using Microsoft.Surface; |
10 using Microsoft.Surface; |
11 using Microsoft.Surface.Presentation; |
11 using Microsoft.Surface.Presentation; |
12 using System.Xml.Serialization; |
12 using System.Xml.Serialization; |
|
13 using System.Reflection; |
13 |
14 |
14 namespace FingersDance.Control.Menu |
15 namespace FingersDance.Control.Menu |
15 { |
16 { |
16 public partial class UserControlMenu |
17 public partial class UserControlMenu |
17 { |
18 { |
25 |
26 |
26 //Premet de deplacer les sous menus vers la droite pour avoir un effect tree view |
27 //Premet de deplacer les sous menus vers la droite pour avoir un effect tree view |
27 private void initChildSize() |
28 private void initChildSize() |
28 { |
29 { |
29 StreamReader reader = null; |
30 StreamReader reader = null; |
30 reader = new StreamReader("../../Menu.iri"); |
31 FileInfo assemblyPath = new FileInfo(Assembly.GetExecutingAssembly().Location); |
|
32 DirectoryInfo info = assemblyPath.Directory; |
|
33 try |
|
34 { |
|
35 reader = new StreamReader(info.FullName.ToString() + "\\Resources\\menu.xml"); |
|
36 } |
|
37 catch (Exception e) |
|
38 { |
|
39 // do nothing |
|
40 } |
31 XmlSerializer serializer = new XmlSerializer(typeof(Menu)); |
41 XmlSerializer serializer = new XmlSerializer(typeof(Menu)); |
32 Menu temp = (Menu)serializer.Deserialize(reader); |
42 Menu temp = (Menu)serializer.Deserialize(reader); |
33 foreach (Item elt in temp.Items) |
43 foreach (Item elt in temp.Items) |
34 try |
44 try |
35 { |
45 { |