BusinessProcessUserInterfaceRefreshInterval Property

sets the value determining the interval in milliseconds for the user interface refresh

Definition

Namespace: Firefly.Box
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
C#
public int UserInterfaceRefreshInterval { set; }

Property Value

Int32

Remarks

Whenever this interval occurs, all the controls on the form are updated with their current values, and the UI is refreshed

Example

The usage of UserInterfaceRefreshInterval
C#
using System.Drawing;
using System.Windows.Forms;
using Firefly.Box;
using Firefly.Box.UI.Advanced;

namespace TestFirefly.Box.Documentation
{
    public class BusinessProcessForm
    {
        public void BusinessProcessWithAForm()
        {
            var bp = new BusinessProcess();
            Time start = Time.Now;

            bp.View = new Firefly.Box.UI.Form();
            var textBox = new Firefly.Box.UI.TextBox
                              {
                                  Alignment = ContentAlignment.MiddleCenter,
                                  Font = new Font("Arial", 72),
                                  Dock = DockStyle.Fill
                              };
            textBox.Data = ControlData.FromText(() => (Time.Now - start).TotalSeconds.ToString());
            bp.View.Controls.Add(textBox);
            bp.UserInterfaceRefreshInterval = 2000; //two seconds
            bp.Exit(ExitTiming.AfterRow, () => (Time.Now - start).TotalSeconds > 15);
            bp.ShowView = true;
            bp.Run();
        }
    }
}

See Also