コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }
コード例 #3
0
 public CommandMenuStripFactory( Utility.Assemblies.ManifestResources resources,
     string prefix, CommandControlSet commandControlSet)
     : this(resources, System.Reflection.Assembly.GetCallingAssembly(), prefix, commandControlSet)
 {
 }
コード例 #4
0
ファイル: CommandForm.cs プロジェクト: CecleCW/ProductMan
        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>();
            }
        }
コード例 #5
0
ファイル: CommandForm.cs プロジェクト: CecleCW/ProductMan
        private void Destroy()
        {
            if( _usingForm != null )
            {
                _usingForm.Dispose();
                _usingForm = null;
            }
            if( _commandControlSet != null )
            {
                _commandControlSet.Dispose();
                _commandControlSet = null;
            }

            _destroyed = true;
        }