int WaveBrighten; // Brightens WaveForm // [1 = All colors scalled till either r/g/b reaches 1] // [0 = Normal] public MilkForm() { // Create Shape & Wave Tabs shapeTabs = new ShapeTabs(this); waveTabs = new WaveTabs(this); // Create New Preset Button Button newPreset = new Button(); newPreset.Text = "New"; newPreset.Location = new Point(7, 19); newPreset.Click += newPresetClicked; // Create Preset Selection Button Button browseButton = new Button(); browseButton.Text = "Open"; browseButton.Location = new Point(7, 45); browseButton.Click += browsePresetClicked; // Create Preset Save Button Button showSave = new Button(); showSave.Location = new Point(652, 11); showSave.Image = new Bitmap("C:\\Users\\User\\Desktop\\Dev\\Milkdrop\\save.jpg"); showSave.ImageAlign = ContentAlignment.MiddleCenter; showSave.Width = 25; showSave.Height = 26; showSave.FlatStyle = FlatStyle.Flat; showSave.FlatAppearance.BorderSize = 0; showSave.Click += showSaveBox; // Create Save Name Panel saveBox = new Panel(); saveBox.Location = new Point(474, 18); saveBox.Size = new Size(165, 70); saveBox.BackColor = Color.Black; saveBox.ForeColor = Color.White; saveBox.BorderStyle = BorderStyle.Fixed3D; saveBox.BringToFront(); saveBox.Visible = false; // Create New Preset Name TextBox presetNameTB = new TextBox(); presetNameTB.Location = new Point(30, 10); presetNameTB.Text = "test"; presetNameTB.Parent = saveBox; // Create Save Button Button save = new Button(); save.Location = new Point(39, 38); save.Text = "Save"; save.Parent = saveBox; save.Click += panelSaveClicked; // Create Cancel Quit Button Button cancel = new Button(); cancel.Location = new Point(142, 2); cancel.Width = 16; cancel.Height = 16; cancel.Image = new Bitmap("C:\\Users\\User\\Desktop\\Dev\\Milkdrop\\close.jpg"); cancel.ImageAlign = ContentAlignment.MiddleCenter; cancel.UseVisualStyleBackColor = true; cancel.FlatStyle = FlatStyle.Flat; cancel.FlatAppearance.BorderSize = 0; cancel.Parent = saveBox; cancel.Click += cancelSave; // Add Preset Selection Controls Controls.Add(newPreset); Controls.Add(browseButton); Controls.Add(showSave); Controls.Add(saveBox); // Window Properties BackColor = Color.Black; ForeColor = Color.White; Size = new Size(700, 600); // Basic settings control group box GroupBox buttonBox = new GroupBox(); buttonBox.Parent = this; buttonBox.BackColor = Color.Black; buttonBox.ForeColor = Color.White; buttonBox.Dock = DockStyle.Top; buttonBox.Text = " General Settings "; // General Setting Value Boxes GSettingBox zoomGB = new GSettingBox(this, buttonBox, 90, 20, "zoom", 0, 200, 100); GSettingBox rotGB = new GSettingBox(this, buttonBox, 90, 45, "rot", 0, 200, 100); GSettingBox warpGB = new GSettingBox(this, buttonBox, 90, 70, "warp", 0, 200, 100); GSettingBox decayGB = new GSettingBox(this, buttonBox, 170, 20, "decay", 0, 100, 90); GSettingBox gammaGB = new GSettingBox(this, buttonBox, 170, 45, "gamma", 0, 200, 100); GSettingBox motionGB = new GSettingBox(this, buttonBox, 170, 70, "motion", 0, 100, 50); GSettingBox stretchGB = new GSettingBox(this, buttonBox, 250, 20, "stretch", 0, 200, 100); GSettingBox waveGB = new GSettingBox(this, buttonBox, 250, 45, "wave", 0, 50, 0); this.Text = "Milkdrop2 Visualization Generator"; resetParameters(); }
////////////////////////////////////// // Constructor public Wave(MilkForm m, TabPage t, WaveTabs tC, string num) { tab = t; mForm = m; tabControl = tC; waveNum = num; perFrameNum = 1; // Create Settings settings = new Setting[7]; // X Position Setting settings[0] = new Setting("x", (float)0.5, 10); // Y Position Setting settings[1] = new Setting("y", (float)0.5, 10); // Red Setting settings[2] = new Setting("red", 1, 10); // Green Setting settings[3] = new Setting("green", 0, 10); // Blue Setting settings[4] = new Setting("blue", 0, 10); // Opacity Setting settings[5] = new Setting("opacity", 1, 10); // Sample Setting settings[6] = new Setting("samples", 256, 1); // Wave Font; Font waveFont = new Font("Arial", 10, FontStyle.Bold); // Create Enable CheckBox enable = new CheckBox(); enabled = false; enable.Location = new Point(10, 4); enable.Text = "Enabled"; enable.Parent = tab; enable.Font = waveFont; enable.CheckedChanged += new EventHandler(enableChk); // Create SettingStrip For Various Settings // X Position SettingStrip Separator sep0 = new Separator(new Point(0, 35), "tab", tab); xSS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 55), "X Position", 0, 100, 50, 0); Separator sep1 = new Separator(new Point(0, 95), "tab", tab); // Y Position SettingStrip ySS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 115), "Y Position", 0, 100, 50, 1); Separator sep2 = new Separator(new Point(0, 155), "tab", tab); // Red SettingStrip redSS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 175), "Red", 0, 100, 100, 2); Separator sep3 = new Separator(new Point(0, 215), "tab", tab); // Green SettingStrip greenSS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 235), "Green", 0, 100, 0, 3); Separator sep4 = new Separator(new Point(0, 275), "tab", tab); // Blue SettingStrip blueSS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 295), "Blue", 0, 100, 0, 4); Separator sep5 = new Separator(new Point(0, 335), "tab", tab); // Opacity SettingStrip opacitySS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 355), "Opacity", 0, 100, 100, 5); Separator sep6 = new Separator(new Point(0, 395), "tab", tab); // Sample SettingStrip sampleSS = new SettingStrip(mForm, tab, 1, null, tC, null, this, new Point(100, 415), "Samples", 0, 512000, 256000, 6); }
public ReactBox(MilkForm m, TabPage t, ShapeTabs sTabs, WaveTabs wTabs, Shape s, Wave w, int sIndx, string setL) { mForm = m; tab = t; shapeTabs = sTabs; shape = s; settingIndx = sIndx; this.Visible = false; // Create Reaction Label Font Font rFont = new Font("Courier New", 15, FontStyle.Bold); // React Label Label rLabel = new Label(); rLabel.Text = setL + " Reaction"; rLabel.Location = new Point(10, 10); rLabel.AutoSize = true; rLabel.Font = rFont; this.Controls.Add(rLabel); // Quit Button Button quitButton = new Button(); quitButton.Image = new Bitmap("C:\\Users\\User\\Desktop\\Dev\\Milkdrop\\back.jpg"); quitButton.ImageAlign = ContentAlignment.MiddleCenter; quitButton.UseVisualStyleBackColor = true; quitButton.Location = new Point(265, 5); quitButton.Size = new Size(17, 17); quitButton.FlatStyle = FlatStyle.Flat; quitButton.FlatAppearance.BorderSize = 0; quitButton.Click += quitClicked; this.Controls.Add(quitButton); // Reaction Selection rCmBx = new ComboBox(); rCmBx.Parent = this; rCmBx.Location = new Point(110, 50); rCmBx.Items.Add("Increase"); rCmBx.Items.Add("Decrease"); rCmBx.Items.Add("Do Nothing"); rCmBx.SelectedValue = "Do Nothing"; // Bass Reaction RadioButton; bassRButton = new RadioButton(); bassRButton.Location = new Point(10, 95); bassRButton.Text = "Bass Reactive"; bassRButton.CheckedChanged += new System.EventHandler(this.reactionChecked); this.Controls.Add(bassRButton); // Mid Reaction RadioButton; midRButton = new RadioButton(); midRButton.Location = new Point(10, 114); midRButton.Text = "Mid Reactive"; midRButton.CheckedChanged += new System.EventHandler(this.reactionChecked); this.Controls.Add(midRButton); // Treb Reaction RadioButton trebRButton = new RadioButton(); trebRButton.Location = new Point(10, 133); trebRButton.Text = "Treb Reactive"; trebRButton.CheckedChanged += new System.EventHandler(this.reactionChecked); this.Controls.Add(trebRButton); // Oscillation Reaction RadioButton oscRButton = new RadioButton(); oscRButton.Location = new Point(10, 152); oscRButton.Text = "Oscillation"; oscRButton.CheckedChanged += new System.EventHandler(this.reactionChecked); this.Controls.Add(oscRButton); // Beat Detection RadioButton beatRButton = new RadioButton(); beatRButton.Location = new Point(10, 171); beatRButton.Text = "Beat Detection"; beatRButton.CheckedChanged += new System.EventHandler(this.reactionChecked); this.Controls.Add(beatRButton); // Reaction Intensity TrackBar intensity = new TrackBar(); intensity.Orientation = Orientation.Horizontal; intensity.Location = new Point(120, 130); intensity.Size = new Size(100, 10); intensity.TickStyle = TickStyle.None; intensity.BackColor = Color.Black; intensity.Padding = new Padding(2, 2, 2, 2); intensity.Margin = new Padding(0, 5, 0, 5); intensity.TickFrequency = 10; intensity.Maximum = 0; intensity.Minimum = -30; intensity.Value = -10; intensity.ValueChanged += new EventHandler(intensityChanged); this.Controls.Add(intensity); // Separator Bevel Line Label sepLine = new Label(); sepLine.Location = new Point(0, 90); sepLine.AutoSize = false; sepLine.Height = 2; sepLine.Width = 300; sepLine.BorderStyle = BorderStyle.Fixed3D; this.Controls.Add(sepLine); // Intensity Label Label intensityL = new Label(); intensityL.Text = "INTENSITY"; intensityL.Location = new Point(130, 110); this.Controls.Add(intensityL); // React Button Button reactButton = new Button(); reactButton.Text = "REACT"; reactButton.Location = new Point(230, 165); reactButton.Size = new Size(60, 24); reactButton.Click += reactClicked; reactButton.BringToFront(); this.Controls.Add(reactButton); // ReactBox Settings this.Size = new Size(300, 200); this.Location = new Point(6, 40); this.BackColor = Color.Black; this.ForeColor = Color.White; this.BorderStyle = BorderStyle.Fixed3D; this.Parent = tab; this.BringToFront(); }
// Constructor public SettingStrip(MilkForm m, TabPage t, int swT, ShapeTabs sTabs, WaveTabs wTabs, Shape s, Wave w, Point tL, string tt, int tMin, int tMax, int tVal, int indx) { mForm = m; tab = t; shape = s; tBarTxt = " " + tt; shapeTabs = sTabs; waveTabs = wTabs; shape = s; wave = w; stripIndx = indx; swType = swT; Font tblFont = new Font("Arial", 8, FontStyle.Bold); // Initialize TrackBar tBar = new TrackBar(); tBar.Parent = tab; tBar.Text = tt; tBar.Orientation = Orientation.Horizontal; tBar.Size = new Size(84, 16); tBar.TickStyle = TickStyle.None; tBar.BackColor = Color.Black; tBar.ForeColor = Color.Black; tBar.Padding = new Padding(2, 2, 2, 2); tBar.Margin = new Padding(0, 5, 0, 5); tBar.Left = 1; tBar.TickFrequency = 10; tBar.Minimum = tMin; tBar.Maximum = tMax; tBar.Value = tVal; tBar.ValueChanged += new EventHandler(tick); // Create TrackBar Setting Label tBarSetL = new Label(); tBarSetL.Text = tBarTxt; tBarSetL.Location = new Point(tL.X - 105, tL.Y + 2); tBarSetL.Size = new Size(100, 20); tBarSetL.Font = tblFont; tBarSetL.Parent = tab; // Create TrackBar Value Label tBarValL = new Label(); if (tBarTxt.Contains("Sides")) { tBarValL.Text = tVal.ToString(); } else { tBarValL.Text = ((float)tVal / (float)100.0).ToString(); } tBarValL.Location = new Point(tL.X + 103, tL.Y + 3); tBarValL.Parent = tab; tBarValL.Size = new Size(28, 17); tBarValL.BorderStyle = BorderStyle.Fixed3D; // Ceate UserControl uControl = new UserControl(); uControl.Size = new Size(93, 27); uControl.BackColor = Color.Black; uControl.Location = new Point(tL.X + 5, tL.Y); uControl.Parent = tab; uControl.BorderStyle = BorderStyle.Fixed3D; uControl.Controls.Add(tBar); // Set TrackBar Location Inside UserControl tBar.Location = new Point(3, 0); // Create Reaction Button react = new Button(); react.Image = new Bitmap("C:\\Users\\User\\Desktop\\Dev\\Milkdrop\\react.jpg"); react.ImageAlign = ContentAlignment.MiddleCenter; react.UseVisualStyleBackColor = true; react.Width = 65; react.Height = 12; react.Location = new Point(tL.X + 139, tL.Y + 5); react.Parent = tab; react.Font = tblFont; react.TabStop = false; react.FlatStyle = FlatStyle.Flat; react.FlatAppearance.BorderSize = 0; react.Click += reactClick; // Create Reaction Box rBox = new ReactBox(mForm, tab, sTabs, wTabs, shape, wave, stripIndx, tt); }