aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Editors
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-02-10 02:13:37 +0200
committerRoy <roy.mail.net@gmail.com>2018-02-10 02:13:37 +0200
commit07e686eb253ffd29f36dbe530b3a17633e02b353 (patch)
treed9663f1c92a400349dffc743adb0114ee1a7f618 /Software/Visual_Studio/Tango.Editors
parentc8c9606e545f49aae3d9f0524775436adbdf27e9 (diff)
downloadTango-07e686eb253ffd29f36dbe530b3a17633e02b353.tar.gz
Tango-07e686eb253ffd29f36dbe530b3a17633e02b353.zip
Added support for motor controllers.
Diffstat (limited to 'Software/Visual_Studio/Tango.Editors')
-rw-r--r--Software/Visual_Studio/Tango.Editors/ElementEditor.cs56
-rw-r--r--Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs15
2 files changed, 41 insertions, 30 deletions
diff --git a/Software/Visual_Studio/Tango.Editors/ElementEditor.cs b/Software/Visual_Studio/Tango.Editors/ElementEditor.cs
index c839639b9..99520ba5b 100644
--- a/Software/Visual_Studio/Tango.Editors/ElementEditor.cs
+++ b/Software/Visual_Studio/Tango.Editors/ElementEditor.cs
@@ -464,15 +464,15 @@ namespace Tango.Editors
/// <param name="e">The <see cref="DragDeltaEventArgs"/> instance containing the event data.</param>
protected virtual void DragTopLeft(object sender, DragDeltaEventArgs e)
{
- if (!IsCtrlDown())
- {
+ //if (!IsCtrlDown())
+ //{
DragLeft(sender, e);
DragTop(sender, e);
- }
- else
- {
- DragAngle(sender, e);
- }
+ //}
+ //else
+ //{
+ // DragAngle(sender, e);
+ //}
}
/// <summary>
@@ -482,15 +482,15 @@ namespace Tango.Editors
/// <param name="e">The <see cref="DragDeltaEventArgs"/> instance containing the event data.</param>
protected virtual void DragTopRight(object sender, DragDeltaEventArgs e)
{
- if (!IsCtrlDown())
- {
+ //if (!IsCtrlDown())
+ //{
DragRight(sender, e);
DragTop(sender, e);
- }
- else
- {
- DragAngle(sender, e);
- }
+ //}
+ //else
+ //{
+ // DragAngle(sender, e);
+ //}
}
/// <summary>
@@ -500,15 +500,15 @@ namespace Tango.Editors
/// <param name="e">The <see cref="DragDeltaEventArgs"/> instance containing the event data.</param>
protected virtual void DragBottomRight(object sender, DragDeltaEventArgs e)
{
- if (!IsCtrlDown())
- {
+ //if (!IsCtrlDown())
+ //{
DragRight(sender, e);
DragBottom(sender, e);
- }
- else
- {
- DragAngle(sender, e);
- }
+ //}
+ //else
+ //{
+ // DragAngle(sender, e);
+ //}
}
/// <summary>
@@ -518,15 +518,15 @@ namespace Tango.Editors
/// <param name="e">The <see cref="DragDeltaEventArgs"/> instance containing the event data.</param>
protected virtual void DragBottomLeft(object sender, DragDeltaEventArgs e)
{
- if (!IsCtrlDown())
- {
+ //if (!IsCtrlDown())
+ //{
DragLeft(sender, e);
DragBottom(sender, e);
- }
- else
- {
- DragAngle(sender, e);
- }
+ //}
+ //else
+ //{
+ // DragAngle(sender, e);
+ //}
}
/// <summary>
diff --git a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
index c6d4c00a3..cf602cac7 100644
--- a/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
+++ b/Software/Visual_Studio/Tango.Editors/ElementsEditor.xaml.cs
@@ -297,7 +297,18 @@ namespace Tango.Editors
public static readonly DependencyProperty PreviewVisualSourceOpacityProperty =
DependencyProperty.Register("PreviewVisualSourceOpacity", typeof(double), typeof(ElementsEditor), new PropertyMetadata(1.0));
-
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is editable.
+ /// </summary>
+ public bool IsEditable
+ {
+ get { return (bool)GetValue(IsEditableProperty); }
+ set { SetValue(IsEditableProperty, value); }
+ }
+ public static readonly DependencyProperty IsEditableProperty =
+ DependencyProperty.Register("IsEditable", typeof(bool), typeof(ElementsEditor), new PropertyMetadata(true));
+
+
#endregion
#region Attached Properties
@@ -730,7 +741,7 @@ namespace Tango.Editors
/// <param name="e">The <see cref="MouseButtonEventArgs"/> instance containing the event data.</param>
private void Element_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
- if (e.ChangedButton == MouseButton.Left && !Keyboard.IsKeyDown(Key.LeftShift) && !Keyboard.IsKeyDown(Key.LeftAlt))
+ if (e.ChangedButton == MouseButton.Left && !Keyboard.IsKeyDown(Key.LeftShift) && IsEditable)
{
SelectedElement = sender as IElementEditor;
}