/// <summary> /// Called when [flip message]. /// </summary> /// <param name="pageName">Name of the page.</param> private void OnFlipMessage(string pageName) { if (pageName == ViewTypes.ConversationDetailsView) { OpenConversationDetailsView(); } else if (pageName == ViewTypes.NegoitationDetailsView) { OpenNegotiationDetailsView(); } if (pageName == ViewTypes.RenameNegotiationConversationPopup) { var renamePopup = new PopUpWindow("Rename"); var renamNegConv = new RenamNegotiationConversation { DataContext = this.ViewModel }; renamePopup.Content = renamNegConv; renamePopup.CenterWindow(); renamePopup.ShowDialog(); } else if (pageName == ViewTypes.ApplicationSettingsPopup) { var renamePopup = new PopUpWindow("Application Settings"); var applicationSettings = new NegotiationApplicationSettings { DataContext = this.ViewModel }; renamePopup.Content = applicationSettings; renamePopup.CenterWindow(); renamePopup.ShowDialog(); } }
private void Button_AddLocalTrack_Click(object sender, RoutedEventArgs e) { PopUpWindow popUpWindow = new PopUpWindow(new UploadLocalTrackPage()); popUpWindow.ShowDialog(); LoadLocalTracks(); }
public void AssignIRB() { string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY00000017", targetStudy); var ActionsNav = new ActivitiesNav(); var AssignIRBPage = new AssignIRB("STUDY-" + targetStudy, "Assign IRB"); Store.LoginAsUser(Users.Irbd); var studyForReview = new CCElement(By.LinkText(targetStudy)); studyForReview.Click(); ActionsNav.LnkAssignIRB.Click(); AssignIRBPage.SwitchTo(); AssignIRBPage.SelIrbOffice.SelectOption("IRB 1"); AssignIRBPage.BtnOk.Click(); //AssignIRBPage.SwitchBackToParent(); PopUpWindow.SwitchTo(targetStudy); Wait.Until(h => new CCElement(By.LinkText("Assigned IRB office")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Assigned IRB office")).Exists, "Assigned IRB office not found for: " + targetStudy); }
public void SelectProperty(string name, Button openPopupWithThis) { var parentWindow = Web.PortalDriver.Title; Wait.Until(d => openPopupWithThis.Exists); openPopupWithThis.AsyncClick(); Thread.Sleep(2000); PopUpWindow.SwitchTo(Title); // Switch to the frame within this popup dialog Web.PortalDriver.SwitchTo() .Frame(Web.PortalDriver.FindElement(By.Id("ifrmAttributeTable"))); Wait.Until(d => new Container(By.Id("spanAttributeName")).Exists); var parsedName = name.Split('.'); var path = new String[parsedName.Length - 1]; Array.Copy(parsedName, path, parsedName.Length - 1); var propertyName = parsedName.Last(); foreach (var expander in path.Select(attr => new Button(By.XPath(String.Format("//*[@id='spanAttributeName' and text()='{0}']/../../td[1]/a", attr))))) { expander.Click(); } var property = new Container(By.XPath(String.Format("//*[@id='spanAttributeName' and text()='{0}']", propertyName))); property.Click(); // Switch back out of frame PopUpWindow.SwitchTo(Title); OkButton.Click(); PopUpWindow.SwitchTo(parentWindow); }
public void OpenPopUp(BaseUserControl control, string title = "Testing Window", int width = 300, int height = 300) { TryCatch.BeginTryCatch(new Action(() => { PopUpWindow ne = new PopUpWindow(control, title, width, height); ne.ShowDialog(); })); }
// TODO: 더 좋은 아이템 나올 확률 또는 아이템 2개 나올확률 추가. public void ResetCooltime() { // 관찰자들에게 Click 이벤트 메세지 송출 foreach (var target in _dataController.Observers) { ExecuteEvents.Execute <IEventListener>(target, null, (x, y) => x.OnObjClick(this)); } // 버튼 활성화 시 if (!Btn) { return; } // 세트 아이템 랜덤 생성 var id = Random.Range(4001, 4059); while (id % 5 == 0) { id = Random.Range(4001, 4059); } // 도감에 등록만 되면 됨 _dataController.InsertNewItem(id); AudioManager.Instance.ItemSound(); PopUpWindow.Alert("[서적] " + DataDictionary.Instance.FindItemDic[id].Name + " 획득"); LeftTimer = _reducedCooltime; Btn.enabled = false; }
public void ShowPopup(PopUpWindow popup) { var alert = new AlertDialog.Builder(Forms.Context); var edit = new EditText(Forms.Context) { Text = popup.Text }; alert.SetView(edit); alert.SetTitle(popup.Title); alert.SetPositiveButton("OK", (senderAlert, args) => { popup.OnPopupClosed(new PopUpWindowArgs { Button = "OK", Text = edit.Text }); }); alert.SetNegativeButton("Cancel", (senderAlert, args) => { popup.OnPopupClosed(new PopUpWindowArgs { Button = "Cancel", Text = edit.Text }); }); alert.Show(); }
protected void DisplayFailedValidationResults(string failedValidtionsList) { PopUpWindow.ErrorWindow( this.LocalizationService.Translate("Validation error"), this.LocalizationService.Translate("Validation failed") + ":" + Environment.NewLine + Environment.NewLine + failedValidtionsList); }
private void DoSearch(object obj) { //long gid = (long)Convert.ToDouble(_searchParam); //Nadji u stablu entitet koji ti treba na osnovu _search param try { TreeNode <NodeData> node = _tree.Where(x => x.Data.IdentifiedObject.Name == SearchParameter).ToList().First(); if (node != null && node.Data.Type != DMSType.DISCRETE && node.Data.Type != DMSType.ANALOG) { double lon = getLongitude(node); double lat = getLatitude(node); Location pinLocation = new Location(lon, lat); _map.ZoomLevel = 23; // _map.Center = pinLocation; _gisTextBlock.Text = String.Empty; _gisTextBlock.Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#FF0398E2")); _gisTextBlock.AppendText(BuildToolTipOnClick(node)); } else { PopUpWindow popUpWindow = new PopUpWindow("Element with selected name does not exist."); popUpWindow.ShowDialog(); } } catch { PopUpWindow popUpWindow = new PopUpWindow("Element with selected name does not exist."); popUpWindow.ShowDialog(); } }
public void AssignPrimaryContact() { string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY00000017", targetStudy); var ActionsNav = new ActivitiesNav(); var workspace = new IRBWorkspace(); var SelectPersonPage = new SelectPerson("Person"); Store.LoginAsUser(Users.Irbd); var studyForReview = new CCElement(By.LinkText(targetStudy)); studyForReview.Click(); var assignPrimaryContact = new AssignPrimaryContact(workspace.GetStudyID(), "Assign Primary Contact"); ActionsNav.LnkAssignPrimaryContact.Click(); assignPrimaryContact.SwitchTo(); PopUpWindow.SwitchTo("Execute \"Assign Primary Contact\"", true); assignPrimaryContact.SelectPrimaryContact("Bivens (pi2)"); PopUpWindow.SwitchTo(targetStudy); Wait.Until(h => new CCElement(By.LinkText("Assigned Primary Contact")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Assigned Primary Contact")).Exists, "Assigned primary contact not found for: " + targetStudy); }
public void OnClickItemButton() { if (stageInfo == null) { return; } PopUpWindow popUpWindow = UIManager.Instance.PopUpWindow; popUpWindow.OpenTextWindow(""); popUpWindow.SetButtonValues(null, null, "Close", delegate { UIManager.Instance.CloseCurrentWindow(); }); popUpWindow.textField.text = ""; popUpWindow.textField.fontSize = 18; popUpWindow.textField.paragraphSpacing = 8; popUpWindow.textField.alignment = TextAlignmentOptions.Left; int sum = 0; stageInfo.archetypeDropList.ForEach(x => sum += x.weight); popUpWindow.textField.text += "<b>Archetype Drops</b>\n"; foreach (WeightBase archetypeDrop in stageInfo.archetypeDropList.OrderBy(x => x.weight).ToList()) { string name = LocalizationManager.Instance.GetLocalizationText_ArchetypeName(archetypeDrop.idName); popUpWindow.textField.text += ((float)archetypeDrop.weight / sum).ToString("p1") + "<indent=6em>" + name + "</indent>\n"; } }
public void PendingReuests() { _pendingRequestList = new List <Request>(); PopUpWindow wnd = new PopUpWindow(); onProcess(wnd, "Loading Data Please wait....", true); //string extra = "https://jira.ncr.com/rest/api/2/search?jql=project%20%3D%20HYDHKTN%20AND%20status%20%3D%20\"Not % 20Started\"%20"; RestClient rClientPending = new RestClient(); rClientPending.endPoint = "https://jira.ncr.com/rest/api/2/search?jql=project%20%3D%20HYDHKTN%20AND%20status%20%3D%20%22Not%20Started%22%20"; //rClientPending.after = "\"Not%20Started\"%20"; rClientPending.userName = MyCredentials.userID; rClientPending.userPassword = MyCredentials.Password; rClientPending.httpMethod = httpVerb.GET; string PendingstrResponse = rClientPending.makeRequest(); string PendingnewStrRwesponse = PendingstrResponse.Replace('\"', '\''); //debugOutput(newStrRwesponse); GlobalHakathon.ViewModel1.Root root2 = JsonConvert.DeserializeObject <GlobalHakathon.ViewModel1.Root>(PendingnewStrRwesponse); Request newRequest; foreach (var pendingresp in root2.issues) { newRequest = new Request(); newRequest.Summary = pendingresp.fields.summary; newRequest.RequestId = pendingresp.key; _pendingRequestList.Add(newRequest); } onProcess(wnd, "Loading Data Please wait....", false); }
public void Submit(List <string> errors) { foreach (string e in errors) { PopUpWindow.Display(e); } }
public async Task PopUpRoomInvite(string friendUID) { string userPath = "users/" + friendUID; DataSnapshot friendSnapshot = await FirebaseData.Instance.reference.Child(userPath).GetValueAsync(); string friendName = friendSnapshot.Child("username").Value.ToString(); PopUpWindow roomInvitePopup = PopUpsManager.Instance.GetPopUp("RoomInvitePopUp"); TextMeshProUGUI friendUsernameText = roomInvitePopup.transform.Find("FriendUsernameText").GetComponent <TextMeshProUGUI>(); friendUsernameText.text = friendName; roomInvitePopup.OpenPopUp(); Button acceptButton = roomInvitePopup.FindButton("AcceptButton"); if (joinFriendsLatestRoomListener != null) { roomInvitePopup.RemoveListener("AcceptButton", joinFriendsLatestRoomListener); } joinFriendsLatestRoomListener = async() => { await PhotonRooms.Instance.JoinFriendsLatestRoom(friendUID); }; roomInvitePopup.AddListener("AcceptButton", joinFriendsLatestRoomListener); }
/* * public delegate void PopUpWindowEvent(PopUpWindow pWindow, PopUpWindowEventType typeEvent); * protected List<PopUpWindowEvent> callBacks = new List<PopUpWindowEvent>(); * public void subscribeOnControllEvents(PopUpWindowEvent newCallBack) { callBacks.Add(newCallBack); } */ // здесь обрабатываются разные события под разные виды окнон public static void onWindow(PopUpWindow pWindow, PopUpWindowEventType eventType) { var typeCW = getTypeCurrentWindow(); if (/*ScenesController.currentScene == GameScene.RAFFLE && */ (typeCW == TypePopUpWindow.GOLD_EXCHANGE || typeCW == TypePopUpWindow.CRYSTALS_BUY)) { if (eventType == PopUpWindowEventType.PW_SHOW) { HUD.hideBuyBallBtn(); HUD.showBuyRubins(); if (typeCW == TypePopUpWindow.GOLD_EXCHANGE) { Tutorial.showFirst(TutorialSubject.TS_BUY_GOLD); // после отображения окна пытаемся показать обучающее сообщение обмена кристалов на золото } } else if (ScenesController.currentScene == GameScene.RAFFLE && eventType == PopUpWindowEventType.PW_HIDE) { MAIN main = MAIN.getMain; if (main.handlerServerData.isAvailableNextBall && main.raffle.raffleState == RaffleState.FINISH) { HUD.showBuyBallBtn(); } HUD.hideBuyRubins(); } } }
public void PrepareLetter() { string targetStudy = "AutoTest-" + DataGen.String(5); CloneEntity("STUDY-AutoTest-hWfUU", targetStudy); var ActionsNav = new ActivitiesNav(); var Inbox = new Inbox(); var finalizeDocumentsPage = new FinalizeDocuments(); //var prepareLetterPage = new PrepareLetterPopup(); //var sendLetterPage = new SendLetterPopup(); var IRBSubmissionPage = new IRBSubmissions(); var studyworkspace = new IRBWorkspace(); Store.LoginAsUser(Users.Irbd); ActionsNav.LnkSubmissions.Click(); IRBSubmissionPage.AllSubmissionsTab.NavigateTo(); IRBSubmissionPage.AllSubmissionsTab.ProjectsComponent.LnkAdvanced.Click(); IRBSubmissionPage.AllSubmissionsTab.ProjectsComponent.SetCriteria("Name", targetStudy); IRBSubmissionPage.OpenSubmission(targetStudy); // finalize the documents ActionsNav.LnkFinalizeDocuments.Click(); PopUpWindow.SwitchTo("Execute \"Finalize Documents\"", true); finalizeDocumentsPage.ChkApprove.Click(); finalizeDocumentsPage.BtnOk.Click(); // Assert that the "Finalized Documents" appear in History tab PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Finalized Documents")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Finalized Documents")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Post-Review"); // Prepare Letter var prepareLetterPage = new PrepareLetterPopup(studyworkspace.GetStudyID(), "Prepare Letter"); ActionsNav.LnkPrepareLetter.Click(); PopUpWindow.SwitchTo("Execute \"Prepare Letter\"", true); prepareLetterPage.CmbDraftLetterTemplate.SelectByInnerText("Approval"); prepareLetterPage.BtnGenerate.Click(); // wait for draft letter link to appear Wait.Until(d => new CCElement(By.PartialLinkText("Correspondence")).Exists); prepareLetterPage.BtnOk.Click(); PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Prepared Letter")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Prepared Letter")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Post-Review"); // Send Letter var sendLetterPage = new SendLetterPopup(studyworkspace.GetStudyID(), "Send Letter"); ActionsNav.LnkSendLetter.Click(); PopUpWindow.SwitchTo("Execute \"Send Letter\"", true); sendLetterPage.BtnOk.Click(); PopUpWindow.SwitchTo("AutoTest", true); Wait.Until((d) => new CCElement(By.LinkText("Letter Sent")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Letter Sent")).Exists); Assert.IsTrue(ActionsNav.ContainerIRBState.Text == "Approved"); }
public void ModificationOtherPartsOfStudyCreationThroughCommitteeReviewWithModificationRequiredToApproved() { string targetStudy = "AutoTest-" + DataGen.String(5); EntityClonerUtil.CloneEntity("STUDY00000024", targetStudy, true); var ActionsNav = new ActivitiesNav(); var submissionPage = new IRBSubmissions(); var ModificationsPage = new InitialModCrSmartForm(); var ModificationInfoPage = new ModificationInformation(); var Workspace = new IRBWorkspace(); var StudySF = new InitialStudySmartForm(); Store.LoginAsUser(Users.Pi); submissionPage.OpenSubmissionByAllSubmissions(targetStudy); // Log in as the PI and go to the IRB/Active tab and select an Approved study, // Create Modification/CR , select “Modification” and “Other parts of the study”. // Make changes to one or more views of the study. ActionsNav.ImgCreateModCr.Click(); ModificationsPage.RdoModification.Click(); ModificationsPage.ChooseModificationScope(Scope.OtherPartsOfTheStudy); //ModificationsPage.BtnContinue ModificationsPage.BtnContinue.Click(); ModificationInfoPage.TxtSummary.Value = "This is a test summary for modification."; ModificationsPage.BtnContinue.Click(); //StudySF.StudyTeamMembersPage.AddStudyTeamMember("Elmira (comm1)", false, false, AddStudyTeamMemberPopup.Roles.CoInvestigator, AddStudyTeamMemberPopup.Roles.ResearchAssistant); //StudySF.StudyTeamMembersPage.BtnContinue.Click(); // save and exit smartform StudySF.LnkSave.Click(); StudySF.LnkExit.Click(); // As the PI, Submit the modification. Workspace.SubmitMod(Users.Pi.UserName, Users.Pi.Password); PopUpWindow.SwitchTo(targetStudy, true); // why does Exists not retry? Wait.Until(h => new CCElement(By.LinkText("Submitted")).Exists); Assert.IsTrue(new CCElement(By.LinkText("Submitted")).Exists, "Attempted submitted mod does not exist for: " + targetStudy); // Log in as the assigned IRB Coordinator and Submit Pre-Review. // Log in as assigned IRB Coordinator, Assign to Meeting. // As the assigned IRB Coordinator, Submit Committee Review (modifications required to secure “approved” determination) // Log in as assigned IRB Coordinator and Finalize Documents. // As the assigned IRB Coordinator, Prepare Letter. // As the assigned IRB Coordinator, Send Letter. }
private void datagrid_Single_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var singleAux = (Album)datagrid_Single.SelectedItem; if (singleAux != null) { PopUpWindow popUpWindow = new PopUpWindow((new TrackAlbum(singleAux))); popUpWindow.ShowDialog(); } }
public void AboutButtonClick(Office.IRibbonControl control) { var infoText = $"{this.localizationService.Translate("Product Information")}: {this.localizationService.Translate("This is an integration of the two audience response systems ARSnova.voting and ARSnova.click.")}{Environment.NewLine}{Environment.NewLine}" + $"Version: 0.1 (beta){Environment.NewLine}{Environment.NewLine}" + $"{this.localizationService.Translate("License")}: {this.localizationService.Translate("This software is Open Source and licensed with the GNU General Public License Version 3")}"; PopUpWindow.InformationWindow( this.localizationService.Translate("Information"), infoText); }
public PointOfInterest(int id, int x, int y, int floorNumber) : base(id, x, y, floorNumber) { detected = false; contents = new List<ExhibitionContent>(); descriptionList = new List<Description>(); observers = new List<Observer>(); popUpWindow = PopUpWindow.Instance(); modalWindow = ModalWindow.Instance(); }
PopUpWindow createAndShowWindow(TypePopUpWindow type) // █ создать и после показать окно { waitToShowWindow = TypePopUpWindow.NONE; //Debug.Log("[createAndShowWindow] type:" + type); GameObject wndGO = null; if (type == TypePopUpWindow.SETTINGS) { var obj = Resources.Load("prefabs/Settings"); wndGO = GameObject.Instantiate(obj) as GameObject; } else { wndGO = GameObject.Instantiate(getResources().popUpWndPrefab); } wndGO.name = type.ToString(); //Debug.Log(wndGO.name); //System.Type typeWnd = < PopUpWindow >; PopUpWindow wnd = wndGO.GetComponent <PopUpWindow>(); float speed = wnd.speedMove; var hPos = wnd.hidePosition; var sPos = wnd.showPosition; if (type != TypePopUpWindow.SETTINGS) { GameObject.DestroyImmediate(wnd); } switch (type) { case TypePopUpWindow.GOLD_EXCHANGE: wnd = wndGO.AddComponent <BuyGoldWnd>(); break; case TypePopUpWindow.CRYSTALS_BUY: wnd = wndGO.AddComponent <BuyCrystalsWnd>(); break; case TypePopUpWindow.SETTINGS: { } break; default: wnd = wndGO.AddComponent <PopUpWindow>(); break; } wnd.speedMove = speed; wnd.hidePosition = hPos; wnd.showPosition = sPos; if (type != TypePopUpWindow.SETTINGS) { wnd.content = wnd.createContent(); } popUpWindows[type] = wnd; float txtH = wndGO.GetComponent <SpriteRenderer>().sprite.texture.height * 0.5f; wnd.hidePosition = new Vector2(0.0f, -(txtH + Screen.height) * 0.01f); wnd.transform.position = new Vector3(0.0f, wnd.hidePosition.y, 0.0f); wnd.show(); return(wnd); }
// 게이지 클릭 public void OnClick() { // 아이템 갯수 제한 if (_dataController.ItemCount >= _dataController.ItemLimit) { PopUpWindow.Alert("창고가 꽉 차있어요!"); return; } var energy = _dataController.Energy + _energyPerClick; ImgEarthback.fillAmount = (float)energy / _energyMaxValue; _dataController.Energy = energy; // 현재 에너지가 필요한 에너지보다 작은 경우 if (_dataController.Energy < _energyMaxValue) { return; } // 나무일 때 if (SwitchMode.Instance.State) { GenerateItem(Random.Range(0, 100) >= DataController.AtlasItemProb * DataController.TwiceAll ? Random.Range(0, 6) * 5 + 2002 : Random.Range(0, 6) * 5 + 2001, true); } else // 별일 때 { // 5%의 확률로 별의 잔재 등장 if (Random.Range(0, 100) < 5) { GenerateItem(5001, true); } else { GenerateItem(Random.Range(0, 100) >= DataController.AtlasItemProb * DataController.TwiceAll ? Random.Range(0, 3) * 5 + 1002 : Random.Range(0, 3) * 5 + 1001, true); } } Btn.enabled = false; StartCoroutine(DecreaseEnergy()); AudioManager.Instance.ClickSound(); AudioManager.Instance.ItemSound(); // 관찰자들에게 Click 이벤트 메세지 송출 foreach (var target in _dataController.Observers) { ExecuteEvents.Execute <IEventListener>(target, null, (x, y) => x.OnObjClick(this)); } }
public static PopUpWindow Instance() { if (!popUpWindow) { popUpWindow = FindObjectOfType(typeof(PopUpWindow)) as PopUpWindow; if (!popUpWindow) Debug.Log("There needs to be one active ModalWindow script on a GameObject in your scene."); } return popUpWindow; }
private void DeleteGroupCardButton_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { DeleteGroupCardButton.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString(ColorManager.Primary800)); AddGroupGridBackground.Visibility = Visibility.Visible; var changeLiveStatusWindow = new PopUpWindow($"You are about to delete '{GroupManager.GetGroup(ActiveGroupID).Name}'\n" + $"Are you sure about that?", PopUpWindow.PopUpType.DeleteGroup); changeLiveStatusWindow.ShowDialog(); }
public void TeamConfirmOnClick() { if (isTeamSelected) { int heroesWithoutSkills = 0; GameManager.Instance.PlayerStats.lastPlayedWorld = selectedAct; foreach (HeroData hero in GameManager.Instance.PlayerStats.heroTeams[GameManager.Instance.selectedTeamNum]) { if (hero == null) { continue; } for (int i = 0; i < 2; i++) { if (hero.GetAbilityFromSlot(i) != null && hero.GetAbilityFromSlot(i).IsUsable) { break; } if (i == 1) { heroesWithoutSkills++; } } } if (GameManager.Instance.PlayerStats.EquipmentInventory.Count >= PlayerStats.maxEquipInventory) { PopUpWindow popUpWindow = UIManager.Instance.PopUpWindow; popUpWindow.OpenTextWindow("Number of items in inventory is over 350. Recycle unneeded equipment to continue.", 380, 200); popUpWindow.textField.fontSize = 24; popUpWindow.textField.paragraphSpacing = 0; popUpWindow.textField.alignment = TextAlignmentOptions.Center; popUpWindow.SetButtonValues(null, null, "Confirm", delegate { UIManager.Instance.CloseCurrentWindow(); }); } else if (heroesWithoutSkills > 0) { PopUpWindow popUpWindow = UIManager.Instance.PopUpWindow; popUpWindow.OpenTextWindow("One or more Heroes have no usable Abilities.\nContinue anyway?", 380, 200); popUpWindow.textField.fontSize = 24; popUpWindow.textField.paragraphSpacing = 0; popUpWindow.textField.alignment = TextAlignmentOptions.Center; popUpWindow.SetButtonValues("Confirm", delegate { UIManager.Instance.CloseCurrentWindow(); GameManager.Instance.MoveToBattle(selectedStage); }, "Cancel", delegate { UIManager.Instance.CloseCurrentWindow(); }); } else { GameManager.Instance.MoveToBattle(selectedStage); } } }
public void AddCustomizeActivityScript(string customActivityScript) { Trace.WriteLine("Customizing activity details page -- adding script."); var parentWindow = GetTitle(); BtnCustomzieDetailsPage.Click(); var popup = new WorkflowScriptEditor(); popup.SwitchTo(); popup.TxtScript.Value = customActivityScript; popup.BtnOk.Click(); PopUpWindow.SwitchTo(parentWindow); }
// Use this for initialization void Start() { //First character selected name = characterName.GetComponent <Text>(); popUp = this.GetComponent <PopUpWindow>(); characterSeries = "SF"; artwork.GetComponent <SpriteRenderer>().sprite = Resources.Load <Sprite>("Textures_and_Sprites/Menus/Interface/CharacterSelectionMenu/CharacterProfile/SF/Ryu/RyuPortraitSelection"); series.GetComponent <Image>().sprite = Resources.Load <Sprite>("Textures_and_Sprites/Menus/Interface/CharacterSelectionMenu/CharacterProfile/SF/SF_logo"); loadScene = EventSystem.current.GetComponent <LoadSceneonClick>(); GameObject.Find("Music").GetComponent <MusicPlayer>().PlayMusic("Selection"); ////Plays character selection music soundEffect = GameObject.Find("SoundEffects").GetComponent <SoundEffectPlayer>(); }
/// <summary> /// Called when [add new pop up]. /// </summary> /// <param name="PopUpName">Name of the pop up.</param> private void OnAddNewPopUp(string PopUpName) { if (eNegMessanger.NewPopUp.PopUpType == eNegMessanger.PopUpType.AddMoreReceivers.ToString()) { #region Show PopUp window to choose identify set of receivers and add it PopUpWindow AddMoreReceivers = new PopUpWindow(PopUpName); AddMoreReceivers.DataContext = this.DataContext; AddMoreReceivers.Content = new MultiNegotiatorsPopUp(); AddMoreReceivers.CenterWindow(); AddMoreReceivers.ShowDialog(); #endregion } }
public Task <string[]> GetImageSelection() { TaskCompletionSource <string[]> tcs = new TaskCompletionSource <string[]>(); Device.BeginInvokeOnMainThread(async() => { if (!CrossMedia.Current.IsPickPhotoSupported) { Console.WriteLine("not supported"); await DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK"); tcs.SetResult(new string[] { "", "", "" }); } var file = await CrossMedia.Current.PickPhotoAsync(); if (file == null || file.Path == null) { return; } if (File.Exists(@file.Path)) { Console.WriteLine("file found!"); var popup = new PopUpWindow("Please name the Icon", string.Empty, "OK", "Cancel"); popup.PopupClosed += (o, closedArgs) => { if (closedArgs.Button == "OK" && closedArgs.Text.Trim().Length > 0) { byte[] imageArray = File.ReadAllBytes(@file.Path); string base64ImageRepresentation = Convert.ToBase64String(imageArray); var extension = Path.GetExtension(@file.Path); tcs.SetResult(new string[] { base64ImageRepresentation, closedArgs.Text, extension }); } else { tcs.SetResult(new string[] { "", "", "" }); } }; popup.Show(); } else { tcs.SetResult(new string[] { "", "", "" }); } }); return(tcs.Task); }
public void ShowAllPossibleAffixes() { if (currentItem == null) { return; } PopUpWindow popUpWindow = UIManager.Instance.PopUpWindow; popUpWindow.OpenTextWindow(""); popUpWindow.SetButtonValues(null, null, "Close", delegate { UIManager.Instance.CloseCurrentWindow(); }); popUpWindow.textField.text = ""; popUpWindow.textField.fontSize = 18; popUpWindow.textField.paragraphSpacing = 8; popUpWindow.textField.alignment = TextAlignmentOptions.Left; float levelSkew = craftingModifierWindow.highLevelMod.currentModifier; Debug.Log(levelSkew); WeightList <AffixBase> possibleAffixes; if (currentItem.GetAffixCap() > currentItem.prefixes.Count) { possibleAffixes = currentItem.GetAllPossiblePrefixes(modifiers, levelSkew); if (possibleAffixes.Count > 0) { popUpWindow.textField.text += "<b>Prefixes</b>\n"; foreach (var affixBaseWeight in possibleAffixes) { float affixPercent = (float)affixBaseWeight.weight / possibleAffixes.Sum * 100f; popUpWindow.textField.text += affixPercent.ToString("F1") + "%" + Affix.BuildAffixString(affixBaseWeight.item, Helpers.AFFIX_STRING_SPACING + 3); popUpWindow.textField.text += "<line-height=0.2em>\n</line-height>"; } popUpWindow.textField.text += "\n"; } } if (currentItem.GetAffixCap() > currentItem.suffixes.Count) { possibleAffixes = currentItem.GetAllPossibleSuffixes(modifiers, levelSkew); if (possibleAffixes.Count > 0) { popUpWindow.textField.text += "<b>Suffixes</b>\n"; foreach (var affixBaseWeight in possibleAffixes) { float affixPercent = (float)affixBaseWeight.weight / possibleAffixes.Sum * 100f; popUpWindow.textField.text += affixPercent.ToString("F1") + "%" + Affix.BuildAffixString(affixBaseWeight.item, Helpers.AFFIX_STRING_SPACING + 3); popUpWindow.textField.text += "<line-height=0.1em>\n</line-height>"; } } } }
private void DeleteSectionCardButton_PreviewMouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (sectionSelected) { DeleteSectionCardButton.Background = ConvertColor.ConvertStringColorToSolidColorBrush(ColorManager.Primary800); SetLoadingGrid(visibility: true, progressBarVisibility: false); var deleteSectionWindow = new PopUpWindow($"You are about to delete {activeSection.Name}\n" + $"Are you sure about that?", PopUpWindow.PopUpType.DeleteSection); deleteSectionWindow.ShowDialog(); } }
private void Button_AddToPlaylist_Click(object sender, RoutedEventArgs e) { var trackAux = (Track)datagrid_SearchTracks.SelectedItem; if (trackAux != null) { PopUpWindow popUpWindow = new PopUpWindow(new AddTrackToPlayist(trackAux)); popUpWindow.ShowDialog(); } else { MessageBox.Show("Please select a track"); } }
void Awake() { beacon = BeaconGameObject.GetComponent<iBeaconServer>(); sounds = GetComponents<AudioSource>(); // popUp = sounds[0]; //beforeSound = sounds[1]; observers = new List<Observer>(); detected = false; popUpWindow = PopUpWindow.Instance(); summaryWindow = SummaryWindow.Instance(); viewVideoAction = new UnityAction(POIplayVideo); modalWindow = ModalWindow.Instance(); myViewAction = new UnityAction(displaySummary); myCloseAction = new UnityAction(popUpWindow.closePanel); }
private void InitGlobalProperties( ) { _popUpWindow = new PopUpWindow( this ); _tempViewport = new ViewportControl( ); _tempViewport.Location = new System.Drawing.Point( -20, 12 ); Controls.Add( _tempViewport ); _itemSelectionTool.Click += new EventHandler( _tools.SelectionTool_Click ); _itemToggleGrid.Click += new EventHandler( _tools.ToggleGrid_Click ); _itemToggleZones.Click += new EventHandler( _tools.ToggleZones_Click ); _itemToggleLight.Click += new EventHandler( _tools.ToggleLight_Click ); _itemToggleEffects.Click += new EventHandler( _tools.ToggleEffects_Click ); this.Text = Consts.Editor.TITLE; _undoProvider = new UndoProvider( ); _undoProvider.CanRedoChanged += new EventHandler( UndoProvider_CanRedoChanged ); _undoProvider.CanUndoChanged += new EventHandler( UndoProvider_CanUndoChanged ); }
//[Button("SetStar" , "星更新",30,700,200,25)]public int myButton_B; // マッチング数だけ透明な星を追. void Start() { playersWin = gameController.playersWin; enemysWin = gameController.enemysWin; //ポップメッセージウィンドウを登録 if(pWindow == null){ pWindow = GameObject.Find ("Canvas/Panel/PopUpWindow").GetComponent<PopUpWindow>() as PopUpWindow; } Debug.Log ("Scoreboard"); panelObject = GameObject.Find ("ScoreBoardPanel"); defaultBoardPositon = panelObject.GetComponent<RectTransform> ().position; defaultBoardRotation = panelObject.GetComponent<RectTransform> ().rotation; GameObject PlayersStarPanel = GameObject.Find ("PlayersStarPanel"); for(int i=1;i<=matchNum;i++){ var star = GameObject.Instantiate (starObject); star.transform.SetParent (PlayersStarPanel.transform,false); star.transform.localScale = new Vector3 (1,1,1); star.GetComponent<Image>().color = new Color(0.5f,0.5f,0.5f,0.5f); } GameObject EnemysStarPanel = GameObject.Find ("EnemysStarPanel"); for(int i=1;i<=matchNum;i++){ var star = GameObject.Instantiate (starObject); star.transform.SetParent (EnemysStarPanel.transform,false); star.transform.localScale = new Vector3 (1,1,1); star.GetComponent<Image>().color = new Color(0.5f,0.5f,0.5f,0.5f); } }
public clsPopupForm(PopUpWindow wndParent) { Form frmParent = wndParent.Parent.FindForm(); PopUpWindow.PlacementType intPlacement; // Asigna las propiedades al formulario this.wndParent = wndParent; SetStyle(ControlStyles.ResizeRedraw, true); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; StartPosition = FormStartPosition.Manual; ShowInTaskbar = false; DockPadding.All = cnstIntBorderMagin; sizControl = wndParent.UserControl.Size; wndParent.UserControl.Dock = DockStyle.Fill; Controls.Add(wndParent.UserControl); sizWindow.Width = sizControl.Width + 2 * cnstIntBorderMagin; sizWindow.Height = sizControl.Height + 2 * cnstIntBorderMagin; if (frmParent != null) frmParent.AddOwnedForm(this); intPlacement = wndParent.Placement; // Try to place the popup at the asked location ReLocate(); // Check if the form is out of the screen and if yes try to adapt the placement Rectangle rctWorkingArea = Screen.FromControl(wndParent.Parent).WorkingArea; if (pntNormalPos.X + this.Width > rctWorkingArea.Right) { if ((intPlacement & PopUpWindow.PlacementType.Right) != 0) intPlacement = (intPlacement & ~PopUpWindow.PlacementType.Right) | PopUpWindow.PlacementType.Left; } else if (pntNormalPos.X < rctWorkingArea.Left) { if ((intPlacement & PopUpWindow.PlacementType.Left) != 0) intPlacement = (intPlacement & ~PopUpWindow.PlacementType.Left) | PopUpWindow.PlacementType.Right; } if (pntNormalPos.Y + this.Height > rctWorkingArea.Bottom) { if ((intPlacement & PopUpWindow.PlacementType.Bottom) != 0) intPlacement = (intPlacement & ~PopUpWindow.PlacementType.Bottom) | PopUpWindow.PlacementType.Top; } else if (pntNormalPos.Y < rctWorkingArea.Top) { if ((intPlacement & PopUpWindow.PlacementType.Top) != 0) intPlacement = (intPlacement & ~PopUpWindow.PlacementType.Top) | PopUpWindow.PlacementType.Bottom; } if (intPlacement != wndParent.Placement) ReLocate(); // Check if the form is still out of the screen // if (yes just move it back into the screen without changing Placement if (pntNormalPos.X + sizWindow.Width > rctWorkingArea.Right) pntNormalPos.X = rctWorkingArea.Right - sizWindow.Width; else if (pntNormalPos.X < rctWorkingArea.Left) pntNormalPos.X = rctWorkingArea.Left; if (pntNormalPos.Y + sizWindow.Height > rctWorkingArea.Bottom) pntNormalPos.Y = rctWorkingArea.Bottom - sizWindow.Height; else if (pntNormalPos.Y < rctWorkingArea.Top) pntNormalPos.Y = rctWorkingArea.Top; // Initialize the animation dblProgress = 0; if (wndParent.AnimationSpeed > 0) { trmTimer = new Timer(); // I always aim 25 images per seconds.. seems to be a good value // it looks smooth enough on fast computers and do not drain slower one trmTimer.Interval = 1000 / 25; dtmTimerStarted = DateTime.Now; trmTimer.Tick += new EventHandler(Showing); trmTimer.Start(); Showing(null, null); } else SetFinalLocation(); Show(); if (OnDropDown != null) OnDropDown(wndParent.Parent, new EventArgs()); }