Exemplo n.º 1
0
 public void RemoveTrigger(Trigger trigger)
 {
     _triggers.Remove(trigger);
     trigger.Dispose();
 }
Exemplo n.º 2
0
        private void listTriggers_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var dlg = new TriggerDlg();
            var selectedTrigger = listTriggers.SelectedItem as Trigger;

            var editTrigger = new Trigger();
            selectedTrigger.CopyPublicValues(editTrigger);

            dlg.Trigger = editTrigger;
            dlg.Scene = Scene;

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                Scene.RemoveTrigger(selectedTrigger);
                Scene.AddTrigger(dlg.Trigger);
                UpdateTriggerList();
            }
        }
Exemplo n.º 3
0
        public void AddTrigger(Trigger trigger)
        {
            trigger.Scene = this;

            if (Loaded) trigger.Load();

            _triggers.Add(trigger);
        }