Using C# in PowerShell to move files

  Screedump form Windows PowerShell ISE     Code $source = @" using System; using System.Collections.Generic; using System.Text; using System.IO; namespace Rvl.Demo.Common {     public class MoveFiles     {         public static void Move()         {             string sourceFolder = @"C:\BDATA\Test\Source"; // Source folder             string destinationFolder = @"C:\BDATA\Test\Destination"; // …

Using XBMC on my ASUS EEE Box 1012P

  Because the ASUS EEE Box 1012P is shipped with Windows 7, I first installed XBMC 10.0 (released 19-dec-1010). on Windows 7. Installation – Download XBMC 10.0 from http://xbmc.org/download/ – Next Next Finish installation.   Network Share – Create a network share, so all sources in the XBMC database will …

How to show the output of a *.bat or *.cmd file in a WPF application, without waiting for the *.bat file to end

Notes The functions – process.StandardOutput.ReadToEnd(); – process.StandardOutput.Read(); – process.StandardOutput.ReadLine(); will wait for the process to end and then output the result. If you want to show the output during processing, you should use – process.OutputDataReceived += new DataReceivedEventHandler(ProcessOuputHandler); – and process.BeginOutputReadLine(); Because the BeginOutputReadLine will spawn a new thread, you …

Setting 100% width and 100% height for a Textbox in WPF

If you want to stretch a textbox to the width of the window in WPF you can use the following code   Code <Window x:Class="Ada.Eac.UI.DeployWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="DeployWindow" Height="300" Width="988" SnapsToDevicePixels="True" UseLayoutRounding="True" WindowState="Maximized" WindowStartupLocation="CenterScreen" Icon="/Eac;component/Dashboard.ico"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"></ColumnDefinition> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="60"></RowDefinition> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <Button Grid.Column="1" Content="Deploy" Height="30" …