private string ConvertCallType(SettingsTable.CallTypeEnum callType) { switch (callType) { case SettingsTable.CallTypeEnum.Phone: { return(this.ApplicationContext.Resources.GetText(Resource.String.Phone)); } case SettingsTable.CallTypeEnum.SkypeOut: { return(this.ApplicationContext.Resources.GetText(Resource.String.SkypeOut)); } case SettingsTable.CallTypeEnum.SkypeUser: { return(this.ApplicationContext.Resources.GetText(Resource.String.Skype)); } default: { throw new NotImplementedException(); } } }
private void AssignCallSettings(string number, SettingsTable.CallTypeEnum callType) { Settings settings = SimpleIoc.Default.GetInstance <bleissem.babyphone.Settings>(); settings.NumberToDial = number; settings.CallType = callType; TextView numberToDial = FindViewById <TextView>(Resource.Id.ContactTextView); numberToDial.Text = settings.NumberToDial; TextView youreUsing = FindViewById <TextView>(Resource.Id.YouAreUsingTextView); youreUsing.Text = this.ConvertCallType(settings.CallType); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.ContactsMaster); m_ListView = FindViewById <ListView>(Resource.Id.ContactsList); m_ContactsAdapter = new ContactsAdapter(this); m_ListView.Adapter = m_ContactsAdapter; m_ListView.ItemClick += m_ListView_ItemClick; int result = this.Intent.GetIntExtra(IntentFactory.SetCallType, -1); m_CallType = (SettingsTable.CallTypeEnum)result; }
public void Turn(bool on, SettingsTable.CallTypeEnum calltype) { if (null == m_AudioManager) { return; } if (calltype == SettingsTable.CallTypeEnum.Phone) { m_AudioManager.Mode = Mode.InCall; } else { m_AudioManager.Mode = Mode.InCommunication; } m_AudioManager.SpeakerphoneOn = on; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.ContactsMaster); m_ListView = FindViewById <ListView>(Resource.Id.ContactsList); string id = this.Intent.GetStringExtra(IntentFactory.SetIdToCall); m_CallType = (SettingsTable.CallTypeEnum) this.Intent.GetIntExtra(IntentFactory.SetCallType, -1); ReadContacts rc = SimpleIoc.Default.GetInstance <ReadContacts>(); m_PhoneNumbersAdapter = new PhoneNumbersAdapter(this, rc.List[id].Phones); m_ListView.Adapter = m_PhoneNumbersAdapter; m_ListView.ItemClick += m_ListView_ItemClick; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.PhoneNumberAdditionalSettings); m_CallNumber = Intent.GetStringExtra(IntentFactory.SetIdToCall); m_CallType = (SettingsTable.CallTypeEnum) this.Intent.GetIntExtra(IntentFactory.SetCallType, -1); Settings settings = SimpleIoc.Default.GetInstance <bleissem.babyphone.Settings>(); m_UseSpeaker = FindViewById <CheckBox>(Resource.Id.PhoneAdditionalSettingsSpeakerCheckBox); m_UseSpeaker.Checked = settings.UseSpeakerEnabled; m_UseSpeaker.Click += M_UseSpeaker_Click; m_OkButton = FindViewById <Button>(Resource.Id.PhoneAdditionalSettingsSpeakerOKButton); m_OkButton.Click += M_OkButton_Click; }