NEWS

[C#] Sử dụng Microsoft Agent in Windows 7, 10 Winform

[C#] Sử dụng Microsoft Agent in Windows 7, 10 Winform
Đăng bởi: Thảo Meo - Lượt xem: 5323 15:36:56, 09/12/2020DEVEXPRESS   In bài viết

Xin chào các bạn, bài viết hôm nay mình sẻ hướng dẫn các bạn cách sử dụng Microsoft Agent trên Windows 7, 10 trong lập trình C#, Winform.

[C#] Using Microsoft Agent in Windows 7, 10

Microsoft Agent là các trợ lý ảo, thời còn hệ điều hành Microsoft Windows XP (Anh em thời 8x, 9x chắc không còn xa lạ với mấy em này)

Từ Windows 7 trở đi, Microsoft đã không còn sử dụng bộ này nữa, nếu các bạn muốn sử dụng và chạy nó trên Windows hiện tại.

Ở bên dưới source code của mình có file DoubleAgent_x86.msi, các bạn cài đặt vào để sử dụng lại bộ này nhé.

Dưới đây là hình ảnh của Biệt đội siêu anh hùng một thời trên Windows XP:

Microsoft Agent_csharp

Video demo ứng dụng Microsoft Agent C#:

Source code sử dụng Microsoft Agent:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2
{
    public partial class Form1 : Form
    {
        private AgentObjects.IAgentCtlCharacter Avatar;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            axAgent1.Characters.Load("Merlin", Application.StartupPath + "\Merlin.acs");
            Avatar = axAgent1.Characters["Merlin"];
            Avatar.Show(0);
            Avatar.MoveTo(850, 200);
            Avatar.Speak("Tôi tên là Merlin!");

            axAgent1.Characters.Load("Robby", Application.StartupPath + "\Robby.acs");
            Avatar = axAgent1.Characters["Robby"];
            Avatar.Show(0);
            Avatar.MoveTo(950, 250);
            Avatar.Speak("Tôi tên là Robby!");

            axAgent1.Characters.Load("genie", Application.StartupPath + "\genie.acs");
            Avatar = axAgent1.Characters["genie"];
            Avatar.Show(this.Location);
            Avatar.MoveTo(250, 250);
            Avatar.Speak("Tôi tên là Genie!");


            axAgent1.Characters.Load("Peedy", Application.StartupPath + "\Peedy.acs");
            Avatar = axAgent1.Characters["Peedy"];
            Avatar.Show(this.Location);
            Avatar.Speak("Xin chào Lập trình VB.NET, chúng tôi đến từ Windows XP!");
            Avatar.MoveTo(350, 250);

            axAgent1.Characters.Load("clipy", Application.StartupPath + "\clipy.acs");
            Avatar = axAgent1.Characters["clipy"];
            Avatar.Show(this.Location);          
            Avatar.MoveTo(450, 250);  
            
            axAgent1.Characters.Load("OFFCAT", Application.StartupPath + "\OFFCAT.ACS");
            Avatar = axAgent1.Characters["OFFCAT"];
            Avatar.Show(this.Location);          
            Avatar.MoveTo(550, 250);

            axAgent1.Characters.Load("MNATURE", Application.StartupPath + "\MNATURE.ACS");
            Avatar = axAgent1.Characters["MNATURE"];
            Avatar.Show(this.Location);
            Avatar.MoveTo(650, 250);

            axAgent1.Characters.Load("ROCKY", Application.StartupPath + "\ROCKY.ACS");
            Avatar = axAgent1.Characters["ROCKY"];
            Avatar.Show(this.Location);
            Avatar.MoveTo(750, 250);  
            
            axAgent1.Characters.Load("F1", Application.StartupPath + "\F1.ACS");
            Avatar = axAgent1.Characters["F1"];
            Avatar.Show(this.Location);
            Avatar.MoveTo(1050, 250);
        }

    }
}

Thanks for watching!

DOWNLOAD SOURCE

THÔNG TIN TÁC GIẢ

BÀI VIẾT LIÊN QUAN

[C#] Sử dụng Microsoft Agent in Windows 7, 10 Winform
Đăng bởi: Thảo Meo - Lượt xem: 5323 15:36:56, 09/12/2020DEVEXPRESS   In bài viết

CÁC BÀI CÙNG CHỦ ĐỀ

Đọc tiếp
.