|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Drawing;
using System.Xml.Serialization;
namespace Trestan
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Normally we will create GUI for user interaction. Here we just use console as a demo.\n");
Console.WriteLine("Configuration settings:\n");
Console.WriteLine("ServerIP: "+Configuration.Instance.ServerIP);
Console.WriteLine("ServerPort: " + Configuration.Instance.ServerPort);
Console.WriteLine("UserName: " + Configuration.Instance.CurrentUser.UserName);
Console.WriteLine("UserID: " + Configuration.Instance.CurrentUser.UserID);
Console.WriteLine("\nPlease input user name: ");
Configuration.Instance.CurrentUser.UserName = Console.ReadLine();
Configuration.Instance.CurrentUser.UserID = 1001; //In real application, this value will be obtained from server side after athentication.
Configuration.Instance.ServerIP = Utility.getHostIP();
Configuration.Instance.Save();
Console.WriteLine("Press enter to exit. Run the program again will show new settings.");
Console.Read();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.