Using C# Language
Develop a Visual C# .NET application that performs a colour control operation. The main form contains a reset button and sets the form's background colour according to the colour values indicated by the colour control objects. Each colour control object is controlled by a corresponding colour control form which provides a progress bar to show the value (in the range 0 to 255) of the corresponding colour control object. The user can click the increase (+) or decrease (-) button to change the value in the corresponding colour control object. When the user clicks the Reset button on the main form, the colour control objects are reset to their initial values (128).
Program Requirements
The main form should have an appropriate title. The colour control form should be named ColourControlForm. The colour control class should be named ColourControl. Make sure to use the property and event names as specified in the colour control class (including case). Local variables and class fields must follow the camel case naming convention. Variable names must be meaningful. The project name must be valid and descriptive. Each form and class filename must match its corresponding form class name and class name. The program must adhere to the following requirements:
The Main Form
The Colour Control Form
The ColourControl Class
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ColorControl
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
this.BackColor = Color.FromArgb(128, 128, 128);
}
public MainForm(int R , int G , int B)
{
this.BackColor = Color.FromArgb(R, G, B);
}
private void reset(int red , int yellow , int green)
{
ButtonRed1.Text = "128";
ButtonGreen1.Text = "128";
ButtonBlack1.Text = "128";
int R = Convert.ToInt32(ButtonRed1.Text);
int G = Convert.ToInt32(ButtonGreen1.Text);
int B = Convert.ToInt32(ButtonBlack1.Text);
new MainForm( R ,G ,B);
}
private void ButtonRed_Click(object sender, EventArgs e)
{
Rpanel.Show();
Bpanel.Hide();
Gpanel.Hide();
DoneButton.Show();
}
private void ButtonRed1_Click(object sender, EventArgs e)
{
Rpanel.Show();
Bpanel.Hide();
Gpanel.Hide();
DoneButton.Show();
}
private void ButtonGreen_Click(object sender, EventArgs e)
{
Rpanel.Hide();
Bpanel.Hide();
Gpanel.Show();
DoneButton.Show();
}
private void ButtonGreen1_Click(object sender, EventArgs
e)
{
Rpanel.Hide();
Bpanel.Hide();
Gpanel.Show();
DoneButton.Show();
}
private void ButtonBlack_Click(object sender, EventArgs e)
{
Rpanel.Hide();
Bpanel.Show();
Gpanel.Hide();
DoneButton.Show();
}
private void ButtonBlack1_Click(object sender, EventArgs
e)
{
Rpanel.Hide();
Bpanel.Show();
Gpanel.Hide();
DoneButton.Show();
}
private void MainForm_Load(object sender, EventArgs e)
{
//miscoded
}
private void button1_Click(object sender, EventArgs e)
{
new MainForm();
}
private void DoneButton_Click(object sender, EventArgs e)
{
Rpanel.Hide();
Bpanel.Hide();
Gpanel.Hide();
new MainForm();
DoneButton.Hide();
}
}
}
Using C# Language Develop a Visual C# .NET application that performs a colour control operation. The...
C# Language The ColourControl Class The class should be public. The class defines a read-only or private set public property named Value of type int. The class defines a public event named ValueChanged whose delegate type is void with two parameters, object sender and EventArgs e. The public constructor for the class is a default constructor (i.e., takes no parameters). The constructor sets the Value property to 128. The class defines a public void method named IncreaseValue. The method increases...
What am I doing wrong? I get this error: "The name 'LoginPasswordUserControl' does not exist in the current context" I have a user control, here is the code: using System.Windows.Forms; //Define the namespace to make the user control. //namespace to hold the application namespace LoginPasswordUser { //Define the class to make the user control. //Class to define the control public partial class LoginPasswordUserControl : UserControl { //Define the read-only properties to get the username and the password from the user...
How do you do this using visual studio on a Mac? You are tasked with creating an application with five PictureBox controls. In the Poker Large folder, you will find JPEG image files for a complete deck of poker cards. Feel free to choose any card image that you like or be creative with this application. Each PictureBox should display a different card from the set of images. When the user clicks any of the PictureBox controls, the name of...
Visual Basic 2015: Extra 18-1 Use inheritance with the Inventory Maintenance Application Source Code: 1. frmNewItem.vb Public Class frmNewItem Public InvItem As InvItem Private Sub frmNewItem_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.LoadComboBox() End Sub Private Sub LoadComboBox() cboSizeOrManufacturer.Items.Clear() If rdoPlant.Checked Then cboSizeOrManufacturer.Items.Add("1 gallon") cboSizeOrManufacturer.Items.Add("5 gallon") cboSizeOrManufacturer.Items.Add("15 gallon") cboSizeOrManufacturer.Items.Add("24-inch box") cboSizeOrManufacturer.Items.Add("36-inch box") Else cboSizeOrManufacturer.Items.Add("Bayer") cboSizeOrManufacturer.Items.Add("Jobe's") cboSizeOrManufacturer.Items.Add("Ortho") cboSizeOrManufacturer.Items.Add("Roundup") cboSizeOrManufacturer.Items.Add("Scotts") End If End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click If IsValidData() Then InvItem = New InvItem(CInt(txtItemNo.Text),...
USING VISUAL BASIC STUDIO PLEASE PROVIDE THE CODE IN C# LANGUAGE SELECT CONSOLE APPLICATION You are to create a House with 2 rooms in the house. The following is an example of C++ code for the basic classes: **in C#, it may be written differently** class Room { private: double L; double W; public: //functions go here. } class House { private: Room room1; Room room2; public: //functions go here } The code above is C++ version. In C#, you...
This has to be extremely precise, thank you for your time. ols Window Help U + 1 /write a class meeting the following specifications: 3 //The class is declared as public. 4 //The class is named Country. 5 //The class has a field of type String named anger. 6 //The class has a field of type int named stretch. 7 //The class has a field of type double named film. 8 //The class has a exactly one constructor. 9 //The...
Write a C# code for a Sales Calculator: Note: You cannot use the foreach loop in any part of this program! sales.txt file: 1189.55, 1207.00, 1348.27, 1456.88, 1198.34, 1128.55, 1172.37, 1498.55, 1163.29 The application should have controls described as follows: • A button that reads Get Sales. If the user clicks this button, the application should call a method named ProcesSalesFile. ProcessSalesFile Method: accepts no arguments and does not return anything The ProcessSalesFile Method will do the following: o Open...
Write a C# code for a Sales Calculator: Note: You cannot use the foreach loop in any part of this program! sales.txt file: 1189.55, 1207.00, 1348.27, 1456.88, 1198.34, 1128.55, 1172.37, 1498.55, 1163.29 The application should have controls described as follows: • A button that reads Get Sales. If the user clicks this button, the application should call a method named ProcesSalesFile. ProcessSalesFile Method: accepts no arguments and does not return anything The ProcessSalesFile Method will do the following: o Open...