コード例 #1
0
 static void ReadParameters()
 {
     if (isTestMode)
     {
         clientParameters.SetServerIP("192.168.0.106");
         clientParameters.ServerPort   = 10086;
         clientParameters.OnlineAvatar = "";
         clientParameters.ServiceName  = "";
     }
     else
     {
         string filePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
         clientParameters = ClientParametersManager.ReadParameters(filePath);
     }
     Console.WriteLine("参数信息:");
     Console.WriteLine("IP:" + clientParameters.GetServerIP());
     Console.WriteLine("PORT:" + clientParameters.ServerPort);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: zz110/RemoteControl-1
        static ClientParameters ReadParameters()
        {
            ClientParameters paras = new ClientParameters();

            if (isTestMode)
            {
                paras.SetServerIP("192.168.1.136");
                paras.ServerPort   = 10086;
                paras.OnlineAvatar = "";
                paras.ServiceName  = "";
            }
            else
            {
                string filePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
                paras = ClientParametersManager.ReadParameters(filePath);
            }
            Console.WriteLine("参数信息:");
            Console.WriteLine("IP:" + paras.GetServerIP());
            Console.WriteLine("PORT:" + paras.ServerPort);

            return(paras);
        }