/// <summary> /// Handle a button click from the wrap panel. /// </summary> /// <param name="sender">Event sender</param> /// <param name="e">Event arguments</param> private void KinectTileButtonClick(object sender, RoutedEventArgs e) { var button = (KinectTileButton)e.OriginalSource; var selectionDisplay = new SelectionDisplay(button.Label as string); this.kinectRegionGrid.Children.Add(selectionDisplay); e.Handled = true; }
private void Awake() { _selectionDisplay = new SelectionDisplay(); _diplomaticActions = new DiplomaticActions(); _selectionDisplay.PreInitialization(); _leftPanel = GameObject.Find("LeftPanel"); _factionRelations = GameObject.Find("FactionRelations"); _declareWarButton = GameObject.Find("DeclareWarButton"); _offerAllianceButton = GameObject.Find("OfferAllianceButton"); _askToJoinFederationButton = GameObject.Find("AskToJoinFederation"); _factionRelationsText = GameObject.Find("FactionRelations").GetComponent <Text>(); _windowPrompt = GameObject.Find("WindowPrompt"); _windowPromptText = GameObject.Find("WindowPromptText").GetComponent <Text>(); }
/// <summary> /// Handle a button click from the wrap panel. /// </summary> /// <param name="sender">Event sender</param> /// <param name="e">Event arguments</param> private void KinectTileButtonClick(object sender, RoutedEventArgs e) { var button = (KinectTileButton)e.OriginalSource; //Check if this is a file if (File.Exists(path + button.Label.ToString())) { //This is a file // Clear out placeholder content this.wrapPanel.Children.Clear(); //var selectionDisplay = new SelectionDisplay(button.Label as string); selectionDisplay = new SelectionDisplay(); selectionDisplay.printMessage(button.Label as string, "This is a file."); this.kinectRegionGrid.Children.Add(selectionDisplay); //Add the files addFiles(path); } else { //Add the path with the new directory path += button.Label.ToString(); // Clear out placeholder content this.wrapPanel.Children.Clear(); Console.WriteLine(path); //This is a directory //Add the files in the selected directory if (!path.Equals("NOT FOUND")) { addFiles(path); } } e.Handled = true; }
// Use this for initialization void Start() { selector = GetComponent <SelectionDisplay> (); underGraph = GameObject.FindObjectOfType <GraphMaster> (); }