コード例 #1
0
ファイル: BeatsAndBarsSettings.cs プロジェクト: robness/Vixen
        public BeatsAndBarsDialog(Audio audio)
        {
            InitializeComponent();

            ForeColor = ThemeColorTable.ForeColor;
            BackColor = ThemeColorTable.BackgroundColor;
            var excludes = new List <Control>();

            excludes.Add(BarsColorPanel);
            excludes.Add(BeatCountsColorPanel);
            excludes.Add(AllColorPanel);
            excludes.Add(BeatSplitsColorPanel);
            ThemeUpdateControls.UpdateControls(this, excludes);

            m_allowUpdates = false;

            m_toolTip = new ToolTip();
            m_toolTip.AutoPopDelay = 5000;
            m_toolTip.InitialDelay = 500;
            m_toolTip.ReshowDelay  = 500;
            m_toolTip.ShowAlways   = true;
            m_toolTip.Active       = true;

            m_toolTip.SetToolTip(AllFeaturesCB, "Single Collection containing all features");
            m_toolTip.SetToolTip(BarsCB, "Single Collection containing starting location of each measure/bar");
            m_toolTip.SetToolTip(BeatCountsCB, "Generates a beat collection for each beat count");
            m_toolTip.SetToolTip(BeatSplitsCB, "Generates a beat collection for each beat count and each beat count split");
            m_toolTip.SetToolTip(BeatsNameTB, "Base name of each collection");
            m_toolTip.SetToolTip(AllColorPanel, "Color of All Features Collection");
            m_toolTip.SetToolTip(BarsColorPanel, "Color of Bars Collection");
            m_toolTip.SetToolTip(BeatCountsColorPanel, "Color of Beat Counts Collection");
            m_toolTip.SetToolTip(BeatSplitsColorPanel, "Color of Beat Splits Collection");

            m_settingsData = m_settingsData ?? new BeatBarSettingsData("Beats");

            BarsCB.Checked        = true;
            AllFeaturesCB.Checked = true;
            BeatCountsCB.Checked  = true;
            BeatSplitsCB.Checked  = false;

            m_allowUpdates = true;
            SetBeatBarOutputSettings();

            musicStaff1.Width = grpDivisions.ClientSize.Width - 20;

            m_previewWaveForm        = new PreviewWaveform(audio);
            m_previewWaveForm.Anchor = AnchorStyles.Left | AnchorStyles.Right;
            PreviewGroupBox.Controls.Add(m_previewWaveForm);
            m_previewWaveForm.Width    = PreviewGroupBox.ClientSize.Width - 25;
            m_previewWaveForm.Height   = PreviewGroupBox.ClientSize.Height / 2;
            m_previewWaveForm.Location = new Point(musicStaff1.Location.X, PreviewGroupBox.ClientSize.Height / 2 - m_previewWaveForm.Height / 2);

            musicStaff1.SettingChanged += MusicStaffSettingsChanged;
        }
コード例 #2
0
ファイル: BeatsAndBarsSettings.cs プロジェクト: stewmc/vixen
		public BeatsAndBarsDialog(Audio audio)
		{
			InitializeComponent();

			ForeColor = ThemeColorTable.ForeColor;
			BackColor = ThemeColorTable.BackgroundColor;
			var excludes = new List<Control>();
			excludes.Add(BarsColorPanel);
			excludes.Add(BeatCountsColorPanel);
			excludes.Add(AllColorPanel);
			excludes.Add(BeatSplitsColorPanel);
			ThemeUpdateControls.UpdateControls(this, excludes);

			m_allowUpdates = false;

			m_toolTip = new ToolTip();
			m_toolTip.AutoPopDelay = 5000;
			m_toolTip.InitialDelay = 500;
			m_toolTip.ReshowDelay = 500;
			m_toolTip.ShowAlways = true;
			m_toolTip.Active = true;

			m_toolTip.SetToolTip(AllFeaturesCB, "Single Collection containing all features");
			m_toolTip.SetToolTip(BarsCB, "Single Collection containing starting location of each measure/bar");
			m_toolTip.SetToolTip(BeatCountsCB, "Generates a beat collection for each beat count");
			m_toolTip.SetToolTip(BeatSplitsCB, "Generates a beat collection for each beat count and each beat count split");
			m_toolTip.SetToolTip(BeatsNameTB, "Base name of each collection");
			m_toolTip.SetToolTip(AllColorPanel, "Color of All Features Collection");
			m_toolTip.SetToolTip(BarsColorPanel, "Color of Bars Collection");
			m_toolTip.SetToolTip(BeatCountsColorPanel, "Color of Beat Counts Collection");
			m_toolTip.SetToolTip(BeatSplitsColorPanel, "Color of Beat Splits Collection");

			m_settingsData = m_settingsData ?? new BeatBarSettingsData("Beats");

			BarsCB.Checked = true;
			AllFeaturesCB.Checked = true;
			BeatCountsCB.Checked = true;
			BeatSplitsCB.Checked = false;

			m_allowUpdates = true;
			SetBeatBarOutputSettings();

			m_previewWaveForm = new PreviewWaveform(audio);
			m_previewWaveForm.Width = musicStaff1.Width;
			m_previewWaveForm.Height = 75;
			m_previewWaveForm.Location = new Point(musicStaff1.Location.X, 25);

			musicStaff1.SettingChanged += MusicStaffSettingsChanged;

			PreviewGroupBox.Controls.Add(m_previewWaveForm);
		}