private void propertiesToolStripMenuItem_Click(object sender, EventArgs e) { if (PropertiesEvent != null) { PropertiesEvent.Invoke(); } }
/// <summary> /// Removes the properties from the queue at the given index /// </summary> /// <param name="index">Index.</param> private void RemoveProperties(int index) { if (queue.Count > 0 && index < queue.Count) { PropertiesEvent dequeuedEvent = queue[index]; queue.RemoveAt(index); CalculateActiveProperties(dequeuedEvent.value, false); } }
/// <summary> /// Adds a new properties event scheduled at a given time /// </summary> /// <param name="properties">Properties.</param> /// <param name="time">Time.</param> public void AddProperties(T properties, float duration) { PropertiesEvent newEvent = new PropertiesEvent(properties, currentTime + duration); int eventOrder = 0; for (eventOrder = 0; eventOrder < queue.Count; eventOrder++) { if (newEvent.time < queue[eventOrder].time) { break; } } queue.Insert(eventOrder, newEvent); CalculateActiveProperties(newEvent.value, true); }