示例#1
0
        /// <summary>
        /// Raises the <see cref="E:ModelsSelected" /> event.
        /// </summary>
        /// <param name="e">The <see cref="ModelsSelectedEventArgs"/> instance containing the event data.</param>
        protected virtual void OnModelsSelected(ModelsSelectedEventArgs e)
        {
            var handler = this.ModelsSelected;

            if (handler != null)
            {
                handler(this.Viewport, e);
            }
        }
 private void HandleSelectionEvent(object sender, ModelsSelectedEventArgs args)
 {
     this.ChangeMaterial(this.selectedModels, Materials.Blue);
     this.selectedModels = args.SelectedModels;
     var rectangleSelectionArgs = args as ModelsSelectedByRectangleEventArgs;
     if (rectangleSelectionArgs != null)
     {
         this.ChangeMaterial(this.selectedModels, rectangleSelectionArgs.Rectangle.Size != default(Size) ? Materials.Red : Materials.Green);
     }
 }
示例#3
0
 /// <summary>
 /// Raises the <see cref="E:ModelsSelected" /> event.
 /// </summary>
 /// <param name="e">The <see cref="ModelsSelectedEventArgs"/> instance containing the event data.</param>
 protected virtual void OnModelsSelected(ModelsSelectedEventArgs e)
 {
     var handler = this.ModelsSelected;
     if (handler != null)
     {
         handler(this.Viewport, e);
     }
 }