-
C# 윈폼 Chart 컨트롤C# 2020. 6. 18. 12:20
3rd Party Component : 제 3자 기업들이 개발해서 제공하는 컴포넌트. 상용 License.
흐리멍텅한 기본 윈폼에서 각종 서드파티컴포넌트 회사가 디자인한 UI와 그래픽을 사용할 수 있다. 돈만 내면.
Modern UI Made Easy
Telerik UI for ASP.NET AJAX, MVC, Core, Xamarin, Angular, HTML5 and jQuery
Telerik: Leading UI controls and Reporting for .NET (ASP.NET AJAX, MVC, Core, Xamarin, WPF), Kendo UI for HTML5 and Angular development, and NativeScript.
www.telerik.com
https://www.jetbrains.com/ko-kr/
JetBrains: Developer Tools for Professionals and Teams
JetBrains is a cutting-edge software vendor specializing in the creation of intelligent development tools, including IntelliJ IDEA – the leading Java IDE, and the Kotlin programming language.
www.jetbrains.com
.NET UI Controls for Developers of Mobile, Desktop, Web & Reporting Apps
DevExpress provides best-in-class UI controls for WinForms, ASP.NET, MVC, Blazor, ASP.NET Core, WPF, VCL and JavaScript developers.
www.devexpress.com
Chart Control
private void Form1_Load(object sender, EventArgs e) { this.Text = "Using Chart Control"; //Form1의 텍스트와 같다 윈도우 창 제목 //10명의 학생 랜덤점수 생성 및 차트 바인딩 Random rnd = new Random(); chart1.Titles.Add("중간고사"); for (int i=0; i<10; i++) { //chart1의 series1에 대한 값을 0~100까지의 랜덤 값 주기 chart1.Series["Series1"].Points.Add(rnd.Next(100)); chart1.Series["Series2"].Points.Add(rnd.Next(100)); } chart1.Series["Series1"].LegendText = "수학"; //선에 대한 설명 chart1.Series["Series1"].ChartType = SeriesChartType.Line; //표의 형태 chart1.Series["Series2"].LegendText = "영어"; chart1.Series["Series2"].ChartType = SeriesChartType.Line; }
System.Windows.Forms 속성 경로에 있는 System.Windows.Forms.dll 이 없으면 윈폼을 사용하지 못한다. 위와 같은 참조가 없으면 난리 난다. 필요한 것이 있다면 위 참조 추가에서 필요한 것들을 마음대초 추가 가능
위 항목들이 객체지향 컴포넌트이다. 소프트웨어 공학 중에서 컴포넌트 베이스 디벨롭먼트과 같은 형태이다.
다른 것들은 마이크로소프트가 제공하는 기본 컴포넌트이고, 위에서 소개한 이쁜 디자인을 가진 프로그램들을 관리해주는 부분이 저 부분이다. 핫하답니다.
두번째 MetroModernUI 를 사용해보자 어느 프로젝트인지 꼭 확인하고 설치하자. 준비 끝
public partial class Form1 : MetroFramework.Forms.MetroForm //Fomrs1를 바꾼다. { public Form1() { InitializeComponent(); }
바꾸면
요래 바뀐다. private void button1_Click(object sender, EventArgs e) { chart1.Series["Series1"].Points.Clear(); //MessageBox.Show("데이터를 지웠습니다.", "처리", MessageBoxButtons.OK, MessageBoxIcon.Information); MetroMessageBox.Show(this,"데이터를 지웠습니다.", "처리", MessageBoxButtons.OK, MessageBoxIcon.Information); }
요래 바꾸면
요래 나온다. 'C#' 카테고리의 다른 글
C# 기초 정리 (0) 2020.06.25 C# DB연동 (0) 2020.06.18 C# 고급 컨트롤 (0) 2020.06.17 C# 고급폼 (2020.06.16) (0) 2020.06.16 C# 윈폼 컨트롤(2020.06.16) (0) 2020.06.16