Exemple #1
0
        public MainPage()
        {
            InitializeComponent();
            lib = new BinaryConverterLib.BinaryConverterLib();
            string myIP = lib.getMyIP();

            addr.Text = myIP;
        }
Exemple #2
0
 public static void Main(string[] args)
 {
     try
     {
         BinaryConverterLib.BinaryConverterLib lib = new BinaryConverterLib.BinaryConverterLib();
         string addr = "localhost:8042";
         Console.Write("Enter a number: ");
         string n   = Console.ReadLine();
         int    m   = Int32.Parse(n);
         string res = lib.RequestToBinaryConverter(addr, m);
         Console.WriteLine($"Binary of {m} is: {res}");
         Console.ReadKey();
     }
     catch (FormatException err)
     {
         Console.WriteLine(err.Message);
     }
 }
Exemple #3
0
        static void Main(string[] args)
        {
            try
            {
                BinaryConverterLib.BinaryConverterLib lib = new BinaryConverterLib.BinaryConverterLib();
                string myIP = lib.getMyIP();
                Console.WriteLine("Your IP Address is :" + myIP);

                Console.Write("Enter a number: ");
                string n   = Console.ReadLine();
                int    m   = Int32.Parse(n);
                string res = lib.RequestToBinaryConverter(myIP, m);
                Console.WriteLine($"Binary of {m} is: {res}");
                Console.ReadKey();
            }
            catch (FormatException err)
            {
                Console.WriteLine(err.Message);
            }
        }