Esempio n. 1
0
        void IDataSender.DeleteFile(DeleteFolderFile delete)
        {
            Datagram datagram = new Datagram
            {
                DataType    = DatagramType.Cloud,
                MessageType = CloudDatagramDefine.DeleteFile,
                Datas       = delete.ToByteArray()
            };

            if (!Send(datagram))
            {
                RunningDatas.InfoNotify("网络连接失败 请重启软件后重试");
            }
        }
Esempio n. 2
0
        private void OnDeleteFile(Datagram datagram)
        {
            DeleteFolderFile delete = datagram.UnSerialData <DeleteFolderFile>();

            try
            {
                string path = FileRootPath + "\\" + datagram.Sender.ToString();
                path += ("" == delete.Path ? "" : delete.Path + "\\") + delete.Name;
                System.IO.File.Delete(path);
                InfoReader.DelFile
                (
                    IKXTServer.DataConvert.GetString(datagram.Sender),
                    delete.Path,
                    delete.Name
                );
            }
            catch
            {
            }
        }