[This is preliminary documentation and is subject to change.]

Determines the form to be displayed while this BusinessProcess is running

Namespace:  Firefly.Box
Assembly:  Firefly.Box (in Firefly.Box.dll) Version: 3.4.23.6473 (3.4.23.6473)

Syntax

C#
public Form View { get; set; }
Visual Basic (Declaration)
Public Property View As Form
Visual C++
public:
virtual property Form^ View {
	Form^ get () sealed;
	void set (Form^ value) sealed;
}

Implements

ITask..::.View

Remarks

The Form's content will be refreshed when ever a row was left and the interval set in the UserInterfaceRefreshInterval property, is reached.

Examples

Usage of form of a
CopyC#
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