Exemplo n.º 1
0
        public static void SelectWireless()
        {
            _colorify.Clear();

            try
            {
                Section.Header("CONNECT DEVICE");

                _config.personal.ipAddress = Network.GetLocalIPv4();
                Section.CurrentIP();

                _colorify.BlankLines();
                _colorify.Write($"{" [I] IP Address:",-25}", txtPrimary); _colorify.WriteLine($"{_config.personal.adb.wifiIpAddress}");
                _colorify.Write($"{" [P] Port:",-25}", txtPrimary); _colorify.WriteLine($"{_config.personal.adb.wifiPort}");

                _colorify.BlankLines();
                _colorify.Write($"{" [C] Connect",-68}", txtStatus(!String.IsNullOrEmpty(_config.personal.adb.wifiIpAddress)));
                _colorify.WriteLine($"{"[EMPTY] Cancel",-17}", txtDanger);

                Section.HorizontalRule();

                _colorify.Write($"{" Make your choice:",-25}", txtInfo);
                string opt = Console.ReadLine()?.ToLower();

                if (String.IsNullOrEmpty(opt))
                {
                    Menu.Start();
                }
                else
                {
                    Menu.Route($"aw>{opt}", "aw");
                }
                Message.Error();
            }
            catch (Exception Ex)
            {
                Exceptions.General(Ex);
            }
        }