示例#1
0
        /// <summary>
        /// Define a layout with a single full screen visualizer.
        /// </summary>
        private void SetLayoutMultipleAudioVisualizers()
        {
            //Define layout dimension column by row (x,y)
            TableLayout layout = new TableLayout(2, 2);

            //First column take 100%
            layout.Columns[0].Width = 25F;
            layout.Columns[1].Width = 75F;
            //Send layout to server
            iClient.SetLayout(layout);

            //Create our full screen audio visualizer field
            AudioVisualizerField field1 = new AudioVisualizerField(0, 0);
            AudioVisualizerField field2 = new AudioVisualizerField(0, 1);
            AudioVisualizerField field3 = new AudioVisualizerField(1, 0);
            AudioVisualizerField field4 = new AudioVisualizerField(1, 1);

            //Set fields
            iClient.CreateFields(new DataField[]
            {
                field1,
                field2,
                field3,
                field4,
            });
        }
示例#2
0
        public static void SetAudioVisualizerField()
        {
            DataField field = new AudioVisualizerField();

            if (!iClient.SetField(field))
            {
                Console.WriteLine("ERROR: field not found! Check layout and field creation.");
            }
        }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        private void CreateFields()
        {
            iRecordingField       = new RecordingField();
            iAudioVisualizerField = new AudioVisualizerField();

            if (iShowingEq)
            {
                iFields = new DataField[] { iAudioVisualizerField };
            }
            else
            {
                if (SupportsGraphics)
                {
                    //Create fields for testing our graphics support.
                    //Currently not used in production environment
                    iBitmapField         = new BitmapField(null, 0, 0, 1, 2);
                    iBitmapField.RowSpan = 2;
                    iTextFieldTop        = new TextField("", ContentAlignment.MiddleCenter, 1, 0);
                    iTextFieldBottom     = new TextField("", ContentAlignment.MiddleCenter, 1, 1);
                    iTextFieldSingleLine = new TextField("", ContentAlignment.MiddleCenter, 0, 0);

                    iFields = new DataField[] { iRecordingField, iBitmapField, iTextFieldTop, iTextFieldBottom };
                }
                else
                {
                    //Just make sure both fields are instantiated
                    iTextFieldTop        = new TextField("", ContentAlignment.MiddleCenter, 0, 0);
                    iTextFieldBottom     = new TextField("", ContentAlignment.MiddleCenter, 0, 1);
                    iTextFieldSingleLine = new TextField("", ContentAlignment.MiddleCenter, 0, 0);

                    if (SharpLibDisplay.Settings.Instance.SingleLine)
                    {
                        //Single line mode
                        iFields = new DataField[] { iRecordingField, iTextFieldSingleLine };
                    }
                    else
                    {
                        //Two lines mode use both fields
                        iFields = new DataField[] { iRecordingField, iTextFieldTop, iTextFieldBottom };
                    }
                }
            }

            iClient.CreateFields(iFields);
        }
示例#4
0
        /// <summary>
        /// Define a layout with a single full screen visualizer.
        /// </summary>
        private void SetLayoutAudioVisualizer()
        {
            //Define layout dimension column by row (x,y)
            TableLayout layout = new TableLayout(1, 1);

            //First column take 100%
            layout.Columns[0].Width = 100F;
            //Send layout to server
            iClient.SetLayout(layout);

            //Create our full screen audio visualizer field
            AudioVisualizerField field = new AudioVisualizerField();

            //Set fields
            iClient.CreateFields(new DataField[]
            {
                field,
            });
        }