ACOP.NET API
AcopUtils

Acop Utilities are a set of static helper methods which can be useful when it is needed or desired to add code to an ACOP application.

ApplyColorGradient provides a set of overloaded methods to add a more stylized look and feed to a finished application. As these interface routines necessary belong to the container form (i.e. a Form1) and not to a specific ACOP control its use involves an extremely modest amount of coding.

The easiest way to apply a color gradient to a form is to make use of an AcopForm. Otherwise, to apply a color gradient to a standard .NET Form, one needs a line of code in the corresponding Form1_load and in Form1_paint. Note: you might have decided to name your container Form something else and/or name your load and paint delegate something besides the default name. The corresponding lines of code then go in their associated spots.

AcopUtilsColorGradientCode.jpg

If the color gradient is to be applied to any controls contained in the form, then you should set their associated BackColor to Transparent.

An example with the above code and several ACOP components:

AcopUtilsColorGradient1.jpg

CheckInstalledPrinter returns true if the given printer is available on the lost host.
GetAcopLinkComponents returns an array of all AcopComponents on the parent container
GetAcops returns an array of all AcopControls on the parent container
GetAcopsByName returns an array of all AcopControls by assigned name on the parent container
GetUtcNow returns the current coordinated universal time (seconds since Jan. 1, 1970) as a double value.
The ACOP Chart, for instance make use of UTC times when drawing trend charts.
GetDefaultPrinter returns the default printer name.
GetLocalTimefromUtc returns the given UTC timestamp as Local DateTime

private void acopChart1_acopLinkUpdate(object sender, Acop.Link lnk)
{
String ts = Acop.AcopUtils.GetLocalTimefromUtc(lnk.GetTimeStamp()).ToString();
Acop.AcopUtils.SetComponentValue(label1, "Text", ts);
}


GetPrintersList returns a string array containing a list of installed printers by name.
ResetAcopLinks resets all Acop Links contained on the given form
SetComponentValue sets the given property of the component to the value given (thread safe). This method can safely be used in ACOP link update delegates to set the properties of other GUI components (such as Labels).
SetLabelText safely sets a label's text field. This method duplicates the functionality of SetComponentValue but specifically targets the Label control.
TextMatches returns true if the privided text contains the pattern given.


Datenschutzerklaerung   -   Data Privacy Policy
Generated for ACOP.NET API by  doxygen 1.5.8