sgcUI 5분 시작 가이드

sgcUI는 Delphi, C++Builder, .NET용 네이티브 UI 제품 14종이며, 설치 프로그램 하나로 모두 설치해요. 이 페이지에서는 체험판을 설치하고, 폼에 실시간으로 갱신되는 행이 있는 그리드를 올리고, 같은 코드를 C++Builder와 C#으로도 보여 드린 다음, 호출 한 번씩으로 애플리케이션 전체를 다크 모드와 오른쪽에서 왼쪽 방향으로 전환해 봐요.

설치 프로그램 하나로 제품 14종
VCL, FireMonkey, WinForms, WPF, Avalonia
다크 테마와 오른쪽에서 왼쪽 방향 기본 내장

체험판 설치

제품마다 설치 프로그램이 따로 있지 않아요. Delphi 체험판 하나와 C++Builder 체험판 하나로 제품 14종을 모두 설치하고, .NET 버전은 NuGet에서 받아요.

1. 설치 프로그램 실행

Delphi용 또는 C++Builder용 무료 체험판을 다운로드해서 실행하세요. 체험판은 모든 제품을 체험판 에디션으로 데모와 도움말까지 함께 설치하며, 라이선스가 필요 없어요.

2. IDE 선택

설치할 Delphi 또는 C++Builder 버전을 고르세요. Delphi 7과 C++Builder 2007부터 RAD Studio 13까지 지원해요. 설치 프로그램이 버전별로 패키지를 컴파일하고 디자인 타임 패키지를 IDE에 등록해요.

3. 종속성은 자동 처리

sgcGrid, sgcCharts, sgcDashboard 등 다른 컨트롤은 sgcUICore를 기반으로 하고, sgcReports는 sgcPDF를 기반으로 해요. 설치 프로그램이 그 순서대로 컴파일하므로 직접 추가할 것이 없어요.

4. 팔레트 확인

제품마다 도구 팔레트 페이지가 따로 생겨요: SGC Grid, SGC Navigation, SGC Toolbar, SGC Editors, SGC Charts, SGC Dashboard, SGC Gauges, SGC PivotGrid, SGC Planner, SGC Diagram, SGC Wizard, SGC Maps, sgcPDF, sgcReports.

5. NuGet으로 .NET 사용

사용하는 UI 프레임워크용 패키지를 추가하세요. 예를 들면 esegece.sgcGrid.WinForms, esegece.sgcGrid.Wpf, esegece.sgcGrid.Avalonia예요. esegece.sgcGrid와 esegece.sgcUICore가 자동으로 함께 설치돼요.

6. Community 또는 Registered

모든 .NET 제품은 .Community 접미사가 붙은 무료 Community 패키지도 함께 제공해요. 예를 들면 esegece.sgcGrid.Community예요. Registered 패키지는 모든 기능과 전체 소스 코드, 상용 라이선스를 포함해요.

첫 번째 sgcUI 폼

VCL 애플리케이션을 만들고 SGC Grid 팔레트 페이지의 TsgcVCLGrid를 폼에 올린 다음, 폼을 더블 클릭해 FormCreate를 만들고 아래 코드를 입력하세요. 그리고 F9를 누르세요. C++Builder와 .NET WinForms 애플리케이션에서의 같은 그리드는 다른 탭에 있어요.

Unit1.pas
uses
  SysUtils, Classes, Controls, Forms,
  sgcGrid_Columns, sgcGrid_Data, sgcGrid_VCL;

type
  TForm1 = class(TForm)
    sgcVCLGrid1: TsgcVCLGrid;
    procedure FormCreate(Sender: TObject);
  end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  sgcVCLGrid1.Align := alClient;
  // the columns: field name, caption and data type
  sgcVCLGrid1.Columns.Add('Symbol', 'Symbol');
  sgcVCLGrid1.Columns.Add('Price', 'Price', gdtFloat).DisplayFormat := '0.00';
  sgcVCLGrid1.Columns.Add('Volume', 'Volume', gdtInteger);
  // one row per key, the values in column order
  sgcVCLGrid1.Data.AppendRow('MSFT', ['MSFT', 412.5, 1200]);
  sgcVCLGrid1.Data.AppendRow('AAPL', ['AAPL', 228.1, 3400]);
  // later, from any thread: update a row by key and field name
  sgcVCLGrid1.Data.UpdateRow('MSFT', ['Price', 'Volume'], [413.1, 1350]);
end;

AppendRow는 값을 열 순서대로 받아요. UpdateRow는 필드 이름을 받으므로, 가격만 담긴 메시지는 가격만 바꾸고, 아직 없는 키는 새로 삽입돼요. 열은 디자인 타임에 Columns 편집기로 추가할 수도 있고, 같은 팔레트 페이지의 TsgcGridSource_DataSet은 모든 TDataSet에서 그리드를 채워요.

Unit1.cpp
#include <vcl.h>
#include "sgcGrid_Columns.hpp"
#include "sgcGrid_Data.hpp"
#include "sgcGrid_VCL.hpp"

void __fastcall CreateGrid(TForm *Form)
{
  TsgcVCLGrid *Grid = new TsgcVCLGrid(Form);
  Grid->Parent = Form;
  Grid->Align = alClient;
  // the columns: field name, caption and data type
  Grid->Columns->Add("Symbol", "Symbol", gdtText);
  Grid->Columns->Add("Price", "Price", gdtFloat)->DisplayFormat = "0.00";
  Grid->Columns->Add("Volume", "Volume", gdtInteger);
  // one row per key, the values in column order
  Grid->Data->AppendRow("MSFT", OPENARRAY(Variant,
    (Variant("MSFT"), Variant(412.5), Variant(1200))));
  Grid->Data->AppendRow("AAPL", OPENARRAY(Variant,
    (Variant("AAPL"), Variant(228.1), Variant(3400))));
}

C++Builder는 C++Builder 설치 프로그램이 빌드하는 헤더와 라이브러리를 통해 같은 컴포넌트를 사용해요. Delphi 오픈 배열은 OPENARRAY 매크로로 전달해요. 코드 없이 TsgcVCLGrid를 폼에 올리고 Object Inspector에서 열을 설정해도 돼요.

Program.cs
// dotnet add package esegece.sgcGrid.WinForms
using System;
using System.Windows.Forms;
using esegece.sgcGrid;

internal static class Program
{
    [STAThread]
    private static void Main()
    {
        Application.EnableVisualStyles();
        Form oForm = new Form { Text = "My first sgcUI form", Width = 640, Height = 360 };

        TsgcWinFormsGrid oGrid = new TsgcWinFormsGrid { Dock = DockStyle.Fill };
        oGrid.Columns.Add("symbol", "Symbol");
        oGrid.Columns.Add("price", "Price", TsgcGridDataType.gdtFloat).DisplayFormat = "0.00";
        oGrid.Columns.Add("volume", "Volume", TsgcGridDataType.gdtInteger);
        oGrid.Data.AppendRow("MSFT", "MSFT", 412.5, 1200);
        oGrid.Data.AppendRow("AAPL", "AAPL", 228.1, 3400);
        oGrid.Data.UpdateRow("MSFT", new[] { "price", "volume" }, new object[] { 413.1, 1350 });
        oForm.Controls.Add(oGrid);

        Application.Run(oForm);
    }
}

클래스 이름은 Delphi 쪽을 따라요. WinForms는 TsgcWinFormsGrid, WPF는 TsgcWpfGrid이고, 각각 같은 Columns와 Data 멤버를 가져요. WinForms 패키지는 .NET Framework 4.7.2와 Windows용 .NET 8, 9, 10을 대상으로 해요.

애플리케이션 전체를 위한 스위치 하나

모든 sgcUI 컨트롤은 기본적으로 애플리케이션의 테마와 방향을 따라요. 호출 한 번으로 모든 컨트롤을 다크 모드로 다시 그리고, 호출 한 번으로 아랍어나 히브리어에 맞게 애플리케이션 전체를 좌우 반전해요.

Theme.pas
uses
  Classes,
  sgcUICore_Theme, sgcUICore_Theme_VCL;

procedure ApplyAppSettings(aDark, aRightToLeft: Boolean);
begin
  // every sgcUI control whose Theme is utDefault repaints in the new theme;
  // True also themes the standard controls of every open form
  if aDark then
    sgcUISetApplicationTheme(utDark, True)
  else
    sgcUISetApplicationTheme(sgcUISystemTheme, True);
  // mirrors every open form and the sgcUI controls that follow it
  if aRightToLeft then
    sgcUISetApplicationBiDiMode(bdRightToLeft)
  else
    sgcUISetApplicationBiDiMode(bdLeftToRight);
end;

두 함수는 모두 sgcUICore_Theme에 있어요. True를 전달할 때는 sgcUICore_Theme_VCL(또는 sgcUICore_Theme_FMX)을 추가해야 폼의 표준 컨트롤에도 테마가 적용돼요. sgcUISystemTheme은 운영 체제의 라이트 또는 다크 선택을 반환해요. C++Builder에서는 sgcUICore_Theme.hpp를 포함하고 같은 호출을 하면 돼요. 자체 Theme가 utLight, utDark, utCustom인 컨트롤은 그 값을 유지해요.

Program.cs
using esegece.sgcUICore;

// follow the light or dark choice of Windows, and theme the forms too
sgcUIApplication.SetTheme(sgcUIApplication.SystemTheme(), true);

// or force dark mode
sgcUIApplication.SetTheme(TsgcUITheme.utDark);

// mirror every open form and the sgcUI controls that follow it
sgcUIApplication.SetRightToLeft(true);

sgcUIApplication은 esegece.sgcUICore에 있는 정적 클래스이며 WinForms, WPF, Avalonia가 함께 사용해요. 컨트롤별로는 표준 속성도 그대로 동작해요. WinForms에서는 RightToLeft, WPF와 Avalonia에서는 FlowDirection이에요.

데모, 제품, 문서

스위트 데모는 여러 제품을 한꺼번에 사용하는 완전한 애플리케이션이에요. 데모 소스는 체험판의 Demos\Suite 아래에 들어 있어요.

스위트 데모 ERP, Factory, Fleet, Markets, Portfolio가 컴파일되어 바로 실행할 수 있어요.
제품 14종 Standard는 sgcGrid, sgcNavigation, sgcToolbar, sgcEditors예요. Professional은 sgcCharts, sgcDashboard, sgcGauges를 더하고, Enterprise는 sgcPivotGrid, sgcPlanner, sgcDiagram, sgcWizard, sgcMaps, sgcPDF, sgcReports를 더해요.
기능 비교 Delphi, C++Builder, .NET용으로 각 제품이 하는 일을 나란히 비교해요.
온라인 도움말 설치, 제품별 및 프레임워크별 빠른 시작, 애플리케이션 테마, 오른쪽에서 왼쪽 방향을 다뤄요.
가격 Standard, Professional, Enterprise 에디션, 또는 원하는 제품만 따로 구매할 수 있어요.
무료 체험판 다운로드 Delphi 및 C++Builder 설치 프로그램, 컴파일된 데모, NuGet 패키지 목록이에요.

모든 제품에는 각자의 빠른 시작이 있으며, 시작하기 페이지에 모아 두었어요.

sgcUI 빠른 시작 질문

아니요. 설치 프로그램 하나로 제품 14종을 모두 설치해요. 체험판은 모든 제품을 설치하고, 정식 설치 프로그램은 제품마다 체크박스를 하나씩 보여 주며 보유한 라이선스에 해당하는 제품만 활성화해요. sgcPDF를 필요로 하는 sgcReports처럼 다른 제품이 필요한 제품은 자동으로 함께 설치돼요.
화면에 가장 맞는 제품부터 시작하세요. 대부분의 애플리케이션은 데이터용 sgcGrid로 시작하고, 시각화용 sgcCharts 또는 sgcDashboard, 셸용 sgcNavigation과 sgcToolbar를 이어서 더해요. 모두 sgcUICore를 공유하므로 테마와 방향도 하나로 공유해요.
모델은 같고 컨트롤 클래스만 달라져요. FireMonkey는 TsgcFMXGrid, WPF는 TsgcWpfGrid, Avalonia는 TsgcAvaloniaGrid이고, 모두 같은 Columns와 Data를 가져요. 도움말에는 제품별, 프레임워크별 빠른 시작이 있어요.
최고의 가성비: All-Access모든 eSeGeCe 제품과 프리미엄 지원이 포함되어 연 €1,059부터 이용할 수 있어요.
All-Access 가격 보기

첫 번째 sgcUI 폼을 만들 준비가 되셨나요?

체험판을 다운로드하고, 스위트 데모를 실행한 다음, 폼에 그리드를 올려 보세요.