Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Graphical Activity Log

Siticone Graphical Activity Log

The SiticoneGraphicalActivityLog is a sophisticated WinForms component for visualizing application events. It supports color-coded log entries (Info, Warning, Error, Success), automatic timestamps, smooth animations, and built-in filtering. Ideal for dashboards, server monitors, or debugging consoles where clarity and visual feedback are essential.

Logging Features

Core methods for adding, managing, and filtering log entries.

Property / Method Type Description & Usage Example
LogInformation() Method log.LogInformation("System Ready", LogType.Success); Adds a new entry with the specified text and type. Triggers animations and events.
Filter() Method log.Filter("error", LogType.Error); Filters visible entries by text content or log type. Pass null to clear filters.
MaxEntries int log.MaxEntries = 100; Limits the number of items kept in memory. Oldest entries are removed automatically (FIFO). Set to 0 for unlimited.
AutoScrollToLatest bool log.AutoScrollToLatest = true; Automatically scrolls to the bottom when new logs are added.

Appearance & Styling

Customize the colors used for each log level and the overall look.

Property Type Description & Usage Example
InfoColor Color log.InfoColor = Color.LightBlue; Background color for LogType.Info entries.
SuccessColor Color log.SuccessColor = Color.Honeydew; Background color for LogType.Success entries.
WarningColor Color log.WarningColor = Color.LightYellow; Background color for LogType.Warning entries.
ErrorColor Color log.ErrorColor = Color.MistyRose; Background color for LogType.Error entries.
IconColor Color log.IconColor = Color.White; The foreground color of the type icons (Checkmark, X, Exclamation).
LogEntryHeight int log.LogEntryHeight = 40; The height in pixels of each log row.
Spacing int log.Spacing = 5; The vertical gap between log entries.

Timestamps

Configure automatic time tracking for log entries.

Property Type Description & Usage Example
ShowTimestamp bool log.ShowTimestamp = true; Prepends the creation time to the log message.
TimestampFormat string log.TimestampFormat = "HH:mm:ss"; Standard .NET DateTime format string (e.g., "yyyy-MM-dd HH:mm").

Public Methods

LogInformation(string message, LogType type)
// Add various types of logs
activityLog1.LogInformation("Connection established.", LogType.Success);
activityLog1.LogInformation("Disk space low.", LogType.Warning);
activityLog1.LogInformation("Critical Failure!", LogType.Error);
Filter(string term, LogType? type)
// Show only errors containing the word "database"
activityLog1.Filter("database", LogType.Error);

// Clear all filters (show everything)
activityLog1.Filter(null, null);
ClearLogs()
// Remove all entries from the view
activityLog1.ClearLogs();

Events

Event Handling
// 1. Log Added
// Fires whenever a new entry is inserted.
activityLog1.LogAdded += (s, e) => 
{
                Console.WriteLine($"New Log: {e.LogMessage} at {e.Timestamp}");
};

// 2. Log Clicked
// Fires when the user clicks on a specific log row.
activityLog1.LogClicked += (s, e) => 
{
                MessageBox.Show($"Details: {e.LogMessage}", "Log Entry");
};

// 3. Max Entries Reached
// Fires when the oldest log is recycled due to the MaxEntries limit.
activityLog1.MaxEntriesReached += (s, e) => 
{
                Console.WriteLine("Log buffer cycling...");
};

Designer Support

The control offers robust design-time features via Smart Tags.

Category Features
Design Actions Add Sample Logs: Populates the control with dummy data to visualize layouts.
Clear All Logs: Removes design-time data.
Dock in Parent: Quickly fills the container.
Configuration Quick access to MaxEntries, LogEntryHeight, and Color properties.

Detailed Usage Examples

Example 1: Server Monitoring Dashboard

A setup for tracking server health with color-coded status updates.

C# - Server Monitor
private void InitializeServerLog()
{
    serverLog.BackColor = Color.FromArgb(30, 30, 30);
    serverLog.LogEntryHeight = 35;
    serverLog.MaxEntries = 500; // Keep last 500 events
    serverLog.AutoScrollToLatest = true;
    
                // Custom Dark Theme
    serverLog.InfoColor = Color.FromArgb(40, 60, 80);
    serverLog.SuccessColor = Color.FromArgb(30, 60, 30);
    serverLog.ErrorColor = Color.FromArgb(60, 20, 20);
    serverLog.LogFont = new Font("Consolas", 9f);
}

private void OnServerEvent(ServerStatus status)
{
                switch (status.Code)
    {
                case 200:
            serverLog.LogInformation("Request OK", LogType.Success);
                break;
                case 404:
            serverLog.LogInformation("Resource Not Found", LogType.Warning);
                break;
                case 500:
            serverLog.LogInformation("Server Error!", LogType.Error);
                break;
    }
}

Example 2: Live Search & Filtering

Implement a search bar to filter logs dynamically as the user types.

C# - Search Logic
private void txtSearch_TextChanged(object sender, EventArgs e)
{
                string term = txtSearch.Text;
    
                // Filter by text, keep all log types visible
    activityLog1.Filter(term, null);
}

private void chkShowErrorsOnly_CheckedChanged(object sender, EventArgs e)
{
                if (chkShowErrorsOnly.Checked)
    {
                // Show only errors, preserve search term
        activityLog1.Filter(txtSearch.Text, LogType.Error);
    }
                else
    {
                // Show all types
        activityLog1.Filter(txtSearch.Text, null);
    }
}