/// <summary> /// Execute the command. /// </summary> public override void execute() { CadKit.Interfaces.IShadeModel model = CadKit.Documents.Manager.Instance.ActiveView as CadKit.Interfaces.IShadeModel; if (null != model) { model.Model = (this.Model == model.Model) ? CadKit.Interfaces.ShadeModel.Model.NONE : this.Model; } }
/// <summary> /// Determine if the button is checked. /// </summary> protected override bool _isChecked() { CadKit.Interfaces.IShadeModel model = CadKit.Documents.Manager.Instance.ActiveView as CadKit.Interfaces.IShadeModel; return((null != model) && (model.Model == this.Model)); }
/// <summary> /// Determine if the button should be enabled. /// </summary> protected override bool _shouldBeEnabled() { CadKit.Interfaces.IShadeModel model = CadKit.Documents.Manager.Instance.ActiveView as CadKit.Interfaces.IShadeModel; return(null != model); }