コード例 #1
0
        public MainPage()
        {
            this.InitializeComponent();
            Page_Load();
            Bank = new Channel1_8();

            presenter = new MainPresenter(this);

            //Set default fader set to Channel 1-8
            navButtons[0].BorderBrush = new SolidColorBrush(new Color {
                A = 255, B = 200
            });
            X32MessageDispatcher.Instance.MetersReceivedEvent += MeterUpdateReceived;
            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval = new TimeSpan(meterUpdateRate);
            timer.Tick    += timer_Tick;
            timer.Start();
        }
コード例 #2
0
        private void NavButtonClick(object sender, RoutedEventArgs e)
        {
            Button s = (Button)sender;

            if (s == navButtons[(int)Bank.getEnum()])
            {
                //do nothing
                return;
            }
            s.BorderBrush = new SolidColorBrush(new Color {
                A = 255, B = 200
            });
            navButtons[(int)Bank.getEnum()].BorderBrush = new SolidColorBrush(Windows.UI.Colors.White);
            switch ((Constants.FADER_GROUP)navButtons.IndexOf(s))
            {
            case Constants.FADER_GROUP.CHANNEL_1_8:
                Bank = new Channel1_8();
                break;

            case Constants.FADER_GROUP.CHANNEL_9_16:
                Bank = new Channel9_16();
                break;

            case Constants.FADER_GROUP.CHANNEL_17_24:
                Bank = new Channel17_24();
                break;

            case Constants.FADER_GROUP.CHANNEL_25_32:
                Bank = new Channel25_32();
                break;

            case Constants.FADER_GROUP.AUX_1_8:
                Bank = new AuxInBank();
                break;

            case Constants.FADER_GROUP.FX_RETURNS:
                Bank = new FXReturnBank();
                break;

            case Constants.FADER_GROUP.BUS_1_8:
                Bank = new MixBus1_8();
                break;

            case Constants.FADER_GROUP.BUS_9_16:
                Bank = new MixBus9_16();
                break;

            case Constants.FADER_GROUP.MATRIX_MAIN:
                Bank = new MatrixMainBank();
                break;

            default:
                break;
            }
            try
            {
                GetChannelValues(Bank.getEnum());
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                Debug.WriteLine(ex.StackTrace);
            }
        }