Browse Source

Fixed simple warnings like redundant using directives, unused variables and added some missing xml comments.

pull/660/head
gumme 11 years ago
parent
commit
08d28baa64
  1. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs
  2. 1
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/PointTrackerPlacementSupport.cs
  3. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObject.cs
  4. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs
  5. 8
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs
  6. 3
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs
  7. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DesignItem.cs
  8. 13
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DrawItemExtension.cs
  9. 13
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/Extension.cs
  10. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/ExtensionAttribute.cs
  11. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/ExtensionServer.cs

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

@ -35,7 +35,6 @@ using ICSharpCode.WpfDesign.Designer.Controls;
using ICSharpCode.WpfDesign.UIExtensions; using ICSharpCode.WpfDesign.UIExtensions;
using ICSharpCode.WpfDesign.Designer.Xaml; using ICSharpCode.WpfDesign.Designer.Xaml;
using ICSharpCode.WpfDesign.Extensions; using ICSharpCode.WpfDesign.Extensions;
using System.Linq;
namespace ICSharpCode.WpfDesign.Designer namespace ICSharpCode.WpfDesign.Designer
{ {

1
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/PointTrackerPlacementSupport.cs

@ -47,7 +47,6 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
public override void Arrange(AdornerPanel panel, UIElement adorner, Size adornedElementSize) public override void Arrange(AdornerPanel panel, UIElement adorner, Size adornedElementSize)
{ {
Point p = new Point(0, 0); Point p = new Point(0, 0);
double distance = 0;
if (shape is Line) if (shape is Line)
{ {
var s = shape as Line; var s = shape as Line;

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlObject.cs

@ -206,6 +206,10 @@ namespace ICSharpCode.WpfDesign.XamlDom
} }
private XamlType _systemXamlTypeForProperty = null; private XamlType _systemXamlTypeForProperty = null;
/// <summary>
/// Gets a <see cref="XamlType"/> representing the <see cref="XamlObject.ElementType"/>.
/// </summary>
public XamlType SystemXamlTypeForProperty public XamlType SystemXamlTypeForProperty
{ {
get get

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlParser.cs

@ -607,7 +607,7 @@ namespace ICSharpCode.WpfDesign.XamlDom
{ {
propertyInfo = FindProperty(elementInstance, propertyType, propertyName); propertyInfo = FindProperty(elementInstance, propertyType, propertyName);
} }
catch (Exception ex) catch (Exception)
{ } { }
if (propertyInfo != null) if (propertyInfo != null)
return propertyInfo; return propertyInfo;

8
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs

@ -250,6 +250,10 @@ namespace ICSharpCode.WpfDesign.XamlDom
} }
private XamlMember _systemXamlMemberForProperty = null; private XamlMember _systemXamlMemberForProperty = null;
/// <summary>
/// Gets a <see cref="XamlMember"/> representing the property.
/// </summary>
public XamlMember SystemXamlMemberForProperty public XamlMember SystemXamlMemberForProperty
{ {
get get
@ -261,6 +265,10 @@ namespace ICSharpCode.WpfDesign.XamlDom
} }
private XamlType _systemXamlTypeForProperty = null; private XamlType _systemXamlTypeForProperty = null;
/// <summary>
/// Gets a <see cref="XamlType"/> representing the type the property is declared on.
/// </summary>
public XamlType SystemXamlTypeForProperty public XamlType SystemXamlTypeForProperty
{ {
get get

3
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlTypeFinder.cs

@ -304,6 +304,9 @@ namespace ICSharpCode.WpfDesign.XamlDom
return WpfTypeFinder.Instance.Clone(); return WpfTypeFinder.Instance.Clone();
} }
/// <summary>
/// Converts the specified <see cref="Uri"/> to local.
/// </summary>
public virtual Uri ConvertUriToLocalUri(Uri uri) public virtual Uri ConvertUriToLocalUri(Uri uri)
{ {
return uri; return uri;

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DesignItem.cs

@ -199,6 +199,9 @@ namespace ICSharpCode.WpfDesign
} }
} }
/// <summary>
/// Reapplies all extensions.
/// </summary>
public void ReapplyAllExtensions() public void ReapplyAllExtensions()
{ {
var manager = this.Services.GetService<Extensions.ExtensionManager>(); var manager = this.Services.GetService<Extensions.ExtensionManager>();
@ -293,6 +296,9 @@ namespace ICSharpCode.WpfDesign
/// </summary> /// </summary>
public abstract DesignItem Clone(); public abstract DesignItem Clone();
/// <summary>
/// Gets a <see cref="Transform"/> that represents all transforms applied to the item's view.
/// </summary>
public Transform GetCompleteAppliedTransformationToView() public Transform GetCompleteAppliedTransformationToView()
{ {
var retVal = new TransformGroup(); var retVal = new TransformGroup();

13
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/DrawItemExtension.cs

@ -29,7 +29,20 @@ namespace ICSharpCode.WpfDesign
/// </summary> /// </summary>
public interface IDrawItemExtension public interface IDrawItemExtension
{ {
/// <summary>
/// Returns if the specified type can be drawn.
/// </summary>
/// <param name="createItemType">The type to check.</param>
/// <returns>True if the specified type can be drawn, otherwise false.</returns>
bool CanItemBeDrawn(Type createItemType); bool CanItemBeDrawn(Type createItemType);
/// <summary>
/// Starts to draw.
/// </summary>
/// <param name="clickedOn">The item.</param>
/// <param name="createItemType">The item type.</param>
/// <param name="panel">The design panel to draw on.</param>
/// <param name="e">The <see cref="MouseEventArgs"/> argument that initiated the draw operation.</param>
void StartDrawItem(DesignItem clickedOn, Type createItemType, IDesignPanel panel, MouseEventArgs e); void StartDrawItem(DesignItem clickedOn, Type createItemType, IDesignPanel panel, MouseEventArgs e);
} }
} }

13
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/Extension.cs

@ -33,16 +33,29 @@ namespace ICSharpCode.WpfDesign.Extensions
/// </remarks> /// </remarks>
public abstract class Extension public abstract class Extension
{ {
/// <summary>
/// Gets the value of the <see cref="DisabledExtensionsProperty"/> attached property for an object.
/// </summary>
/// <param name="obj">The object from which the property value is read.</param>
/// <returns>The object's <see cref="DisabledExtensionsProperty"/> property value.</returns>
public static string GetDisabledExtensions(DependencyObject obj) public static string GetDisabledExtensions(DependencyObject obj)
{ {
return (string)obj.GetValue(DisabledExtensionsProperty); return (string)obj.GetValue(DisabledExtensionsProperty);
} }
/// <summary>
/// Sets the value of the <see cref="DisabledExtensionsProperty"/> attached property for an object.
/// </summary>
/// <param name="obj">The object to which the attached property is written.</param>
/// <param name="value">The value to set.</param>
public static void SetDisabledExtensions(DependencyObject obj, string value) public static void SetDisabledExtensions(DependencyObject obj, string value)
{ {
obj.SetValue(DisabledExtensionsProperty, value); obj.SetValue(DisabledExtensionsProperty, value);
} }
/// <summary>
/// Gets or sets a semicolon-separated list with extension names that is disabled for a component's view.
/// </summary>
public static readonly DependencyProperty DisabledExtensionsProperty = public static readonly DependencyProperty DisabledExtensionsProperty =
DependencyProperty.RegisterAttached("DisabledExtensions", typeof(string), typeof(Extension), new PropertyMetadata(null)); DependencyProperty.RegisterAttached("DisabledExtensions", typeof(string), typeof(Extension), new PropertyMetadata(null));

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/ExtensionAttribute.cs

@ -26,7 +26,9 @@ namespace ICSharpCode.WpfDesign.Extensions
[AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=false)] [AttributeUsage(AttributeTargets.Class, AllowMultiple=false, Inherited=false)]
public sealed class ExtensionAttribute : Attribute public sealed class ExtensionAttribute : Attribute
{ {
//The Order in wich the Extensions are used /// <summary>
public int Order { get; set; } /// Gets or sets the Order in wich the extensions are used.
/// </summary>
public int Order { get; set; }
} }
} }

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign/Project/Extensions/ExtensionServer.cs

@ -74,8 +74,8 @@ namespace ICSharpCode.WpfDesign.Extensions
/// </summary> /// </summary>
public abstract bool ShouldApplyExtensions(DesignItem extendedItem); public abstract bool ShouldApplyExtensions(DesignItem extendedItem);
// <summary> /// <summary>
/// Set if the Extension Server should be reaplied (For multiple Selection extension Server for Example!) /// Returns if the Extension Server should be reapplied (for multiple selection extension server for example).
/// </summary> /// </summary>
public virtual bool ShouldBeReApplied() public virtual bool ShouldBeReApplied()
{ {

Loading…
Cancel
Save