These are chat archives for chat-rooms/programming

30th
Nov 2016
lovetechgirl11
@lovetechgirl11
Nov 30 2016 20:44
Anyone an expert in c#?
VoidVolker
@VoidVolker
Nov 30 2016 20:44
@lovetechgirl11 feel free to ask your question
lovetechgirl11
@lovetechgirl11
Nov 30 2016 20:45
Cool
@VoidVolker just messaged you thaks
VoidVolker
@VoidVolker
Nov 30 2016 20:47
np
lovetechgirl11
@lovetechgirl11
Nov 30 2016 20:49

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Threading;

namespace MyFirstChatBot
{
class Program
{
static void Main(string[] args)
{

        bool shutdown = false;
        bool foundResponse;
        string inputValue;
        string outputValue = "";

        Console.ForegroundColor = ConsoleColor.Green;
        Console.WriteLine("Computer: Hello Friend!");
        Console.WriteLine("");
        Console.ResetColor();

        while (!shutdown)
        {
            foundResponse = false;

            Console.ForegroundColor = ConsoleColor.White;
            Console.Write("User: ");
            inputValue = Console.ReadLine().ToLower();
            Console.WriteLine("");

            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write("Computer: ");
            switch (inputValue)
            {


                case "hello":
                    outputValue = "I've already said Hello.";
                    foundResponse = true;
                    break;

                case "bye":
                    outputValue = "Good bye";
                    foundResponse = true;
                    break;

                case "notepad":
                    Process ExternalProcess = new Process();
                    outputValue = ExternalProcess.StartInfo.FileName = "Notepad.exe";
                    foundResponse = true;
                    ExternalProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
                    ExternalProcess.Start();
                    ExternalProcess.WaitForExit();
                    break;


            }          

        }

            if (foundResponse)
            {
                Console.WriteLine(outputValue);
            }
            else
            {
                Console.WriteLine("Found no response.");
            }

            Console.WriteLine("");
            Console.ResetColor();
        }

    }
}

}

I don't know where to add the function that allows me to type in "Cats" for example and the web browser will show the results within google
lovetechgirl11
@lovetechgirl11
Nov 30 2016 20:56
?