Author: alanmc
Date: 2007-08-22 17:57:01 -0400 (Wed, 22 Aug 2007)
New Revision: 84668

Modified:
   trunk/lunareclipse/ChangeLog
   trunk/lunareclipse/Model/StoryboardManager.cs
   trunk/lunareclipse/Properties/PropertyManager.cs
   trunk/lunareclipse/View/MainWindow.cs
Log:
* Model/StoryboardManager.cs, View/MainWindow.cs,
  Properties/PropertyManager.cs: Added the ability to change the
  NameProperty -> All storyboards correctly update

Modified: trunk/lunareclipse/ChangeLog
===================================================================
--- trunk/lunareclipse/ChangeLog        2007-08-22 21:55:07 UTC (rev 84667)
+++ trunk/lunareclipse/ChangeLog        2007-08-22 21:57:01 UTC (rev 84668)
@@ -1,5 +1,11 @@
 2007-08-22  Alan McGovern <[EMAIL PROTECTED]> 
 
+       * Model/StoryboardManager.cs, View/MainWindow.cs,
+         Properties/PropertyManager.cs: Added the ability to change the
+         NameProperty -> All storyboards correctly update
+
+2007-08-22  Alan McGovern <[EMAIL PROTECTED]> 
+
        * Properties/PropertyType.cs: Added new enums
 
 2007-08-22  Alan McGovern <[EMAIL PROTECTED]> 

Modified: trunk/lunareclipse/Model/StoryboardManager.cs
===================================================================
--- trunk/lunareclipse/Model/StoryboardManager.cs       2007-08-22 21:55:07 UTC 
(rev 84667)
+++ trunk/lunareclipse/Model/StoryboardManager.cs       2007-08-22 21:57:01 UTC 
(rev 84668)
@@ -158,6 +158,14 @@
                        DependencyObject target = null;
                        DependencyProperty property = null;
                        LinearDoubleKeyFrame keyframe = null;
+
+                       if(e.Property == DependencyObject.NameProperty)
+                       {
+                               foreach(Timeline l in this.Current.Children)
+                                       
if(l.GetValue(Storyboard.TargetNameProperty).Equals(e.OldValue))
+                                               
l.SetValue<object>(Storyboard.TargetNameProperty, e.NewValue);
+                               return;
+                       }
                        
                        if(!Recording || Current == null)
                                return;

Modified: trunk/lunareclipse/Properties/PropertyManager.cs
===================================================================
--- trunk/lunareclipse/Properties/PropertyManager.cs    2007-08-22 21:55:07 UTC 
(rev 84667)
+++ trunk/lunareclipse/Properties/PropertyManager.cs    2007-08-22 21:57:01 UTC 
(rev 84668)
@@ -86,8 +86,9 @@
                        info.Add(Rectangle.RadiusXProperty, new 
PropertyInfo(ReflectionHelper.GetData(Rectangle.RadiusXProperty), 
PropertyType.Double));
                        info.Add(Rectangle.RadiusYProperty, new 
PropertyInfo(ReflectionHelper.GetData(Rectangle.RadiusYProperty), 
PropertyType.Double));
                        info.Add(Rectangle.StrokeThicknessProperty, new 
PropertyInfo(ReflectionHelper.GetData(Rectangle.StrokeThicknessProperty), 
PropertyType.Double));
+                       info.Add(Rectangle.NameProperty, new 
PropertyInfo(ReflectionHelper.GetData(Canvas.NameProperty), 
PropertyType.String));
                        info.Add(Path.DataProperty, new 
PropertyInfo(ReflectionHelper.GetData(Path.DataProperty), PropertyType.Data));
-
+                       
                        // extended properties
                        info.Add(Path.StretchProperty, new 
PropertyInfo(ReflectionHelper.GetData(Path.StretchProperty), 
PropertyType.Stretch, false, true));
                        info.Add(Path.StrokeDashArrayProperty, new 
PropertyInfo(ReflectionHelper.GetData(Path.StrokeDashArrayProperty), 
PropertyType.DashArray, false, true));

Modified: trunk/lunareclipse/View/MainWindow.cs
===================================================================
--- trunk/lunareclipse/View/MainWindow.cs       2007-08-22 21:55:07 UTC (rev 
84667)
+++ trunk/lunareclipse/View/MainWindow.cs       2007-08-22 21:57:01 UTC (rev 
84668)
@@ -160,11 +160,16 @@
                        {
                                if(((Label)box.Children[0]).Text == 
data.ShortName)
                                {
-                                       if(box.Children[1] is SpinButton)
-                                               
((SpinButton)box.Children[1]).Value = Convert.ToDouble(e.NewValue);
+                                       Widget widget = box.Children[1];
+                                       if(widget is SpinButton)
+                                               ((SpinButton)widget).Value = 
Convert.ToDouble(e.NewValue);
                                        
-                                       else if(box.Children[1] is ComboBox)
-                                               
((ComboBox)box.Children[1]).Active = Convert.ToInt32(e.NewValue);
+                                       else if(widget is ComboBox)
+                                               ((ComboBox)widget).Active = 
Convert.ToInt32(e.NewValue);
+                                       
+                                       else if(widget is Entry)
+                                               ((Entry)widget).Text = 
Convert.ToString(e.NewValue);
+                                       
                                        else
                                                Console.WriteLine("Couldn't 
Update");
                                }
@@ -249,6 +254,14 @@
                                b.PackEnd(CreateEnumPropertyWidget(o, info, 
typeof(Stretch)));
                                break;
                                
+                       case PropertyType.String:
+                               Entry entry = new 
Entry(o.GetValue(info.PropertyData.Property).ToString());
+                               entry.Changed += delegate (object sender, 
EventArgs e) {
+                                       Toolbox.ChangeProperty(o, 
info.PropertyData.Property, ((Entry)sender).Text);
+                               };
+                               b.PackEnd(entry);
+                               break;
+                               
                        case PropertyType.DashArray:
                        case PropertyType.Data:
                                b.PackEnd(new Entry());

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to