コード例 #1
0
        static void Main(string[] args)
        {
            window = new ConsoleWindowFrame
            {
                Width  = 70,
                Height = 20
            };

            window.StartRender();

            try
            {
                remoteName = "localhost";
                remotePort = 5150;
                running    = true;
                client     = null;

                string input = window.GetInputWithQuestion("Enter your name: ");

                client = new Client(input);

                while (running)
                {
                    try
                    {
                        string message = window.GetInputWithQuestion("Skriv ett meddelande: ");

                        DecodeMessage(message);
                    }
                    catch (Exception e)
                    {
                    }
                }

                client.Close();
            }
            catch (Exception e)
            {
                ErrorMessage(e.Message);
            }

            window.Abort();

            PressAnyKey();
        }
コード例 #2
0
 protected AdministrateGui(ConsoleWindowFrame mainWindow, ICrud <T> dbManager)
 {
     MainWindow = mainWindow;
     DbManager  = dbManager;
 }
コード例 #3
0
 public ProductGui(ConsoleWindowFrame mainWindow)
     : base(mainWindow,
            new ProductDbManager(System.Configuration.ConfigurationManager.ConnectionStrings["Kundregister"].ConnectionString))
 {
 }