[PowerShell] Integrated PowerShell with C# Application

มาต่อบทความการใช้ C# กับ PowerShell สักที หลังจากไปลองสร้าง Winform Application จาก PowerShell เพียวๆกันแล้ว โดยคราวนี้ เราใช้โจทย์ของคราวที่แล้วแหละ โดยมีการออกแบบหน้าจอ ดังรูป จัดการ Add Code Event ต่างๆให้เรียบร้อย (อันนี้ผมใช้ Pattern MVP นะครับ เผื่อคนโหลดไปแกะ Code)จากนั้น เราต้องทำให้ C# รู้จักกับ PowerShell กันก่อน โดยการ Add Reference DLL เข้ามาใน Project ครับ โดยเราจะ Add DLL…