Exemplo n.º 1
0
 public TLBaseKeyFrame(TLTransformer Transformer, double NewTime, float SliceTop, float SliceHeight)
 {
     FTime        = NewTime;
     FSliceTop    = SliceTop;
     FSliceHeight = SliceHeight;
     FTransformer = Transformer;
 }
Exemplo n.º 2
0
        public TLColorPin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings) : base(Host, Transformer, Order, PinSettings, true, true)
        {
            //only load slices after all super constructors have been executed:
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("SliceCount") as XmlAttribute;

            LoadSlices(int.Parse(attr.Value));
        }
Exemplo n.º 3
0
        // CONTROLS
        ///////////////////////



        public TLMidiPin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings) : base(Host, Transformer, Order, PinSettings, true, true)
        {
            InitializeComponent();

            //only load slices after all super constructors have been executed:
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("SliceCount") as XmlAttribute;

            LoadSlices(int.Parse(attr.Value));

            try
            {
                attr          = PinSettings.Attributes.GetNamedItem("MinNote") as XmlAttribute;
                MinNote.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat);
            }
            catch
            {}

            try
            {
                attr          = PinSettings.Attributes.GetNamedItem("MaxNote") as XmlAttribute;
                MaxNote.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat);
            }
            catch
            {}
        }
Exemplo n.º 4
0
        public TLBasePin(TLTransformer Transformer, int Order, XmlNode PinSettings) : base()
        {
            FSettings = new XmlDocument();

            FTransformer = Transformer;
            FOrder       = Order;

            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("Name") as XmlAttribute;

            this.Name = attr.Value;

            try
            {
                //keep this order: type, height, ...
                attr     = PinSettings.Attributes.GetNamedItem("Type") as XmlAttribute;
                FPinType = (TLPinType)Enum.Parse(typeof(TLPinType), attr.Value);

                attr = PinSettings.Attributes.GetNamedItem("Height") as XmlAttribute;
                FUncollapsedHeight = Math.Max(FMinimalHeight, int.Parse(attr.Value));
            }
            catch
            {
                FUncollapsedHeight = 0;
            }
            InitializeHeight();
        }
Exemplo n.º 5
0
        public TLPin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings, bool ShowRemoveButton, bool ShowPinName) : base(Transformer, Order, PinSettings)
        {
            InitializeComponent();

            FHost = Host;
            FUncollapsedHeight = Height;

            this.RemoveButton.Visible = ShowRemoveButton;
            this.PinNameEdit.Visible  = ShowPinName;

            //initializecomponent overrides the name! reset it here
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("Name") as XmlAttribute;

            this.Name        = attr.Value;
            PinNameEdit.Text = Name;

            try
            {
                attr      = PinSettings.Attributes.GetNamedItem("AllInOne") as XmlAttribute;
                FAllInOne = bool.Parse(attr.Value);
            }
            catch
            {}

            try
            {
                attr       = PinSettings.Attributes.GetNamedItem("Collapsed") as XmlAttribute;
                FCollapsed = bool.Parse(attr.Value);
            }
            catch
            {}


            CreatePins();
        }
Exemplo n.º 6
0
 public TLValueKeyFrame(TLTransformer Transformer, double Time, double Value, double Minimum, double Maximum, TLInterpolationType InType, TLInterpolationType OutType, float SliceTop, float SliceHeight) : base(Transformer, Time, SliceTop, SliceHeight)
 {
     SetValue(Value);
     FInType   = InType;
     FOutType  = OutType;
     FMinValue = Minimum;
     FMaxValue = Maximum;
 }
Exemplo n.º 7
0
        public TLRulerPin(TLTransformer Transformer, int Order, XmlNode PinSettings, bool ShowRemoveButton) : base(Transformer, Order, PinSettings)
        {
            InitializeComponent();

            //initializecomponent overrides the name! reset it here
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("Name") as XmlAttribute;

            this.Name = attr.Value;

            this.RemoveButton.Visible = ShowRemoveButton;
        }
Exemplo n.º 8
0
        public TLMidiKeyFrame(TLTransformer Transformer, int Track, int Channel, int Note, int Velocity, double Start, double End, int MinNote, int MaxNote, float SliceTop, float SliceHeight) : base(Transformer, Start, SliceTop, SliceHeight)
        {
            FTrack    = Track;
            FChannel  = Channel;
            this.Note = Note;
            FVelocity = Velocity;

            FMinNote = MinNote;
            FMaxNote = MaxNote;
            FEnd     = End;
        }
Exemplo n.º 9
0
        public TLValuePin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings) : base(Host, Transformer, Order, PinSettings, true, true)
        {
            InitializeComponent();

            //only load slices after all super constructors have been executed:
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("SliceCount") as XmlAttribute;

            LoadSlices(int.Parse(attr.Value));

            try
            {
                attr             = PinSettings.Attributes.GetNamedItem("InterpolationIn") as XmlAttribute;
                FInterpolationIN = (TLInterpolationType)Enum.Parse(typeof(TLInterpolationType), attr.Value);
            }
            catch
            {
                FInterpolationIN = TLInterpolationType.Cubic;
            }

            try
            {
                attr        = PinSettings.Attributes.GetNamedItem("Minimum") as XmlAttribute;
                MinIO.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat);
            }
            catch
            {
                MinIO.Value = -1;
            }

            try
            {
                attr        = PinSettings.Attributes.GetNamedItem("Maximum") as XmlAttribute;
                MaxIO.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat);
            }
            catch
            {
                MaxIO.Value = 1;
            }

            MinIO.Minimum = MaxIO.Minimum = double.MinValue;
            MinIO.Maximum = MaxIO.Maximum = double.MaxValue;
        }
Exemplo n.º 10
0
        public TLPin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings, bool ShowRemoveButton, bool ShowPinName) : base(Transformer, Order, PinSettings)
        {
            float originalHeight = Height;

            InitializeComponent();

            FHost = Host;
            FUncollapsedHeight = Height;

            //compute dpifactor here instead of getting it from graphics.DPIY
            //because controls are set to AutoSizeMode font
            //and therefore the actual scaling factor is different to the dpi-value
            FDPIFactor = Height / originalHeight;

            this.RemoveButton.Visible = ShowRemoveButton;
            this.PinNameEdit.Visible  = ShowPinName;

            //initializecomponent overrides the name! reset it here
            XmlAttribute attr = PinSettings.Attributes.GetNamedItem("Name") as XmlAttribute;

            this.Name        = attr.Value;
            PinNameEdit.Text = Name;

            try
            {
                attr      = PinSettings.Attributes.GetNamedItem("AllInOne") as XmlAttribute;
                FAllInOne = bool.Parse(attr.Value);
            }
            catch
            {}

            try
            {
                attr       = PinSettings.Attributes.GetNamedItem("Collapsed") as XmlAttribute;
                FCollapsed = bool.Parse(attr.Value);
            }
            catch
            {}


            CreatePins();
        }
Exemplo n.º 11
0
 public TLStateKeyFrame(TLTransformer Transformer, double Time, string Name, string Events, float SliceTop, float SliceHeight) : base(Transformer, Time, SliceTop, SliceHeight)
 {
     FName = Name;
     this.EventsAsString = Events;
 }
Exemplo n.º 12
0
 public TLAutomataPin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings) : base(Host, Transformer, Order, PinSettings, false, false)
 {
     AddSlice(0);
 }
Exemplo n.º 13
0
 public TLColorKeyFrame(TLTransformer Transformer, double Time, RGBAColor Color, float SliceTop, float SliceHeight) : base(Transformer, Time, SliceTop, SliceHeight)
 {
     VColor.RGBtoHSV(Color.R, Color.G, Color.B, out FHue, out FSaturation, out FValue);
     FAlpha = Color.A;
 }
Exemplo n.º 14
0
 public TLStringKeyFrame(TLTransformer Transformer, double Time, float Flag, string Value, float SliceTop, float SliceHeight) : base(Transformer, Time, SliceTop, SliceHeight)
 {
     this.Value = Value;
     FPositionY = Flag;
 }