예제 #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
파일: PluginManager.cs 프로젝트: bg0jr/Maui
        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;
        }