<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Niklas Rother - XNA, Computer &#38; mehr &#187; Syntax Highlighter</title>
	<atom:link href="http://niklas-rother.de/tags/syntax-highlighter/feed/" rel="self" type="application/rss+xml" />
	<link>http://niklas-rother.de</link>
	<description>Ein Blog über XNA, C#, Software, und anderes...</description>
	<lastBuildDate>Thu, 09 Feb 2012 12:53:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Wieder ein neues Plugin!</title>
		<link>http://niklas-rother.de/artikel/wieder-ein-neues-plugin/</link>
		<comments>http://niklas-rother.de/artikel/wieder-ein-neues-plugin/#comments</comments>
		<pubDate>Fri, 01 May 2009 12:24:01 +0000</pubDate>
		<dc:creator>Niklas</dc:creator>
				<category><![CDATA[mein Blog]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Syntax Highlighter]]></category>

		<guid isPermaLink="false">http://niklas-rother.de/?p=124</guid>
		<description><![CDATA[Es gibt wieder mal was neues hier! Diesmal ist es ein Syntax Highlighter. Ich konnte diesen alten Code CSS Syle einfach nicht mehr sehen! Doch seht selbst: Es gibt noch leichte Probleme mit Kommentaren im Code, und während die Seite &#8230; <a href="http://niklas-rother.de/artikel/wieder-ein-neues-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Es gibt wieder mal was neues hier! Diesmal ist es ein Syntax Highlighter. Ich konnte diesen alten Code CSS Syle einfach nicht mehr sehen! Doch seht selbst:</p>
<p>Es gibt noch leichte Probleme mit Kommentaren im Code, und während die Seite geladen wird, zeigt er noch die alte Darstellung an, aber alles in allem doch schon viel besser!</p>
<pre class="brush: csharp; title: ; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace LineCounter
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(&amp;quot;Bitte Ordner-Pfad angeben:&amp;quot;);
string path = Console.ReadLine();
Console.WriteLine(&amp;quot;Bitte Dateityp angeben(z.B. für Hallo.cs .cs)&amp;quot;);
string dateityp = Console.ReadLine();

List&amp;amp;lt;string&amp;amp;gt; Names = new List&amp;amp;lt;string&amp;amp;gt;();
getAllFileNames(new DirectoryInfo(path), dateityp, Names);

&lt;span id=&quot;more-124&quot;&gt;&lt;/span&gt;

int allLines = 0;
foreach (string str in Names)
{
int curLine = GetLineCount(str);
Console.WriteLine(str.Replace(path, &amp;quot;&amp;quot;) + &amp;quot;:&amp;quot; + curLine);
allLines += curLine;
}

Console.WriteLine(&amp;quot;Alle Dateien beinhalten &amp;quot; + allLines + &amp;quot; Zeilen&amp;quot;);

Console.WriteLine(&amp;quot;Beliebige Taste zum Beenden...&amp;quot;);
Console.ReadKey(true);
}

private static void getAllFileNames(DirectoryInfo folder,string dateityp, List&amp;amp;lt;string&amp;amp;gt; names)
{
//Achtung rekrusize Methode
foreach (DirectoryInfo dir in folder.GetDirectories())
{
getAllFileNames(dir, dateityp,names);
}
foreach (FileInfo file in folder.GetFiles())
{
if (file.FullName.EndsWith(dateityp))
{
names.Add(file.FullName);
}
}
}

private static int GetLineCount(string datei)
{
StreamReader sr = new StreamReader(datei);
int result = 0;
while (sr.ReadLine() != null)
result++;
sr.Close();
return result;
}
}
}
</pre>
<p>Sieht gut aus, oder?</p>
<p>P.S. Das ist ein kleines Programm das euch sagen kann wie viele Zeilen Code euer Projekt umfasst, wenn ihr es als *.exe Datei haben wollt, meldet euch via Kommentar!</p>
<br /><a href="http://niklas-rother.de/?p=124#comments" title="Comments on &quot;Wieder ein neues Plugin!&quot;"><img src="http://niklas-rother.de/wp-content/plugins/feed-comments-number/image.php?124" alt="Comments" /></a>]]></content:encoded>
			<wfw:commentRss>http://niklas-rother.de/artikel/wieder-ein-neues-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

