public KeyCommandLauncherFactory( Utility.Assemblies.ManifestResources resources, System.Reflection.Assembly assembly, string prefix, CommandControlSet commandControlSet) { if( assembly == null ) { throw new ArgumentNullException( "assembly" ); } if( prefix == null ) { throw new ArgumentNullException( "prefix" ); } if( commandControlSet == null ) { throw new ArgumentNullException( "commandControlSet" ); } if( resources == null ) { throw new ArgumentNullException( "resources" ); } _resources = resources; _assembly = assembly; _prefix = prefix; _commandControlSet = commandControlSet; }
public CommandMenuStripFactory( Utility.Assemblies.ManifestResources resources, System.Reflection.Assembly assembly, string prefix, CommandControlSet commandControlSet) : base(resources) { if( assembly == null ) { throw new ArgumentNullException( "assembly" ); } if( prefix == null ) { throw new ArgumentNullException( "prefix" ); } if( commandControlSet == null ) { throw new ArgumentNullException( "commandControlSet" ); } _assembly = assembly; _prefix = prefix; _commandControlSet = commandControlSet; }
public CommandMenuStripFactory( Utility.Assemblies.ManifestResources resources, string prefix, CommandControlSet commandControlSet) : this(resources, System.Reflection.Assembly.GetCallingAssembly(), prefix, commandControlSet) { }
private void EnsureCommandControlSet() { if( _destroyed && !this.DesignMode ) { throw new InvalidOperationException(); } if( _commandControlSet == null ) { CommandForm parent = Owner as CommandForm; _commandControlSet = new CommandControlSet( parent == null ? null : parent._commandControlSet, this ); foreach( ICommandControl control in _deferredControls ) { _commandControlSet.AddControl( control ); } _deferredControls = new List<ICommandControl>(); } }
private void Destroy() { if( _usingForm != null ) { _usingForm.Dispose(); _usingForm = null; } if( _commandControlSet != null ) { _commandControlSet.Dispose(); _commandControlSet = null; } _destroyed = true; }