public uint AddFocusHandler (FocusHandler handler) { if (focusHandlers.ContainsValue (handler)) return 0; lastFocusHandlerId++; focusHandlers [lastFocusHandlerId] = handler; return lastFocusHandlerId; }
private void SetFocusOnMainWindown(object s, System.Timers.ElapsedEventArgs e) { FocusHandler.SetFocus(System.Reflection.Assembly.GetExecutingAssembly().GetName().Name); }
private void SetFocusOnMainWindown() { FocusHandler.SetFocus(string.Format("{0}.exe", System.Reflection.Assembly.GetExecutingAssembly().GetName().Name)); }
void Awake() { myButton = GetComponent<Button>(); // <-- you get access to the button component here myButton.onClick.AddListener(VerifFormule); // <-- you assign a method to the button OnClick event here focusHandler = (FocusHandler)GameObject.Find("Canvas/PanelDessous/FormulePan").GetComponent<FocusHandler>(); terrainHandler = (TerrainHandler)GameObject.Find("Plane").GetComponent<TerrainHandler>(); }