Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
* Model/Tools/ElementCreationTool.cs,
Browse files Browse the repository at this point in the history
  Model/Tools/PolyLineCreationTool.cs, Model/Tools/SelectionTool.cs,
  Model/StandardSelection.cs, Model/Frames/AbstractFrame.cs,
  Model/ZIndexComparer.cs, Model/Handles/AbstractHandle.cs,
  Controller/Toolbox.cs, Controls/TimeLine/PositionMarker.cs,
  Properties/PropertyManager.cs, Serialization/Serializer.cs:
  Temporary removed references to Canvas.ZIndexProperty

svn path=/trunk/lunareclipse/; revision=110341
  • Loading branch information
Manuel Cerón committed Aug 13, 2008
1 parent a393589 commit 78abe1e
Show file tree
Hide file tree
Showing 19 changed files with 61 additions and 22 deletions.
4 changes: 4 additions & 0 deletions Controller/ChangeLog
@@ -1,3 +1,7 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* Toolbox.cs: Temporary removed references to Canvas.ZIndexProperty

2008-08-09 Manuel Cerón <ceronman@unicauca.edu.co>

* MoonlightController.cs: CaptureMouse() is back
Expand Down
4 changes: 2 additions & 2 deletions Controller/Toolbox.cs
Expand Up @@ -91,7 +91,7 @@ public static int MaxZ(UIElementCollection elements)
int max = int.MinValue;

foreach (UIElement element in elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; //(int) element.GetValue(Canvas.ZIndexProperty);
max = Math.Max(max, z);
}

Expand All @@ -106,7 +106,7 @@ public static int MinZ(UIElementCollection elements)
int min = int.MaxValue;

foreach (UIElement element in elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; //(int) element.GetValue(Canvas.ZIndexProperty);
min = Math.Max(min, z);
}

Expand Down
5 changes: 5 additions & 0 deletions Controls/TimeLine/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* PositionMarker.cs: Temporary removed references to
Canvas.ZIndexProperty

2008-08-02 Manuel Cerón <ceronman@unicauca.edu.co>

* KeyframeMarker.cs, AnimationTimeline.cs, PositionMarker.cs,
Expand Down
4 changes: 2 additions & 2 deletions Controls/TimeLine/PositionMarker.cs
Expand Up @@ -43,8 +43,8 @@ public class PositionMarker : Control, IMarker

public int ZIndex
{
get { return (int)GetValue(Shape.ZIndexProperty); }
set { SetValue(Shape.ZIndexProperty, value); }
get { return 0; } //(int)GetValue(Canvas.ZIndexProperty); }
set { /*SetValue(Canvas.ZIndexProperty, value);*/ }
}

public TimeSpan Time
Expand Down
5 changes: 5 additions & 0 deletions Model/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* StandardSelection.cs, ZIndexComparer.cs: Temporary removed references
to Canvas.ZIndexProperty

2008-08-02 Manuel Cerón <ceronman@unicauca.edu.co>

* SelectionChangedEventArgs.cs, SelectedBorder.cs,
Expand Down
2 changes: 1 addition & 1 deletion Model/Frames/AbstractFrame.cs
Expand Up @@ -41,7 +41,7 @@ public abstract class AbstractFrame: Canvas, IFrame {

Child = child;

SetValue(ZIndexProperty, int.MaxValue-1);
//SetValue(Canvas.ZIndexProperty, int.MaxValue-1);
}

public abstract void Update();
Expand Down
5 changes: 5 additions & 0 deletions Model/Frames/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* AbstractFrame.cs: Temporary removed references to
Canvas.ZIndexProperty

2008-08-10 Manuel Cerón <ceronman@unicauca.edu.co>

* RectangleFrame.cs: Using Slashes
Expand Down
2 changes: 1 addition & 1 deletion Model/Handles/AbstractHandle.cs
Expand Up @@ -61,7 +61,7 @@ public abstract class AbstractHandle: Control, IHandle {
inner.SetValue(Shape.FillProperty, normal_fill);
};

SetValue(ZIndexProperty, int.MaxValue);
//SetValue(Canvas.ZIndexProperty, int.MaxValue);

transforms = new TransformGroup();
scaleTransform = new ScaleTransform();
Expand Down
5 changes: 5 additions & 0 deletions Model/Handles/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* AbstractHandle.cs: Temporary removed references to
Canvas.ZIndexProperty

2008-08-12 Manuel Cerón <ceronman@unicauca.edu.co>

* PolyLineHandle.cs: using PointCollection instead of Point[]
Expand Down
10 changes: 5 additions & 5 deletions Model/StandardSelection.cs
Expand Up @@ -173,7 +173,7 @@ public void SendToBack()
int selectionMaxZ = Toolbox.MaxZ(Visuals);
int minz = Toolbox.MinZ(Controller.Canvas.Children);
foreach (UIElement element in Elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; // (int) element.GetValue(Canvas.ZIndexProperty);
z -= selectionMaxZ - minz - 1;
ChangeZ(element, z);
}
Expand All @@ -184,7 +184,7 @@ public void SendToBack()
public void SendBackwards()
{
foreach (UIElement element in Elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; //(int) element.GetValue(Canvas.ZIndexProperty);
z--;
ChangeZ(element, z);
}
Expand All @@ -197,7 +197,7 @@ public void BringToFront()
int selectionMinZ = Toolbox.MinZ(Visuals);
int maxz = Toolbox.MaxZ(Controller.Canvas.Children);
foreach (UIElement element in Elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; //(int) element.GetValue(Canvas.ZIndexProperty);
z += maxz - selectionMinZ + 1;
ChangeZ(element, z);
}
Expand All @@ -208,7 +208,7 @@ public void BringToFront()
public void BringForwards()
{
foreach (UIElement element in Elements) {
int z = (int) element.GetValue(Canvas.ZIndexProperty);
int z = 0; //(int) element.GetValue(Canvas.ZIndexProperty);
z++;
ChangeZ(element, z);
}
Expand Down Expand Up @@ -427,7 +427,7 @@ private void PushUndo ()
private void ChangeZ (UIElement element, int z)
{
IDescriptor descriptor = StandardDescriptor.CreateDescriptor(element, undo);
descriptor.ChangeProperty(element, Canvas.ZIndexProperty, z);
//descriptor.ChangeProperty(element, Canvas.ZIndexProperty, z);
}

private void RemoveElementFromCanvas(UIElement element)
Expand Down
5 changes: 5 additions & 0 deletions Model/Tools/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* ElementCreationTool.cs, PolyLineCreationTool.cs, SelectionTool.cs:
Temporary removed references to Canvas.ZIndexProperty

2008-08-12 Manuel Cerón <ceronman@unicauca.edu.co>

* PolyLineCreationTool.cs: using PointCollection instead of Point[]
Expand Down
6 changes: 3 additions & 3 deletions Model/Tools/ElementCreationTool.cs
Expand Up @@ -62,10 +62,10 @@ protected virtual void SetupShapeProperties()
{
CreatedShape.SetValue(Shape.StrokeProperty, new SolidColorBrush(Colors.Black));
CreatedShape.SetValue(Shape.FillProperty, new SolidColorBrush(Colors.Transparent));
CreatedShape.SetValue(UIElement.NameProperty,
NameGenerator.GetName(Controller.Canvas, CreatedShape));
//CreatedShape.SetValue(UIElement.NameProperty,
// NameGenerator.GetName(Controller.Canvas, CreatedShape));
CreatedShape.SetValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5));
CreatedShape.SetValue(Canvas.ZIndexProperty, Toolbox.MaxZ(Controller.Canvas.Children) + 1);
//CreatedShape.SetValue(Canvas.ZIndexProperty, Toolbox.MaxZ(Controller.Canvas.Children) + 1);
}

protected abstract UIElement CreateShape();
Expand Down
3 changes: 2 additions & 1 deletion Model/Tools/PolyLineCreationTool.cs
Expand Up @@ -46,7 +46,8 @@ public override void MouseDown (MouseEventArgs ev)
{
if (CheckDoubleClick()) {
create_new = true;
points.RemoveAt(current_index + 1);
try { points.RemoveAt(current_index + 1); }
catch {}
return;
}

Expand Down
2 changes: 1 addition & 1 deletion Model/Tools/SelectionTool.cs
Expand Up @@ -48,7 +48,7 @@ public class SelectionTool: AbstractTool {
SelectionRect.Fill = new SolidColorBrush(Colors.Blue);
SelectionRect.Stroke = new SolidColorBrush(Colors.Black);
SelectionRect.StrokeThickness = 1.0;
SelectionRect.SetValue(Canvas.ZIndexProperty, int.MaxValue);
//SelectionRect.SetValue(Canvas.ZIndexProperty, int.MaxValue);

undo = new UndoGroup();
}
Expand Down
4 changes: 2 additions & 2 deletions Model/ZIndexComparer.cs
Expand Up @@ -44,8 +44,8 @@ public ZIndexComparer()
public int Compare(UIElement left, UIElement right)
{
//Console.WriteLine("Compare Start");
int leftValue = (int)left.GetValue(Canvas.ZIndexProperty);
int rightValue = (int)right.GetValue(Canvas.ZIndexProperty);
int leftValue = 0; // (int)left.GetValue(Canvas.ZIndexProperty);
int rightValue = 0; //(int)right.GetValue(Canvas.ZIndexProperty);
return leftValue.CompareTo(rightValue);
}
}
Expand Down
5 changes: 5 additions & 0 deletions Properties/ChangeLog
@@ -1,3 +1,8 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* PropertyManager.cs: Temporary removed references to
Canvas.ZIndexProperty

2008-06-26 Manuel Cerón <ceronman@unicauca.edu.co>

* PropertyManager.cs: Removed dependecies to old objects such as
Expand Down
4 changes: 2 additions & 2 deletions Properties/PropertyManager.cs
Expand Up @@ -76,7 +76,7 @@ static PropertyManager()
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(FrameworkElement.NameProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.NameProperty), PropertyType.String));
info.Add(Path.DataProperty, new PropertyInfo(ReflectionHelper.GetData(Path.DataProperty), PropertyType.Data));

// extended properties
Expand All @@ -93,7 +93,7 @@ static PropertyManager()
info.Add(Canvas.HeightProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.HeightProperty), PropertyType.Double, false, true));
info.Add(Canvas.LeftProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.LeftProperty), PropertyType.Double, true, false));
info.Add(Canvas.TopProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.TopProperty), PropertyType.Double, true, false));
info.Add(Canvas.ZIndexProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.ZIndexProperty), PropertyType.Integer, false, false));
//info.Add(Canvas.ZIndexProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.ZIndexProperty), PropertyType.Integer, false, false));

info.Add(UIElement.RenderTransformOriginProperty, new PropertyInfo(ReflectionHelper.GetData(Canvas.RenderTransformOriginProperty), PropertyType.Point));
info.Add(Shape.FillProperty, new PropertyInfo(ReflectionHelper.GetData(Shape.FillProperty), PropertyType.Brush));
Expand Down
4 changes: 4 additions & 0 deletions Serialization/ChangeLog
@@ -1,3 +1,7 @@
2008-08-13 Manuel Cerón <ceronman@unicauca.edu.co>

* Serializer.cs: Temporary removed references to Canvas.ZIndexProperty

2008-08-12 Manuel Cerón <ceronman@unicauca.edu.co>

* Serializer.cs: Added suport for PointCollection to Clone
Expand Down
4 changes: 2 additions & 2 deletions Serialization/Serializer.cs
Expand Up @@ -289,8 +289,8 @@ public static DependencyObject Clone(Canvas root, DependencyObject item)
}
System.Diagnostics.Debug.Unindent();

if (!string.IsNullOrEmpty(item.Name))
newObject.Name = NameGenerator.GetName(root, newObject);
//if (!string.IsNullOrEmpty(item.Name))
// newObject.Name = NameGenerator.GetName(root, newObject);

return newObject;
}
Expand Down

0 comments on commit 78abe1e

Please sign in to comment.