Exemplo n.º 1
0
        private void OnConnected(MPC sender)
        {
            Debug.WriteLine("OnConnected@ConnectViewModel");

            IsBusy = false;

            ConnectionStatus = "Connected! Saving connection info...";

            Profile pro = new Profile();

            pro.Name      = Host + ":" + _port.ToString();
            pro.Host      = Host;
            pro.Port      = _port;
            pro.Password  = Password;
            pro.IsDefault = true;

            _con.Profiles.Add(pro);
            _con.SaveProfile();

            ConnectionStatus = "...";

            Device.BeginInvokeOnMainThread(
                () =>
            {
                GoToPage?.Invoke(this, "HomePage");
            });
        }
Exemplo n.º 2
0
        private void OnConnected(MPC sender)
        {
            Debug.WriteLine("OnConnected@SettingViewModel");

            IsBusy = false;

            SettingProfileEditMessage = "Connected!";

            Device.BeginInvokeOnMainThread(
                () =>
            {
                GoToPage?.Invoke(this, "HomePage");
            });

            SettingProfileEditMessage = "";
        }