Ejemplo n.º 1
0
        /// <summary>
        /// Gets a deep copy of this instance.
        /// </summary>
        /// <returns>A deep copy of this instance.</returns>
        public override MoveableSlot DeepCopy()
        {
            TriggerSlot copy = new TriggerSlot(fitter);

            copy.Contents = this.Contents.DeepCopy();
            return(copy);
        }
Ejemplo n.º 2
0
        public TriggerBar(Fitter fitter)
        {
            if (fitter == null)
            {
                throw new ArgumentNullException("fitter");
            }

            currentScriptIsBasedOn = String.Empty;

            spine = new Spine(fitter, 3);
            Grid.SetRow(spine, 0);
            Grid.SetColumn(spine, 0);
            spine.Margin = new Thickness(14, 0, 0, 0);

            triggerSlot           = new TriggerSlot(new TriggerFitter());
            triggerSlot.AllowDrop = true;
            triggerSlot.Margin    = new Thickness(100, 0, 0, 0);

            InitializeComponent();

            triggerBarPanel.Children.Add(triggerSlot);

            saveButton        = new BigButton("Save");
            saveButton.Margin = new Thickness(35, 5, 5, 5);

            triggerBarPanel.Children.Add(saveButton);

            spine.Extends = border.Height + 20;
            Grid.SetZIndex(spine, 1);
            Grid.SetZIndex(border, 2);
            mainGrid.Children.Add(spine);

            Effect = new DropShadowEffect();

            triggerSlot.Changed += delegate { OnChanged(new EventArgs()); };
            spine.Changed       += delegate { OnChanged(new EventArgs()); };
        }