예제 #1
0
        /// <summary>
        /// Synchronously eads the values from the server.
        /// </summary>
        private TsCHdaResultCollection[] SyncDelete(TsCHdaItem[] items)
        {
            // get request parameters from controls.
            TrendCTRL.Update(m_trend);

            switch (m_type)
            {
            // synchronous delete raw.
            case RequestType.DeleteRaw:
            {
                OpcItemResult[] results = m_trend.Delete(items);

                if (results != null)
                {
                    TsCHdaResultCollection[] collections = new TsCHdaResultCollection[results.Length];

                    for (int ii = 0; ii < results.Length; ii++)
                    {
                        collections[ii] = new TsCHdaResultCollection(results[ii]);
                        collections[ii].Add(new TsCHdaResult(results[ii]));
                    }

                    return(collections);
                }

                return(null);
            }

            // synchronous delete at time.
            case RequestType.DeleteAtTime:
            {
                return(m_trend.DeleteAtTime(items));
            }
            }

            return(null);
        }