Пример #1
0
        public void Download(BlockConditionsWindow.Model.BlockConditions bCs)
        {
            string[] BlockConditions = ReturnBlockCondition.Split(',');

            if (BlockConditions[1] == "0")
            {
                bCs.SortBlockConditions(ReturnBlockCondition);
            }
            else
            {
                throw new Exception("Error");
            }
        }
Пример #2
0
        public void Download(BlockConditionsWindow.Model.BlockConditions bCs)
        {
            try
            {
                sp.Open();
                sp.WriteLine(bCs.HeaderToRequestBlockCondition + "," + bCs.ProgramNo + "," + bCs.BlockNo + bCs.Delimiter);
                var waitingForResponce = Task.Delay(250);
                waitingForResponce.Wait();
                string   ReturnBlockCondition = sp.ReadExisting();
                string[] BlockConditions      = ReturnBlockCondition.Split(',');

                if (errorcode.IsNoErrorExists(ReturnBlockCondition))//(BlockConditions[1] == "0")
                {
                    bCs.SortBlockConditions(ReturnBlockCondition);
                }
            }
            catch (System.IO.IOException ex) { throw ex; }

            finally
            {
                sp.Close();
            }
        }