예제 #1
0
        private async void SetSoundPathBtn_Clicked(object sender, EventArgs e)
        {
            try
            {
                Log.Debug(Globals.LogTag, "Set call sound path start");
                var actionPath = await DisplayActionSheet("Operation", "Cancel", null, Enum.GetNames(typeof(SoundPath)));

                var actionVolume = await DisplayActionSheet("Operation", "Cancel", null, Enum.GetNames(typeof(ExtraVolume)));

                Log.Debug(Globals.LogTag, "Action: Path = " + actionPath + ", Volume = " + actionVolume);
                if (actionPath != null && actionVolume != null)
                {
                    SoundPath         path     = (SoundPath)Enum.Parse(typeof(SoundPath), actionPath);
                    ExtraVolume       volume   = (ExtraVolume)Enum.Parse(typeof(ExtraVolume), actionVolume);
                    CallSoundPathInfo pathInfo = new CallSoundPathInfo(path, volume);
                    await call.SetCallSoundPath(pathInfo);

                    Log.Debug(Globals.LogTag, "Set call sound path ends with success");
                }
            }

            catch (Exception ex)
            {
                Log.Debug(Globals.LogTag, "Set call sound path,exception = " + ex.ToString());
            }
        }
예제 #2
0
 /// <summary>
 /// A parameterized constructor of CallSoundPathInfo.
 /// </summary>
 /// <param name="path">Sound path.</param>
 /// <param name="exVolume">Extra volume status.</param>
 public CallSoundPathInfo(SoundPath path, ExtraVolume exVolume)
 {
     _path     = path;
     _exVolume = exVolume;
 }