コード例 #1
0
        public MenuBAGASK(Game g)
            : base(g)
        {
            Name     = "MenuBAGASK";
            Location = new Point(64 + 24, 256 + 24);
            BGTextureBox.Texture.Name = "bg_64x64";
            BGTextureBox.Size         = new System.Drawing.Size(128, 128);

            BB1                        = new ButtonBox(g);
            BB1.Location               = new Point(48, 24);
            BB1.UpTextBox.Text         = BB1.DownTextBox.Text = BB1.FocusTextBox.Text = BB1.WaitTextBox.Text = "使用";
            BB1.FocusTextBox.FontColor = Color.CornflowerBlue;
            BB1.OnButtonUp            += new ButtonBoxEvent(BB1_OnButtonUp);

            BB2                        = new ButtonBox(g);
            BB2.Location               = new Point(48, 48);
            BB2.UpTextBox.Text         = BB2.DownTextBox.Text = BB2.FocusTextBox.Text = BB2.WaitTextBox.Text = "装备";
            BB2.FocusTextBox.FontColor = Color.CornflowerBlue;
            BB2.OnButtonUp            += new ButtonBoxEvent(BB2_OnButtonUp);

            BB3                        = new ButtonBox(g);
            BB3.Location               = new Point(48, 72);
            BB3.UpTextBox.Text         = BB3.DownTextBox.Text = BB3.FocusTextBox.Text = BB3.WaitTextBox.Text = "丢弃";
            BB3.FocusTextBox.FontColor = Color.CornflowerBlue;
            BB3.OnButtonUp            += new ButtonBoxEvent(BB3_OnButtonUp);

            ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
            ControlBoxes.Add(BB3);
        }
コード例 #2
0
        public ASKboolBox(Game g)
            : base(g)
        {
            Name     = "ASKboolBox";
            Location = new Point(0, 360);

            TextBox          = new TextBox(g);
            TextBox.Location = new Point(16, 16);
            TextBox.OneByOne = true;

            BB1                        = new ButtonBox(g);
            BB1.Location               = new Point(300, 80);
            BB1.UpTextBox.Text         = BB1.DownTextBox.Text = BB1.FocusTextBox.Text = BB1.WaitTextBox.Text = "是";
            BB1.FocusTextBox.FontColor = Color.Blue;
            BB1.OnButtonDown          += new ButtonBoxEvent(BB1_OnButtonDown);

            BB2                        = new ButtonBox(g);
            BB2.Location               = new Point(400, 80);
            BB2.UpTextBox.Text         = BB2.DownTextBox.Text = BB2.FocusTextBox.Text = BB2.WaitTextBox.Text = "否";
            BB2.FocusTextBox.FontColor = Color.Blue;
            BB2.OnButtonDown          += new ButtonBoxEvent(BB2_OnButtonDown);

            ControlBoxes.Add(TextBox);
            ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
        }
コード例 #3
0
        private void buttonBox_AudioSystemConfig_ItemSelectedNotify(
            ButtonBox.Item itPrevItem,
            ButtonBox.Item itCurrItem,
            ButtonBox objSender)
        {
            if (itCurrItem == null || itCurrItem.Tag == null || itCurrItem.Tag.GetType() != typeof(string))
            {
                return;
            }

            string tag = itCurrItem.Tag as string;

            if (string.IsNullOrEmpty(tag))
            {
                return;
            }

            int result = -1;

            if (!int.TryParse(tag, out result) || result < 0 || result > 8)
            {
                return;
            }

            m_nCurrentAudioSystem = result;
            RefreshSpeakerList();
        }
コード例 #4
0
 void drawButtonBox(ButtonBox bb, Point basepos)
 {
     basepos = Util.PointAddPoint(basepos, bb.Location);
     basepos = Util.PointAddPoint(basepos, ScreenOffsetPixelPoint);
     if (bb.ButtonBoxState == ButtonBoxState.Down)
     {
         drawTextureBox(bb.DownTextureBox, basepos);
         drawTextBox(bb.DownTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Focus)
     {
         drawTextureBox(bb.FocusTextureBox, basepos);
         drawTextBox(bb.FocusTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Up)
     {
         drawTextureBox(bb.UpTextureBox, basepos);
         drawTextBox(bb.UpTextBox, basepos);
     }
     else if (bb.ButtonBoxState == ButtonBoxState.Wait)
     {
         drawTextureBox(bb.WaitTextureBox, basepos);
         drawTextBox(bb.WaitTextBox, basepos);
     }
 }
コード例 #5
0
 private void DeactivateModalBox()
 {
     if (_activeModalBox != null)
     {
         _activeModalBox.Visible = false;
     }
     _activeModalBox = null;
 }
コード例 #6
0
ファイル: ButtonBoxCollision.cs プロジェクト: Dothi/Stoopidoo
 void Start()
 {
     if (GameObject.FindGameObjectWithTag("ButtonBoxController").GetComponent <ButtonBox>() != null)
     {
         bb = GameObject.FindGameObjectWithTag("ButtonBoxController").GetComponent <ButtonBox>();
     }
     rotated = false;
 }
コード例 #7
0
ファイル: AppWindow.cs プロジェクト: simo-andreev/CataBaseS
        private Box GetButtonBox()
        {
            var box = new ButtonBox(Orientation.Horizontal);

            _buttonClear = new LinkButton("https://www.youtube.com/watch?v=EPUVstUH22k", "Clear");
            box.Add(_buttonClear);

            _buttonSave = new Button("Save");
            box.Add(_buttonSave);

            return(box);
        }
コード例 #8
0
 void MenuMonster_OnButtonFocus(object sender, object arg)
 {
     ButtonBox bbs = (ButtonBox)sender;
     //if (bbs.Visible == false)
     //{
     //    FocusNextButtonBox();
     //}
     //else
     {
         Microsoft.DirectX.Vector3 loc = Util.Point2Vector3(bbs.Location);
         loc.X -= 48;
         loc.Y -= 32;
         game.MovieManager.PlayMovie("cursor", loc);
     }
 }
コード例 #9
0
        public MenuBattleCHR(Game g)
            : base(g)
        {
            Name     = "MenuBattleCHR";
            Location = new Point(640 - 128, 480 - 128);
            BGTextureBox.Texture.Name = "bg_64x64";
            BGTextureBox.Size         = new System.Drawing.Size(128, 128);

            BB1                  = new ButtonBox(g);
            BB1.Location         = new Point(20, 16);
            BB1.WaitTextBox.Text = "攻击";
            BB1.SameAsWait();
            BB1.OnButtonUp += new ButtonBoxEvent(BB1_OnButtonUp);

            BB2                  = new ButtonBox(g);
            BB2.Location         = new Point(20, 32);
            BB2.WaitTextBox.Text = "道具";
            BB2.SameAsWait();
            BB2.OnButtonUp += new ButtonBoxEvent(BB2_OnButtonUp);

            BB3                  = new ButtonBox(g);
            BB3.Location         = new Point(20, 48);
            BB3.WaitTextBox.Text = "装备";
            BB3.SameAsWait();
            BB3.OnButtonUp += new ButtonBoxEvent(BB3_OnButtonUp);

            BB4                  = new ButtonBox(g);
            BB4.Location         = new Point(20, 64);
            BB4.WaitTextBox.Text = "乘降";
            BB4.SameAsWait();
            BB4.OnButtonUp += new ButtonBoxEvent(BB4_OnButtonUp);

            BB5                  = new ButtonBox(g);
            BB5.Location         = new Point(20, 80);
            BB5.WaitTextBox.Text = "逃跑";
            BB5.SameAsWait();
            BB5.OnButtonUp += new ButtonBoxEvent(BB5_OnButtonUp);

            ControlBoxes.Add(BB1);
            ControlBoxes.Add(BB2);
            ControlBoxes.Add(BB3);
            ControlBoxes.Add(BB4);
            ControlBoxes.Add(BB5);
        }
コード例 #10
0
 protected override void HandleBackButtonPress()
 {
     if (_inputHandler.KeyPressed(Keys.Escape))
     {
         if (_activeModalBox != null)
         {
             if (_activeModalBox is SelectionBox)
             {
                 ((SelectionBox)_activeModalBox).Selection = "";
             }
             _activeModalBox.Visible = false;
             _activeModalBox         = null;
             _controlPanel.UpdateSelectedOption(Vector2.Zero);
         }
         else
         {
             ActivateModalBox("exit-confirm");
         }
     }
 }
コード例 #11
0
        public EditorScene()
            : base(1600, 900)
        {
            _inputHandler = new InputHandler()
            {
                StartMouseAction    = StartMouseAction,
                CancelMouseAction   = CancelMouseAction,
                CompleteMouseAction = CompleteMouseAction
            };

            _cameraController = new MobileCameraController();
            _motionController = new MotionController();

            CreateControls();
            CreateModalBoxes();

            Data.Container.RegisterComponent   = RegisterGameObject;
            Data.Container.UnregisterComponent = UnregisterGameObject;

            _selected       = null;
            _activeModalBox = null;
        }
コード例 #12
0
        private void InitializeComponent()
        {
#pragma warning disable CS0612

            //
            // AmiiboWindow
            //
            CanFocus       = false;
            Resizable      = false;
            Modal          = true;
            WindowPosition = WindowPosition.Center;
            DefaultWidth   = 600;
            DefaultHeight  = 470;
            TypeHint       = Gdk.WindowTypeHint.Dialog;

            //
            // _mainBox
            //
            _mainBox = new Box(Orientation.Vertical, 2);

            //
            // _buttonBox
            //
            _buttonBox = new ButtonBox(Orientation.Horizontal)
            {
                Margin      = 20,
                LayoutStyle = ButtonBoxStyle.End
            };

            //
            // _scanButton
            //
            _scanButton = new Button()
            {
                Label           = "Scan It!",
                CanFocus        = true,
                ReceivesDefault = true,
                MarginLeft      = 10
            };
            _scanButton.Clicked += ScanButton_Pressed;

            //
            // _randomUuidCheckBox
            //
            _randomUuidCheckBox = new CheckButton()
            {
                Label       = "Hack: Use Random Tag Uuid",
                TooltipText = "This allows multiple scans of a single Amiibo.\n(used in The Legend of Zelda: Breath of the Wild)"
            };

            //
            // _cancelButton
            //
            _cancelButton = new Button()
            {
                Label           = "Cancel",
                CanFocus        = true,
                ReceivesDefault = true,
                MarginLeft      = 10
            };
            _cancelButton.Clicked += CancelButton_Pressed;

            //
            // _amiiboBox
            //
            _amiiboBox = new Box(Orientation.Vertical, 0);

            //
            // _amiiboHeadBox
            //
            _amiiboHeadBox = new Box(Orientation.Horizontal, 0)
            {
                Margin  = 20,
                Hexpand = true
            };

            //
            // _amiiboSeriesBox
            //
            _amiiboSeriesBox = new Box(Orientation.Horizontal, 0)
            {
                Hexpand = true
            };

            //
            // _amiiboSeriesLabel
            //
            _amiiboSeriesLabel = new Label("Amiibo Series:");

            //
            // _amiiboSeriesComboBox
            //
            _amiiboSeriesComboBox = new ComboBoxText();

            //
            // _amiiboCharsBox
            //
            _amiiboCharsBox = new Box(Orientation.Horizontal, 0)
            {
                Hexpand = true
            };

            //
            // _amiiboCharsLabel
            //
            _amiiboCharsLabel = new Label("Character:");

            //
            // _amiiboCharsComboBox
            //
            _amiiboCharsComboBox = new ComboBoxText();

            //
            // _showAllCheckBox
            //
            _showAllCheckBox = new CheckButton()
            {
                Label = "Show All Amiibo"
            };

            //
            // _amiiboImage
            //
            _amiiboImage = new Image()
            {
                HeightRequest = 350,
                WidthRequest  = 350
            };

            //
            // _gameUsageLabel
            //
            _gameUsageLabel = new Label("")
            {
                MarginTop = 20
            };

#pragma warning restore CS0612

            ShowComponent();
        }
コード例 #13
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmEQPreset));
     this.buttonBox_Preset    = new ViPER4WindowsBin.UIControls.ButtonBox();
     this.singleButton_Load   = new Telerik.WinControls.UI.RadButton();
     this.singleButton_Cancel = new Telerik.WinControls.UI.RadButton();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Load)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     this.SuspendLayout();
     //
     // buttonBox_Preset
     //
     this.buttonBox_Preset.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.buttonBox_Preset.Location  = new System.Drawing.Point(12, 12);
     this.buttonBox_Preset.Name      = "buttonBox_Preset";
     this.buttonBox_Preset.Size      = new System.Drawing.Size(175, 331);
     this.buttonBox_Preset.TabIndex  = 0;
     //
     // singleButton_Load
     //
     this.singleButton_Load.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.singleButton_Load.Location     = new System.Drawing.Point(193, 12);
     this.singleButton_Load.Name         = "singleButton_Load";
     this.singleButton_Load.Size         = new System.Drawing.Size(89, 32);
     this.singleButton_Load.TabIndex     = 27;
     this.singleButton_Load.Text         = "$LOAD_PRESET";
     this.singleButton_Load.ThemeName    = "VisualStudio2012Dark";
     //
     // singleButton_Cancel
     //
     this.singleButton_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.singleButton_Cancel.Location     = new System.Drawing.Point(193, 311);
     this.singleButton_Cancel.Name         = "singleButton_Cancel";
     this.singleButton_Cancel.Size         = new System.Drawing.Size(93, 32);
     this.singleButton_Cancel.TabIndex     = 28;
     this.singleButton_Cancel.Text         = "$CANCEL";
     this.singleButton_Cancel.ThemeName    = "VisualStudio2012Dark";
     //
     // frmEQPreset
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(291, 355);
     this.Controls.Add(this.singleButton_Load);
     this.Controls.Add(this.singleButton_Cancel);
     this.Controls.Add(this.buttonBox_Preset);
     this.Font            = new System.Drawing.Font("Roboto", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
     this.ForeColor       = System.Drawing.Color.White;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "frmEQPreset";
     //
     //
     //
     this.RootElement.ApplyShapeToControl = true;
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "$EQUALIZER_PRESET";
     this.ThemeName     = "VisualStudio2012Dark";
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Load)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
     this.ResumeLayout(false);
 }
コード例 #14
0
        private void PresetSelected(
            ButtonBox.Item itPrevItem,
            ButtonBox.Item itCurrItem,
            ButtonBox objSender)
        {
            if (itCurrItem.Tag == null || !(itCurrItem.Tag is string))
            {
                return;
            }

            string tag = itCurrItem.Tag as string;

            if (tag == "")
            {
                return;
            }

            int result = -1;

            if (!int.TryParse(tag, out result))
            {
                return;
            }

            switch (result)
            {
            case 0:
                Array.Copy(m_faEQPreset_Flat, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 1:
                Array.Copy(m_faEQPreset_SuperBass, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 2:
                Array.Copy(m_faEQPreset_SoftBass, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 3:
                Array.Copy(m_faEQPreset_Rock, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 4:
                Array.Copy(m_faEQPreset_RandB, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 5:
                Array.Copy(m_faEQPreset_Classic, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 6:
                Array.Copy(m_faEQPreset_Pop, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 7:
                Array.Copy(m_faEQPreset_Jazz, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 8:
                Array.Copy(m_faEQPreset_Blues, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 9:
                Array.Copy(m_faEQPreset_Electronic, m_faEQPreset, m_faEQPreset.Length);
                break;

            case 10:
                Array.Copy(m_faEQPreset_Vocal, m_faEQPreset, m_faEQPreset.Length);
                break;
            }
        }
コード例 #15
0
	// Use this for initialization	
	void Start () {
		lever = FindObjectOfType<ButtonBox> ();
	}
コード例 #16
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmLatency));
     this.label_CurrentLatency = new System.Windows.Forms.Label();
     this.label_DesiredLatency = new System.Windows.Forms.Label();
     this.buttonBox_Latency    = new ViPER4WindowsBin.UIControls.ButtonBox();
     this.label_LowLatencyNote = new System.Windows.Forms.Label();
     this.singleButton_OK      = new Telerik.WinControls.UI.RadButton();
     this.singleButton_Cancel  = new Telerik.WinControls.UI.RadButton();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_OK)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     this.SuspendLayout();
     //
     // label_CurrentLatency
     //
     this.label_CurrentLatency.AutoSize  = true;
     this.label_CurrentLatency.ForeColor = System.Drawing.Color.Snow;
     this.label_CurrentLatency.Location  = new System.Drawing.Point(12, 10);
     this.label_CurrentLatency.Name      = "label_CurrentLatency";
     this.label_CurrentLatency.Size      = new System.Drawing.Size(139, 13);
     this.label_CurrentLatency.TabIndex  = 0;
     this.label_CurrentLatency.Text      = "$CURRENT_LATENCY : 0ms";
     //
     // label_DesiredLatency
     //
     this.label_DesiredLatency.AutoSize  = true;
     this.label_DesiredLatency.ForeColor = System.Drawing.Color.Snow;
     this.label_DesiredLatency.Location  = new System.Drawing.Point(12, 44);
     this.label_DesiredLatency.Name      = "label_DesiredLatency";
     this.label_DesiredLatency.Size      = new System.Drawing.Size(105, 13);
     this.label_DesiredLatency.TabIndex  = 1;
     this.label_DesiredLatency.Text      = "$DESIRED_LATENCY";
     //
     // buttonBox_Latency
     //
     this.buttonBox_Latency.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.buttonBox_Latency.Location            = new System.Drawing.Point(12, 80);
     this.buttonBox_Latency.Name                = "buttonBox_Latency";
     this.buttonBox_Latency.Size                = new System.Drawing.Size(137, 206);
     this.buttonBox_Latency.TabIndex            = 2;
     this.buttonBox_Latency.ItemSelectedNotify += new ViPER4WindowsBin.UIControls.ButtonBox.ItemSelectDelegate(this.buttonBox_Latency_ItemSelectedNotify);
     //
     // label_LowLatencyNote
     //
     this.label_LowLatencyNote.AutoSize  = true;
     this.label_LowLatencyNote.ForeColor = System.Drawing.Color.Red;
     this.label_LowLatencyNote.Location  = new System.Drawing.Point(12, 64);
     this.label_LowLatencyNote.Name      = "label_LowLatencyNote";
     this.label_LowLatencyNote.Size      = new System.Drawing.Size(120, 13);
     this.label_LowLatencyNote.TabIndex  = 3;
     this.label_LowLatencyNote.Text      = "$LOW_LATENCY_NOTE";
     //
     // singleButton_OK
     //
     this.singleButton_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.singleButton_OK.Location     = new System.Drawing.Point(155, 204);
     this.singleButton_OK.Name         = "singleButton_OK";
     this.singleButton_OK.Size         = new System.Drawing.Size(93, 32);
     this.singleButton_OK.TabIndex     = 31;
     this.singleButton_OK.Text         = "$OK";
     this.singleButton_OK.ThemeName    = "VisualStudio2012Dark";
     //
     // singleButton_Cancel
     //
     this.singleButton_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.singleButton_Cancel.Location     = new System.Drawing.Point(155, 242);
     this.singleButton_Cancel.Name         = "singleButton_Cancel";
     this.singleButton_Cancel.Size         = new System.Drawing.Size(93, 32);
     this.singleButton_Cancel.TabIndex     = 32;
     this.singleButton_Cancel.Text         = "$CANCEL";
     this.singleButton_Cancel.ThemeName    = "VisualStudio2012Dark";
     //
     // frmLatency
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(254, 302);
     this.Controls.Add(this.singleButton_OK);
     this.Controls.Add(this.singleButton_Cancel);
     this.Controls.Add(this.label_LowLatencyNote);
     this.Controls.Add(this.buttonBox_Latency);
     this.Controls.Add(this.label_DesiredLatency);
     this.Controls.Add(this.label_CurrentLatency);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "frmLatency";
     //
     //
     //
     this.RootElement.ApplyShapeToControl = true;
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "$LATENCY_SETTING";
     this.ThemeName     = "VisualStudio2012Dark";
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_OK)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #17
0
 private void ActivateModalBox(string boxName)
 {
     _activeModalBox         = _modalBoxes[boxName];
     _activeModalBox.Visible = true;
 }
コード例 #18
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmVirtualization));
     this.label_AudioSystemConfig        = new System.Windows.Forms.Label();
     this.groupBox_VirtApplied           = new System.Windows.Forms.GroupBox();
     this.checkBox_Freestyle             = new System.Windows.Forms.CheckBox();
     this.checkBox_MovieMode             = new System.Windows.Forms.CheckBox();
     this.checkBox_MusicMode             = new System.Windows.Forms.CheckBox();
     this.listView_Speaker               = new System.Windows.Forms.ListView();
     this.columnHeader_Speaker           = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.columnHeader_Angle             = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.groupBox_VirtEnv               = new System.Windows.Forms.GroupBox();
     this.twoSelector_PrePostProcess     = new ViPER4WindowsBin.UIControls.TwoSelector();
     this.label_PrePostProcess           = new System.Windows.Forms.Label();
     this.hSlider_EnvRealizeDrySignal    = new ViPER4WindowsBin.UIControls.HSlider();
     this.comboBox_EnvRealizePreset      = new System.Windows.Forms.ComboBox();
     this.onOffSwitch_EnvRealize         = new ViPER4WindowsBin.UIControls.OnOffSwitch();
     this.contextMenuStrip_SpeakerAngle  = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.toolStripMenuItem_SpeakerAngle = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripSeparator_Angle       = new System.Windows.Forms.ToolStripSeparator();
     this.toolStripComboBox_SpeakerAngle = new System.Windows.Forms.ToolStripComboBox();
     this.singleButton_ResetConfig       = new ViPER4WindowsBin.UIControls.SingleButton();
     this.buttonBox_AudioSystemConfig    = new ViPER4WindowsBin.UIControls.ButtonBox();
     this.singleButton_OK     = new Telerik.WinControls.UI.RadButton();
     this.singleButton_Cancel = new Telerik.WinControls.UI.RadButton();
     this.groupBox_VirtApplied.SuspendLayout();
     this.groupBox_VirtEnv.SuspendLayout();
     this.contextMenuStrip_SpeakerAngle.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_OK)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     this.SuspendLayout();
     //
     // label_AudioSystemConfig
     //
     this.label_AudioSystemConfig.AutoSize = true;
     this.label_AudioSystemConfig.Location = new System.Drawing.Point(12, 18);
     this.label_AudioSystemConfig.Name     = "label_AudioSystemConfig";
     this.label_AudioSystemConfig.Size     = new System.Drawing.Size(138, 13);
     this.label_AudioSystemConfig.TabIndex = 0;
     this.label_AudioSystemConfig.Text     = "$AUDIO_SYSTEM_CONFIG";
     //
     // groupBox_VirtApplied
     //
     this.groupBox_VirtApplied.Controls.Add(this.checkBox_Freestyle);
     this.groupBox_VirtApplied.Controls.Add(this.checkBox_MovieMode);
     this.groupBox_VirtApplied.Controls.Add(this.checkBox_MusicMode);
     this.groupBox_VirtApplied.ForeColor = System.Drawing.Color.Snow;
     this.groupBox_VirtApplied.Location  = new System.Drawing.Point(151, 316);
     this.groupBox_VirtApplied.Name      = "groupBox_VirtApplied";
     this.groupBox_VirtApplied.Size      = new System.Drawing.Size(167, 95);
     this.groupBox_VirtApplied.TabIndex  = 2;
     this.groupBox_VirtApplied.TabStop   = false;
     this.groupBox_VirtApplied.Text      = "$VIRT_APPLIED";
     //
     // checkBox_Freestyle
     //
     this.checkBox_Freestyle.AutoSize = true;
     this.checkBox_Freestyle.Location = new System.Drawing.Point(16, 69);
     this.checkBox_Freestyle.Name     = "checkBox_Freestyle";
     this.checkBox_Freestyle.Size     = new System.Drawing.Size(123, 17);
     this.checkBox_Freestyle.TabIndex = 5;
     this.checkBox_Freestyle.Text     = "$FREESTYLE_MODE";
     this.checkBox_Freestyle.UseVisualStyleBackColor = true;
     //
     // checkBox_MovieMode
     //
     this.checkBox_MovieMode.AutoSize = true;
     this.checkBox_MovieMode.Location = new System.Drawing.Point(16, 46);
     this.checkBox_MovieMode.Name     = "checkBox_MovieMode";
     this.checkBox_MovieMode.Size     = new System.Drawing.Size(105, 17);
     this.checkBox_MovieMode.TabIndex = 4;
     this.checkBox_MovieMode.Text     = "$MOVIE_MODE";
     this.checkBox_MovieMode.UseVisualStyleBackColor = true;
     //
     // checkBox_MusicMode
     //
     this.checkBox_MusicMode.AutoSize = true;
     this.checkBox_MusicMode.Location = new System.Drawing.Point(16, 22);
     this.checkBox_MusicMode.Name     = "checkBox_MusicMode";
     this.checkBox_MusicMode.Size     = new System.Drawing.Size(104, 17);
     this.checkBox_MusicMode.TabIndex = 3;
     this.checkBox_MusicMode.Text     = "$MUSIC_MODE";
     this.checkBox_MusicMode.UseVisualStyleBackColor = true;
     //
     // listView_Speaker
     //
     this.listView_Speaker.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.listView_Speaker.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.columnHeader_Speaker,
         this.columnHeader_Angle
     });
     this.listView_Speaker.FullRowSelect = true;
     this.listView_Speaker.GridLines     = true;
     this.listView_Speaker.HeaderStyle   = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
     this.listView_Speaker.HideSelection = false;
     this.listView_Speaker.Location      = new System.Drawing.Point(151, 77);
     this.listView_Speaker.MultiSelect   = false;
     this.listView_Speaker.Name          = "listView_Speaker";
     this.listView_Speaker.Size          = new System.Drawing.Size(167, 233);
     this.listView_Speaker.TabIndex      = 3;
     this.listView_Speaker.UseCompatibleStateImageBehavior = false;
     this.listView_Speaker.View     = System.Windows.Forms.View.Details;
     this.listView_Speaker.MouseUp += new System.Windows.Forms.MouseEventHandler(this.listView_Speaker_MouseUp);
     //
     // columnHeader_Speaker
     //
     this.columnHeader_Speaker.Text  = "$VIRT_SPEAKER";
     this.columnHeader_Speaker.Width = 95;
     //
     // columnHeader_Angle
     //
     this.columnHeader_Angle.Text = "$VIRT_SPEAKER_ANGLE";
     //
     // groupBox_VirtEnv
     //
     this.groupBox_VirtEnv.Controls.Add(this.twoSelector_PrePostProcess);
     this.groupBox_VirtEnv.Controls.Add(this.label_PrePostProcess);
     this.groupBox_VirtEnv.Controls.Add(this.hSlider_EnvRealizeDrySignal);
     this.groupBox_VirtEnv.Controls.Add(this.comboBox_EnvRealizePreset);
     this.groupBox_VirtEnv.Controls.Add(this.onOffSwitch_EnvRealize);
     this.groupBox_VirtEnv.ForeColor = System.Drawing.Color.Snow;
     this.groupBox_VirtEnv.Location  = new System.Drawing.Point(324, 39);
     this.groupBox_VirtEnv.Name      = "groupBox_VirtEnv";
     this.groupBox_VirtEnv.Size      = new System.Drawing.Size(222, 115);
     this.groupBox_VirtEnv.TabIndex  = 5;
     this.groupBox_VirtEnv.TabStop   = false;
     this.groupBox_VirtEnv.Text      = "$VIRTUAL_ENVIRONMENT";
     //
     // twoSelector_PrePostProcess
     //
     this.twoSelector_PrePostProcess.BackColor     = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.twoSelector_PrePostProcess.CurrentObject = null;
     this.twoSelector_PrePostProcess.LeftObject    = null;
     this.twoSelector_PrePostProcess.Location      = new System.Drawing.Point(146, 80);
     this.twoSelector_PrePostProcess.Name          = "twoSelector_PrePostProcess";
     this.twoSelector_PrePostProcess.RightObject   = null;
     this.twoSelector_PrePostProcess.Selector      = ViPER4WindowsBin.UIControls.TwoSelector.SelectorPosition.SELECTOR_ON_LEFT;
     this.twoSelector_PrePostProcess.Size          = new System.Drawing.Size(70, 24);
     this.twoSelector_PrePostProcess.TabIndex      = 9;
     //
     // label_PrePostProcess
     //
     this.label_PrePostProcess.AutoSize = true;
     this.label_PrePostProcess.Location = new System.Drawing.Point(6, 86);
     this.label_PrePostProcess.Name     = "label_PrePostProcess";
     this.label_PrePostProcess.Size     = new System.Drawing.Size(116, 13);
     this.label_PrePostProcess.TabIndex = 3;
     this.label_PrePostProcess.Text     = "$PRE_POST_PROCESS";
     //
     // hSlider_EnvRealizeDrySignal
     //
     this.hSlider_EnvRealizeDrySignal.BackColor     = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.hSlider_EnvRealizeDrySignal.Location      = new System.Drawing.Point(68, 52);
     this.hSlider_EnvRealizeDrySignal.MoveDelta     = ((uint)(1u));
     this.hSlider_EnvRealizeDrySignal.Name          = "hSlider_EnvRealizeDrySignal";
     this.hSlider_EnvRealizeDrySignal.Position      = ((uint)(0u));
     this.hSlider_EnvRealizeDrySignal.PositionFloat = 0F;
     this.hSlider_EnvRealizeDrySignal.Size          = new System.Drawing.Size(148, 22);
     this.hSlider_EnvRealizeDrySignal.TabIndex      = 2;
     //
     // comboBox_EnvRealizePreset
     //
     this.comboBox_EnvRealizePreset.BackColor         = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.comboBox_EnvRealizePreset.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox_EnvRealizePreset.FormattingEnabled = true;
     this.comboBox_EnvRealizePreset.Location          = new System.Drawing.Point(6, 22);
     this.comboBox_EnvRealizePreset.Name     = "comboBox_EnvRealizePreset";
     this.comboBox_EnvRealizePreset.Size     = new System.Drawing.Size(210, 21);
     this.comboBox_EnvRealizePreset.TabIndex = 1;
     //
     // onOffSwitch_EnvRealize
     //
     this.onOffSwitch_EnvRealize.BackColor  = System.Drawing.Color.Transparent;
     this.onOffSwitch_EnvRealize.Location   = new System.Drawing.Point(6, 50);
     this.onOffSwitch_EnvRealize.Name       = "onOffSwitch_EnvRealize";
     this.onOffSwitch_EnvRealize.Size       = new System.Drawing.Size(53, 24);
     this.onOffSwitch_EnvRealize.SwitchedOn = false;
     this.onOffSwitch_EnvRealize.TabIndex   = 0;
     //
     // contextMenuStrip_SpeakerAngle
     //
     this.contextMenuStrip_SpeakerAngle.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         this.toolStripMenuItem_SpeakerAngle,
         this.toolStripSeparator_Angle,
         this.toolStripComboBox_SpeakerAngle
     });
     this.contextMenuStrip_SpeakerAngle.Name    = "contextMenuStrip_SpeakerAngle";
     this.contextMenuStrip_SpeakerAngle.Size    = new System.Drawing.Size(182, 59);
     this.contextMenuStrip_SpeakerAngle.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.contextMenuStrip_SpeakerAngle_Closed);
     //
     // toolStripMenuItem_SpeakerAngle
     //
     this.toolStripMenuItem_SpeakerAngle.Enabled = false;
     this.toolStripMenuItem_SpeakerAngle.Name    = "toolStripMenuItem_SpeakerAngle";
     this.toolStripMenuItem_SpeakerAngle.Size    = new System.Drawing.Size(181, 22);
     this.toolStripMenuItem_SpeakerAngle.Text    = "$SPEAKER_ANGLE";
     this.toolStripMenuItem_SpeakerAngle.Click  += new System.EventHandler(this.toolStripMenuItem_SpeakerAngle_Click);
     //
     // toolStripSeparator_Angle
     //
     this.toolStripSeparator_Angle.Name = "toolStripSeparator_Angle";
     this.toolStripSeparator_Angle.Size = new System.Drawing.Size(178, 6);
     //
     // toolStripComboBox_SpeakerAngle
     //
     this.toolStripComboBox_SpeakerAngle.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.toolStripComboBox_SpeakerAngle.Name                  = "toolStripComboBox_SpeakerAngle";
     this.toolStripComboBox_SpeakerAngle.Size                  = new System.Drawing.Size(121, 23);
     this.toolStripComboBox_SpeakerAngle.SelectedIndexChanged += new System.EventHandler(this.toolStripComboBox_SpeakerAngle_SelectedIndexChanged);
     //
     // singleButton_ResetConfig
     //
     this.singleButton_ResetConfig.BackColor          = System.Drawing.SystemColors.Control;
     this.singleButton_ResetConfig.ButtonText         = "$VIRT_RESET";
     this.singleButton_ResetConfig.Location           = new System.Drawing.Point(151, 39);
     this.singleButton_ResetConfig.Name               = "singleButton_ResetConfig";
     this.singleButton_ResetConfig.Size               = new System.Drawing.Size(167, 28);
     this.singleButton_ResetConfig.TabIndex           = 4;
     this.singleButton_ResetConfig.ButtonClickNotify += new ViPER4WindowsBin.UIControls.SingleButton.ButtonClickEventDelegate(this.singleButton_ResetConfig_ButtonClickNotify);
     //
     // buttonBox_AudioSystemConfig
     //
     this.buttonBox_AudioSystemConfig.BackColor           = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(45)))), ((int)(((byte)(48)))));
     this.buttonBox_AudioSystemConfig.Location            = new System.Drawing.Point(14, 39);
     this.buttonBox_AudioSystemConfig.Name                = "buttonBox_AudioSystemConfig";
     this.buttonBox_AudioSystemConfig.Size                = new System.Drawing.Size(131, 373);
     this.buttonBox_AudioSystemConfig.TabIndex            = 1;
     this.buttonBox_AudioSystemConfig.ItemSelectedNotify += new ViPER4WindowsBin.UIControls.ButtonBox.ItemSelectDelegate(this.buttonBox_AudioSystemConfig_ItemSelectedNotify);
     this.buttonBox_AudioSystemConfig.Load               += new System.EventHandler(this.buttonBox_AudioSystemConfig_Load);
     //
     // singleButton_OK
     //
     this.singleButton_OK.DialogResult = System.Windows.Forms.DialogResult.OK;
     this.singleButton_OK.Location     = new System.Drawing.Point(343, 378);
     this.singleButton_OK.Name         = "singleButton_OK";
     this.singleButton_OK.Size         = new System.Drawing.Size(89, 32);
     this.singleButton_OK.TabIndex     = 29;
     this.singleButton_OK.Text         = "$OK";
     this.singleButton_OK.ThemeName    = "VisualStudio2012Dark";
     //
     // singleButton_Cancel
     //
     this.singleButton_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     this.singleButton_Cancel.Location     = new System.Drawing.Point(455, 378);
     this.singleButton_Cancel.Name         = "singleButton_Cancel";
     this.singleButton_Cancel.Size         = new System.Drawing.Size(93, 32);
     this.singleButton_Cancel.TabIndex     = 30;
     this.singleButton_Cancel.Text         = "$CANCEL";
     this.singleButton_Cancel.ThemeName    = "VisualStudio2012Dark";
     //
     // frmVirtualization
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(562, 427);
     this.Controls.Add(this.singleButton_OK);
     this.Controls.Add(this.singleButton_Cancel);
     this.Controls.Add(this.groupBox_VirtEnv);
     this.Controls.Add(this.singleButton_ResetConfig);
     this.Controls.Add(this.listView_Speaker);
     this.Controls.Add(this.groupBox_VirtApplied);
     this.Controls.Add(this.buttonBox_AudioSystemConfig);
     this.Controls.Add(this.label_AudioSystemConfig);
     this.ForeColor       = System.Drawing.Color.Snow;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.Name            = "frmVirtualization";
     //
     //
     //
     this.RootElement.ApplyShapeToControl = true;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text          = "$VIRTUALIZATION";
     this.ThemeName     = "VisualStudio2012Dark";
     this.groupBox_VirtApplied.ResumeLayout(false);
     this.groupBox_VirtApplied.PerformLayout();
     this.groupBox_VirtEnv.ResumeLayout(false);
     this.groupBox_VirtEnv.PerformLayout();
     this.contextMenuStrip_SpeakerAngle.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_OK)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.singleButton_Cancel)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
コード例 #19
0
ファイル: EqualizerWindow.cs プロジェクト: thoja21/banshee-1
        public EqualizerWindow(Window parent) : base(Catalog.GetString("Equalizer"))
        {
            if (instance == null)
            {
                instance = this;
            }

            TransientFor    = parent;
            WindowPosition  = WindowPosition.CenterOnParent;
            TypeHint        = Gdk.WindowTypeHint.Dialog;
            SkipPagerHint   = true;
            SkipTaskbarHint = true;

            SetDefaultSize(-1, 230);

            VBox box = new VBox();

            header_box             = new HBox();
            header_box.BorderWidth = 4;
            header_box.Spacing     = 2;

            box.PackStart(header_box, false, false, 0);
            box.PackStart(new HSeparator(), false, false, 0);

            eq_view             = new EqualizerView();
            eq_view.BorderWidth = 10;
            eq_view.SetSizeRequest(-1, 110);
            eq_view.Frequencies = ((IEqualizer)ServiceManager.PlayerEngine.ActiveEngine).EqualizerFrequencies;
            eq_view.Show();

            eq_enabled_checkbox = new CheckButton(Catalog.GetString("Enabled"));

            eq_preset_combo          = new EqualizerPresetComboBox();
            eq_preset_combo.Changed += OnPresetChanged;
            eq_preset_combo.Show();

            Button new_preset_button = new Button(new Image(Stock.Add, IconSize.Button));

            new_preset_button.Relief   = ReliefStyle.None;
            new_preset_button.Clicked += OnNewPreset;

            delete_preset_button          = new Button(new Image(Stock.Remove, IconSize.Button));
            delete_preset_button.Relief   = ReliefStyle.None;
            delete_preset_button.Clicked += OnDeletePreset;

            VBox combo_box = new VBox();

            combo_box.PackStart(eq_preset_combo, true, false, 0);

            header_box.PackStart(combo_box, false, false, 0);
            header_box.PackStart(new_preset_button, false, false, 0);
            header_box.PackStart(delete_preset_button, false, false, 0);
            header_box.PackEnd(eq_enabled_checkbox, false, false, 0);

            box.PackStart(eq_view, true, true, 0);

            var button_box = new ButtonBox(Orientation.Horizontal);

            button_box.Layout      = ButtonBoxStyle.End;
            button_box.BorderWidth = 12;
            var button = new Button(Stock.Close)
            {
                UseStock = true
            };

            button.Clicked += delegate { Destroy(); };
            button_box.Add(button);
            box.PackEnd(button_box, false, true, 0);

            eq_enabled_checkbox.Active      = EqualizerManager.Instance.IsActive;
            eq_enabled_checkbox.Clicked    += OnEnableDisable;
            eq_preset_combo.ActiveEqualizer = EqualizerManager.Instance.SelectedEqualizer;

            int minimum_height, natural_height;

            GetPreferredHeight(out minimum_height, out natural_height);
            Gdk.Geometry limits = new Gdk.Geometry();
            limits.MinWidth  = -1;
            limits.MaxWidth  = -1;
            limits.MinHeight = minimum_height;
            limits.MaxHeight = Gdk.Screen.Default.Height;
            SetGeometryHints(this, limits, Gdk.WindowHints.MaxSize);

            KeyPressEvent += OnKeyPress;

            Add(box);
            box.ShowAll();
        }