void CinemaActionControl_AlterAction(object sender, ActionItemEventArgs e) { TimelineAction action = e.actionItem as TimelineAction; if (action == null) return; if (e.duration <= 0) { deleteItem(e.actionItem); } else { Undo.RecordObject(e.actionItem, string.Format("Change {0}", action.name)); action.Firetime = e.firetime; action.Duration = e.duration; } }
void CinemaActionControl_AlterAction(object sender, ActionItemEventArgs e) { TimelineAction action = e.actionItem as TimelineAction; if (action == null) { return; } if (e.duration <= 0) { deleteItem(e.actionItem); } else { Undo.RecordObject(e.actionItem, string.Format("Change {0}", action.name)); action.Firetime = e.firetime; action.Duration = e.duration; } }
private void ButtonsContainer_ActionItemAdding(object sender, ActionItemEventArgs e) { if (filterController != null && (e.Item.Action == searchTextAction || e.Item.Action == filterController.FullTextFilterAction)) { var buttons = (ButtonsContainer)sender; var oldItem = e.Item; buttons.BarManager.Items.Remove(oldItem.ShortcutHandler); searchTextActionItem = new PropertyEditor.ButtonsContainersParametrizedActionComboItem((ParametrizedAction)oldItem.Action, buttons); e.Item = searchTextActionItem; if (oldItem.Control != null) { oldItem.Dispose(); } buttons.BarManager.Items.Add(e.Item.ShortcutHandler); searchTextActionItem.Control.TextChanged += Control_TextChangedAsync; if (searchTextActionItem.Control is ComboBoxEdit be) { be.Properties.AutoComplete = false; be.SelectedIndexChanged += ComboBox_SelectedIndexChanged; } } }
private void ChangeFont(WinActionContainerViewItem winActionContainerViewItem, ActionItemEventArgs e) { var buttonsContainersSimpleActionItem = e.Item as ButtonsContainersSimpleActionItem; if (buttonsContainersSimpleActionItem != null) { SimpleButton simpleButton = (buttonsContainersSimpleActionItem.Control); if (simpleButton != null) { if (winActionContainerViewItem.Model.ActionContainer != null) { var actionLink = (IModelActionLinkFont)winActionContainerViewItem.Model.ActionContainer.FirstOrDefault(link => link.ActionId == e.Item.Action.Id); if (actionLink != null) { simpleButton.Font = GetFont(actionLink.Font, simpleButton.Font); } } } } }