public ToolBarSpinEdit(Codon codon, object caller)
     : base(new PopupContainerControl())
 {
     this.menuCommand = null;
     this.RightToLeft = RightToLeft.Inherit;
     this.caller = caller;
     this.codon = codon;
     this.spinEdit = new SpinEdit();
     if (!codon.Properties.Contains("width"))
     {
         this.spinEdit.Width = 40;
     }
     else
     {
         this.spinEdit.Width = Convert.ToInt32(codon.Properties["width"]);
     }
     this.spinEdit.EditValue = 1;
     this.spinEdit.EditValueChanged += new EventHandler(this.EditValueChanged);
     base.Control.Controls.Add(this.spinEdit);
     try
     {
         this.CreateCommand();
     }
     catch (Exception exception)
     {
         LoggingService.Error(exception);
     }
     this.UpdateStatus();
     this.UpdateText();
 }
 public ToolBarCalcEdit(Codon codon, object caller)
     : base(new PopupContainerControl())
 {
     this.menuCommand = null;
     this.RightToLeft = RightToLeft.Inherit;
     this.caller = caller;
     this.codon = codon;
     try
     {
         if (codon.Properties.Contains("class"))
         {
             this.menuCommand = (ISpinEditCommand) codon.AddIn.CreateObject(codon.Properties["class"]);
             if (this.menuCommand != null)
             {
                 this.menuCommand.ID = codon.Id;
                 this.menuCommand.Owner = this;
                 this.menuCommand.Codon = codon;
             }
         }
     }
     catch (Exception exception)
     {
         LoggingService.Error(exception);
     }
     this.calcEdit = new CalcEdit();
     this.calcEdit.Width = 200;
     this.calcEdit.EditValue = 1;
     this.calcEdit.Text = "计算器";
     base.Control.Controls.Add(this.calcEdit);
     this.UpdateStatus();
     this.UpdateText();
 }
 private void CreateCommand()
 {
     this.menuCommand = (ISpinEditCommand) this.codon.AddIn.CreateObject(this.codon.Properties["class"]);
     this.menuCommand.ID = this.codon.Id;
     this.menuCommand.Owner = this;
     this.menuCommand.Codon = this.codon;
 }