private void ButtonBack_IsEnabledChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e) { if (!ButtonBack.IsEnabled) { ButtonNext.Focus(); } }
void ReleaseDesignerOutlets() { if (SamplesTable != null) { SamplesTable.Dispose(); SamplesTable = null; } if (ButtonPrev != null) { ButtonPrev.Dispose(); ButtonPrev = null; } if (UrhoSurface != null) { UrhoSurface.Dispose(); UrhoSurface = null; } if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } }
private void RemoveFromListToolStripMenuItem_Click(object sender, EventArgs e) { // Search for the clicked MusicPanel and remove it foreach (MusicPanel musicPanel in FlowLayoutPanelMusic.Controls) { if (musicPanel.BackColor == Color.FromArgb(28, 28, 28)) { // if the removed MusicPanel is the Playong Music, Start the next one if (musicPanel.MusicPath == Music[CurrentPlayingMusicIndex]) { ButtonNext.PerformClick(); } Music.Remove(musicPanel.MusicPath); FlowLayoutPanelMusic.Controls.Remove(musicPanel); if (Music.Count == 0) { ClearListToolStripMenuItem_Click(sender, e); } break; } } // Initialize the CurrentPlayingMusicIndex with the correct index for (int i = 0; i < Music.Count; i++) { if (this.Text == (TagFile.GetArtists(Music[i]) + " - " + TagFile.GetTitle(Music[i]))) { CurrentPlayingMusicIndex = i; break; } } }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_images_repeat); var toolbarMain = FindViewById <Toolbar>(Resource.Id.toolbar_images_repeat); SetSupportActionBar(toolbarMain); SupportActionBar.SetDisplayHomeAsUpEnabled(true); using (var background = BitmapHelper.GetBackgroung(Resources, _displayWidth - PixelConverter.DpToPX(20), PixelConverter.DpToPX(190))) { FindViewById <LinearLayout>(Resource.Id.repeat_background).Background = background; } Buttons = new List <Button> { FindViewById <Button>(Resource.Id.button_I_choice1), FindViewById <Button>(Resource.Id.button_I_choice2), FindViewById <Button>(Resource.Id.button_I_choice3), FindViewById <Button>(Resource.Id.button_I_choice4) }; ButtonNext = new ButtonNext { button = FindViewById <Button>(Resource.Id.button_I_Next), State = StateButton.Next }; Button_Images_Next_Click(null); }
private void AppTimer_Tick(object sender, EventArgs e) { if (AudioFileReader != null) { // Change the Label Text to the Music current Time LabelMusicCurrentTimeState.Text = AudioFileReader.CurrentTime.ToString(@"mm\:ss"); // Change the PlaybackBarControl value to the Music current Time PlaybackBarControl.Val = Convert.ToInt32(ConvertFrom.TimeToSeconds(AudioFileReader.CurrentTime)); // Check if the Music end, then start the Next one or repeat it if (LabelMusicCurrentTimeState.Text == LabelMusicEndTime.Text) { if (LoopState == LoopState.One) { AudioFileReader.Position = 0; } else if (LoopState == LoopState.Off || LoopState == LoopState.All) { MusicState = MusicState.Pause; ButtonPlayPause.BackgroundImage = Properties.Resources.Play; PlayAndPauseToolStripMenuItem.Text = "Play"; ButtonNext.PerformClick(); } } } }
void ReleaseDesignerOutlets() { if (ButtonAdd != null) { ButtonAdd.Dispose(); ButtonAdd = null; } if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (PickerTime != null) { PickerTime.Dispose(); PickerTime = null; } if (TableViewDates != null) { TableViewDates.Dispose(); TableViewDates = null; } }
void ReleaseDesignerOutlets() { if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (TextFieldMinimumStock != null) { TextFieldMinimumStock.Dispose(); TextFieldMinimumStock = null; } if (TextFieldName != null) { TextFieldName.Dispose(); TextFieldName = null; } if (TextFieldStock != null) { TextFieldStock.Dispose(); TextFieldStock = null; } }
public void XacMinh() { XacMinh: if (ElementIsVisible(ButtonNext)) { ButtonNext.Click(); goto XacMinh; } else { return; } }
private void ButtonDelete_Click(object sender, EventArgs e) { if (LabelWord.Text != "*WORD*") { xl.DeleteWord(LabelWord.Text); MessageBox.Show("This word has been deleted."); ButtonNext.PerformClick(); } else { MessageBox.Show("Please start a test first!"); } }
void ReleaseDesignerOutlets() { if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (PickerStartTime != null) { PickerStartTime.Dispose(); PickerStartTime = null; } }
void ReleaseDesignerOutlets() { if (author != null) { author.Dispose(); author = null; } if (buttonLink != null) { buttonLink.Dispose(); buttonLink = null; } if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (ButtonPrev != null) { ButtonPrev.Dispose(); ButtonPrev = null; } if (image != null) { image.Dispose(); image = null; } if (quote != null) { quote.Dispose(); quote = null; } if (title != null) { title.Dispose(); title = null; } }
private void ButtonReveal_Click(object sender, EventArgs e) { if (LabelWord.Text != "*WORD*") { if (indexer < (listForTest.Length / 2)) { TextDefinition.Text = listForTest[indexer, 1]; ButtonNext.Focus(); } else { indexer = 0; } } else { MessageBox.Show("Please start a test first!"); } }
private void ContentFrame_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.F6) { e.Handled = true; if (ButtonPrevious.Focusable) { ButtonPrevious.Focus(); } else if (ButtonNext.Focusable) { ButtonNext.Focus(); } else { FocusListBox(); } } }
/// <summary> /// Displays waiting animation. /// </summary> /// <param name="wait">Indicates whether to wait</param> /// <param name="message">Message to display</param> private void SetWaitStateInternal(bool?wait, string message) { if (wait != null) { progressBarWaiting.Visible = wait.Value; lblState.Visible = wait.Value; if (wait.Value) { footerButtons.AsyncActionStart(CurrentStep.AllowCancel); } else { footerButtons.AsyncActionFinish(); } } lblState.Text = !string.IsNullOrEmpty(message) ? message : string.Empty; ButtonNext.Focus(); }
/// <summary> /// When we switch panels, we update the "next", "previous" and "cancel" buttons. /// </summary> /// <param name="newPage">The page selected.</param> private void UpdateButtons(MultiPanelPage newPage) { bool nextPrev = false; if (newPage == CredentialsPage) { StartServer(); } else { nextPrev = true; ButtonNext.Text = m_updateMode ? "&Update" : "&Import"; ButtonNext.Focus(); } ButtonPrevious.Visible = nextPrev; ButtonPrevious.Enabled = nextPrev; ButtonNext.Visible = nextPrev; ButtonNext.Enabled = nextPrev; Throbber.State = ThrobberState.Stopped; Throbber.Visible = false; }
/// <summary> /// When we switch panels, we update the "next", "previous" and "cancel" buttons. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void MultiPanel_SelectionChange(object sender, MultiPanelSelectionChangeEventArgs args) { if (args.NewPage == CredentialsPage) { ButtonPrevious.Enabled = false; ButtonNext.Enabled = true; ButtonNext.Text = "&Next >"; } else if (args.NewPage == WaitingPage) { ButtonPrevious.Enabled = true; ButtonNext.Enabled = false; ButtonNext.Text = "&Next >"; } else { ButtonPrevious.Enabled = true; ButtonNext.Enabled = ResultsMultiPanel.SelectedPage == CharacterPage; ButtonNext.Text = "&Import"; ButtonNext.Focus(); } }
void ReleaseDesignerOutlets() { if (ConstraintImageViewHeight != null) { ConstraintImageViewHeight.Dispose(); ConstraintImageViewHeight = null; } if (ConstraintImageViewWidth != null) { ConstraintImageViewWidth.Dispose(); ConstraintImageViewWidth = null; } if (ImageViewPage != null) { ImageViewPage.Dispose(); ImageViewPage = null; } if (LabelImageFile != null) { LabelImageFile.Dispose(); LabelImageFile = null; } if (ButtonPrevious != null) { ButtonPrevious.Dispose(); ButtonPrevious = null; } if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } }
// Use this for initialization void Awake() { //Warning Panel WarningPanel.sizeDelta = new Vector2(0, Screen.height / 1.5f); warningTitle.GetComponent <Text>().fontSize = Screen.width / 30; warningTitle.anchoredPosition = new Vector2(0, Screen.height / 4); warningText.GetComponent <Text>().fontSize = Screen.width / 40; warningText.anchoredPosition = new Vector2(0, 0); ButtonBack.anchoredPosition = new Vector3(Screen.width / 10, Screen.height / 10); //ButtonBack.sizeDelta = new Vector2(Screen.width / 6, Screen.height / 6); ButtonBack.GetChild(1).GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 20, Screen.height / 20); ButtonBack.GetChild(1).GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 20, Screen.height / 20); ButtonBack.GetChild(0).GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 8, Screen.height / 20); ButtonBack.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 60; ButtonBack.GetChild(0).GetComponent <RectTransform>().anchoredPosition = new Vector2(ButtonBack.GetChild(1).GetComponent <RectTransform>().sizeDelta.x - 20, 0); ButtonNext.anchoredPosition = new Vector2(0, Screen.height / 10); ButtonNext.sizeDelta = new Vector2(Screen.width / 10, Screen.height / 12); ButtonNext.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 50; //Settings Panel semiAutomaticSettings.sizeDelta = new Vector2(0, Screen.height / 1.5f); semiAutomaticSettings.anchoredPosition = new Vector2(0, Screen.height / 8); FixedHeights.anchoredPosition = new Vector2(Screen.width / 6, 4 * Screen.height / 6); MinFixedDistance.anchoredPosition = new Vector2(4 * Screen.width / 6, 4 * Screen.height / 6); FixedHeights.GetComponent <Text>().fontSize = Screen.width / 40; MinFixedDistance.GetComponent <Text>().fontSize = Screen.width / 40; sliderHeight.anchoredPosition = new Vector2(Screen.width / 4, 2 * Screen.height / 6); sliderHeight.localScale = new Vector2(Screen.height / 500, Screen.height / 500); sliderDistance.anchoredPosition = new Vector2(3 * Screen.width / 4 - sliderDistance.sizeDelta.x, 2 * Screen.height / 6); sliderDistance.localScale = new Vector2(Screen.width / 600, Screen.height / 500); TextDistance.anchoredPosition = new Vector2(4 * Screen.width / 6, 3 * Screen.height / 6); TextDistance.sizeDelta = new Vector2(Screen.width / 10, Screen.height / 12); TextDistance.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 30; TextHeigth.anchoredPosition = new Vector2(Screen.width / 3, 2 * Screen.height / 6); TextHeigth.sizeDelta = new Vector2(Screen.width / 10, Screen.height / 12); TextHeigth.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 30; ContinueButton.anchoredPosition = new Vector2(0, Screen.height / 10); ContinueButton.sizeDelta = new Vector2(Screen.width / 8, Screen.height / 10); ContinueButton.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 40; //Select type panel MappingTypePanel.sizeDelta = new Vector2(0, Screen.height / 1.5f); MappingTypePanel.anchoredPosition = new Vector2(0, Screen.height / 8); buttonManual.sizeDelta = new Vector2(Screen.width / 4, Screen.height / 6); buttonManual.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 30; buttonManual.anchoredPosition = new Vector2(0, Screen.height / 8); buttonSemiAutomatic.sizeDelta = new Vector2(Screen.width / 4, Screen.height / 6); buttonSemiAutomatic.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 40; buttonSemiAutomatic.anchoredPosition = new Vector2(4 * Screen.width / 6, Screen.height / 4); MappingTypeTitle.sizeDelta = new Vector2(Screen.width / 4, Screen.height / 4); MappingTypeTitle.anchoredPosition = new Vector2(0, 1.5f * Screen.height / 4); MappingTypeTitle.GetComponent <Text>().fontSize = Screen.width / 25; //Mapping MappingPanel.sizeDelta = new Vector2(0, Screen.height / 1.5f); MappingPanel.anchoredPosition = new Vector2(0, Screen.height / 8); ScanTakeoffButton.anchoredPosition = new Vector2(-Screen.width / 30, Screen.height / 25); ScanTakeoffButton.sizeDelta = new Vector2(Screen.width / 8, Screen.height / 12); ScanTakeoffButton.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 50; //scanningThrobber.sizeDelta = new Vector2(Screen.width / 25, Screen.width / 25); //scanningThrobber.anchoredPosition = new Vector2(0, -(Screen.width / 40) - scanningThrobber.sizeDelta.y); // dropdownHeight; RotateDronButton.anchoredPosition = new Vector2(Screen.width / 8, Screen.height / 4); RotateDronButton.sizeDelta = new Vector2(Screen.width / 4, Screen.height / 4); moveDronButton.anchoredPosition = new Vector2(6 * Screen.width / 8, Screen.height / 4); moveDronButton.sizeDelta = new Vector2(Screen.width / 4, Screen.height / 4); backToMappingTypeButton.anchoredPosition = new Vector3(Screen.width / 10, 20); backToMappingTypeButton.GetChild(1).GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 20, Screen.height / 20); backToMappingTypeButton.GetChild(0).GetComponent <RectTransform>().sizeDelta = new Vector2(Screen.width / 8, Screen.height / 20); backToMappingTypeButton.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 60; backToMappingTypeButton.GetChild(0).GetComponent <RectTransform>().anchoredPosition = new Vector2(backToMappingTypeButton.GetChild(1).GetComponent <RectTransform>().sizeDelta.x - 20, 0); goToPlanning.anchoredPosition = new Vector3(0, Screen.height / 25); goToPlanning.sizeDelta = new Vector3(Screen.width / 8, Screen.height / 12); goToPlanning.GetChild(0).GetComponent <Text>().fontSize = Screen.width / 50; //goToPlanning.GetChild(1).GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width / 20, Screen.height / 20); //goToPlanning.GetChild(0).GetComponent<RectTransform>().anchoredPosition = new Vector2(-goToPlanning.GetChild(1).GetComponent<RectTransform>().sizeDelta.x + 20, 0); //goToPlanning.GetChild(0).GetComponent<RectTransform>().sizeDelta = new Vector2(Screen.width / 8, Screen.height / 20); dropdownHeight.anchoredPosition = new Vector2(6 * Screen.width / 8, 5 * Screen.height / 8); dropdownHeight.localScale = new Vector2(Screen.width / 750, Screen.height / 500); binButton.sizeDelta = new Vector2(Screen.width / 30, Screen.width / 30); binButton.anchoredPosition = new Vector2(50, -50); binLastButton.sizeDelta = new Vector2(Screen.width / 30, Screen.width / 30); binLastButton.anchoredPosition = new Vector2(ScanTakeoffButton.anchoredPosition.x, ScanTakeoffButton.anchoredPosition.y + ScanTakeoffButton.sizeDelta.y * 2); }
void ReleaseDesignerOutlets() { if (ButtonNext != null) { ButtonNext.Dispose(); ButtonNext = null; } if (DependsSpace != null) { DependsSpace.Dispose(); DependsSpace = null; } if (LabelAfter != null) { LabelAfter.Dispose(); LabelAfter = null; } if (LabelEvery != null) { LabelEvery.Dispose(); LabelEvery = null; } if (LabelTake != null) { LabelTake.Dispose(); LabelTake = null; } if (LabelUnits != null) { LabelUnits.Dispose(); LabelUnits = null; } if (PickerIntervallType != null) { PickerIntervallType.Dispose(); PickerIntervallType = null; } if (PickerViewMedis != null) { PickerViewMedis.Dispose(); PickerViewMedis = null; } if (StackView != null) { StackView.Dispose(); StackView = null; } if (TextFieldDosage != null) { TextFieldDosage.Dispose(); TextFieldDosage = null; } if (TextFieldIntervall != null) { TextFieldIntervall.Dispose(); TextFieldIntervall = null; } }
public SignInPage StepEnterUsername(string username) { EnterUsername.SendKeys(username); ButtonNext.Click(); return(this); }
private void TimerAutoplay_Tick(object sender, EventArgs e) { ButtonNext.PerformClick(); }
private void NextButoon_Click(object sender, RoutedEventArgs e) { ButtonNext?.Invoke(); }
public bool RunGetMail() { try { if (library.IsLoadingComplete() && library.IsAjaxLoaded(driver)) { ClickButtonNext: if (library.ElementIsVisible(ButtonNext)) { ButtonNext.Click(); goto ClickButtonNext; } else if (library.ElementIsVisible(Menu)) { library.ScrollToElement(Menu); Menu.Click(); if (library.IsLoadingComplete() && library.IsAjaxLoaded()) { if (library.ElementIsVisible(Setting)) { try { library.ScrollToElement(Setting); Setting.Click(); } catch { Email = "Đizz con mẹ Indonesia"; return(false); } if (library.IsLoadingComplete() && library.IsAjaxLoaded() && library.ElementsIsVisible(By.XPath("//div[@class='_5r7k _5r7m']"))) { library.ScrollToElement(Profile[0]); Profile[0].Click(); if (library.IsLoadingComplete() && library.IsAjaxLoaded() && library.ElementsIsVisible(By.XPath("//div//div//h3//span//span"))) { Email = MailInfo[0].Text; return(true); } else { Email = "Không tìm thấy Email"; driver.Close(); return(false); // } } else { Email = "Không tìm thấy Profile"; driver.Close(); return(false); // Không tìm thấy Profile } } else { Email = "Không tìm thấy Setting"; driver.Close(); return(false); // Không tìm thấy Setting } } } else { Email = "Cookie died!"; driver.Close(); return(false); } } return(true); } catch (Exception ex) { Email = ex.Message; driver.Close(); return(false); } finally { GC.Collect(); } }
//The function that saves the thumbnail, mission and metadata called from saveandgotoplanselection IEnumerator RenderTexture() { ButtonBack.SetActive(false); ButtonNext.SetActive(false); topInfoPanel.SetActive(false); DownInfoPanel.SetActive(false); otherPanel.SetActive(false); infoPanel.SetActive(false); ScanButton.SetActive(false); GameObject Helper = this.gameObject; //Assign the bounding box to the file MissionManager.modelBoundingBox = new Vector3(maxX, maxY, maxZ); //All this comments used to take a photo at the pointcloud, but for a reason unknown, it didn't center the image correctly to take the photo. TODO fix that // Vector3 auxPosition = Camera.main.transform.position; // // Camera.main.transform.parent.position = Vector3.zero; // Camera.main.transform.parent.rotation = Quaternion.Euler(0,0,0); // Camera.main.transform.localPosition = new Vector3(drone.transform.position.x, drone.transform.position.y + maxY * 3, drone.transform.position.z); // float fieldOfVIewHelper = Camera.main.fieldOfView; // float futureFOV = 2.0f * Mathf.Atan((Camera.main.transform.localPosition.y - (drone.transform.position.y - maxY)) * 0.5f / Vector3.Distance(Camera.main.transform.localPosition, drone.transform.position)) * Mathf.Rad2Deg; // futureFOV = Mathf.Clamp(futureFOV + 10.0f, 1.0f, 179.0f); // if (float.IsNaN(futureFOV)) // { // Camera.main.fieldOfView = 40; // Camera.main.transform.localPosition = new Vector3(drone.transform.position.x, drone.transform.position.y * 3, drone.transform.position.z); // } // else // { // Camera.main.fieldOfView = futureFOV; // } // Camera.main.transform.LookAt(drone.transform); // yield return new WaitForSeconds(1.0f); // Resolution auxResolution = Screen.currentResolution; // Screen.SetResolution(256, 256, true); // yield return new WaitForSeconds(1.0f); // yield return new WaitForEndOfFrame(); // Camera.main.targetTexture = modelRenderer; // // Texture2D texture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false); // UnityEngine.Debug.Log("CamPos: " + Camera.main.transform.position); // UnityEngine.Debug.Log("CamRot: " + Camera.main.transform.rotation.eulerAngles); // UnityEngine.Debug.Log("Drone: " + drone.transform.position); // UnityEngine.Debug.Log("Fov: " + futureFOV); // Camera.main.Render(); // texture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0); // texture.Apply(); // byte[] bytes = texture.EncodeToPNG(); // save the image //Remember to create directories if they don't exist if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData/Thumbnails")) { System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData/Thumbnails"); } //Create the thumbnail from a jpg that we have. TODO change to a render of the PC File.WriteAllBytes(Application.persistentDataPath + "/PersistentData/Thumbnails/" + MissionManager.guid + ".jpeg.thumbnail", pointCloudThumbnail.texture.EncodeToPNG()); //DestroyObject(texture); // Camera.main.targetTexture.Release(); // Camera.main.targetTexture = null; // Screen.SetResolution(auxResolution.width, auxResolution.height, true); // Camera.main.fieldOfView = fieldOfVIewHelper; // Camera.main.transform.position = auxPosition; //string jsonPointCloud = JsonUtility.ToJson(savedPointCloud); //CreatePlan(jsonPointCloud); bool canBuild = true; //UnityEngine.Debug.Log("Creating pointCloud scene"); if (canBuild) { Matrix4x4 mat = Matrix4x4.identity; if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData")) { System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData"); } if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData/Maps")) { System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData/Maps"); } //UnityEngine.Debug.Log("Creating Map: " + Application.persistentDataPath + "/PersistentData/Maps/" + MissionManager.guid + ".dae.map"); //File.Create(Application.persistentDataPath + "/PersistentData/Maps/" + MissionManager.guid + ".dae.map").Close(); //File.WriteAllText(Application.persistentDataPath + "/PersistentData/Maps/" + MissionManager.guid + ".dae.map", jsonPointCloud, System.Text.Encoding.ASCII); //Need to set loading bigger, in the middle and to rotate it in the next while loop inside this function Loading.SetActive(true); yield return(new WaitForEndOfFrame()); if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData/Thumbnails")) { System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData/Thumbnails"); } MapMetadata MapMetadata = new MapMetadata(MissionManager.guid, "MapMetadata_" + MissionManager.guid, "ImportedLocation_", MapMetadata.MapType.PointCloud); //MapMetadata.MapPath = Application.persistentDataPath + "/PersistentData/Maps/" + MissionManager.guid + ".dpl.map"; MapMetadata.BoundingBox = new Vector3(maxX, maxY, maxZ); MapMetadata.Location = location; MapMetadata.Name = mapName; MapMetadata.Byte_Size = (ulong)fileSize; string metadataJson = JsonUtility.ToJson(MapMetadata); if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData/Missions")) { System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData/Missions"); } System.IO.File.WriteAllText(Application.persistentDataPath + "/PersistentData/Missions/" + MapMetadata.Guid + ".json.metadata", metadataJson); yield return(new WaitForEndOfFrame()); Map map = new Map(); map.Guid = MissionManager.guid; //Pozyx is in milimiters, need to convert to that map.unityToAnchors = Matrix4x4.identity; mat.m00 *= 1000; mat.m11 *= 1000; mat.m22 *= 1000; map.unityToAnchors = mat; MissionManager.invMatrix = Matrix4x4.Inverse(mat); string mapJson = JsonUtility.ToJson(map); System.IO.File.WriteAllText(Application.persistentDataPath + "/PersistentData/Missions/" + map.Guid + ".json.mission", mapJson); //yield return new WaitForEndOfFrame(); //SceneManager.LoadScene("PlanSelection"); //guid = System.Guid.NewGuid().ToString(); //Map m = new Map(); //MapMetadata MapMetadata = new MapMetadata(guid, "MapMetadata_" + guid.Split('-')[0], "EmptyLocation_", MapMetadata.MapType.EmptyBox); //MapMetadata.BoxScale = new Vector3(width / 10, height / 10, depth / 10); //MapMetadata.BoundingBox = new Vector3(width, height, depth); //string json = JsonUtility.ToJson(MapMetadata); // //if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData")) // System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData"); // //if (!System.IO.Directory.Exists(Application.persistentDataPath + "/PersistentData/Missions")) // System.IO.Directory.CreateDirectory(Application.persistentDataPath + "/PersistentData/Missions"); // //System.IO.File.WriteAllText(Application.persistentDataPath + "/PersistentData/Missions/" + MapMetadata.Name + ".json", json); } //This is for the app that clicked the done button. It exits here and won't enter more than once. PlanSelectionManager.uploadMapMetadata = true; clientUnity.client.SendCommand((byte)Modules.PLAN_LIBRARIAN_MODULE, (byte)PlanLibrarianCommandType.PLAN_LIB_REQUEST_LIBRARY_PATH); done = false; MapperModule.state = MapperModule.MapperState.IDLE; SceneManager.LoadScene("General"); // Screen.SetResolution(auxResolution.width, auxResolution.height, true); }