示例#1
0
        public override void SetUp()
        {
            base.SetUp();

            var file = Path.GetTempFileName();
            mySheet = new CsvWorksheet( new CsvWorkbook( Path.GetDirectoryName( file ) ), file, ";" );
            myConfig = new WorkbookConfig( mySheet );

            // set a default section
            var section = new ConfigSection( "Test1" );
            section.SetProperty( "a", "2" );
            section.SetProperty( "blub", "hiho" );

            myConfig.SetSection( section );
        }
示例#2
0
        private ConfigSection GetOrCreatePluginConfig( string pluginName )
        {
            var config = myPluginContext.ActiveWorkbook.Config.GetSection( pluginName );
            if ( config == null )
            {
                config = new ConfigSection( pluginName );
                config.SetProperty( "Excel.Caption", pluginName );
                config.SetProperty( "Excel.FaceId", 16.ToString() );

                myPluginContext.ActiveWorkbook.Config.SetSection( config );
            }

            return config;
        }