/// <summary> /// Clears the current selection /// </summary> public void Clear() { if (connector != null) { connector.IsSelected = false; connector = null; } if (mController == null || mModel == null) { return; } //deselect the current ones foreach (IDiagramEntity entity in SelectedItems) { entity.IsSelected = false; } //forget the current state mSelection.Clear(); if (Controller.View != null) { Controller.View.HideTracker(); } this.RaiseOnNewSelection(); }
/// <summary> /// Sets the items. /// </summary> /// <param name="editValue">The edit value.</param> /// <param name="value">The value.</param> /// <returns></returns> protected override object SetItems(object editValue, object[] value) { CollectionBase <IShapeMaterial> entries = editValue as CollectionBase <IShapeMaterial>; entries.Clear(); for (int k = 0; k < value.Length; k++) { entries.Add(value[k] as IShapeMaterial); } object retValue = base.SetItems(entries, value); return(retValue); }
/// <summary> /// Handles the OnClear event of the DefaultPage. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> void mDefaultPage_OnClear(object sender, EventArgs e) { mPaintables.Clear(); }