protected void ReturnHandler(Event e) { if (e.Target is TextField) { DoLogin(); } }
protected void ReturnHandler(Event e) { if (e.Target is TextField) { SendMessage(); } }
private void ChangeHandler(Event e) { //ValueChangedEvent ve = (ValueChangedEvent)e; //Debug.Log(ve.NewValue); //VSlider s = (VSlider)e.Target; // we might care about the slider touched RgbColor = new Color(_red.Percentage, _green.Percentage, _blue.Percentage); }
private void OnInspectorActiveChanged(Event e) { if (_chkInspect.Selected != OptionsModel.Instance.InspectorActive) { _chkInspect.Selected = OptionsModel.Instance.InspectorActive; } }
private void ChildAddHandler(Event e) { ChildExistenceChangedEvent cece = (ChildExistenceChangedEvent) e; var child = cece.RelatedObject; var index = GetChildIndex(child); //Debug.Log("ChildAddHandler: " + child); if (child is InteractiveComponent) { var uiChild = (InteractiveComponent)child; // ViewStack creates all of its children initially invisible. // They are made as they become the selected child. uiChild.Visible = false; //Debug.Log("Set invisible: " + uiChild); } //if (child is INavigatorContent) //{ // child.addEventListener("labelChanged", navigatorChildChangedHandler); // child.addEventListener("iconChanged", navigatorChildChangedHandler); //} // If we just created the first child and no selected index has // been proposed, then propose this child to be selected. if (NumberOfChildren == 1 && proposedSelectedIndex == -1) { SelectedIndex = 0; } else if (index <= _selectedIndex && NumberOfChildren > 1 && proposedSelectedIndex == -1) { SelectedIndex++; } }
private void OnRunInBackgroundChanged(Event e) { if (_chkRunInBackground.Selected != OptionsModel.Instance.RunInBackground) { _chkRunInBackground.Selected = OptionsModel.Instance.RunInBackground; } }
/// <summary> /// Used for deffered parts /// </summary> /// <param name="e"></param> private void SkinPropertyChangeHandler(Event e) { if (null != SkinParts) { PropertyChangeEvent pce = (PropertyChangeEvent)e; string skinPartID = pce.Property; if (SkinParts.ContainsKey(skinPartID)) { var part = CoreReflector.GetValue(Skin, skinPartID); if (pce.NewValue == null) { if (!(part is IFactory)) { PartRemoved(skinPartID, part); } CoreReflector.SetValue(this, skinPartID, pce.NewValue); } else { part = pce.NewValue; if (!(part is IFactory)) { PartAdded(skinPartID, part); } } } } }
private void OnVolumeChanged(Event e) { if (_sliderVolume.Value != OptionsModel.Instance.Volume) { _sliderVolume.Value = OptionsModel.Instance.Volume; } }
private void ChangeHandler(Event e) { //ValueChangedEvent ve = (ValueChangedEvent)e; //Debug.Log(ve.NewValue); //VSlider s = (VSlider)e.Target; // we might care about the slider touched RgbColor = new Color(_red.Percentage, _green.Percentage, _blue.Percentage); }
private void ChildAddHandler(Event e) { ChildExistenceChangedEvent cece = (ChildExistenceChangedEvent)e; var child = cece.RelatedObject; var index = GetChildIndex(child); //Debug.Log("ChildAddHandler: " + child); if (child is InteractiveComponent) { var uiChild = (InteractiveComponent)child; // ViewStack creates all of its children initially invisible. // They are made as they become the selected child. uiChild.Visible = false; //Debug.Log("Set invisible: " + uiChild); } //if (child is INavigatorContent) //{ // child.addEventListener("labelChanged", navigatorChildChangedHandler); // child.addEventListener("iconChanged", navigatorChildChangedHandler); //} // If we just created the first child and no selected index has // been proposed, then propose this child to be selected. if (NumberOfChildren == 1 && proposedSelectedIndex == -1) { SelectedIndex = 0; } else if (index <= _selectedIndex && NumberOfChildren > 1 && proposedSelectedIndex == -1) { SelectedIndex++; } }
private void ContentGroupElementAddedHandler(Event e) { ElementExistenceEvent eee = (ElementExistenceEvent)e; eee.Element.Owner = this; // Re-dispatch the event DispatchEvent(e); }
private void PressHandler(Event e) { if (e.Target == _btnSubmit) { DoLogin(); return; } }
private void OnTimerTick(Event e) { var frame = _animation.Next(); FrameChangeSignal.Emit(frame); if (frame.Duration > 0) { _timer.Delay = frame.Duration;_timer.Start(); } }
/** * */ private void removedFromStageHandler(Event e) { if (null != _popup && (_popup).Parent != null) { RemoveAndResetPopUp(); } _addedToStage = false; }
private void ContentGroupElementRemovedHandler(Event e) { ElementExistenceEvent eee = (ElementExistenceEvent)e; eee.Element.Owner = null; // Re-dispatch the event DispatchEvent(e); }
private void OnTimerTick(Event e) { var frame = _animation.Next(); FrameChangeSignal.Emit(frame); if (frame.Duration > 0) { _timer.Delay = frame.Duration; _timer.Start(); } }
/// <summary> /// Fires after the message is sent /// </summary> /// <param name="e"></param> private void MessageSentHandler(Event e) { _mask.Unmask(); _mask = null; _timer.RemoveEventListener(Timer.COMPLETE, MessageSentHandler); Alert.Show("Info", "Message sent!", AlertButtonFlag.Ok, delegate { SetFocus(); }); }
// ReSharper disable VirtualMemberNeverOverriden.Global /// <summary> /// /// </summary> /// <param name="e"></param> protected virtual void OnButton(Event e) // ReSharper restore VirtualMemberNeverOverriden.Global { ButtonEvent be = (ButtonEvent)e; if (be.ButtonId == "submit") // the default button ID for submittion { //Debug.Log("Submitting form..."); Submit(); } }
/// <summary> /// Fires after the message is sent /// </summary> /// <param name="e"></param> private void LogInHandler(Event e) { _mask.Unmask(); _mask = null; _timer.RemoveEventListener(Timer.COMPLETE, LogInHandler); DispatchLoginEvent(); Alert.Show("Info", "You are logged in.", AlertButtonFlag.Ok, delegate { SetFocus(); }); }
private void ChildRemoveHandler(Event e) { ChildExistenceChangedEvent cece = (ChildExistenceChangedEvent)e; var child = cece.RelatedObject; var index = GetChildIndex(child); //if (child is INavigatorContent) //{ // child.removeEventListener("labelChanged", navigatorChildChangedHandler); // child.removeEventListener("iconChanged", navigatorChildChangedHandler); //} // Handle the simple case. if (index > _selectedIndex) { return; } var currentSelectedIndex = _selectedIndex; // This matches one of the two conditions: // 1. a view before the current was deleted, or // 2. the current view was deleted and it was also // at the end of the stack. // In both cases, we need to decrement selectedIndex. if (index < currentSelectedIndex || currentSelectedIndex == (NumberOfChildren - 1)) { // If the selectedIndex was already 0, it should go to -1. // -1 is a special value; in order to avoid runtime errors // in various methods, we need to skip the range checking in // commitSelectedIndex() and set _selectedIndex explicitly here. if (currentSelectedIndex == 0) { SelectedIndex = -1; _selectedIndex = -1; } else { SelectedIndex--; } } else if (index == currentSelectedIndex) { // If we're deleting the currentSelectedIndex and there is another // child after it, it will become the new selected child so we // need to make sure it is instantiated. _needToInstantiateSelectedChild = true; InvalidateProperties(); } }
private void ChildRemoveHandler(Event e) { ChildExistenceChangedEvent cece = (ChildExistenceChangedEvent) e; var child = cece.RelatedObject; var index = GetChildIndex(child); //if (child is INavigatorContent) //{ // child.removeEventListener("labelChanged", navigatorChildChangedHandler); // child.removeEventListener("iconChanged", navigatorChildChangedHandler); //} // Handle the simple case. if (index > _selectedIndex) return; var currentSelectedIndex = _selectedIndex; // This matches one of the two conditions: // 1. a view before the current was deleted, or // 2. the current view was deleted and it was also // at the end of the stack. // In both cases, we need to decrement selectedIndex. if (index < currentSelectedIndex || currentSelectedIndex == (NumberOfChildren - 1)) { // If the selectedIndex was already 0, it should go to -1. // -1 is a special value; in order to avoid runtime errors // in various methods, we need to skip the range checking in // commitSelectedIndex() and set _selectedIndex explicitly here. if (currentSelectedIndex == 0) { SelectedIndex = -1; _selectedIndex = -1; } else { SelectedIndex--; } } else if (index == currentSelectedIndex) { // If we're deleting the currentSelectedIndex and there is another // child after it, it will become the new selected child so we // need to make sure it is instantiated. _needToInstantiateSelectedChild = true; InvalidateProperties(); } }
private void RedispatchLayoutEvent(Event e) { PropertyChangeEvent pce = e as PropertyChangeEvent; if (null != pce) { switch (pce.Property) { case "verticalScrollPosition": case "horizontalScrollPosition": DispatchEvent(e); break; } } }
private void SetResolution(Event e) { bool fullScreen = _chkFullScreen.Selected; ResolutionDescriptor resolutionDescriptor = (ResolutionDescriptor)_list.SelectedItem; OptionsModel.Instance.FullScreen = fullScreen; OptionsModel.Instance.Resolution = resolutionDescriptor; Resolution resolution = resolutionDescriptor.Resolution; Debug.Log(string.Format("Setting resoulution to {0} [full screen: {1}]", new Point(resolution.width, resolution.height), fullScreen)); Screen.SetResolution(resolution.width, resolution.height, fullScreen); ExecCallback(SUBMIT); }
/// <summary> /// Handler on button press /// </summary> /// <param name="e"></param> private void PressHandler(Event e) { #if DEBUG if (DebugMode) { Debug.Log("Press"); } #endif if (!DictButton2Id.ContainsKey((Button)e.Target)) { return; } //Hide(); // crutial - start Hide() here ExecCallback(DictButton2Id[(Button)e.Target]); }
private void PressHandler(Event e) { if (e.Target == _btnCc) { var parent = (Group)_txtCc.Parent; parent.Visible = parent.IncludeInLayout = _btnCc.Selected; } else if (e.Target == _btnBcc) { var parent = (Group)_txtBcc.Parent; parent.Visible = parent.IncludeInLayout = _btnBcc.Selected; } else if (e.Target == _btnSend) { SendMessage(); return; } }
/** * * Called when contents within the dataProvider changes. * * Param: event The collection change event */ protected virtual void DataProviderCollectionChangeHandler(Event e) { if (e is CollectionEvent) { var ce = (CollectionEvent)e; if (ce.Kind == CollectionEventKind.ADD) { ItemAdded(ce.Location); } else if (ce.Kind == CollectionEventKind.REMOVE) { ItemRemoved(ce.Location); } else if (ce.Kind == CollectionEventKind.RESET) { // Data provider is being reset, clear out the selection if (DataProvider.Length == 0) { SetSelectedIndex(NO_SELECTION, false); SetCurrentCaretIndex(NO_CARET); } else { _dataProviderChanged = true; InvalidateProperties(); } } else if (ce.Kind == CollectionEventKind.REPLACE || ce.Kind == CollectionEventKind.MOVE || ce.Kind == CollectionEventKind.REFRESH) { //These cases are handled by the DataGroup skinpart } } }
/// <summary> /// Fires after the message is sent /// </summary> /// <param name="e"></param> private void MessageSentHandler(Event e) { _mask.Unmask(); _mask = null; _timer.RemoveEventListener(Timer.COMPLETE, MessageSentHandler); Alert.Show("Info", "Message sent!", AlertButtonFlag.Ok, delegate { SetFocus(); }); }
protected void ReturnHandler(Event e) { if (e.Target is TextField) SendMessage(); }
private void PressHandler(Event e) { Alert.Show("Info", string.Format(@"The button was pressed. The input text is: ""{0}""", _textField.Text), AlertButtonFlag.Ok, delegate { SetFocus(); }); }
/// <summary> /// Handler on button press /// </summary> /// <param name="e"></param> private void PressHandler(Event e) { #if DEBUG if (DebugMode) { Debug.Log("Press"); } #endif if (!DictButton2Id.ContainsKey((Button)e.Target)) return; //Hide(); // crutial - start Hide() here ExecCallback(DictButton2Id[(Button)e.Target]); }
public void Load(Event e) { Debug.Log("Loading level 1"); Application.LoadLevel(1); }
private static void OnGizmoTimerComplete(Event e) { Hide(); }
private void LayoutUseVirtualLayoutChangedHandler(Event e) { ChangeUseVirtualLayout(); }
protected void ReturnHandler(Event e) { if (e.Target is TextField) DoLogin(); }
private void PressHandler(Event e) { if (e.Target == _btnSubmit) { DoLogin(); return; } }
private void OnTimerComplete(eDriven.Core.Events.Event e) { _timer.Stop(); SystemManager.Instance.Enabled = false; }
/// <summary> /// Fires after the message is sent /// </summary> /// <param name="e"></param> private void LogInHandler(Event e) { _mask.Unmask(); _mask = null; _timer.RemoveEventListener(Timer.COMPLETE, LogInHandler); DispatchLoginEvent(); Alert.Show("Info", "You are logged in.", AlertButtonFlag.Ok, delegate { SetFocus(); }); }
/// <summary> /// Used for deffered parts /// </summary> /// <param name="e"></param> private void SkinPropertyChangeHandler(Event e) { if (null != SkinParts) { PropertyChangeEvent pce = (PropertyChangeEvent) e; string skinPartID = pce.Property; if (SkinParts.ContainsKey(skinPartID)) { var part = CoreReflector.GetValue(Skin, skinPartID); if (pce.NewValue == null) { if (!(part is IFactory)) PartRemoved(skinPartID, part); CoreReflector.SetValue(this, skinPartID, pce.NewValue); } else { part = pce.NewValue; if (!(part is IFactory)) PartAdded(skinPartID, part); } } } }
private static void OnGizmoTimerComplete(Event e) { Hide(); }
/** * */ private void removedFromStageHandler(Event e) { if (null != _popup && (_popup).Parent != null) RemoveAndResetPopUp(); _addedToStage = false; }
private void RedispatchLayoutEvent(Event e) { PropertyChangeEvent pce = e as PropertyChangeEvent; if (null != pce) { switch (pce.Property) { case "verticalScrollPosition": case "horizontalScrollPosition": DispatchEvent(e); break; } } }
public void Load(Event e) { Debug.Log("Loading level 1"); Application.LoadLevel(1); }
//-------------------------------------------------------------------------- // // Event Handlers // //-------------------------------------------------------------------------- /** * */ private void addedToStageHandler(Event e) { _addedToStage = true; AddOrRemovePopup(); }
//-------------------------------------------------------------------------- // // Event Handlers // //-------------------------------------------------------------------------- /** * */ private void addedToStageHandler(Event e) { _addedToStage = true; AddOrRemovePopup(); }
private void OnInspectorActiveChanged(Event e) { if (_chkInspect.Selected != OptionsModel.Instance.InspectorActive) _chkInspect.Selected = OptionsModel.Instance.InspectorActive; }
/** * * Called when contents within the dataProvider changes. * * Param: event The collection change event */ protected virtual void DataProviderCollectionChangeHandler(Event e) { if (e is CollectionEvent) { var ce = (CollectionEvent) e; if (ce.Kind == CollectionEventKind.ADD) { ItemAdded(ce.Location); } else if (ce.Kind == CollectionEventKind.REMOVE) { ItemRemoved(ce.Location); } else if (ce.Kind == CollectionEventKind.RESET) { // Data provider is being reset, clear out the selection if (DataProvider.Length == 0) { SetSelectedIndex(NO_SELECTION, false); SetCurrentCaretIndex(NO_CARET); } else { _dataProviderChanged = true; InvalidateProperties(); } } else if (ce.Kind == CollectionEventKind.REPLACE || ce.Kind == CollectionEventKind.MOVE || ce.Kind == CollectionEventKind.REFRESH) { //These cases are handled by the DataGroup skinpart } } }
private void OnDetailsActiveChanged(Event e) { //if (_chkDetails.Selected != OptionsModel.Instance.DetailsActive) //_chkDetails.Selected = OptionsModel.Instance.DetailsActive; }
private void PressHandler(Event e) { if (e.Target == _btnCc) { var parent = (Group)_txtCc.Parent; parent.Visible = parent.IncludeInLayout = _btnCc.Selected; } else if (e.Target == _btnBcc) { var parent = (Group)_txtBcc.Parent; parent.Visible = parent.IncludeInLayout = _btnBcc.Selected; } else if (e.Target == _btnSend) { SendMessage(); return; } }
private void OnRunInBackgroundChanged(Event e) { if (_chkRunInBackground.Selected != OptionsModel.Instance.RunInBackground) _chkRunInBackground.Selected = OptionsModel.Instance.RunInBackground; }
private void SetResolution(Event e) { bool fullScreen = _chkFullScreen.Selected; ResolutionDescriptor resolutionDescriptor = (ResolutionDescriptor)_list.SelectedItem; OptionsModel.Instance.FullScreen = fullScreen; OptionsModel.Instance.Resolution = resolutionDescriptor; Resolution resolution = resolutionDescriptor.Resolution; Debug.Log(string.Format("Setting resoulution to {0} [full screen: {1}]", new Point(resolution.width, resolution.height), fullScreen)); Screen.SetResolution(resolution.width, resolution.height, fullScreen); ExecCallback(SUBMIT); }
private void OnVolumeChanged(Event e) { if (_sliderVolume.Value != OptionsModel.Instance.Volume) _sliderVolume.Value = OptionsModel.Instance.Volume; }
// ReSharper disable VirtualMemberNeverOverriden.Global /// <summary> /// /// </summary> /// <param name="e"></param> protected virtual void OnButton(Event e) // ReSharper restore VirtualMemberNeverOverriden.Global { ButtonEvent be = (ButtonEvent)e; if (be.ButtonId == "submit") // the default button ID for submittion { //Debug.Log("Submitting form..."); Submit(); } }
private void OnDetailsActiveChanged(Event e) { //if (_chkDetails.Selected != OptionsModel.Instance.DetailsActive) //_chkDetails.Selected = OptionsModel.Instance.DetailsActive; }
private void PressHandler(Event e) { Alert.Show("Info", string.Format(@"The button was pressed. The input text is: ""{0}""", _textField.Text), AlertButtonFlag.Ok, delegate { SetFocus(); }); }
private void DataProviderCollectionChangeHandler(Event e) { CollectionEvent ce = (CollectionEvent) e; switch (ce.Kind) { case CollectionEventKind.ADD: { // items are added // figure out what items were added and where // for virtualization also figure out if items are now in view AdjustAfterAdd(ce.Items, ce.Location); break; } case CollectionEventKind.REPLACE: { // items are replaced AdjustAfterReplace(ce.Items, ce.Location); break; } case CollectionEventKind.REMOVE: { // items are added // figure out what items were removed // for virtualization also figure out what items are now in view AdjustAfterRemove(ce.Items, ce.Location); break; } case CollectionEventKind.MOVE: { // one item is moved AdjustAfterMove(ce.Items[0], ce.Location, ce.OldLocation); break; } case CollectionEventKind.REFRESH: { // from a filter or sort...let's just reset everything RemoveDataProviderListener(); _dataProviderChanged = true; InvalidateProperties(); break; } case CollectionEventKind.RESET: { // reset everything RemoveDataProviderListener(); _dataProviderChanged = true; InvalidateProperties(); break; } case CollectionEventKind.UPDATE: { // if a renderer is currently being updated, let's // just ignore any UPDATE events. if (_renderersBeingUpdated) break; //update the renderer's data and data-dependant //properties. for (int i = 0; i < ce.Items.Count; i++) { PropertyChangeEvent pce = (PropertyChangeEvent) ce.Items[i]; if (null != pce) { int index = DataProvider.GetItemIndex(pce.Source); IVisualElement renderer = _indexToRenderer[index]; SetUpItemRenderer(renderer, index, pce.Source); } } break; } } }