private void OnUrlTextFieldChange(ChangeEvent <string> evt) { urlText = evt.newValue; AddButton.SetEnabled(!string.IsNullOrEmpty(urlText)); }
public void OnChanged(ChangeEvent <Object> evt) { EventNames.Remove(evt.GetType().FullName); }
private void OnTargetPlatformChanged(ChangeEvent <Enum> targetChangedEvent) { targetPlatform = (BuildTarget)targetChangedEvent.newValue; }
/// <summary> /// 引发ChangeEvent事件 /// </summary> public static void OnChanged(object sender, EventArgs e) { ChangeEvent?.Invoke(sender, e); }
public override void stateChanged(ChangeEvent e) { change(); }
protected void OnRename(ChangeEvent <string> e) { m_OwnerElement.CommandDispatcher.Dispatch(new RenameElementCommand(m_Model as IRenamable, e.newValue)); }
static void Dispatch <T>(IConstantEditorBuilder builder, T oldValue, T newValue) { using (ChangeEvent <T> other = ChangeEvent <T> .GetPooled(oldValue, newValue)) builder.OnValueChanged(other); }
void OnAssetSelectionChanged(ChangeEvent <Object> e) { Asset = e.newValue as Asset; }
private void SetFullScreen(ChangeEvent <bool> evt) { Screen.fullScreen = evt.newValue; }
void PerformSearch(ChangeEvent <string> evt) { m_FoundItems.Clear(); m_SelectedIndex = 0; m_CountLabel.text = string.Empty; m_CountLabel.AddToClassList("unity-treeview-searchbar-hidden"); m_ParentTreeView.ClearSearchResults(); m_FieldHelpLabel.AddToClassList("unity-treeview-searchbar-hidden"); var query = evt.newValue; if (string.IsNullOrEmpty(query)) { m_FieldHelpLabel.RemoveFromClassList("unity-treeview-searchbar-hidden"); return; } var items = m_ParentTreeView.treeItems; if (items == null) { return; } m_CurrentFilter = ElementHierarchySearchBarFilter.All; if (query.StartsWith("#")) { m_CurrentFilter = ElementHierarchySearchBarFilter.Name; } else if (query.StartsWith(".")) { m_CurrentFilter = ElementHierarchySearchBarFilter.Class; } if ((m_CurrentFilter & ElementHierarchySearchBarFilter.All) != ElementHierarchySearchBarFilter.All) { query = query.Remove(0, 1); } m_CurrentQuery = query; foreach (var item in items) { var treeItem = item as TreeViewItem <VisualElement>; var element = treeItem.data; if (m_CurrentFilter == ElementHierarchySearchBarFilter.All && element.typeName.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0) { m_FoundItems.Add(new SearchResultItem() { item = treeItem, highlight = SearchHighlight.Type }); } if ((m_CurrentFilter & ElementHierarchySearchBarFilter.Name) != 0 && element.name.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0) { m_FoundItems.Add(new SearchResultItem() { item = treeItem, highlight = SearchHighlight.Name }); } if ((m_CurrentFilter & ElementHierarchySearchBarFilter.Class) != 0) { foreach (var styleClass in element.GetClasses()) { if (styleClass.IndexOf(query, StringComparison.OrdinalIgnoreCase) >= 0) { m_FoundItems.Add(new SearchResultItem() { item = treeItem, highlight = SearchHighlight.Class }); break; } } } } if (m_FoundItems.Count == 0) { return; } m_CountLabel.RemoveFromClassList("unity-treeview-searchbar-hidden"); m_CountLabel.text = string.Format("{0} of {1}", m_SelectedIndex + 1, m_FoundItems.Count); var firstItem = m_FoundItems.First(); m_ParentTreeView.SelectElement(firstItem.item.data, query, firstItem.highlight); }
private void SetScreenOrientation(ChangeEvent <Enum> evt) { Screen.orientation = (ScreenOrientation)evt.newValue; }
private void ToggleExpansion(ChangeEvent <bool> evt) { SetExpanded(evt.newValue); }
void ChangeLit(ChangeEvent <bool> e) { m_Node.lit = new ToggleData(e.newValue, m_Node.alphaTest.isEnabled); }
public void OnChange(ChangeEvent evt) { this .RefreshFileAsync() .ContinueWith( x => { if (x.IsFaulted) { this.logger.Error(x.Exception, "Failed to refresh file."); } else { this.logger.Info("Successfully refreshed file."); } }); }
void OnUssPathFieldChange(ChangeEvent <string> evt) { m_HasModifiedUssPathManually = true; ValidateSaveDialogPath(evt.newValue); }
void OnTitleFieldChange(ChangeEvent <string> evt) { // Call setter in derived class, if any. title = evt.newValue; }
void VisualTreeAssetChanged(ChangeEvent<Object> evt) { m_CurrentVisualTreeAsset = evt.newValue as VisualTreeAsset; CloneTree(); }
void TitleChangedCallback(ChangeEvent <string> e) { group.title = e.newValue; }
private void SetOverridePlayerSettings(ChangeEvent <bool> evt) { UpdateCustomizedPlayerSettings(evt.newValue); }
void OnChange(ChangeEvent <UnityEngine.Object> evt) { m_Node.owner.owner.RegisterCompleteObjectUndo("Texture Change"); m_PropertyInfo.SetValue(m_Node, evt.newValue, null); this.MarkDirtyRepaint(); }
private void SetResolutionScalingMode(ChangeEvent <Enum> evt) { m_CustomizedPlayerSettings.resolutionScalingMode = (ResolutionScalingMode)evt.newValue; UpdateResolutionScalingMode(m_CustomizedPlayerSettings.resolutionScalingMode); }
void OnPlayRateField(ChangeEvent <int> e) { SetPlayRate(e.newValue); }
private void SyncDpiField(ChangeEvent <int> evt) { m_CustomizedPlayerSettings.targetDpi = evt.newValue; m_DpiField.SetValueWithoutNotify(m_CustomizedPlayerSettings.targetDpi); }
void OnToggleEnable(ChangeEvent <bool> e) { controller.model.enabled = !controller.model.enabled; }
private void SyncDpiSlider(ChangeEvent <int> evt) { m_CustomizedPlayerSettings.targetDpi = GetValidDpi(evt.newValue); m_DpiSlider.SetValueWithoutNotify(m_CustomizedPlayerSettings.targetDpi); }
private void VersionSelectionChanged(ChangeEvent <VersionItem> e) { RefreshAddButton(); }
private void SetDefaultOrientation(ChangeEvent <Enum> evt) { m_CustomizedPlayerSettings.defaultOrientation = (UIOrientation)evt.newValue; UpdateAllowedOrientations(m_CustomizedPlayerSettings.defaultOrientation); }
public static void TriggerOnValueChanged <T>(this IConstantEditorBuilder builder, T oldValue, T newValue) { using (ChangeEvent <T> other = ChangeEvent <T> .GetPooled(oldValue, newValue)) builder.OnValueChanged(other); }
private void ToggleDetailsFoldout(ChangeEvent <bool> evt) { m_Details.style.display = evt.newValue ? DisplayStyle.Flex : DisplayStyle.None; }
public void addChangeEvent(XElement changeNode, Package pkg) { string type = ""; if (changeNode.Attribute("{http://schema.omg.org/spec/XMI/2.1}type") != null) type = changeNode.Attribute("{http://schema.omg.org/spec/XMI/2.1}type").Value; else if (changeNode.Attribute("{http://www.omg.org/spec/XMI/20131001}type") != null) type = changeNode.Attribute("{http://www.omg.org/spec/XMI/20131001}type").Value; MascaretApplication.Instance.VRComponentFactory.Log("Type = " + type); if (type != "uml:ChangeEvent") { return; } string id = ""; if (changeNode.Attribute("{http://schema.omg.org/spec/XMI/2.1}id") != null) id = changeNode.Attribute("{http://schema.omg.org/spec/XMI/2.1}id").Value; else if (changeNode.Attribute("{http://www.omg.org/spec/XMI/20131001}id") != null) id = changeNode.Attribute("{http://www.omg.org/spec/XMI/20131001}id").Value; ChangeEvent changeEvent = new ChangeEvent(id); if (changeNode.Element("changeExpression") != null) { MascaretApplication.Instance.VRComponentFactory.Log("New Change Event : " + id); string changeExp = changeNode.Element("changeExpression").Attribute("value").Value; Expression exp = new Expression(changeExp, this.Model.BasicTypes["boolean"]); changeEvent.ChangeExpression = exp; } /* add in package*/ _events.Add(id, changeEvent); }
private void OnSearchTextChanged(ChangeEvent <string> evt) { OnSearchChange(evt.newValue); }
/// <summary> Calls setFocus() on the currently selected Component in the tabbedPane. /// </summary> public virtual void stateChanged(ChangeEvent event_Renamed) { ((AbstractJamochaPanel) tabbedPane.SelectedComponent).setFocus(); }
void OnWidthValueChanged(ChangeEvent <int> e) { m_HeightPopupField.value = e.newValue; }