Inheritance: IAudioDevice
Ejemplo n.º 1
0
        public Editor(Rodent instance)
        {
            this.Rodent     = instance;
            this.ClientSize = new Size(BaseBitmap.Width, BaseBitmap.Height + TopBarBitmap.Height);

            Gain      = new BitmapKnob(KnobsBitmap, Knob1Width, KnobHeight, Positions, 0, 0, 0, KnobHeight);
            Gain.Top  = TopH;
            Gain.Left = Knob1X;

            Filter      = new BitmapKnob(KnobsBitmap, Knob2Width, KnobHeight, Positions, Knob1Width, 0, 0, KnobHeight);
            Filter.Top  = TopH;
            Filter.Left = Knob2X;

            Vol      = new BitmapKnob(KnobsBitmap, Knob3Width, KnobHeight, Positions, Knob1Width + Knob2Width, 0, 0, KnobHeight);
            Vol.Top  = TopH;
            Vol.Left = Knob3X;


            Ruetz          = new BitmapSwitch(SwitchBitmap, Switch1Width, SwitchHeight, false, true, Switch1X, SwitchY);
            Ruetz.Brush    = Brushes.White;
            Ruetz.OffBrush = Brushes.White;
            Ruetz.Top      = TopH + SwitchY;
            Ruetz.Left     = Switch1X;

            Turbo          = new BitmapSwitch(SwitchBitmap, Switch2Width, SwitchHeight, false, true, Switch2X, SwitchY);
            Turbo.Brush    = Brushes.White;
            Turbo.OffBrush = Brushes.White;
            Turbo.Top      = TopH + SwitchY;
            Turbo.Left     = Switch2X;

            Tight          = new BitmapSwitch(SwitchBitmap, Switch3Width, SwitchHeight, false, true, Switch3X, SwitchY);
            Tight.Brush    = Brushes.White;
            Tight.OffBrush = Brushes.White;
            Tight.Top      = TopH + SwitchY;
            Tight.Left     = Switch3X;

            OD          = new BitmapSwitch(SwitchBitmap, Switch4Width, SwitchHeight, false, true, Switch4X, SwitchY);
            OD.Brush    = Brushes.White;
            OD.OffBrush = Brushes.White;
            OD.Top      = TopH + SwitchY;
            OD.Left     = Switch4X;

            Light      = new BitmapIndicator(SwitchBitmap, LightWidth, SwitchHeight, false, true, LightX, SwitchY);
            Light.Left = LightX;
            Light.Top  = TopH + SwitchY;

            Stomp      = new BitmapSwitch(SwitchBitmap, StompWidth, StompHeight, false, true, StompX, StompY);
            Stomp.Left = StompX;
            Stomp.Top  = TopH + StompY;
            Stomp.Mode = Switch.SwitchMode.Toggle;

            Controls.Add(Gain);
            Controls.Add(Filter);
            Controls.Add(Vol);
            Controls.Add(Ruetz);
            Controls.Add(Turbo);
            Controls.Add(Tight);
            Controls.Add(OD);
            Controls.Add(Light);
            Controls.Add(Stomp);

            Gain.ValueChanged   += ParameterChanged;
            Filter.ValueChanged += ParameterChanged;
            Vol.ValueChanged    += ParameterChanged;
            Ruetz.ValueChanged  += ParameterChanged;
            Turbo.ValueChanged  += ParameterChanged;
            Tight.ValueChanged  += ParameterChanged;
            OD.ValueChanged     += ParameterChanged;
            Stomp.ValueChanged  += ParameterChanged;

            var about = new AboutButton();

            about.Top    = 0;
            about.Left   = TopBarBitmap.Width - about.Width;
            about.Click += about_Click;
            Controls.Add(about);
        }
Ejemplo n.º 2
0
        public Editor(Rodent instance)
        {
            this.Rodent = instance;

            this.ClientSize = new Size(BaseBitmap.Width, BaseBitmap.Height + TopBarBitmap.Height);

            Gain = new BitmapKnob(KnobsBitmap, Knob1Width, KnobHeight, Positions, 0, 0, 0, KnobHeight);
            Gain.Brush = Brushes.White;
            Gain.Top = TopH;
            Gain.Left = Knob1X;

            Filter = new BitmapKnob(KnobsBitmap, Knob2Width, KnobHeight, Positions, Knob1Width, 0, 0, KnobHeight);
            Filter.Brush = Brushes.White;
            Filter.Top = TopH;
            Filter.Left = Knob2X;

            Vol = new BitmapKnob(KnobsBitmap, Knob3Width, KnobHeight, Positions, Knob1Width + Knob2Width, 0, 0, KnobHeight);
            Vol.Brush = Brushes.White;
            Vol.Top = TopH;
            Vol.Left = Knob3X;

            Ruetz = new BitmapSwitch(SwitchBitmap, Switch1Width, SwitchHeight, false, true, Switch1X, SwitchY);
            Ruetz.Brush = Brushes.White;
            Ruetz.OffBrush = Brushes.White;
            Ruetz.Top = TopH + SwitchY;
            Ruetz.Left = Switch1X;

            Turbo = new BitmapSwitch(SwitchBitmap, Switch2Width, SwitchHeight, false, true, Switch2X, SwitchY);
            Turbo.Brush = Brushes.White;
            Turbo.OffBrush = Brushes.White;
            Turbo.Top = TopH + SwitchY;
            Turbo.Left = Switch2X;

            Tight = new BitmapSwitch(SwitchBitmap, Switch3Width, SwitchHeight, false, true, Switch3X, SwitchY);
            Tight.Brush = Brushes.White;
            Tight.OffBrush = Brushes.White;
            Tight.Top = TopH + SwitchY;
            Tight.Left = Switch3X;

            OD = new BitmapSwitch(SwitchBitmap, Switch4Width, SwitchHeight, false, true, Switch4X, SwitchY);
            OD.Brush = Brushes.White;
            OD.OffBrush = Brushes.White;
            OD.Top = TopH + SwitchY;
            OD.Left = Switch4X;

            Light = new BitmapIndicator(SwitchBitmap, LightWidth, SwitchHeight, false, true, LightX, SwitchY);
            Light.Left = LightX;
            Light.Top = TopH + SwitchY;

            Stomp = new BitmapSwitch(SwitchBitmap, StompWidth, StompHeight, false, true, StompX, StompY);
            Stomp.Left = StompX;
            Stomp.Top = TopH + StompY;
            Stomp.Mode = Switch.SwitchMode.Toggle;

            Controls.Add(Gain);
            Controls.Add(Filter);
            Controls.Add(Vol);
            Controls.Add(Ruetz);
            Controls.Add(Turbo);
            Controls.Add(Tight);
            Controls.Add(OD);
            Controls.Add(Light);
            Controls.Add(Stomp);

            Gain.ValueChanged += ParameterChanged;
            Filter.ValueChanged += ParameterChanged;
            Vol.ValueChanged += ParameterChanged;
            Ruetz.ValueChanged += ParameterChanged;
            Turbo.ValueChanged += ParameterChanged;
            Tight.ValueChanged += ParameterChanged;
            OD.ValueChanged += ParameterChanged;
            Stomp.ValueChanged += ParameterChanged;

            var about = new AboutButton();
            about.Top = 0;
            about.Left = TopBarBitmap.Width - about.Width;
            about.Click += about_Click;
            Controls.Add(about);
        }