private void Run_Click(object sender, EventArgs e)
        {
            var ip = new InputPrompt {Title = "Input string"};
            ip.Completed += (s, ev) => {
                var result = ev.Result;
                var output = new StringBuilder();

                var bf = new Brainfuck(
                    Code.Text,
                    c => output.Append(c),
                    () => {
                        if (result != string.Empty) {
                            var next = result[0];
                            result = result.Substring(1);
                            return next;
                        } else {
                            return (char) 0;
                        }
                    },
                    trace => MessageBox.Show(trace, "Debug trace", MessageBoxButton.OK)
                );

                try {
                    bf.Run();
                    MessageBox.Show(output.ToString(), "Output", MessageBoxButton.OK);
                } catch (ArgumentException ae) {
                    MessageBox.Show(ae.Message, "Error", MessageBoxButton.OK);
                } catch (IndexOutOfRangeException iore) {
                    MessageBox.Show("You exceeded the limit of memory or stack.", "Error", MessageBoxButton.OK);
                }
            };
            ip.Show();
        }
 private void ApplicationBarIconButton_Click_1(object sender, EventArgs e)
 {
     Coding4Fun.Phone.Controls.InputPrompt ip = new Coding4Fun.Phone.Controls.InputPrompt();
     ip.Completed += input_Completed;
     ip.Title = "New Note";
     ip.Message = "Enter the text content of the new note :";
     ip.Show();
 }
 private void changeCallsign()
 {
     InputPrompt input = new InputPrompt();
     input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(changeCallsign_Completed);
     input.Title = "Change Callsign";
     input.InputScope = new InputScope { Names = { new InputScopeName() { NameValue = InputScopeNameValue.LogOnName } } };
     input.Value = callsign;
     input.Show();
 }
 /**
  * Button Add Click handler
  *
  */
 private void AddTaskList(object sender, EventArgs e)
 {
     InputPrompt input = new InputPrompt()
     {
         Title = "Create Task List",
         Message = "Title",
         IsCancelVisible = true
     };
     input.Completed += inputAdd_completed;
     input.Show();
 }
		private void InputClick(object sender, RoutedEventArgs e)
		{
			var input = new InputPrompt
			{
				Title = "Basic Input",
				Message = "I'm a basic input prompt" + LongText,
			};

			input.Completed += PopUpPromptStringCompleted;

			input.Show();
		}
		private void InputNoEnterClick(object sender, RoutedEventArgs e)
		{
			var input = new InputPrompt
			{
				Title = "Enter won't submit",
				Message = "Enter key won't submit now",
				IsSubmitOnEnterKey = false
			};

			input.Completed += PopUpPromptStringCompleted;

			input.Show();
		}
		private void InputLongMsgClick(object sender, RoutedEventArgs e)
		{
			var input = new InputPrompt
			{
				Title = "Basic Input",
				Message = LongText,
				MessageTextWrapping = TextWrapping.Wrap
			};

			input.Completed += PopUpPromptStringCompleted;

			input.Show();
		}
		private void InputAdvancedClick(object sender, RoutedEventArgs e)
		{
			var input = new InputPrompt
			{
				Title = "TelephoneNum",
				Message = "I'm a message about Telephone numbers!",
				Background = _naturalBlueSolidColorBrush,
				Foreground = _aliceBlueSolidColorBrush,
				Overlay = _cornFlowerBlueSolidColorBrush,
				IsCancelVisible = true
			};

			input.Completed += PopUpPromptStringCompleted;

			input.InputScope = new InputScope { Names = { new InputScopeName { NameValue = InputScopeNameValue.TelephoneNumber } } };
			input.Show();
		}
Exemple #9
0
        private void cmdNewGroup_Click(object sender, EventArgs e)
        {
            var dlgNewGroup = new InputPrompt
            {
                Message = Properties.Resources.PromptName,
                Title = Properties.Resources.NewGroupTitle,
            };
            dlgNewGroup.Completed += dlgNewGroup_Completed;

            dlgNewGroup.Show();
        }
Exemple #10
0
        private void EditTodoItemAction(Task task)
        {
            _currentTask = task;

            var input = new InputPrompt();

            input.IsCancelVisible = true;
            input.Completed += input_Completed;
            input.Value = task.Description;
            input.Title = "Edit description";

            input.Show();
        }
        public void viewModel_OnSelectedItemChanged(object sender, EventArgs e)
        {
            if (viewModel.SelectedApplication != null)
            {
                KeyAction action = viewModel.SelectedApplication.action;
                InteropSvc.InteropLib.Initialize();

                if (action.type != KeyAction.ActionType.ACTION_URL)
                {
                    InteropSvc.InteropLib.Instance.RegistrySetDWORD7(InteropSvc.InteropLib.HKEY_LOCAL_MACHINE, "Software\\OEM\\WebSearchOverride", "ActionType", (int)action.type);
                }
                if (action.type == KeyAction.ActionType.ACTION_RUNAPPLICATION)
                {
                    InteropSvc.InteropLib.Instance.RegistrySetString7(InteropSvc.InteropLib.HKEY_LOCAL_MACHINE, "Software\\OEM\\WebSearchOverride", "Uri", action.uri);
                }
                else if (action.type == KeyAction.ActionType.ACTION_URL)
                {
                    System.Text.StringBuilder sb = new System.Text.StringBuilder(300);
                    try
                    {
                        InteropSvc.InteropLib.Instance.RegistryGetString7(InteropSvc.InteropLib.HKEY_LOCAL_MACHINE, "Software\\OEM\\WebSearchOverride", "Url", sb, 300);
                    }
                    catch (Exception ex)
                    {

                    }
                    InputPrompt input = new InputPrompt();
                    input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
                    input.Title = LocalizedResources.CustomUrl;
                    input.Message = LocalizedResources.CustomUrlText;
                    input.Value = sb.ToString();
                    input.InputScope = new InputScope { Names = { new InputScopeName() { NameValue = InputScopeNameValue.Url } } };
                    input.Show();

                }
                else if (action.type == KeyAction.ActionType.ACTION_KEYEVENT)
                {
                    InteropSvc.InteropLib.Instance.RegistrySetDWORD7(InteropSvc.InteropLib.HKEY_LOCAL_MACHINE, "Software\\OEM\\WebSearchOverride", "KeyCode", (int)action.KeyCode);
                }

                InteropSvc.InteropLib.Instance.ApplySkSettings();
            }
        }
 private void ToCurrencyListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     CurrencyWapper selectedItem = this.ToCurrencyListBox.SelectedItem as CurrencyWapper;
     if (selectedItem != null)
     {
         this.tempCurrencyWapperForEdit = selectedItem;
         InputPrompt prompt2 = new InputPrompt
         {
             InputScope = MoneyInputTextBox.NumberInputScope
         };
         InputPrompt prompt = prompt2;
         prompt.Completed += new System.EventHandler<PopUpEventArgs<string, PopUpResult>>(this.rateInputBox_Completed);
         prompt.Title = this.editPivotTitle;
         prompt.Message = this.editRateFormatter.FormatWith(new object[] { this.tempFromCurrencyWapper.CurrencyNameWithSymbol, this.tempCurrencyWapperForEdit.CurrencyNameWithSymbol });
         this.tempValue = this.tempCurrencyWapperForEdit.RateToCompareToCurrency;
         prompt.Value = this.tempValue;
         prompt.Show();
         this.ToCurrencyListBox.SelectedItem = null;
     }
 }
 private void RenameButton_Click(object sender, EventArgs e)
 {
     Coding4Fun.Phone.Controls.InputPrompt p = new InputPrompt();
     p.Title = "New Name...";
     p.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(p_Completed);
     p.Show();
 }
 private void EnviarParaPaginaDeGameOver()
 {
     if (TopUsers.EstaEntreTops(DefinicaoEstagio.PontuacaoTotal))
     {
         InputPrompt input = new InputPrompt();
         input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
         input.Title = "Game Over";
         input.Message = "Congratulations. Please, type your nickname to appear in the raking.";
         input.Show();
     }
     else
     {
         NavigationService.Navigate(new Uri("/Ranking.xaml", UriKind.Relative));
     }
 }
 /**
  * Input Add Prompt completed handler
  *
  */
 private void inputAdd_completed(object sender, PopUpEventArgs<string, PopUpResult> e)
 {
     if (e.PopUpResult == PopUpResult.Ok)
     {
         if (e.Result.Length > 1)
         {
             progressBar.IsIndeterminate = true;
             _taskComponent.InsertTaskList(response =>
             {
                 progressBar.IsIndeterminate = false;
                 if (response.Data == null)
                 {
                     MessageBox.Show("An error occured, please try again", "TaskList", MessageBoxButton.OK);
                     return;
                 }
             }, new TaskList() { Title = e.Result });
         }
         else
         {
             InputPrompt input = new InputPrompt()
             {
                 Title = "Create Task List",
                 Message = "Title",
                 Value = e.Result,
                 IsCancelVisible = true
             };
             input.Completed += inputAdd_completed;
             input.Show();
         }
     }
 }
 /**
  * Button Edit Click handler
  *
  */
 private void EditTaskList(object sender, RoutedEventArgs e)
 {
     TaskList taskList = (sender as Button).DataContext as TaskList;
     ListBoxItem pressedItem = this.listBox.ItemContainerGenerator.ContainerFromItem(taskList) as ListBoxItem;
     if (pressedItem != null)
     {
         InputPrompt input = new InputPrompt()
         {
             Title = "Edit Task List",
             Message = "Title",
             IsCancelVisible = true,
             Value = taskList.Title
         };
         input.Completed += (object obj, PopUpEventArgs<string, PopUpResult> args) =>
         {
             if (args.PopUpResult == PopUpResult.Ok && args.Result.Length > 1)
             {
                 progressBar.IsIndeterminate = true;
                 // start update request
                 _taskComponent.UpdateTaskList(response =>
                 {
                     progressBar.IsIndeterminate = false;
                     if (response.Data == null)
                     {
                         MessageBox.Show("An error occured, please try again", "TaskList", MessageBoxButton.OK);
                         return;
                     }
                     taskList.Title = args.Result;
                 }, new TaskList() { Id = taskList.Id, Title = args.Result });
             }
         };
         input.Show();
     }
 }
 private void changeInterval()
 {
     InputPrompt input = new InputPrompt();
     input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(changeInterval_Completed);
     input.Title = "Change Update Interval";
     input.Message = "(seconds)";
     input.InputScope = new InputScope { Names = { new InputScopeName() { NameValue = InputScopeNameValue.Digits } } };
     input.Value = (interval/1000).ToString();
     input.Show();
 }
 /// <summary>
 /// 评论点击 回复该评论
 /// </summary>
 private void list_Comment_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     //登陆判断
     if ( this. catalog != ( int ) CommentType. News && Tool. CheckLogin( ) == false )
     {
         //无法发表评论
     }
     else
     {
         CommentUnit c = this. list_Comment. SelectedItem as CommentUnit;
         this. list_Comment. SelectedItem = null;
         if ( c != null )
         {
             InputPrompt input = new InputPrompt
             {
                 Title = "回复这条评论",
                 Message = c. content,
                 IsCancelVisible = true,
                 IsSubmitOnEnterKey = false,
                 Value = Config. GetCache_CommentReply( this. id, c. id ),
             };
             input. OnValueChanged += (s, e1) =>
             {
                 Config. SaveCache_CommentReply( e1. Text, this. id, c. id );
             };
             input. Completed += (s, e1) =>
             {
                 if ( e1. PopUpResult == PopUpResult. Ok )
                 {
                     Dictionary<string, object> parameters = null;
                     if ( this. catalog != ( int ) CommentType. Blog )
                     {
                         parameters = new Dictionary<string, object>
                     {
                         {"catalog", this.catalog},
                         {"id", this.id},
                         {"replyid",c.id},
                         {"authorid", c.authorID},
                         {"uid",Config.UID},
                         {"content", e1.Result},
                     };
                     }
                     else
                     {
                         parameters = new Dictionary<string, object>
                             {
                                 {"blog", this.id},
                                 {"uid",Config.UID},
                                 {"content",e1.Result},
                                 {"reply_id",c.id},
                                 {"objuid",c.authorID},
                             };
                     }
                     PostClient client = Tool. SendPostClient( this. catalog == ( int ) CommentType. Blog ? Config. api_blogcomment_pub : Config. api_comment_reply, parameters );
                     client. DownloadStringCompleted += (s1, e2) =>
                     {
                         if ( e2. Error != null )
                         {
                             System. Diagnostics. Debug. WriteLine( "回复评论时网络错误: {0}", e2. Error. Message );
                             return;
                         }
                         ApiResult result = Tool. GetApiResult( e2. Result );
                         if ( result != null )
                         {
                             switch ( result. errorCode )
                             {
                                 case 1:
                                     Config. SaveCache_CommentReply( null, this. id, c. id );
                                     this. listBoxHelper. Refresh( );
                                     break;
                                 case -1:
                                 case -2:
                                 case 0:
                                     MessageBox. Show( result. errorMessage, "温馨提示", MessageBoxButton. OK );
                                     break;
                             }
                         }
                     };
                 }
             };
             input. Show( );
         }
     }
 }
Exemple #19
0
 private void icon_Comment1_Click(object sender, EventArgs e)
 {
     if ( this.IsEnabled == false )
     {
         return;
     }
     if ( this. DetailType != Model. AppOnly. DetailType. News && Tool. CheckLogin( ) == false )
     {
         //无法发表评论
     }
     else
     {
         string title, author, url, id;
         int commentCount;
         if ( GetUrl_Title_Author_CommentCount( out id, out url, out title, out author, out commentCount ) )
         {
             InputPrompt input = new InputPrompt
             {
                 Title = "发表评论",
                 Message = string. Format( "对 {0}", title ),
                 IsCancelVisible = true, 
                  IsSubmitOnEnterKey = false,
             };
             //验证缓存
             Dictionary<string, string> cacheCommentPub = Config. Cache_CommentPub;
             input. Value = cacheCommentPub. ContainsKey( string. Format( "{0}_{1}", this. DetailType, id ) ) ? cacheCommentPub[ string. Format( "{0}_{1}", this. DetailType, id ) ] : string. Empty;
             input. OnValueChanged += (s, e1) =>
                 {
                     Dictionary<string, string> cacheCommentsPub = Config. Cache_CommentPub;
                     cacheCommentsPub[ string. Format( "{0}_{1}", this. DetailType, id ) ] = e1. Text;
                     Config. Cache_CommentPub = cacheCommentsPub;
                 };
             if ( this.DetailType == Model.AppOnly.DetailType.Tweet )
             {
                 input. Message = string. Empty;
             }
             input. Completed += (s, e1) =>
                 {
                     if ( e1.PopUpResult == PopUpResult.Ok )
                     {
                         if ( e1.Result.Length == 0 )
                         {
                             MessageBox. Show( "发表的评论内容不能为空" );
                             return;
                         }
                         Dictionary<string, object> parameters = null;
                         if ( this. DetailType != Model. AppOnly. DetailType. Blog )
                         {
                             parameters = new Dictionary<string, object>
                                 {
                                     {"catalog", this.GetPubCommentType},
                                     {"id", id},
                                     {"uid", Config.UID},
                                     {"content", e1.Result},
                                     //{"isPostToMyZone", this.DetailType == CommentType.Tweet ? ((bool)this.checkResendToZone.IsChecked ? "1" : "0" ): "0"},
                                     {"isPostToMyZone","1"},
                                 };
                         }
                         else
                         {
                             parameters = new Dictionary<string, object>
                                 {
                                     {"blog", id},
                                     {"uid", Config.UID},
                                     {"content", e1.Result},
                                 };
                         }
                         PostClient client = Tool. SendPostClient( this. DetailType == Model. AppOnly. DetailType. Blog ? Config. api_blogcomment_pub : Config. api_comment_pub, parameters );
                         client. DownloadStringCompleted += (s1, e2) =>
                             {
                                 if ( e2. Error != null )
                                 {
                                     System. Diagnostics. Debug. WriteLine( "发表评论时网络错误: {0}", e2. Error. Message );
                                     return;
                                 }
                                 ApiResult result = Tool. GetApiResult( e2. Result );
                                 if ( result != null )
                                 {
                                     switch ( result. errorCode )
                                     {
                                         case 1:
                                             //进入评论列表页  改变 pivot 的 selectIndex
                                             if ( Config.Cache_CommentPub.ContainsKey(string.Format("{0}_{1}", this.DetailType, id)) )
                                             {
                                                 Config. Cache_CommentPub. Remove( string. Format( "{0}_{1}", this. DetailType, id ) );
                                             }
                                             this. icon_Refresh_Click( null, null );
                                             if ( this.pivot.SelectedIndex != 1 )
                                             {
                                                 this. pivot. SelectedIndex = 1;
                                             }
                                             break;
                                         case 0:
                                         case -1:
                                         case -2:
                                             MessageBox. Show( result. errorMessage, "温馨提示", MessageBoxButton. OK );
                                             break;
                                     }
                                 }
                             };
                     }
                 };
             input. Show( );
         }
     }
 }
Exemple #20
0
 private void dt_Tick(object sender, EventArgs e)
 {
     try
     {
         FrameworkDispatcher.Update();
     }
     catch
     {
     }
     this.TB_Time.set_Text(DateTime.get_Now().ToString("hh:mm"));
     this.TB_Second.set_Text(DateTime.get_Now().ToString("ss") ?? "");
     this.TB_TimeOfDay.set_Text(TimeOfDay.GetTimeOfDay(DateTime.get_Now()));
     if (this.isMatch)
     {
         TimeSpan span = DateTime.get_Now() - this._matchStartTime;
         if (span.get_TotalSeconds() > 15.0)
         {
             if (this.marks.IsMarked(this.max_DB))
             {
                 this.stopMeasure();
                 InputPrompt prompt = new InputPrompt();
                 prompt.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(this, this.input_Completed);
                 prompt.Title = "请输入你的昵称:";
                 prompt.Message = "本次最高为 " + this.max_DB.ToString("f1") + " dB\n你已经创造了一条记录!";
                 prompt.Show();
             }
             else
             {
                 MessageBox.Show("本次最高为 " + this.max_DB.ToString("f1") + " dB");
                 this.min_DB = this.buffMinDB;
                 this.max_DB = this.buffMaxDB;
                 this.isMatch = false;
                 this.update();
             }
         }
     }
 }
        private void saveButton_Click(object sender, System.EventArgs e)
        {

            stopButton_Click(null,null);

            // TODO: Add event handler implementation here.
            if (stream.GetBuffer().Length == 0)
            {
                MessageBox.Show("You must first record a sound before you try to save it");
                return;
            }
            IsolatedStorageFile isf = Utilities.IsoStore;

            if (!isf.DirectoryExists("sounds")) isf.CreateDirectory("sounds");

            InputPrompt input = new InputPrompt();
            input.Completed += (s, e2) =>
            {
                IsolatedStorageFileStream localstream = isf.CreateFile(Path.Combine("sounds", e2.Result + ".wav"));
                localstream.Write(stream.GetBuffer(), 0, stream.GetBuffer().Length);
                localstream.Flush();
                localstream.Close();
            };
            input.Title = "Filename";
            input.Message = "Write the filename of the sound";
            input.Show();

        }
        private void RealizarDestruicao()
        {
            DestruirBlocosEmDestaque();
            ReorganizarTela();
            ReorganizarColunas();

            if (!ValidarSeAindaPodeJogar())
            {
                if (Ranking.EstaEntreTops(nota))
                {
                    InputPrompt input = new InputPrompt();
                    input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
                    input.Title = "Congratulations";
                    input.Message = "Now you're in the rank. Please, type your nickname\n to appear in the raking.";
                    input.Show();
                }
                else
                {
                    MessageBox.Show("Your score was not  so high. Try again.", "Game Over", MessageBoxButton.OK);
                    NavigationService.Navigate(new Uri("/GameOver.xaml", UriKind.Relative));
                }
            }
        }
Exemple #23
0
 private void RenameListEntry(object sender, ListBox list)
 {
     ListBoxItem contextMenuListItem = list.ItemContainerGenerator.ContainerFromItem((sender as MenuItem).DataContext) as ListBoxItem;
     ROMDBEntry re = contextMenuListItem.DataContext as ROMDBEntry;
     InputPrompt prompt = new InputPrompt();
     prompt.Completed += (o, e2) =>
     {
         if (e2.PopUpResult == PopUpResult.Ok)
         {
             if (String.IsNullOrWhiteSpace(e2.Result))
             {
                 MessageBox.Show(AppResources.RenameEmptyString, AppResources.ErrorCaption, MessageBoxButton.OK);
             }
             else
             {
                 if (e2.Result.ToLower().Equals(re.DisplayName.ToLower()))
                 {
                     return;
                 }
                 if (this.db.IsDisplayNameUnique(e2.Result))
                 {
                     re.DisplayName = e2.Result;
                     this.db.CommitChanges();
                     FileHandler.UpdateROMTile(re.FileName);
                 }
                 else
                 {
                     MessageBox.Show(AppResources.RenameNameAlreadyExisting, AppResources.ErrorCaption, MessageBoxButton.OK);
                 }
             }
         }
     };
     prompt.Title = AppResources.RenamePromptTitle;
     prompt.Message = AppResources.RenamePromptMessage;
     prompt.Value = re.DisplayName;
     prompt.Show();
 }
 private void settingButton_Click(object sender, System.EventArgs e)
 {
     InputPrompt prompt = new InputPrompt
     {
         Message = this.GetLanguageInfoByKey("TipsWhenSetSafeModeIP").Replace("$Line$", "\r\n"),
         Value = "192.168.1.5:10010",
         IsCancelVisible = true,
         IsSubmitOnEnterKey = true
     };
     prompt.Completed += new System.EventHandler<PopUpEventArgs<string, PopUpResult>>(this.ip_Completed);
     prompt.Show();
 }
        private void commandsMainListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DeviceCommandViewModel vm = commandsMainListBox.SelectedItem as DeviceCommandViewModel;
            if (vm != null)
            {

                if (vm.name.StartsWith("TURN"))
                {
                    App.Client.DeviceCommand(this.model.id, vm.name, 0, vm.type);
                }
                else
                {
                    Coding4Fun.Phone.Controls.InputPrompt prompt = new InputPrompt();
                    prompt.Title = "What value would you like to set?";
                    prompt.Message = "New setting:";
                    prompt.InputScope = new InputScope { Names = { new InputScopeName() { NameValue = InputScopeNameValue.Number } } };
                    prompt.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(prompt_Completed);
                    prompt.Show();
                }
            }
        }
        private void Update(TimeSpan elapsedTime)
        {
            if (_inputToUserExibindo)
                return;

            if (!_jogoComecou)
                return;

            if (_tempoEsgotou)
            {
                AppLevel.PontuacaoTotal += this.pontuacaoAtual;
                if (AppLevel.LevelAtual <= 3)
                {
                    MessageBox.Show("Tap at screen when see three pictures at same time.\nAre you prepare to next level?", "next level", MessageBoxButton.OK);
                    AppLevel.LevelAtual++;
                    IniciarJogo();
                }
                else
                {
                    _inputToUserExibindo = true;

                    if (Ranking.EstaEntreTops(GerarUsuario()))
                    {
                        InputPrompt input = new InputPrompt();
                        input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
                        input.Title = "Game Over";
                        input.Message = "Congratulations. Please, type your nickname\n to appear in the raking.";
                        input.Show();
                    }
                    else
                    {
                        NavigationService.Navigate(new Uri("/GameOver.xaml", UriKind.Relative));
                    }
                }

            }

            this.PlotarImagens();

            this.lblMinhaPontuacao.Text = pontuacaoAtual.ToString();
        }
Exemple #27
0
 private void Share_Click(object sender, RoutedEventArgs e)
 {
     InputPrompt prompt = new InputPrompt();
     prompt.Title = "Share with";
     prompt.Show();
     prompt.Completed += (s, args) =>
         {
             if(args.PopUpResult == PopUpResult.Ok)
             {
                 Dictionary<String,Object> data = new Dictionary<String, Object>();
                 data.Add("shared-with", args.Result);
                 CMClient.Instance().SendEvent("share", data, null);
             }
         };
 }
 private void metroFlow1_SelectionTap(object sender, SelectionTapEventArgs e)
 {
     InputPrompt input = new InputPrompt();
     input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
     input.Title = "Enter Name";
     input.Show();
 }
Exemple #29
0
        private void mnuRename_Click(object sender, RoutedEventArgs e)
        {
            var mnuRename = (MenuItem)sender;
            var group = (Group)mnuRename.Tag;

            var dlgRename = new InputPrompt
            {
                Tag = group,
                Value = group.Name,
                Title = Properties.Resources.RenameTitle,
                Message = Properties.Resources.PromptName,
            };

            dlgRename.Completed += dlgRename_Completed;

            dlgRename.Show();
        }
 private void DirecionarParaGameOver()
 {
     if (Ranking.EstaEntreTops(this._pontuacao))
     {
         InputPrompt input = new InputPrompt();
         input.Completed += new EventHandler<PopUpEventArgs<string, PopUpResult>>(input_Completed);
         input.Title = "Game Over";
         input.Message = "Congratulations. Please, type your nickname\n to appear in the raking.";
         input.Show();
     }
     else
     {
         NavigationService.Navigate(new Uri("/GameOver.xaml", UriKind.Relative));
     }
 }