Esempio n. 1
0
        /// <summary>
        /// User wants to see a survey
        /// </summary>
        void SurveyList_ItemTapped(object sender, ItemTappedEventArgs e)
        {
            // Use Tapped instead of selected to allow the re-selection of the item without crashing Android
            SurveyCellViewModel cell = (SurveyCellViewModel)e.Item;

            cell.BackgroundColor = Color.FromHex("#FF4F45");
            Survey item = cell.Survey;
            Page   sp;

            if (App.isAdmin())
            {
                if (Device.OS == TargetPlatform.WinPhone)
                {
                    Device.BeginInvokeOnMainThread(() => DisplayAlert("Not supported", "Due to technical reasons, this Action is not supported on WindowsPhone at the moment.", "OK"));
                    return;
                }
                sp = new SurveyResultPage(item);
            }
            else
            {
                sp = new SurveyPage(item);
            }
            cell.BackgroundColor = this.BackgroundColor;
            Navigation.PushAsync(sp);
        }
Esempio n. 2
0
 /// <summary>
 /// User wants to see a survey
 /// </summary>
 void SurveyList_ItemTapped(object sender, ItemTappedEventArgs e)
 {
     // Use Tapped instead of selected to allow the re-selection of the item without crashing Android
     SurveyCellViewModel cell = (SurveyCellViewModel)e.Item;
     cell.BackgroundColor = Color.FromHex ("#FF4F45");
     Survey item = cell.Survey;
     Page sp;
     if (App.isAdmin())
     {
         if (Device.OS == TargetPlatform.WinPhone)
         {
             Device.BeginInvokeOnMainThread(() => DisplayAlert("Not supported", "Due to technical reasons, this Action is not supported on WindowsPhone at the moment.", "OK"));
             return;
         }
         sp = new SurveyResultPage(item);
     }
     else
     {
         sp = new SurveyPage(item);
     }
     cell.BackgroundColor = this.BackgroundColor;
     Navigation.PushAsync (sp);
 }