Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Wireless Information in Vista/Seven

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
Rafael
Plugin Author
Posts: 71
Joined: November 22nd, 2005, 7:12 pm
Location: Curitiba, Paran?, Brazil

Wireless Information in Vista/Seven

Post by Rafael »

Hi!

Now I can run LCD Smartie in Windows 7 conected by USB Module found in ebay. :lol:

I need to improve my plugins, and my question: What is the best way to get wireless information in Vista or 7 ?

Code: Select all

		void Button1Click(object sender, EventArgs e)
		{
			string linha;

            Process proc = new Process();
            proc.StartInfo.CreateNoWindow = true;
            proc.StartInfo.FileName = "netsh";
            proc.StartInfo.Arguments = "wlan show interfaces";
            proc.StartInfo.RedirectStandardOutput = true;
            proc.StartInfo.UseShellExecute = false; // required for the Redirect setting above Process.Start(proc);
            proc.StartInfo.StandardOutputEncoding = System.Text.Encoding.GetEncoding(850);
            proc.Start();
            while((linha = proc.StandardOutput.ReadLine()) != null)
            {
            	linha = linha.TrimStart(' ');
            	
            	if(linha.StartsWith("SSID"))
            	{
            		this.textBox1.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	}
            	else if(linha.StartsWith("Canal"))
            	{
            		this.textBox3.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	}
            	else if(linha.StartsWith("Auten"))
            	{
            		this.textBox4.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	}            	
            	else if(linha.StartsWith("Taxa de r"))
            	{
            		this.textBox5.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	} 
                else if(linha.StartsWith("Taxa de t"))
            	{
            		this.textBox6.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	}
                else if(linha.StartsWith("Sinal"))
            	{
            		this.textBox7.Text = linha.Substring(linha.IndexOf(":") + 1).TrimEnd(' ').TrimStart(' ');
            	}
            	else
            	{
            		//System.Diagnostics.Debug.WriteLine(linha);
            	}
            	            	
            }
            proc.WaitForExit();
Post Reply