public ToolBarPopupEdit(Codon codon, object caller) : base(new PopupContainerEdit()) { this.menuCommand = null; this.RightToLeft = RightToLeft.Inherit; this.caller = caller; this.codon = codon; this.popupContainerEdit = base.Control as PopupContainerEdit; PopupContainerControl control = new PopupContainerControl(); this.popupContainerEdit.Properties.PopupControl = control; this.popupContainerEdit.Properties.CloseOnLostFocus = false; this.popupContainerEdit.Properties.CloseOnOuterMouseClick = false; control.ControlAdded += new ControlEventHandler(this.popupControl_ControlAdded); this.popupContainerEdit.QueryPopUp += new CancelEventHandler(this.popupContainerEdit_QueryPopUp); this.popupContainerEdit.QueryCloseUp += new CancelEventHandler(this.popupContainerEdit_QueryCloseUp); try { this.CreateCommand(codon); } catch (Exception exception) { LoggingService.Error(exception); } this.UpdateStatus(); this.UpdateText(); }
private void CreateCommand(Codon codon) { this.menuCommand = (IPopupEditCommand) codon.AddIn.CreateObject(codon.Properties["class"]); if (this.menuCommand != null) { this.menuCommand.ID = codon.Id; this.menuCommand.Owner = this; this.menuCommand.Codon = codon; } }