usingSystem; |
usingSystem.Collections.Generic; |
usingSystem.ComponentModel; |
usingSystem.Data; |
usingSystem.Drawing; |
usingSystem.Linq; |
usingSystem.Text; |
usingSystem.Threading.Tasks; |
usingSystem.Windows.Forms; |
namespaceBunifu_UI_Sales_Dashboard |
{ |
publicpartialclassForm1 : Form |
{ |
publicForm1() |
{ |
InitializeComponent(); |
} |
privatevoidbunifuFlatButton2_Click(objectsender, EventArgse) |
{ |
} |
privatevoidbunifuDataViz1_Load(objectsender, EventArgse) |
{ |
} |
publicvoidplotdata() |
{ |
//creat a canvas and datapoints for the bunifu line |
varcanvas=newBunifu.DataViz.WinForms.Canvas(); |
vardatapoints=newBunifu.DataViz.WinForms.DataPoint(Bunifu.DataViz.WinForms.BunifuDataViz._type.Bunifu_line); |
datapoints.addLabely('Jan', '2'); |
datapoints.addLabely('Feb', '3'); |
datapoints.addLabely('Mar', '4'); |
datapoints.addLabely('Apr', '7'); |
datapoints.addLabely('May', '6'); |
datapoints.addLabely('Jun', '7'); |
datapoints.addLabely('Jul', '8'); |
datapoints.addLabely('Aug', '9'); |
datapoints.addLabely('Sep', '9'); |
datapoints.addLabely('Oct', '7'); |
datapoints.addLabely('Nov', '5'); |
datapoints.addLabely('Dec', '4'); |
//second chart points |
vardatapoints2=newBunifu.DataViz.WinForms.DataPoint(Bunifu.DataViz.WinForms.BunifuDataViz._type.Bunifu_line); |
datapoints2.addLabely('Jan', '12'); |
datapoints2.addLabely('Feb', '10'); |
datapoints2.addLabely('Mar', '9'); |
datapoints2.addLabely('Apr', '7'); |
datapoints2.addLabely('May', '8'); |
datapoints2.addLabely('Jun', '6'); |
datapoints2.addLabely('Jul', '5'); |
datapoints2.addLabely('Aug', '4.5'); |
datapoints2.addLabely('Sep', '4'); |
datapoints2.addLabely('Oct', '5'); |
datapoints2.addLabely('Nov', '8'); |
datapoints2.addLabely('Dec', '9'); |
//add the datapoints to the canvas |
canvas.addData(datapoints); |
canvas.addData(datapoints2); |
//render the canvas |
bunifuDataViz1.Render(canvas); |
} |
privatevoidtimer1_Tick(objectsender, EventArgse) |
{ |
plotdata(); |
timer1.Stop(); |
} |
privatevoidForm1_Load(objectsender, EventArgse) |
{ |
//add different colors for the two line charts other than the default |
bunifuDataViz1.colorSet.Add(Color.FromArgb(36, 106, 179)); |
bunifuDataViz1.colorSet.Add(Color.FromArgb(244, 248, 252)); |
//we need to add the rows |
bunifuCustomDataGrid1.Rows.Add('Twitter', 'Today', 'December', '$7,000.00'); |
bunifuCustomDataGrid1.Rows.Add('Shopify', 'Yesterday', 'November', '$3,000.00'); |
bunifuCustomDataGrid1.Rows.Add('Dribble', 'Wednesday', 'October', '$7,000.00'); |
bunifuCustomDataGrid1.Rows.Add('Facebook', 'Tuesday', 'September', '$7,000.00'); |
bunifuCustomDataGrid1.Rows.Add('Adidas', 'Monday', 'August', '$300.00'); |
//lets now style each cell in the columns to have different colors |
bunifuCustomDataGrid1.Rows[0].Cells[0].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[1].Cells[0].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[2].Cells[0].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[3].Cells[0].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[4].Cells[0].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[0].Cells[1].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[1].Cells[1].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[2].Cells[1].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[3].Cells[1].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[4].Cells[1].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[0].Cells[2].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[1].Cells[2].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[2].Cells[2].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[3].Cells[2].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[4].Cells[2].Style.ForeColor=Color.FromArgb(112, 162, 219); |
bunifuCustomDataGrid1.Rows[0].Cells[3].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[1].Cells[3].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[2].Cells[3].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[3].Cells[3].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.Rows[4].Cells[3].Style.ForeColor=Color.FromArgb(198, 205, 216); |
bunifuCustomDataGrid1.ClearSelection(); |
} |
privatevoidbunifuFlatButton12_Click(objectsender, EventArgse) |
{ |
} |
privatevoidbunifuCustomLabel6_Click(objectsender, EventArgse) |
{ |
} |
privatevoidbunifuCustomDataGrid1_CellContentClick(objectsender, DataGridViewCellEventArgse) |
{ |
} |
privatevoidbunifuFlatButton9_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton3_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton4_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton5_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton6_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton7_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton8_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton1_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton10_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton11_Click(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
privatevoidbunifuFlatButton7_Load(objectsender, EventArgse) |
{ |
//the indicator should move as the user navigates through |
Bunifu.Framework.UI.BunifuFlatButtonclicked= (Bunifu.Framework.UI.BunifuFlatButton)sender; |
// Set the location of the separator (horizontally) to be below the clicked label. |
bunifuSeparator1.Location=newPoint(bunifuSeparator1.Location.X, ((Bunifu.Framework.UI.BunifuFlatButton)sender).Location.Y); |
//set height of separator to be equal to that of flatbutton |
bunifuSeparator1.Height=clicked.Height; |
((Bunifu.Framework.UI.BunifuFlatButton)sender).BackColor=Color.FromArgb(57, 132, 210); |
} |
} |
} |