nType | (Long) Specifies the state mask, i.e. the viewer state that will be returned by calling the method. It is possible to enter even the combination of values, for example 2+4.
1 - Test whether at least one of tvTrend objects isn't connected to data source (e.g. the tvTrend.Connect method hasn't been called).
2 - Test whether at least one of tvTrend objects is connected to data source (e.g. by calling the tvTrend.Connect method) and it has data ready (former requests to the data, for example when moving the time scale, have already been processed).
4 - Test whether at least one of tvTrend objects is connected to data source and it waits for the data (the data from server haven't come).
8 - Test whether at least one of tvTrend objects has tried to connect to data source (to the variable in the PmaTrendGroup object) (e.g. by calling the tvTrend.Connect method) and this failed by error (connection of the object failed).
16 - Test whether at least one of tvTrend objects is connected to data source, has been waiting for the data but these haven't come (waiting ended by the timeout, see: DataTimeout).
32 - Test whether the range of the time axis hasn't been extended so that it wouldn't be possible to read all required data from this range. See: PointsMaxVisibleCount. |
---|
var oTView = pMe;
if (oTView.GetState(4) == 4)
{
// ... some of trends is waiting for the data from server
}
var oTView = pMe;
var nState = oTView.GetState(20);
if (nState == 20)
{
// ... some of trends is waiting for the data from server and, at the same time, wating at some of objects was finished by the timeout.
}
else if (nState == 16)
{
// ... none of trends is waiting for the data from server but waiting at some of trends was finished by the timeout, i.e. the viewer has the data ready (but not all of them) and probably it will not get the remaining data.
}
else if (nState == 4)
{
// ... some of trends is waiting for the data from server.
}
else
{
// ... nState = 0 none of trends is waiting for the data and waiting at none of trends was finished by the timeout, i.e. the viewer has already got all data and they are ready.
}