<?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>KYRIAKOS ANASTASAKIS - ΚΥΡΙΑΚΟΣ ΑΝΑΣΤΑΣΑΚΗΣ &#187; .net</title>
	<atom:link href="http://kyriakos.anastasakis.net/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://kyriakos.anastasakis.net</link>
	<description></description>
	<lastBuildDate>Wed, 28 Dec 2011 08:42:23 +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>Selecting the value of an HTML combobox programmatically using a WebBrowser Control</title>
		<link>http://kyriakos.anastasakis.net/2011/10/30/selecting-the-value-of-an-html-combobox-programmatically-using-a-webbrowser-control/</link>
		<comments>http://kyriakos.anastasakis.net/2011/10/30/selecting-the-value-of-an-html-combobox-programmatically-using-a-webbrowser-control/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 11:43:25 +0000</pubDate>
		<dc:creator>Kyriakos Anastasakis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[My Programs]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[import_linkedin]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://kyriakos.anastasakis.net/?p=296</guid>
		<description><![CDATA[Recently I&#8217;ve been playing around with a webbrowser control to automate my interaction with a website for testing purposes. I am using C# and DOT NET. I found it a bit difficult to change the value of an HTML combobox (i.e. dropdown), but as it turns out it&#8217;s rather easy.I used the following code to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been playing around with a webbrowser control to automate my interaction with a website for testing purposes. I am using C# and DOT NET.</p>
<p>I found it a bit difficult to change the value of an HTML combobox (i.e. dropdown), but as it turns out it&#8217;s rather easy.I used the following code to change the value of a combobox named: &#8220;test&#8221; to the value 12.</p>
<pre class="qoate-code">
foreach (HtmlElement el in webBrowser1.Document.GetElementsByTagName("select"))
{
if (el.Name == "test")
{
foreach (HtmlElement comboItem in el.Children)
{
Console.WriteLine(comboItem.InnerText + " " + comboItem.GetAttribute("Selected"));

if (comboItem.InnerText == "12")
{
comboItem.SetAttribute("Selected", "True");
}
}
}

}
</pre>
<p>This code was used for the following HTML:<br />
&lt;select name=&#8221;test&#8221;&gt;&lt;option value=&#8221;10&#8243; SELECTED&gt;10&lt;/option&gt;&lt;option value=&#8221;11&#8243;&gt;11&lt;/option&gt;&lt;option value=&#8221;12&#8243;&gt;12&lt;/option&gt;&lt;option value=&#8221;13&#8243;&gt;13&lt;/option&gt;&lt;option value=&#8221;14&#8243;&gt;14&lt;/option&gt;&lt;/select&gt;</p>
<p><code>
<pre class="qoate-code">
foreach (HtmlElement el in webBrowser1.Document.GetElementsByTagName("input"))
{
if (el.Name.ToLower() == "submit")
{
el.InvokeMember("click");
}
}
</pre>
<p> </code></p>
]]></content:encoded>
			<wfw:commentRss>http://kyriakos.anastasakis.net/2011/10/30/selecting-the-value-of-an-html-combobox-programmatically-using-a-webbrowser-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the CPU Usage in C#</title>
		<link>http://kyriakos.anastasakis.net/2010/10/07/getting-the-cpu-usage-in-c-sharp/</link>
		<comments>http://kyriakos.anastasakis.net/2010/10/07/getting-the-cpu-usage-in-c-sharp/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 23:38:20 +0000</pubDate>
		<dc:creator>Kyriakos Anastasakis</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://kyriakos.anastasakis.net/?p=239</guid>
		<description><![CDATA[I recently wanted to get the usage of my CPU in C#. After searching the internet I found a way of doing it using the PerfomanceCounter class. I made a couple of changes and I created the following class, which seems to work. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; { public [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to get the usage of my CPU in C#. After searching the internet <a href="http://stackoverflow.com/questions/278071/how-to-get-the-cpu-usage-in-c" target="_blank">I found a way of doing it</a> using the <em>PerfomanceCounter</em> class. I made a couple of changes and I created the following class, which seems to work.</p>
<p><code><br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.Diagnostics;</code></p>
<p>{<br />
   public class SystemUtils<br />
   {<br />
      public static long getCpuUsage()<br />
      {<br />
        PerformanceCounter cpuCounter;<br />
        cpuCounter = new PerformanceCounter();</p>
<p>        cpuCounter.CategoryName = &#8220;Processor&#8221;;<br />
        cpuCounter.CounterName = &#8220;% Processor Time&#8221;;<br />
        cpuCounter.InstanceName = &#8220;_Total&#8221;;</p>
<p>        cpuCounter.NextValue();<br />
        System.Threading.Thread.Sleep(1000);<br />
        return (int) cpuCounter.NextValue();<br />
      }<br />
    }<br />
}</p>
<p>Using the statement: <em>SystemUtils.getCpuUsage()</em> you should be able to get an integer number showing the CPU usage.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyriakos.anastasakis.net/2010/10/07/getting-the-cpu-usage-in-c-sharp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET Certification</title>
		<link>http://kyriakos.anastasakis.net/2007/09/03/net-certification/</link>
		<comments>http://kyriakos.anastasakis.net/2007/09/03/net-certification/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 16:14:54 +0000</pubDate>
		<dc:creator>Kyriakos Anastasakis</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[certification]]></category>

		<guid isPermaLink="false">http://kyriakos.anastasakis.net/blog/2007/09/03/net-certification/</guid>
		<description><![CDATA[A few weeks ago (http://kyriakos.anastasakis.net/prof/blog/?p=24) I posted that I was interested in .NET certification. Unfortunately I haven&#8217;t had the time to work on it since then. The main incentive was to get acquainted with the DSL tools provided in .NET 3.0 (even though the available certification exams are only for .NET 2.0). Today I read [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago (<a href="http://kyriakos.anastasakis.net/prof/blog/?p=24">http://kyriakos.anastasakis.net/prof/blog/?p=24</a>) I posted that I was interested in .NET certification. Unfortunately I haven&#8217;t had the time to work on it since then. The main incentive was to get acquainted with the DSL tools provided in .NET 3.0 (even though the available certification exams are only for .NET 2.0).</p>
<p>Today I read  an article in ComputerWeekly that there is a shortage of .NET skills (<a href="http://www.computerweekly.com/Articles/2007/09/03/226513/employers-struck-by-shortage-of-.net-skills.htm">http://www.computerweekly.com/Articles/2007/09/03/226513/employers-struck-by-shortage-of-.net-skills.htm)</a></p>
<p>It would be interesting to work on a contact .NET project and see the potential of applying Model Driven techniques in practice&#8230; But I guess I will have to find some time to study for the certification first.</p>
]]></content:encoded>
			<wfw:commentRss>http://kyriakos.anastasakis.net/2007/09/03/net-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

