private void Load(string filename) { TabsManager.Load(filename); Filename = filename; DlgSearch.SearchReset(); try { string programFilesX64 = Environment.ExpandEnvironmentVariables("%ProgramW6432%"); string programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); bool isProg = filename.StartsWith(programFilesX64, StringComparison.InvariantCultureIgnoreCase) || filename.StartsWith(programFilesX86, StringComparison.InvariantCultureIgnoreCase); bool isAdmin = (new WindowsPrincipal(WindowsIdentity.GetCurrent())).IsInRole(WindowsBuiltInRole.Administrator); if (isProg && !isAdmin) { DlgMessage.Show("This file is located under 'program files' and hence protected by Windows.\n" + "So KML will not be able to overwrite it, when you choose to save your changes.\n\n" + "Please run KML as administrator or manually pick the changed file from 'program data'\n" + "and put it back to original place.", "Permission warning", (new GuiIcons16()).Warning); } } catch { ; // something went wrong with reading env-var or admin flag } }
void Start() { if (!tabsMangager) { tabsMangager = gameObject.transform.GetComponentInParent <TabsManager>(); } }
public SimvaWindow(Rect aStartPos, GUIStyle aStyle, params GUILayoutOption[] aOptions) : base(aStartPos, new GUIContent(TC.get("Simva.Title")), aStyle, aOptions) { ButtonContent = new GUIContent() { image = Resources.Load <Texture2D>("simva-icon"), text = "Simva" }; tabsManager = new TabsManager(this); simvaConf = new SimvaConf(); if (string.IsNullOrEmpty(simvaConf.Host)) { Debug.LogWarning("No Simva Host!"); } if (ProjectConfigData.existsKey("Simva.RefreshToken")) { Login(); } if (linkStyle == null) { linkStyle = new GUIStyle(GUI.skin.label); linkStyle.richText = true; titleStyle = new GUIStyle(GUI.skin.label); titleStyle.richText = true; } }
public void DisableObjects(Vuforia.VuMarkTarget vumarkTargetTracked) { previousGameObject = detectedGameObject; previousTabsManager = myTabsManagerRef; bool isAnimationDone = true; //checks if all the animations on the detected object were done. foreach (Animator anim in detectedGameObject.GetComponentsInChildren <Animator>()) { isAnimationDone = isAnimationDone && anim.GetCurrentAnimatorStateInfo(0).normalizedTime >= 1; Debug.Log("<color='red'> animator time </color>" + anim.name + " " + anim.GetCurrentAnimatorStateInfo(0).IsName("main") + ": " + anim.GetCurrentAnimatorStateInfo(0).normalizedTime); } if (isAnimationDone) { curState = TrackingState.Waiting; } else { curState = TrackingState.Lost; } if (messenger != null && !SlidingWindow.IsOpen()) { messenger.ShowMessage("Please aim your camera at our poster"); } detectedGameObject.SetActive(false); ToggleArrows(false); }
private void Window_Loaded(object sender, RoutedEventArgs e) { // When data loaded in constructor before window is loaded, setting focus does not work // For this case do it here once TabsManager.Next(); TabsManager.Previous(); }
private void Execute(RaycastHit hitToCheck) { //if(CanvasManager.instance.canvasDictionary.ContainsKey(hitToCheck.transform.gameObject.name)) { //TODO makes tabs manager use the name TabsManager tabsManager = hitToCheck.transform.parent.gameObject.GetComponentInChildren <TabsManager>(true); tabsManager.Open(hitToCheck.transform.name); //CanvasManager.instance.SetCurrentCanvas(CanvasManager.instance.canvasDictionary[hitToCheck.transform.gameObject.name]); //SlidingWindow.Open(); } }
private void ButtonPrevious_Click(object sender, RoutedEventArgs e) { KmlItem search = DlgSearch.SearchPrevious(); if (search != null) { TabsManager.TreeManager.Select(search); } else { TabsManager.Previous(); } }
// private bool notMe; void Start() { //activeTweener = activeSpriteGO.GetComponent<TweenPosition>(); if (!tabsMangager) { tabsMangager = gameObject.transform.GetComponentInParent <TabsManager>(); nonActiveSpriteGO = transform.GetChild(0).gameObject; activeSpriteGO = transform.GetChild(1).gameObject; nonActiveSpite = nonActiveSpriteGO.GetComponent <UISprite>(); activeSprite = activeSpriteGO.GetComponent <UISprite>(); } else { nonActiveSpriteGO = mainButton.GetChild(0).gameObject; activeSpriteGO = mainButton.GetChild(1).gameObject; nonActiveSpite = nonActiveSpriteGO.GetComponent <UISprite>(); activeSprite = activeSpriteGO.GetComponent <UISprite>(); } }
private void CommandSwitchView_Executed(object sender, ExecutedRoutedEventArgs e) { TabsManager.CommandExec("SwitchView"); }
private void CommandCopy_Executed(object sender, ExecutedRoutedEventArgs e) { TabsManager.CommandExec("Copy"); }
private void Save(string filename) { TabsManager.Save(filename); Filename = filename; }
private void Load(string filename) { TabsManager.Load(filename); Filename = filename; }
private void ButtonPrevious_Click(object sender, RoutedEventArgs e) { TabsManager.Previous(); }
public void EnableObjects(GameObject gameObjectToPass) { detectedGameObject = gameObjectToPass; myTabsManagerRef = detectedGameObject.GetComponentInChildren <TabsManager>(true); var rendererComponents = gameObjectToPass.GetComponentsInChildren <Renderer>(true); var colliderComponents = gameObjectToPass.GetComponentsInChildren <Collider>(true); var canvasComponents = gameObjectToPass.GetComponentsInChildren <Canvas>(true); var depthMaskComponent = depthMask.GetComponent <Renderer>(); foreach (var component in rendererComponents) { component.shadowCastingMode = ShadowCastingMode.Off; component.enabled = true; if (component.gameObject.tag == "VirtualButton") { component.enabled = false; } } foreach (var component in colliderComponents) { component.enabled = true; } foreach (var component in canvasComponents) { component.enabled = true; } depthMaskComponent.enabled = true; Animator[] myAnimatorContainer = gameObjectToPass.GetComponentsInChildren <Animator>(); //if(curState!=TrackingState.Waiting) { Debug.Log(myAnimatorContainer.Length); for (int i = 0; i < myAnimatorContainer.Length; i++) { myAnimatorContainer[i].SetBool("shouldMove", true); } } if (curState == TrackingState.Waiting) { for (int i = 0; i < myAnimatorContainer.Length; i++) { myAnimatorContainer[i].SetTrigger("Skip"); } ToggleArrows(true); } ResetTracking(); if (messenger != null) { messenger.HideMessage(); } if (detectedGameObject != previousGameObject) { previousTabsManager.Close(); } }
private void PrepareEverything() { dataManager = new DataManager(); tabsManager = new TabsManager(this, dataManager); }
private void CommandEscape_Executed(object sender, ExecutedRoutedEventArgs e) { TabsManager.CommandExec("Escape"); }
private void CommandRight_Executed(object sender, ExecutedRoutedEventArgs e) { TabsManager.CommandExec("Right"); }
void Start() { instance = this; WindowLauncher_RectTransform.SetAsLastSibling(); CurrentTabCount += 1; }
public void Awake() { TM = GameObject.Find("TabsManager").GetComponent <TabsManager> (); thisText = transform.Find("Text").GetComponent <Text> (); thisImage = GetComponent <Image> (); }
private void ButtonNext_Click(object sender, RoutedEventArgs e) { TabsManager.Next(); }