BeFriend.ViewModel.SosPageViewModel.Caller C# (CSharp) Метод

Caller() приватный Метод

private Caller ( ) : void
Результат void
        private void Caller()
        {
            //TODO: Not working on phones too
            //if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.ApplicationModel.Calls"))
            //    return;

            if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("FirstContactNumber"))
            {
                SosPageText += "\n No Contacts assigned to call \n";
                RaisePropertyChanged(() => SosPageText);
                return;
            }
            _phonenumber = ApplicationData.Current.LocalSettings.Values["FirstContactNumber"] as string;

            if (!ApplicationData.Current.LocalSettings.Values.ContainsKey("FirstContactName"))
            {
                return;
            }
            _phonename = ApplicationData.Current.LocalSettings.Values["FirstContactName"] as string;

            if ((SpineClass.CurrentPhoneLine != null))
            {
                SosPageText += "\n Calling... \n";
                SpineClass.CurrentPhoneLine.Dial(_phonenumber, _phonename);
            }
            else
            {
                SosPageText += "\n No line found to place the call. No SIM or system not a mobile phone \n";
            }
            RaisePropertyChanged(()=>SosPageText);
        }