/////////////////////////////////////////////////////// // Enable Checkbox Event Handler public void enableChk(object sender, EventArgs e) { if (enabled == false) { enabled = true; mForm.reWrite(); } else { enabled = false; mForm.reWrite(); } }
/////////////////////////////////////// // React Clicked EventHandler public void reactClicked(object sender, EventArgs e) { shape.settings[settingIndx].changeRType(rCmBx.Text); mForm.reWrite(); }
// Event Handler For Trackbar Value Change // Calculations Differ Between Settings public void tick(object sender, EventArgs e) { // Settings: X, Y, R, G, B, A, R2, G2, B2, A2, BorderR, Borders R G and B if (tBarTxt.Contains("X")) { // Get New X Position Value float newVal = ((float)tBar.Value / (float)100.0); // Apply New Value To Shape/Wave if (swType == 0) { shape.changeVal(0, newVal); } else { wave.changeVal(0, newVal); } // Change Value Label Text tBarValL.Text = newVal.ToString(); // Write To Preset File mForm.reWrite(); } else if (tBarTxt.Contains("Y")) { // Get New Y Position Value float newVal = ((float)tBar.Value / (float)100.0); // Apply New Value To Shape/Wave if (swType == 0) { shape.changeVal(1, newVal); } else { wave.changeVal(1, newVal); } // Change Value Label Text tBarValL.Text = newVal.ToString(); // Write To Preset File mForm.reWrite(); } else if (tBarTxt.Contains("Sides")) { // Change Side Count And Write To .milk File shape.changeVal(2, (int)tBar.Value); tBarValL.Text = tBar.Value.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Size")) { // Change Size And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(3, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Angle")) { // Change Angle And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(4, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Inner Red")) { // Change Inner Redness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(5, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Outer Red")) { // Change Outer Redness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(6, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Red")) { // Change Wave's Red Value float newVal = ((float)tBar.Value / (float)100.0); wave.changeVal(2, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Inner Green")) { // Change Inner Greenness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(7, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Outer Green")) { // Change Outer Greenness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(8, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Green")) { // Change Wave's Green Value float newVal = ((float)tBar.Value / (float)100.0); wave.changeVal(3, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Inner Blue")) { // Change Inner Blueness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(9, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Outer Blue")) { // Change Outer Blueness and Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(10, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Blue")) { // Change Wave's Blue Value float newVal = ((float)tBar.Value / (float)100.0); wave.changeVal(4, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Border Red")) { // Change Border Redness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(11, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Border Green")) { // Change Border Greenness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(12, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Border Blue")) { // Change Border Blueness And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(13, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Border Opacity")) { // Change Border Opacity And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(14, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Inner Opacity")) { // Change Inner Opacity And Write To .milk File float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(15, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Opacity")) { // Change Wave's Opacity Value float newVal = ((float)tBar.Value / (float)100.0); wave.changeVal(5, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else if (tBarTxt.Contains("Samples")) { // Change Wave's Samples Value float newVal = ((float)tBar.Value / (float)100.0); wave.changeVal(6, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } else { // Change Outer Opacity And Write To .milk file float newVal = ((float)tBar.Value / (float)100.0); shape.changeVal(16, newVal); tBarValL.Text = newVal.ToString(); mForm.reWrite(); } if (swType == 0) { tBarValL.Text = shape.getVal(tBarTxt).ToString(); } else { tBarValL.Text = wave.getVal(tBarTxt).ToString(); } }