Esempio n. 1
0
        internal static void MakeVideoCall(string primaryId, UIElementCollection uiElementCollection, int timeoutInSeconds, string secondaryId = null)
        {
            CommunicationView commView = new CommunicationView(primaryId, timeoutInSeconds);

            uiElementCollection.Add(commView);
            commView.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            commView.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            commView.Width               = 700;
            commView.Height              = 400;
            commView.CommunicationEnded += (p1, p2) =>
            {
                if (commView.TimedOut &&
                    string.IsNullOrEmpty(secondaryId) == false)
                {
                    commView.InitializeUI(secondaryId);
                    secondaryId = null;
                    return;
                }
                else
                {
                    commView.Visibility = Visibility.Collapsed;
                    uiElementCollection.Remove(commView);
                }
            };
        }
Esempio n. 2
0
        public ActionResult Create(CommunicationView commView)
        {
            try
            {
                // TODO: Add insert logic here

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
Esempio n. 3
0
 public static void SetTo(this CommunicationView view, Communication model)
 {
     Mapper.Map(view, model);
 }
Esempio n. 4
0
 public static Communication ToModel(this CommunicationView view)
 {
     return(Mapper.Map <Communication>(view));
 }