public void WhenCheckMessageInInbox(string messageKey) { new MainPage(TestSetup.Driver) .ClickMessageCenterIcon(); var m = FeatureContext.Current.Get <Setup.Message>(messageKey); new MessageCenter(TestSetup.Driver) .EnterTopic(m.Topic); Poll("Wait for filtering to finish", 60, 5, () => new MessageCenter(TestSetup.Driver).TableSize, x => x == 1 ); new MessageCenter(TestSetup.Driver) .ClickFirstLink(); var popup = new PopupMessage(TestSetup.Driver); popup.Topic.ShouldBe(m.Topic); popup.Message.ShouldContain(m.Signature); popup.Dismiss(); }
private void OnWeiBoLogin(object sender, RoutedEventArgs e) { Hide(); LoadingIcon.Display(); AuthorizationHelper.Login(LoginType.Sina, null, loginSuccess => { if (loginSuccess) { PopupMessage.DisplayMessageInRes("LoginSuccess"); var info = StorageInfo.Instance.ZhiHuAuthoInfo; if (info == null) { return; } LLQNotifier.Default.Notify(new LoginEvent() { IsLogin = true, UserPhotoUrl = info.avatar }); } else { PopupMessage.DisplayMessageInRes("LoginFailed"); } LoadingIcon.Hide(); }); }
void onAskGiftSuccess(string jsonData) { enabled = true; Debug.Log("Send High Score Cache Service Success"); Dictionary <string, object> data = jsonData.dictionaryFromJson(); if (data.ContainsKey("reward")) { int rewardValue = Convert.ToInt32(data["reward"]); UserManagerCloud.Instance.CurrentUser.UserGoldCoins += rewardValue; UserCloud.Serialize(UserManagerCloud.FILE_NAME_LOCAL); GameObject TipObj = GameObject.Find("MFP Gift Panel Portrait/Tip1"); UILabel tipLabel = TipObj.GetComponent <UILabel>(); tipLabel.text = Language.Get("GIFT_SUCCESS_TIP") + "+" + rewardValue.ToString() + Language.Get("MFP_MALL_TAB_DIAMOND"); PopupMessage.Show(Language.Get("GIFT_SUCCESS_TIP") + "+" + rewardValue.ToString() + Language.Get("MFP_MALL_TAB_DIAMOND")); //fsm.SendEvent(NGuiPlayMakerProxy.GetFsmEventEnumValue(NGuiPlayMakerDelegates.OnClickEvent)); } else { GameObject TipObj = GameObject.Find("MFP Gift Panel Portrait/Tip1"); UILabel tipLabel = TipObj.GetComponent <UILabel>(); tipLabel.text = Language.Get("TIP_INVALID_GIFT_CODE"); } }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } }
public virtual DialogResult ShowDirectoryObjectPickerDialog(IWin32Window parentWindow) { try { return(_directoryObjectPicker.ShowDialog(parentWindow)); } catch (Exception e) { var popupController = CustomContainer.Get <Common.Interfaces.Studio.Controller.IPopupController>(); if (popupController != null) { var popupMessage = new PopupMessage { Description = Core.Error_Opening_Windows_Group_Picker, Image = MessageBoxImage.Error, Buttons = MessageBoxButton.OK, IsError = true, Header = @"Error" }; popupController.Show(popupMessage); } Dev2Logger.Error(@"Error opening group picker: ", e); } return(DialogResult.Cancel); }
private void textButtonOk_Click(object sender, EventArgs e) { try { _isOk = false; if (string.IsNullOrEmpty(textBoxInput.Text)) { PopupMessage.Popup(WinformRes.Input + ValidationRes.CannotBeNull); return; } if (VerificationRule.IsNullOrEmpty()) { _isOk = true; } else { _isOk = TextVerificationHelper.Verify(textBoxInput.Text, VerificationRule, VerificationParams); } if (_isOk) { _inputText = textBoxInput.Text; Close(); } } catch (Exception ex) { PopupMessage.Popup(ex.Message); } }
protected override void OnCantMove <T>(T component) { if (component.tag.Equals("Wall")) { Wall hitWall = component as Wall; hitWall.DamageWall(wallDamage); animator.SetTrigger("playerChop"); } else if (component.tag.Equals("BoneFire")) { Debug.Log(component.tag); BoneFire boneFire = component as BoneFire; animator.SetTrigger("playerChop"); SoundManager.instance.RandomizeSfx(eatSound1, eatSound2); Eat(); //SceneManager.LoadScene("Combat",LoadSceneMode.Additive); //boneFire.CoockMeat(this); } else if (component.tag.Equals("Reproductor")) { Debug.Log(component.tag); Reproductor reproductor = component as Reproductor; animator.SetTrigger("playerChop"); //SoundManager.instance.RandomizeSfx(epicSaxGuy); gameController = GameObject.Find("GameController"); popupMessage = gameController.GetComponent <PopupMessage>(); popupMessage.Open(reproductor); } }
void OnClick() { /* * GameObject mallTableObj = GameObject.Find("MallDragPanel"); * //MallInitialization tableCom = mallTableObj.GetComponent<MallInitialization>(); * //tableCom.addDiamond("com.mfp.frozen.cash_30"); * mallTableObj.SendMessage("addDiamond", "com.mfp.frozen.cash_30"); * * return; */ GameObject diamondCellObj = transform.parent.gameObject; DiamondCell diamondCellCom = diamondCellObj.GetComponent <DiamondCell>(); int productID = diamondCellCom.diamondProductID; Debug.Log("Press item cell" + productID); bool purchaseSuccess = ItemModel.Instance.buyItem(productID); if (purchaseSuccess) { Debug.Log("Purchase Success!"); PopupMessage.Show(Language.Get("PURCHASE_ITEM_SUCCESS")); packageTableCom.UpdateContent(); } else { Debug.Log("Not enough diamond. Then jump to mall tab."); PopupMessage.Show(Language.Get("NOT_ENOUGH_DIAMOND")); MallTab mallTab = GameObject.Find("MallTabButton2").gameObject.GetComponent <MallTab>(); mallTab.OnClick(); } }
private void dgProductMaster_DoubleClick(object sender, EventArgs e) { ppMsg = new PopupMessage(); try { //ProductId = 0; if (dgProductMaster.CurrentRow.Index != -1 && dgProductMaster.CurrentRow.Cells[1].Value != null) { var lID = Convert.ToInt32(dgProductMaster.CurrentRow.Cells[0].Value); _entities = new TSEntities(); var data = _entities.tbl_ProductMaster.Where(x => x.id == lID).FirstOrDefault(); //clear(); txtpName.Text = data.p_Name; txtRate.Text = data.rate.ToString(); // ProductId = data.id; //btnSubmit.Text = "Update"; } } catch (Exception x) { ppMsg.infoMessage("Something went wrong. Contact your system administrator!"); } }
private async void ShareWeiBo(object sender, RoutedEventArgs e) { if (VM == null || VM.MainHtmlContent == null) { return; } Animator.Use(AnimationType.ZoomOutUp).SetDuration(TimeSpan.FromMilliseconds(800)).PlayOn(WeiboSharePopup, () => { WeiboSharePopup.IsOpen = false; var transform = (CompositeTransform)AnimUtil.PrepareTransform(WeiboSharePopup, typeof(CompositeTransform)); transform.CenterX = transform.CenterY = 0; transform.ScaleX = transform.ScaleY = 1; transform.TranslateX = transform.TranslateY = 0; WeiboSharePopup.Opacity = 1; }); WeiboSDKForWinRT.SdkNetEngine engine = new WeiboSDKForWinRT.SdkNetEngine(); var response = await engine.RequestCmd(WeiboSDKForWinRT.SdkRequestType.POST_MESSAGE, new WeiboSDKForWinRT.CmdPostMessage() { Status = PostMsg.Text }); if (response.errCode == WeiboSDKForWinRT.SdkErrCode.SUCCESS) { PopupMessage.DisplayMessageInRes("ShareSuccess"); } else { PopupMessage.DisplayMessageInRes("ShareFailed"); } }
private void SheetgridBind() { ppMsg = new PopupMessage(); try { int rowNo = 1; dgSheetMaster.AutoGenerateColumns = false; _entities = new TSEntities(); List <SheetMasterVM> modelList = new List <SheetMasterVM>(); var data = _entities.tbl_SheetMaster.OrderBy(x => x.sheetName); foreach (var item in data) { SheetMasterVM model = new SheetMasterVM(); model.rowNo = rowNo; model.sheetId = item.sheetId; model.sheetName = item.sheetName; modelList.Add(model); rowNo++; } dgSheetMaster.DataSource = modelList; lblTotalRows.Text = modelList.Count.ToString() + " Rows"; } catch (Exception x) { ppMsg.infoMessage("Something went wrong. Contact your system administrator!"); } }
void Update() { if (m_IsActive) { m_Radius -= RingReducitonRate * Time.deltaTime; if (m_Radius < 0.0f) { m_Radius = 0.0f; m_IsActive = false; } if (!m_WasPassed && HasPassed) { PopupMessage msg = new PopupMessage("JUMP!", "", 5.0f); PopupController.Main.PushImmediate(msg); } NonPassedMesh.SetActive(!HasPassed); PassedMesh.SetActive(HasPassed); m_WasPassed = HasPassed; if (ScaleWithRadius) { transform.localScale = new Vector3(m_Radius, 1.0f, m_Radius); } } }
public void Awake() { gameController = GameObject.Find("GameController"); popupMessage = gameController.GetComponent <PopupMessage>(); popupMessage.Close(); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); enemies = new List <Enemy>(); boardScript = GetComponent <BoardManager>(); if (MainMenu.loadBoolea) { LoadGame(); LoadPlayer(); } else { } InitGame(); }
public async void JoinCircle() { if (!AuthorizationHelper.IsLogin) { PopupMessage.DisplayMessageInRes("NeedLogin"); return; } if (Misc.ZhiHuCircleId.ToString() == CircleId && JoinCircleButtonIcon == _checkIcon) { PopupMessage.DisplayMessageInRes("CannotQuitZhiHuCircle"); return; } if (JoinCircleButtonIcon == _addIcon) { JoinCircleButtonIcon = _checkIcon; await DataRequester.JoinCircle(CircleId); PopupMessage.DisplayMessageInRes("JoinCircleSuccess"); } else { JoinCircleButtonIcon = _addIcon; await DataRequester.QuitCircle(CircleId); PopupMessage.DisplayMessageInRes("QuitCircleSuccess"); } }
public void SpawnPopupText(Vector3 position, int value, PopupType type, string op) { GameObject popupTransform = Instantiate(popupPrefab, position, Quaternion.identity); PopupMessage popup = popupTransform.GetComponent <PopupMessage>(); popup.Setup(value, type, op); }
public PopupMessage Insert(PopupMessage message) { try { connection.Open(); var cmd = connection.CreateCommand() as SqlCommand; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "PopUpMessage_Insert"; cmd.Parameters.Add(new SqlParameter("@startDate", message.StartDate)); cmd.Parameters.Add(new SqlParameter("@endDate", message.EndDate)); cmd.Parameters.Add(new SqlParameter("@shortTitle", message.ShortTitle)); cmd.Parameters.Add(new SqlParameter("@title", message.Title)); cmd.Parameters.Add(new SqlParameter("@description", message.Description)); if (message.ImageURL == null) { message.ImageURL = ""; } cmd.Parameters.Add(new SqlParameter("@imageUrl", message.ImageURL)); cmd.Parameters.Add(new SqlParameter("@regionId", message.RegionId)); var idParameter = new SqlParameter("@ID", SqlDbType.Int) { Direction = ParameterDirection.Output }; cmd.Parameters.Add(idParameter); cmd.ExecuteNonQuery(); connection.Close(); return(message); } catch (Exception ex) { throw ex; } }
private async void PostToCirclePage_Loaded(object sender, RoutedEventArgs arg) { LoadingIcon.Display(); OwnCircles = await DataRequester.GetOwnCircles(); if (OwnCircles.Circles != null && OwnCircles.Circles.Count > 0) { CurrentCircle = OwnCircles.Circles[0]; CurrentCircleBtn.Content = CurrentCircle.Name; OwnCircles.Circles.ForEach(circle => { var menuItem = new MenuFlyoutItem() { Text = circle.Name, Tag = circle }; menuItem.Click += (s, e) => { CurrentCircle = ((OwnCircleInfo)((MenuFlyoutItem)s).Tag); CurrentCircleBtn.Content = CurrentCircle.Name; }; CircleMenu.Items.Add(menuItem); }); } else if (_needCreateCircle) { LLQNotifier.Default.Notify(new StoryEvent() { Type = StoryEventType.CreateCircle }); PopupMessage.DisplayMessageInRes("NoCircle"); } LoadingIcon.Hide(); }
private void dgSheetMaster_DoubleClick(object sender, EventArgs e) { ppMsg = new PopupMessage(); try { if (dgSheetMaster.CurrentRow.Index != -1 && dgSheetMaster.CurrentRow.Cells[1].Value != null) { var SID = Convert.ToInt32(dgSheetMaster.CurrentRow.Cells[0].Value); if (!Dashboard.Instance.PnlContainer.Controls.ContainsKey("AddProduct_SheetUC")) { Dashboard.Instance.PnlContainer.Controls.Clear(); AddProduct_SheetUC un = new AddProduct_SheetUC(SID); un.Dock = DockStyle.Fill; Dashboard.Instance.PnlContainer.Controls.Add(un); } Dashboard.Instance.PnlContainer.Controls["AddProduct_SheetUC"].BringToFront(); Dashboard.Instance.BackButton.Visible = true; } } catch (Exception x) { ppMsg.infoMessage("Something went wrong. Contact your system administrator!"); } }
public ShellViewModel( INavigationService navigationService, IStorageService storageService, IAccountService authService, IApiHttpHelper httpHelper, Context context) { this.navigationService = navigationService; this.storageService = storageService; this.authService = authService; this.httpHelper = httpHelper; this.Context = context; var list = new List <MenuItem> { //new MenuItem //{ // Title = Constants.TextHome, // Icon = Constants.IconHome, // Type = typeof(HomePage) //}, new MenuItem { Title = Constants.TextFind, Icon = Constants.IconCategory, Type = typeof(CategoriesPage) }, new MenuItem { Title = Constants.TextSearch, Icon = Constants.IconFind, Type = typeof(FindPage) }, new MenuItem { Title = Constants.TextMine, Icon = Constants.IconMine, Type = typeof(MinePage) }, new MenuItem { Title = Constants.TextDownload, Icon = Constants.IconDownload, Type = typeof(DownloadPage) }, new MenuItem { Title = Constants.TextSetting, Icon = Constants.IconSetting, Type = typeof(SettingPage) }, }; Menu = new ObservableCollection <MenuItem>(list); this.Context.ShowMessageHandler += msg => { PopupMessage.ShowMessage(msg); }; }
void Update() { if (m_MessageQueue.Count != 0 && !Text.InUse) { PopupMessage message = m_MessageQueue.Dequeue(); Text.Push(message); } }
private void ButtonMergeSort_Click(object sender, RoutedEventArgs e) { if (MainWindowState.IsGeneratingArray) { var popup = new PopupMessage("Task is in progress", "Program is generating array. Please wait after progress finished!"); popup.ShowDialog(); return; } if (_ints.Length == 0) { var popup = new PopupMessage("The array is empty", "Please generate array before doing this!"); popup.ShowDialog(); return; } if (MainWindowState.IsLinearSearching) { var popup = new PopupMessage("Task is in progress", "Merge sort is in progress. Please wait after progress finished!"); popup.ShowDialog(); return; } void Action() { MainWindowState.IsMergeSorting = true; var a = new int[_ints.Length]; _ints.CopyTo(a, 0); var watch = new Stopwatch(); watch.Start(); Algorithms.MergeSort(a, 0, a.Length - 1); watch.Stop(); var content = string.Join(" ", a); File.WriteAllText($"{OutputPath}/MergeSort.txt", content); MainWindowState.IsMergeSorting = false; Dispatcher.Invoke(() => { var message = "Array was sorted!"; message += $"\nExecution time: {watch.ElapsedMilliseconds}ms"; var popup = new PopupMessage("Merge Sort Result", message); popup.ShowDialog(); }); } var task = new Task(Action); task.Start(); }
private void ButtonAuthorInfo_OnClick(object sender, RoutedEventArgs e) { var popup = new PopupMessage( "Application's info", "Seminar Data structure and Algorithms\nAuthor: Khiem Le\nWebsite: khiemle.dev" ); popup.ShowDialog(); }
private void TryPush() { if (PopupController.Main != null) { PopupMessage msg = new PopupMessage(Header, Message, Duration); PopupController.Main.Push(msg); Destroy(this); } }
public void Push(PopupMessage message) { HeaderText.text = message.Header; DecriptionText.text = message.Description; HeaderText.color = new Color(HeaderText.color.r, HeaderText.color.g, HeaderText.color.b, 1.0f); DecriptionText.color = new Color(DecriptionText.color.r, DecriptionText.color.g, DecriptionText.color.b, 1.0f); m_Timer = message.Duration + m_FadeDuration; }
internal static void AddPopup(GameContext gameContext, PopupMessage popup) { var container = GetPopupContainer(gameContext); var messages = container.popup.PopupMessages; messages.Add(popup); container.ReplacePopup(messages); ScreenUtils.TriggerScreenUpdate(gameContext); }
void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
static public void Show(string content) { GameObject messageObj = GameObject.Find("Popup Message Panel/Message Label"); UILabel labelCom = messageObj.GetComponent <UILabel>(); labelCom.text = content; PopupMessage messageCom = messageObj.GetComponent <PopupMessage>(); messageCom.messageFsm.SendEvent("ShowMessage"); }
private void ButtonSaveToFile_OnClick(object sender, RoutedEventArgs e) { if (MainWindowState.IsGeneratingArray) { var popup = new PopupMessage("Task is in progress", "Please wait after task is complete!"); popup.ShowDialog(); return; } if (MainWindowState.IsSavingFile) { var popup = new PopupMessage("Task is in progress", "Please wait after task is complete!"); popup.ShowDialog(); return; } if (_ints.Length == 0) { var popup = new PopupMessage("The array is empty", "Please generate array before doing this!"); popup.ShowDialog(); return; } var saveFileDialog = new SaveFileDialog { InitialDirectory = Environment.CurrentDirectory, Filter = "Text|*.txt", Title = "Save data to file" }; var result = saveFileDialog.ShowDialog(); if (result != true) { return; } var path = saveFileDialog.FileName; if (string.IsNullOrEmpty(path)) { return; } var content = string.Join(" ", _ints); void Action() { MainWindowState.IsSavingFile = true; File.WriteAllText(path, content); MainWindowState.IsSavingFile = false; } var task = new Task(Action); task.Start(); }
public PopupMessageCommand(PopupMessage instance, PopupType _type, string _message, string _title, PopupMessageCompleteDelegate[] completeCallbacks) { popupMessage = instance; type = _type; message = _message; title = _title; foreach (PopupMessageCompleteDelegate callback in completeCallbacks) { completeCallback += callback; } }
private void CreateCircle_Click(object sender, RoutedEventArgs e) { if (!AuthorizationHelper.IsLogin) { PopupMessage.DisplayMessageInRes("NeedLogin"); return; } LLQNotifier.Default.Notify(new StoryEvent() { Type = StoryEventType.CreateCircle }); }