Esempio n. 1
0
 public void RemoveElement(SBElement element)
 {
     if (Elements.Remove(element.GetId()))
     {
         ElementRemoveEvent(element);
     }
 }
Esempio n. 2
0
 private void OnElementChanged(SBElement element)
 {
     foreach (DataGridViewRow row in containerElements.Rows)
     {
         if ((Guid)row.Cells["Id"].Value == element.GetId())
         {
             row.Cells["Elements"].Value = element.Name;
             break;
         }
     }
 }
Esempio n. 3
0
 private void OnElementRemoved(SBElement element)
 {
     foreach (DataGridViewRow row in containerElements.Rows)
     {
         if ((Guid)row.Cells["Id"].Value == element.GetId())
         {
             containerElements.Rows.Remove(row);
             break;
         }
     }
 }
Esempio n. 4
0
        public FormEffectFade(SBElement element, CommandFade command)
        {
            Element = element;
            Command = command;

            InitializeComponent();

            inputStartTime.Value    = Command.StartTime;
            inputEndTime.Value      = Command.EndTime;
            inputStartOpacity.Value = (decimal)Command.StartOpacity;
            inputEndOpacity.Value   = (decimal)Command.EndOpacity;
        }
Esempio n. 5
0
        private void buttonEditElement_Click(object sender, EventArgs e)
        {
            Guid id = GetSelectedId();

            if (id == Guid.Empty)
            {
                return;
            }

            SBElement element = Effect.GetElement(id);

            FormUtils.OpenForm(new FormElement(element), this);
        }
Esempio n. 6
0
        public void AddElement(SBElement element)
        {
            bool changed = Elements.ContainsKey(element.GetId());

            Elements[element.GetId()] = element;

            if (changed)
            {
                ElementChangeEvent(element);
            }
            else
            {
                ElementAddEvent(element);
            }
        }
Esempio n. 7
0
        public FormElement(SBElement element)
        {
            Element = element;

            InitializeComponent();

            // Update the list when a new command has been added
            Element.CommandAddEvent    += OnCommandAdded;
            Element.CommandChangeEvent += OnCommandChanged;
            Element.CommandRemoveEvent += OnCommandRemoved;

            if (Element.Name != "")
            {
                inputName.Text = Element.Name;
            }

            foreach (SBCommand command in Element.GetCommands().Values)
            {
                containerCommands.Rows.Add(command.GetId(), command.ToString());
            }
        }
Esempio n. 8
0
 private void OnElementAdded(SBElement element)
 {
     containerElements.Rows.Add(element.GetId(), element.Name);
 }
Esempio n. 9
0
 public override Form GetForm(SBElement element)
 {
     return(new FormEffectFade(element, this));
 }
Esempio n. 10
0
 public abstract Form GetForm(SBElement element);