Example #1
0
        private void Privacy_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            MessagePrompt mp = new MessagePrompt
            {
                BorderThickness = new Thickness(0, 0, 0, 0),
                Title = "定位服务隐私声明"
            };


            var body = new Grid();
            body.Children.Add(new TextBlock
            {
                Text = @"噪音地图将使用Microsoft定位服务来使用你的地理位置信息。
你的地理位置信息将会保存一段时间。如果你不希望使用的地理位置信息,请点击“取消”按钮。你可以随时到“设置”页面中开启或关闭“定位服务”。
在下述情况下噪音地图需要使用你的地理位置信息:
(1)分享到微博
(2)上传到地图。

使用Microsoft位置服务代表你同意Microsoft收集有关你的位置信息,以提供和改进其地图和位置服务。有关详情,请阅读Microsoft隐私声明(http://www.windowsphone.com/zh-cn/how-to/wp7/start/welcome)。"
            ,
                TextWrapping = TextWrapping.Wrap
            });

            mp.Body = body;
            var btnComplete = new Button { Content = "确认" };
            btnComplete.Click += (o, args) =>
            {
                mp.Hide();
            };

            mp.Show();
        }
 public void GetPhoto(GetPhotoCallback callback)
 {
     this.getPhotoCallback = callback;
     MessagePrompt questionMessage = new MessagePrompt();
     questionMessage.Title = "Choose source:";
     SelectPhotoDialog dialogContent = new SelectPhotoDialog();
     dialogContent.TakePhotoCommand = new DelegateCommand((o) =>
         {
             questionMessage.Hide();
             this.photoCameraCapture.Show();
         });
     dialogContent.ChosePhotoCommand = new DelegateCommand((o) =>
         {
             questionMessage.Hide();
             this.photoChooserTask.Show();
         });
     dialogContent.RandomPhotoCommand = new DelegateCommand((o) =>
         {
             questionMessage.Hide();
             callback(null);
         });
     questionMessage.Body = dialogContent;
     RoundButton cancelButton = new RoundButton();
     cancelButton.ImageSource = new BitmapImage(new Uri("/Resources/icons/appbar.stop.rest.png", UriKind.Relative));
     cancelButton.Click += (sender, args) =>
         {
             questionMessage.Hide();
         };
     questionMessage.ActionPopUpButtons.Clear();
     questionMessage.ActionPopUpButtons.Add(cancelButton);
     questionMessage.Show();
 }
Example #3
0
 private void missing()
 {
     MessagePrompt message = new MessagePrompt
     {
         Title = "Nenhuma fenofase registrada",
         Body = new TextBlock { Text = "Registrar " + PhenologyDataContext.Singleton().selected().Id + " como não encontrado?" },
         IsCancelVisible = true,
         VerticalContentAlignment = VerticalAlignment.Bottom
     };
     message.Completed += delegate(Object sender, PopUpEventArgs<string, PopUpResult> e)
     {
         if (e.PopUpResult == PopUpResult.Ok)
         {
             new ToastPrompt
             {
                 Title = PhenologyDataContext.Singleton().selected().Id.ToString(),
                 Message = "Não encontrado.",
                 MillisecondsUntilHidden = 1500,
                 VerticalAlignment = VerticalAlignment.Bottom,
                 VerticalContentAlignment = VerticalAlignment.Center,
                 Background = new SolidColorBrush
                 {
                     Color = Colors.Black,
                     Opacity = 0.9
                 },
                 ImageSource = new BitmapImage(new Uri("Toolkit.Content/ApplicationBar.Check.png", UriKind.RelativeOrAbsolute))
             }.Show();
             next();
         }
     };
     message.Show();
 }
 private void ApplicationBarIconButton_Click(object sender, System.EventArgs e)
 {
     if (SmallName.Text == "")
     {
         //MessageBox.Show("The 'Name' of the subject identifies the subject in the Time Table.\nThis field cannot be left empty");
         var messagePrompt = new MessagePrompt
         {
             Title = "Error!",
             Message = "The 'Name' of the subject identifies the subject in the Time Table.\nThis field cannot be left empty"
         };
         messagePrompt.Show();
         return;
     }
     IEnumerable<Subject> s = from sub in a.subjects
                              where sub.ShortName == SmallName.Text
                              select sub;
     if (s.Count()!=0)
     {
         //MessageBox.Show("A subject with this name already exists, please select that from the list directly to enter into the timetable");
         var messagePrompt = new MessagePrompt
         {
             Title = "Error!",
             Message = "A subject with this name already exists, please select that from the list directly to enter into the timetable"
         };
         messagePrompt.Show();
         return;
     }
     a.subjects.Add(new Subject(SmallName.Text, LongName.Text, tsp.Value.Value, DescriptionTB.Text));
     NavigationService.GoBack();
 }
		private void back_Click(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Advanced Message",
				Message = "When prompt is complete, i'll navigate back",
			};

			messagePrompt.Completed += navBack_Completed;

			messagePrompt.Show();
		}
		private void MessageClick(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Basic Message",
				Message = LongText,
			};

			messagePrompt.Completed += PopUpPromptStringCompleted;

			messagePrompt.Show();
		}
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     var messagePrompt = new MessagePrompt
     {
         Title = "Are you sure?",
         Message = "Are you sure you want to delete the subject "+(sender as Button).Tag.ToString(),
         IsCancelVisible = true,
         Tag = (sender as Button).Tag.ToString()
     };
     messagePrompt.Completed += messagePrompt_Completed;
     messagePrompt.Show();
 }
		private void newPage_Click(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Advanced Message",
				IsCancelVisible = true,
				Body = "Nav to Color page page on complete"
			};

			messagePrompt.Completed += navTo_Completed;

			messagePrompt.Show();
		}
		private void MessageAdvancedClick(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Advanced Message",
				Message = "When complete, i'll navigate back",
				Overlay = _cornFlowerBlueSolidColorBrush,
				IsCancelVisible = true
			};

			messagePrompt.Completed += PopUpPromptStringCompleted;

			messagePrompt.Show();
		}
		private void NavToNewPageViaBodyButtonClick(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Advanced Message",
				IsCancelVisible = true,
			};

			var btn = new Button { Content = "Nav to Colors" };
			btn.Click += (s, ee) => NavigationService.Navigate(new Uri("/Samples/ColorControls.xaml", UriKind.Relative));
			messagePrompt.Body = btn;

			messagePrompt.Show();
		}
Example #11
0
        private void dialogbox(object sender, EventArgs e)
        {
            var messagePrompt = new MessagePrompt
            {
                Title = "             Change Text Size",  //white space needed to center text
            };

            messagePrompt.Completed += messagePrompt_Completed;

            RoundButton customButton = new RoundButton();
            customButton.ImageSource = new BitmapImage(new Uri("/icons/appbar.next.rest.png", UriKind.RelativeOrAbsolute));
            customButton.Click += new RoutedEventHandler(customButton_Click);
            messagePrompt.ActionPopUpButtons.Add(customButton);

            RoundButton customButton2 = new RoundButton();
            customButton2.ImageSource = new BitmapImage(new Uri("/icons/appbar.next.restup.png", UriKind.RelativeOrAbsolute));
            customButton2.Click += new RoutedEventHandler(customButton2_Click);
            messagePrompt.ActionPopUpButtons.Add(customButton2);

            messagePrompt.Show();
        }
		private void MessageCustomClick(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Custom Body Message",
				Background = _naturalBlueSolidColorBrush,
				Foreground = _aliceBlueSolidColorBrush,
				Overlay = _cornFlowerBlueSolidColorBrush,
				IsCancelVisible = true,

			};

			var btn = new Button { Content = "Msg Box" };
			btn.Click += (s, args) => resultBlock.Text = "Hi!";

			messagePrompt.Body = btn;

			messagePrompt.Completed += PopUpPromptStringCompleted;

			messagePrompt.Show();
		}
Example #13
0
        private void SaveClick(object sender, RoutedEventArgs e)
        {
            var data = new TestSerializeClass();

            data.StringData = stringData.Text;

            int tempInt;
            int.TryParse(intData.Text, out tempInt);
            data.IntData = tempInt;

            if (dateTimeData.Value != null) 
                data.DateTimeData = dateTimeData.Value.Value;

            if (timeSpanData.Value != null) 
                data.TimeSpanData = timeSpanData.Value.Value;

            Serialize.Save(MyDataFileName, data);

            var prompt = new MessagePrompt {Title = "Saved", Message = "data saved"};
            prompt.Show();
        }
		private void MessageSuperClick(object sender, RoutedEventArgs e)
		{
			var messagePrompt = new MessagePrompt
			{
				Title = "Advanced Message",
				Background = _naturalBlueSolidColorBrush,
				Foreground = _aliceBlueSolidColorBrush,
				Overlay = _cornFlowerBlueSolidColorBrush,
			};

			var btnHide = new RoundButton { Content = "Hide" };
			btnHide.Click += (o, args) => messagePrompt.Hide();

			var btnComplete = new RoundButton { Content = "Complete" };
			btnComplete.Click += (o, args) => messagePrompt.OnCompleted(new PopUpEventArgs<string, PopUpResult> { PopUpResult = PopUpResult.Ok, Result = "You clicked the Complete Button" });

			messagePrompt.ActionPopUpButtons.Clear();
			messagePrompt.ActionPopUpButtons.Add(btnHide);
			messagePrompt.ActionPopUpButtons.Add(btnComplete);

			messagePrompt.Completed += PopUpPromptStringCompleted;

			messagePrompt.Show();
		}
Example #15
0
 void DeleteElementHandler(object sender, EventArgs e)
 {
     //MessageBox.Show((sender as MenuItem).Tag.ToString());
     var messagePrompt = new MessagePrompt
     {
         Title = "Are you sure?",
         Message = "Are you sure you want to delete this entry?",
         IsCancelVisible = true,
         Tag = (sender as MenuItem).Tag
     };
     messagePrompt.Completed += messagePrompt_Completed;
     messagePrompt.Show();
 }
Example #16
0
        void Response_Completed(IAsyncResult result)
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)result.AsyncState;
                HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
                System.IO.StreamReader respStreamReader = new System.IO.StreamReader(response.GetResponseStream());
                string responseString = respStreamReader.ReadToEnd();
                respStreamReader.Close();
                response.Close();
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    progressOverlay.Hide();
                    //grid1.Visibility = Visibility.Visible;
                    grid2.Visibility = Visibility.Visible;
                    String resp_msg = "";
                    try
                    {
                        if (responseString.Equals("1"))
                        {
                            resp_msg = "SMS succesfully sent to " + temp;
                            if ((bool)checkBox1.IsChecked)
                                resp_msg = "SMS succesfully SCHEDULED to " + temp;
                            load_sentsms();
                            Save_SentSMS();
                        }
                        else if (responseString.Equals("-1"))
                        {
                            if (count > 0)
                            {
                                textBox2.Text += " ";
                                send(settings.way2smsuid, settings.way2smspwd, textBox2.Text, textBox1.Text);
                                --count;
                                return;
                            }

                            resp_msg = "We are having a temporary problem with servers ,Please try again :(";
                        }
                        else if (responseString.Equals("-2"))
                            resp_msg = "This Mobile no is not registered in " + App.service_name + " ,Please register first!";
                        else if (responseString.Equals("-3"))
                            resp_msg = "Sorry,There seems to be a problem with your message text,Message Undelivered.";
                        else if (responseString.Equals("-4"))
                            resp_msg = "Incorrect login details ,please recheck!";
                    }
                    catch (NullReferenceException e)
                    {

                    }
                    App.resp_msg = resp_msg;
                    MessagePrompt messagePrompt = new MessagePrompt();
                    messagePrompt.Body = new BodyUserControl();
                    messagePrompt.Show();

                });
            }
            catch (Exception e)
            {
                //UIThread.Invoke(() => MessageBox.Show("Right now, we cant connect to internet ,make sure your data connection is turned on"));
                //UIThread.Invoke(() => NavigationService.Navigate(new Uri("/home.xaml", UriKind.Relative)));
                Exception exception = e;
                base.Dispatcher.BeginInvoke(() =>
                {
                    if (exception.Message == "The remote server returned an error: NotFound.")
                    {
                        MessageBox.Show("No internet connectivity ,Make sure your data connection is turned on");
                    }
                });
            }
        }
Example #17
0
        public static void ShowPopup(RubyModule/*!*/ self, Object args)
        {
            String message = "";
            String title = "";
            Object[] buttons = null;
            object val = null;

            if (args != null && args is MutableString)
            {
                message = ((MutableString)args).ToString();
                buttons = new String[1];
                buttons[0] = "Ok";
            }
            if (args != null && args is Hash && ((Hash)args).TryGetValue(CRhoRuby.CreateSymbol("title"), out val))
                title = val.ToString();
            if (args != null && args is Hash && ((Hash)args).TryGetValue(CRhoRuby.CreateSymbol("message"), out val))
                message = val.ToString();
            if (args != null && args is Hash && ((Hash)args).TryGetValue(CRhoRuby.CreateSymbol("callback"), out val))
                m_callback = val.ToString();
            if (args != null && args is Hash && ((Hash)args).TryGetValue(CRhoRuby.CreateSymbol("buttons"), out val) && val is RubyArray)
                buttons = ((RubyArray)val).ToArray();

            RHODESAPP().MainPage.Dispatcher.BeginInvoke(() =>
            {
                m_messagePrompt = new MessagePrompt
                {
                    Title = title,
                    Message = message
                };
                m_messagePrompt.Completed += messagePrompt_Completed;
                m_messagePrompt.ActionPopUpButtons.Clear();
                for (int i = 0; buttons != null && i < buttons.Length; i++)
                {
                    if (buttons[i] != null)
                    {
                        Button customButton = new Button();
                        if(buttons[i] is Hash)
                        {
                            ((Hash)buttons[i]).TryGetValue(CRhoRuby.CreateSymbol("title"), out val);
                            if(val != null)
                                customButton.Content = val;
                        }
                        else
                            customButton.Content = buttons[i];
                        customButton.Click += new RoutedEventHandler(customButton_Click);
                        m_messagePrompt.ActionPopUpButtons.Add(customButton);
                    }
                }
                m_messagePrompt.Show();
            });
    
        }
 private void ShowNetworkUnavailable()
 {
     var prompt = new MessagePrompt()
     {
         Message = AppResources.NetworkNotAvailableMessage,
     };
     prompt.Show();
 }
Example #19
0
        private void SprawdzOdpowiedz(object sender)
        {
            Question q = new Question();
            string answer = (sender as Button).Content.ToString();
            var messagePrompt = new MessagePrompt();

            switch ((sender as Button).Name[7])
            {
                case '1' :
                    q = pytanieIMG; break;
                case '2' :
                    q = pytanieTrailer; break;
                case '3':
                    q = pytanieSong; break;
            }

            if(answer.Equals(q.Answer))
            {
                if (MainPage.CanMusic)
                    _correctSound.Play();
                SetScore();
                messagePrompt.Title = "Correct Answer";
            }
            else
            {
                if (MainPage.CanMusic)
                    _wrongSound.Play();

                messagePrompt.Title = "Wrong Answer";
                messagePrompt.Message = "The correct answer is: " + q.Answer;

            }
            messagePrompt.OnCompleted(new PopUpEventArgs<string, PopUpResult>
            {
                Result = messagePrompt.Value,
                PopUpResult = PopUpResult.Ok
            });

            BlokowanieOdpowiedzi(int.Parse((sender as Button).Name[7].ToString()));

            messagePrompt.Completed += MessagePromptCompleted;
            messagePrompt.Show();
        }
 /// <summary>
 /// Функция в которой компьютерный делает свой ход
 /// </summary>
 private void MakeMove()
 {
     if (CheckWin2(!pars.HumanFirst.Value))
     {
         var messagePrompt = new MessagePrompt
         {
             VerticalAlignment = System.Windows.VerticalAlignment.Bottom,
             Title = "Nerd",
             Message = "Вы победили",
             Padding = new Thickness(0),
             Margin = new Thickness(0),
             BorderBrush = new SolidColorBrush(Colors.Transparent),
             BorderThickness = new Thickness(5),
             //Opacity = 0,
             //OpacityMask = new SolidColorBrush(Colors.Transparent),
             Overlay = new SolidColorBrush(Colors.Transparent),
             Background = new ImageBrush()
             {
                 Stretch = System.Windows.Media.Stretch.None,
                 ImageSource = new BitmapImage(new Uri("Hydrangeas.png", UriKind.RelativeOrAbsolute))
             },
             Body = new WindowsPhoneControl1()
         };
         messagePrompt.Show();
         SetFieldToDefault();
     }
     else
     {
         GenerateGameField(ref GameField);
         calculationThread.RunWorkerAsync(GameField);
         progress.Show();
     }
 }
Example #21
0
        private void checkCards(){

            if (firstCard != null && secondCard != null)
            {
                bool result = firstCard.myPhoto.id == secondCard.myPhoto.id;

                if (result)
                {
                    winMoves++;

                    Stream stream = TitleContainer.OpenStream("sounds/yes/"+RandomNumber(1,10)+".wav");
                    SoundEffect effect = SoundEffect.FromStream(stream);
                    FrameworkDispatcher.Update();
                    effect.Play();

                    wonCards.Add(firstCard);
                    wonCards.Add(secondCard);
                    firstCard.canBeChanged = false;
                    secondCard.canBeChanged = false;

                    if (winMoves == 10)
                    {
                        gameTimer.Stop();
                       
                        IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
                        App app = (App)Application.Current;

                        EyeemHighscore newHighscore = new EyeemHighscore();
                        newHighscore.albumName = app.selectedAlbum.name;
                        newHighscore.moves = moves;
                        
                        if (gametimeSeconds >= 10)
                        {
                            newHighscore.seconds = "" + gametimeSeconds;
                        }
                        else
                        {
                            newHighscore.seconds = "0" + gametimeSeconds;
                        }

                        if (gametimeMinutes >= 10)
                        {
                            newHighscore.minutes = "" + gametimeMinutes;
                        }
                        else
                        {
                            newHighscore.minutes = "0" + gametimeMinutes;
                        }
                        
                        app.highscoreList.Add(newHighscore);
                        
                        List<EyeemHighscore> SortedList = app.highscoreList.OrderBy(o => o.moves).ToList();
                        app.highscoreList = SortedList;

                        if (app.highscoreList.Capacity > 10)
                        {
                            app.highscoreList = app.highscoreList.GetRange(0, 9);
                        }

                        settings["highscore"] = app.highscoreList;
                        settings.Save();

                        var messagePrompt = new MessagePrompt
                        {
                            Title = "Congratulations",
                            Body = new TextBlock { Text = "You won! " },
                            IsAppBarVisible = true,
                            IsCancelVisible = false
                        };
                        messagePrompt.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(messagePrompt_Completed);
                        messagePrompt.Show();
                    }
                    else
                    {
                        gameTimer.Stop();

                        Popup showPhotoPopup;
                        showPhotoPopup = new Popup();
                        showPhotoPopup.Child = new PhotoPopup(firstCard.myPhoto);
                        showPhotoPopup.IsOpen = true;
                        showPhotoPopup.VerticalOffset = 10;
                        showPhotoPopup.HorizontalOffset = 0;
                        showPhotoPopup.Closed += (s1, e1) =>
                        {
                            gameTimer.Start();
                        };

                        /*var photoBox = new MessagePrompt
                        {
                            Title = "Great Move!",
                            Body = new Image { Stretch = Stretch.Uniform, Source = new BitmapImage(new Uri(firstCard.myPhoto.photoUrl)) },
                            IsAppBarVisible = true
                        };
                        photoBox.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(photoBox_Completed);
                        photoBox.Show();*/

                        firstCard = null;
                        secondCard = null;
                    }
                }
                else
                {
                    Stream stream = TitleContainer.OpenStream("sounds/no/"+RandomNumber(1,10)+".wav");
                    SoundEffect effect = SoundEffect.FromStream(stream);
                    FrameworkDispatcher.Update();
                    effect.Play();

                    firstCard.FrontImage.Visibility = Visibility.Visible;
                    secondCard.FrontImage.Visibility = Visibility.Visible;
                    firstCard = null;
                    secondCard = null;
                }
            }
            
        }
 private void OnInfoClicked(object sender, EventArgs e)
 {
     MessagePrompt messagePrompt = new MessagePrompt();
     messagePrompt.Title = wp7_api_demos.Resources.ResourceDictionary.dialogPushNotificationsTitle;
     messagePrompt.Body = new PushNotificationInfoMessage();
     messagePrompt.Show();
 }
 private void calculationThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     progress.Hide();
     GetButton(resultPoint).Content = pars.HumanFirst.Value ? "o" : "x";
     if (CheckWin2(pars.HumanFirst.Value))
     {
         var messagePrompt = new MessagePrompt
         {
             VerticalAlignment = System.Windows.VerticalAlignment.Bottom,
             Title = "Nerd",
             Message = "Вы победили",
             Padding = new Thickness(0),
             Margin = new Thickness(0),
             BorderBrush = new SolidColorBrush(Colors.Transparent),
             BorderThickness = new Thickness(5),
             //Opacity = 0,
             //OpacityMask = new SolidColorBrush(Colors.Transparent),
             Overlay = new SolidColorBrush(Colors.Transparent),
             Background = new ImageBrush()
             {
                 Stretch = System.Windows.Media.Stretch.None,
                 ImageSource = new BitmapImage(new Uri("Hydrangeas.png", UriKind.RelativeOrAbsolute))
             },
             Body = new WindowsPhoneControl1()
         };
         //messagePrompt.Completed += messagePrompt_Completed;
         messagePrompt.Show();
         SetFieldToDefault();
     }
 }
Example #24
0
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            //Clock = new Timer(new TimerCallback(TimerProc));
            if (IsolatedStorageSettings.ApplicationSettings.Contains("EnableLocation"))
            {
                bool enableLocationIsChecked = (bool?)IsolatedStorageSettings.ApplicationSettings["EnableLocation"] ?? true;
                if (enableLocationIsChecked)
                {
                    this.StartGeo();
                }
            }
            else
            {
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    try
                    {
                        MessagePrompt mp = new MessagePrompt
                        {
                            BorderThickness= new Thickness(0,0,0,0),
                            Title = "定位服务",
                            IsCancelVisible = true
                        };

                        
                            var body = new Grid();
                            body.Children.Add(new TextBlock
                            {
                                Text = @"噪音地图将使用Microsoft定位服务来使用你的地理位置信息。
你的地理位置信息将会保存一段时间。如果你不希望使用的地理位置信息,请点击“取消”按钮。你可以随时到“设置”页面中开启或关闭“定位服务”。
在下述情况下噪音地图需要使用你的地理位置信息:
(1)分享到微博
(2)上传到地图。

使用Microsoft位置服务代表你同意Microsoft收集有关你的位置信息,以提供和改进其地图和位置服务。有关详情,请阅读Microsoft隐私声明(http://www.windowsphone.com/zh-cn/how-to/wp7/start/welcome)。"
                            ,
                                TextWrapping = TextWrapping.Wrap
                            });

                            mp.Body = body;

                        var btnHide = new Button { Content = "取消" };
                        btnHide.Click += (o, args) =>
                        {
                            mp.Hide();
                            IsolatedStorageSettings.ApplicationSettings["EnableLocation"] = false;
                        };

                        var btnComplete = new Button { Content = "确认" };
                        btnComplete.Click += (o, args) =>
                        {
                            mp.Hide();
                            IsolatedStorageSettings.ApplicationSettings["EnableLocation"] = true;
                            this.StartGeo();
                        };

                        mp.ActionPopUpButtons.Clear();
                        mp.ActionPopUpButtons.Add(btnHide);
                        mp.ActionPopUpButtons.Add(btnComplete);

                        mp.Show();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButton.OKCancel);
                    }
                });
            }

            this.googleMapControl.DefaultZoomLevel = 14;
        }
 public void ShowPhoto(IMobeelizerFile photo)
 {
     MessagePrompt showPhoto = new MessagePrompt();
     showPhoto.ActionPopUpButtons.Clear();
     showPhoto.Body = new PhotoControl(photo);
     showPhoto.Show();
 }
Example #26
0
 void ShowSaveDialog()
 {
     confirmPopupOpened = true;
     MessagePrompt prompt = new MessagePrompt();
     ConfirmationPage page = new ConfirmationPage(AppResources.ConfirmSaveText);
     page.Closed += (o, e) =>
     {
         confirmPopupOpened = false;
         prompt.Hide();
     };
     prompt.Completed += (o, e) =>
     {
         confirmPopupOpened = false;
     };
     page.Confirmed += (o, e) =>
     {
         confirmPopupOpened = false;
         prompt.Hide();
         EmulatorSettings.Current.HideConfirmationDialogs = page.DoNotShowAgain;
         this.m_d3dBackground.SaveState();
     };
     prompt.Body = page;
     prompt.ActionPopUpButtons.Clear();
     prompt.Overlay = new SolidColorBrush(Color.FromArgb(155, 41, 41, 41));
     prompt.Show();
 }
Example #27
0
        private void popupSubjectButton_Click(object sender, System.Windows.Input.GestureEventArgs e)
        {
            popup_edit_delete popup = new popup_edit_delete();
            popup.BtnDelete.Click += new RoutedEventHandler(deleteSubjectButton_Click);

            edit_delete_popup = new MessagePrompt();
            edit_delete_popup.Title = "Studentus";
            edit_delete_popup.Body = popup;
            edit_delete_popup.Show();
           
            var su = sender as TextBlock;
            this.sub = (StudentusDB.Model.Subject)su.DataContext;

        }
Example #28
0
        void Response_Completed(IAsyncResult result)
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)result.AsyncState;
                HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result);
                System.IO.StreamReader respStreamReader = new System.IO.StreamReader(response.GetResponseStream());
                string responseString = respStreamReader.ReadToEnd();
                respStreamReader.Close();
                response.Close();
                Deployment.Current.Dispatcher.BeginInvoke(() =>
                {
                    progressOverlay.Hide();
                    String resp_msg = "";
                    try
                    {
                        if (responseString.Equals("0"))
                            resp_msg = temp + " Is not registered for DND";
                        else if (responseString.Equals("1"))
                            resp_msg = temp + " Is registered for Do not Distrub service";
                        else if (responseString.Equals("-1"))
                            resp_msg = "There were some issues with your internet connection!";
                        else if (responseString.Equals("404"))
                            resp_msg = "Sorry for the inconvenience,Something went wrong! We will fix this bug in next version";
                        else if (responseString.Equals("400"))
                            resp_msg = "We have Overwhelming requests at this time,Please try later.Sorry for the inconvenience";
                    }
                    catch (NullReferenceException e)
                    {

                    }
                    App.resp_msg = resp_msg;
                    MessagePrompt messagePrompt = new MessagePrompt();
                    messagePrompt.Body = new BodyUserControl();
                    messagePrompt.Show();

                });
            }
            catch (Exception e)
            {
                Exception exception = e;
                base.Dispatcher.BeginInvoke(() =>
                {
                    if (exception.Message == "The remote server returned an error: NotFound.")
                    {
                        MessageBox.Show("No internet connectivity ,Make sure your data connection is turned on");
                    }
                });
            }
        }
 private void OnInfoClicked(object sender, EventArgs e)
 {
     MessagePrompt messagePrompt = new MessagePrompt();
     messagePrompt.Title = wp7_api_demos.Resources.ResourceDictionary.dialogConflictsSyncTitle;
     messagePrompt.Body = new ConflictInfoMessage();
     messagePrompt.Show();
 }
Example #30
0
 private void show_captcha()
 {
     MessagePrompt messagePrompt = new MessagePrompt();
     messagePrompt.Title = "Enter Captcha";
     messagePrompt.Body = new Captcha();
     messagePrompt.Completed += messagePrompt_Completed;
     messagePrompt.IsCancelVisible = true;
     messagePrompt.Show();
 }