private void ParseJson(string json) { var values = JsonConvert.DeserializeObject <Dictionary <string, dynamic> >(json); if (values["groups"] != null) { foreach (var group in values["groups"]) { AddGroup(null, null); var g = Groups[Groups.Count - 1]; g.Hotkey = group["hotkey"] ?? ""; foreach (var seq in group["sequences"]) { g.AddSequence(null, null); var s = g.Sequences[g.Sequences.Count - 1]; s.IsActive = seq["active"] ?? true; foreach (var action in seq["actions"]) { s.AddAction(null, null); var a = s.Actions[s.Actions.Count - 1]; ActionView.FromJson(action, a); } } } } }
private void Initialize() { _actionView = new ActionView(); _actionView.Refresh(Scenario.ActionHolder, Scenario); _actionView.Modified += (element) => Modified?.Invoke(); gridContent.Children.Add(_actionView); }
public void checkSelectActions() { if (!gameOverC) { if (!selection && isLoad) { if (Input.GetKey(KeyCode.UpArrow)) { actualActionView = actualActionView.back(); activeActionSelector(); } if (Input.GetKey(KeyCode.DownArrow)) { actualActionView = actualActionView.next(); activeActionSelector(); } if (Input.GetKey(KeyCode.RightArrow)) { selection = true; actualActionView.selection(actualPlayer); } } } }
public void Apply(ActionView action) { if (Tags != null) { action.Tags = action.Tags .Union(Tags) .ToArray(); } if (Facettes != null) { foreach (var facetteName in Facettes.Keys) { if (!action.Facettes.ContainsKey(facetteName)) { action.Facettes[facetteName] = Facettes[facetteName]; } } } action.Reassure = action.Reassure || Reassure; action.NoLogs = action.NoLogs || NoLogs; action.KeepOpen = action.KeepOpen || KeepOpen; action.AlwaysClose = action.AlwaysClose || AlwaysClose; action.Visible = action.Visible && !Background; }
public void resetActionView() { if (actualActionView != null) { actualActionView.disablePointer(); } actualActionView = GetComponentInChildren <AttackActionView> (); }
public async Task <ActionResult <ActionView> > GetActionView() { var actionView = new ActionView() { ActionType = "TextAction" }; return(actionView); }
public void CreateAction(Action <int> inputAction, string description, int id, Sprite sprite) { GameObject newAction = Instantiate(actionGameObject); newAction.transform.SetParent(actionsHolder, true); newAction.transform.position = Vector3.zero; ActionView view = newAction.GetComponent <ActionView>(); view.Setup(inputAction, description, id, sprite); }
private void button1_Click(object sender, EventArgs e) { ActionView actionView = new ActionView(); ActionCodeService actionService = new ActionCodeService(); IList actionList = actionService.getAllActionCodes(); //actionList.Add(new ActionCode("1","a")); //actionList.Add(new ActionCode("2", "b")); ActionCodeController controller = new ActionCodeController(actionView, actionList); controller.LoadView(); actionView.ShowDialog();; }
public bool Match(ActionView action) { if (Include != null && Include.Any(m => !m.Match(action))) { return(false); } if (Exclude != null && Exclude.Any(m => m.Match(action))) { return(false); } return(true); }
public void AllocView(IntPtr ObjectPtr) { if (Alloced) { Track_PitchView.setPartsObjectPtr(ObjectPtr); Track_NoteView.setPartsObjectPtr(ObjectPtr); Global_ActionView.setPartsObjectPtr(ObjectPtr); Param_PitchView.setPartsObjectPtr(ObjectPtr); Param_DynamicView.setPartsObjectPtr(ObjectPtr); Track_NoteView.setSingerDataFinder(SingerDataFinders); } else { Track_NoteView = new NoteView(ObjectPtr, this.PianoWindow); Track_NoteView.setSingerDataFinder(SingerDataFinders); Track_PitchView = new PitchView(ObjectPtr, this.PianoWindow); Param_PitchView = new PITParamView(ObjectPtr, this.ParamWindow); Param_DynamicView = new DYNParamView(ObjectPtr, this.ParamWindow); Global_ActionView = new ActionView(ObjectPtr, this.PianoWindow, this.ParamWindow); CopyPasteController = new CopyPaste(ref Track_NoteView, ref Track_PitchView); CopyPasteController.NoteCopyMemoryChanged += CopyPasteController_NoteCopyMemoryChanged; Track_NoteView.NoteActionBegin += Track_NoteView_NoteActionBegin; Track_NoteView.NoteActionEnd += Track_NoteView_NoteActionEnd; Track_NoteView.NoteSelecting += Track_NoteView_NoteSelecting; Track_PitchView.PitchActionBegin += Track_PitchView_PitchActionBegin; Track_PitchView.PitchActionEnd += Track_PitchView_PitchActionEnd; Param_DynamicView.DynActionBegin += Param_DynamicView_DynActionBegin; Param_DynamicView.DynActionEnd += Param_DynamicView_DynActionEnd; Param_PitchView.PitchActionBegin += Param_PitchView_PitchActionBegin; Param_PitchView.PitchActionEnd += Param_PitchView_PitchActionEnd; Global_ActionView.TickPosChange += Global_ActionView_TickPosChange; Track_NoteView.NoteSelectListChange += Track_NoteView_NoteSelectListChange; Alloced = true; SetNoteViewTool(NoteView.NoteToolsType.Select); SetParamGraphicTool(PitchView.PitchDragingType.DrawGraphS); SwitchParamView(ParamViewType.Dynamic); } try { ParamWindow.RedrawPiano(); PianoWindow.RedrawPiano(); LastSelectIndex = -1; } catch {; } }
/// <inheritdoc/> /// <since_tizen> 9 </since_tizen> public override void CopyFrom(BindableObject bindableObject) { base.CopyFrom(bindableObject); if (bindableObject is AppBarStyle appBarStyle) { BackButton.CopyFrom(appBarStyle.BackButton); TitleTextLabel.CopyFrom(appBarStyle.TitleTextLabel); ActionView.CopyFrom(appBarStyle.ActionView); ActionButton.CopyFrom(appBarStyle.ActionButton); NavigationPadding = (appBarStyle.NavigationPadding == null) ? new Extents() : new Extents(appBarStyle.NavigationPadding); ActionPadding = (appBarStyle.ActionPadding == null) ? new Extents() : new Extents(appBarStyle.ActionPadding); ActionCellPadding = (appBarStyle.ActionCellPadding == null) ? new Size2D() : new Size2D(appBarStyle.ActionCellPadding.Width, appBarStyle.ActionCellPadding.Height); } }
public void AddAction(object sender, RoutedEventArgs e) { // Add action and arrow on Click ActionView action = new ActionView(); action.ParentSequence = this; action.SetValue(DockPanel.DockProperty, Dock.Right); Actions.Add(action); ArrowRight arr = new ArrowRight(); arr.SetValue(DockPanel.DockProperty, Dock.Right); sequencePanel.Children.Insert(sequencePanel.Children.Count - 1, action); sequencePanel.Children.Insert(sequencePanel.Children.Count - 1, arr); }
internal void LogReferencingActionRemoval(ActionView av) { if (_relatedActionRemovals == null) { _relatedActionRemovals = new List <IUndoRedo>(1); } var cav = av as CompositeActionView; if (cav != null) { var ca = (CompositeAction)cav.action; _relatedActionRemovals.Add(new ConnectCompositeOperation(cav, ca.connectorAction, null)); } else { _relatedActionRemovals.Add(new RemoveActionOperation(_ui, av)); } }
/// <summary> /// Shows the download progress view. /// </summary> public void ShowDownloadProgressView() { DownloadProgressView = new CircularProgressView(new CGRect(0, 0, 30, 30)); InvisibleCancelDownloadButton = new UIButton(DownloadProgressView.Frame); InvisibleCancelDownloadButton.BackgroundColor = UIColor.Clear; InvisibleCancelDownloadButton.TouchUpInside += delegate { cancelDownloadAlert(publication, (PublicationView)Superview); }; RemoveActionSubview(); ActionView.AddSubview(DownloadProgressView); ActionView.AddSubview(InvisibleCancelDownloadButton); if (ActionLabel != null) { ActionLabel.Hidden = true; } }
public SaveActionFromForm() { _action = CopyAction.Value; _display = MainProgram.Self.actionView; NameViewSave(); StateViewSave(); PlatformInstalationSave(); ECCCSave(); CalculatioBySave(); PNCEstymationSave(); ANCChangeSave(); STKChangeSave(); NextANCSave(); CalculationGroupSave(); if (new CheckIfEqual().Check()) { } }
public bool Match(ActionView actionView) { switch (Mode) { case ActionMatchMode.Description: return(MatchString(actionView.Title)); case ActionMatchMode.Command: return(MatchString(actionView.Command)); case ActionMatchMode.Facette: return(MatchString(actionView.GetFacetteValue(NormalizedFacette))); case ActionMatchMode.Tag: return(actionView.Tags.Any(MatchString)); default: throw new ArgumentOutOfRangeException(); } }
private void Form1_Load(object sender, EventArgs e) { ProjectObject poj = LoadUST(@"D:\VocalUtau\VocalUtau.DebugExampleFiles\DemoUSTS\Sakurane2.Tracks\Track-4b158252-eb7f-4223-b7b0-d78f32e044ec.ust"); OAC.ReAlloc(poj.TrackerList[1].PartList[0]); NV = new NoteView(OAC.IntPtr, this.pianoRollWindow1); PV = new PitchView(OAC.IntPtr, this.pianoRollWindow1); PitV = new PITParamView(OAC.IntPtr, this.paramCurveWindow1); DynV = new DYNParamView(OAC.IntPtr, this.paramCurveWindow1); UAU = new UndoAbleUtils <PartsObject>(); AV = new ActionView(OAC.IntPtr, this.pianoRollWindow1, this.paramCurveWindow1); NV.HandleEvents = false; PV.HandleEvents = true; PV.EarseModeV2 = true; PitV.HandleEvents = false; DynV.HandleEvents = true; btn_DYN.BackColor = DynV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control; btn_PIT.BackColor = PitV.HandleEvents ? System.Drawing.SystemColors.ControlDark : System.Drawing.SystemColors.Control; NV.NoteActionEnd += NV_NoteActionEnd; PV.PitchActionEnd += PV_PitchActionEnd; PitV.PitchActionEnd += PitV_PitchActionEnd; DynV.DynActionEnd += DynV_DynActionEnd; NV.NoteActionBegin += NV_NoteActionBegin; PV.PitchActionBegin += PV_PitchActionBegin; PitV.PitchActionBegin += PitV_PitchActionBegin; DynV.DynActionBegin += DynV_DynActionBegin; this.pianoRollWindow1.TrackPaint += TrackPaint; InitEventAction(); AV.TickPos = 480; }
/// <summary> /// Shows the download action view. /// </summary> /// <param name="publication">Publication.</param> /// <param name="startDownload">Start download.</param> /// <param name="cancelDownloadAlert">Cancel download alert.</param> /// <param name="hasFailed">If set to <c>true</c> has failed.</param> public void ShowDownloadActionView(Publication publication, DoPublicationDownload startDownload, ShowAlert cancelDownloadAlert, bool hasFailed = false) { RemoveActionSubview(); if (publication.PublicationStatus == PublicationStatusEnum.NotDownloaded) { UIImageView downloadImageView = hasFailed ? new UIImageView(new UIImage("Images/Publication/Cover/DownloadFailed.png")) : new UIImageView(new UIImage("Images/Publication/Cover/CloudInstall.png")); if (!hasFailed) { downloadImageView.Frame = new CGRect(0, 0, ACTION_VIEW_WIDTH, ACTION_VIEW_WIDTH); } else { TriangleBackgroundColor = UIColor.FromRGB(253, 59, 47); SetNeedsDisplay(); } downloadImageView.UserInteractionEnabled = false; ActionView.AddSubview(downloadImageView); } ActionView.AddGestureRecognizer(new UITapGestureRecognizer(delegate() { startDownload(publication, (PublicationView)Superview); ShowDownloadProgressView(); })); ActionView.UserInteractionEnabled = true; this.publication = publication; this.cancelDownloadAlert = cancelDownloadAlert; if (ActionLabel != null) { ActionLabel.Hidden = false; ActionLabel.AddGestureRecognizer(new UITapGestureRecognizer(delegate() { startDownload(publication, (PublicationView)Superview); ShowDownloadProgressView(); })); } }
/// <summary> /// this function sets the menu of actions /// </summary> private void SetActionMenu() { // step1: get all actions Dictionary<action.Action, XElement> actionList = new Dictionary<ICE.action.Action, XElement>(); foreach (string actionXml in this.node.Actions) { try { XElement actionElement = XDocument.Parse(actionXml).Root; string actionName = actionElement.Attribute(xml.DataXmlContent.IDRefAttributeOfActionElementName).Value; action.Action action = this.viewManager.Settings.GetAction(actionName); if (action != null && (!action.IsGroupAction)) { actionList.Add(action, actionElement); } } catch (Exception) { /* do nothing*/ } } if (this.node.IsSelected) { action.Action collapse = action.Action.GetCollapseAction(); actionList.Add(collapse, null); } else { action.Action expand = action.Action.GetExpandAction(); actionList.Add(expand, null); } ActionMenu menu = new ActionMenu(); menu.Color = this.viewManager.Settings.ActionsCircleColor; foreach (action.Action action in actionList.Keys) { // step2: create an actionView for each of them List<action.IActionable> targets = new List<IActionable>(); targets.Add(this); ActionView actionView = new ActionView(targets, action); // step3: add the action to a action menu menu.AddActionView(actionView); } // step4: subscribe to the close event menu.Closed += delegate(object sender, EventArgs args) { this.actionMenu = null; }; // step5: display this.actionMenu = menu; this.viewManager.DisplayActionMenu(menu); menu.Open(); }
internal SetActionOperation(AIUI ui, ActionView newAction) : base(ui) { _newAction = newAction; }
/// <summary> /// This function adds the action to the menu /// </summary> /// <param name="actionView">a visual action representration</param> public void AddActionView(ActionView actionView) { ScaleTransform st = new ScaleTransform(); actionView.RenderTransform = st; actionView.Measure(new Size(double.MaxValue, double.MaxValue)); st.CenterX = actionView.DesiredSize.Width / 2; st.CenterY = actionView.DesiredSize.Height / 2; if (!this.isOpen) { st.ScaleX = 0; st.ScaleY = 0; } actionView.Executed += new EventHandler(this.ActionView_Executed); actionView.MouseEnter += new MouseEventHandler(this.ActionView_MouseEnter); actionView.MouseLeave += new MouseEventHandler(this.ActionView_MouseLeave); cilclePanel.Children.Add(actionView); }
internal RemoveActionOperation(AIUI ui, ActionView target) : base(ui) { _target = target; }
public void NavigateToAction() { var view = new ActionView(); view.ShowDialog(); }
/// <summary> /// This function updates the available actions from the current group of nodes /// </summary> private void UpdateFromGroupList() { foreach (UIElement item in new List<UIElement>(this.nodeListPanel.Children)) { if (!this.nodeGroupList.ContainsValue((ObjectGroupListItem)item)) { this.nodeListPanel.Children.Remove(item); } } foreach (UIElement item in this.nodeGroupList.Values) { if (!this.nodeListPanel.Children.Contains(item)) { this.nodeListPanel.Children.Add(item); } } this.actionTargetsTable = new Dictionary<ICE.action.Action, List<action.IActionable>>(); foreach (NodeViewManager node in this.nodeGroupList.Keys) { foreach (action.Action action in node.GetGroupableActions()) { if (!this.actionTargetsTable.ContainsKey(action)) { this.actionTargetsTable.Add(action, new List<action.IActionable>()); } this.actionTargetsTable[action].Add(node); } } List<action.Action> sortedActions = new List<ICE.action.Action>(from act in this.actionTargetsTable.Keys orderby this.actionTargetsTable[act].Count descending select act); this.ActionListPanel.Children.Clear(); foreach (action.Action action in sortedActions) { ActionView view = new ActionView(this.actionTargetsTable[action], action); view.MouseEnter += new MouseEventHandler(this.ActionView_MouseEnter); view.MouseLeave += new MouseEventHandler(this.ActionView_MouseLeave); this.ActionListPanel.Children.Add(view); } }
public void Save(ActionView viewModel) { throw new NotImplementedException(); }