Esempio n. 1
0
File: IO.cs Progetto: sunpander/VSDT
 /// <summary>
 /// Զ�̻�ȡ�ļ�
 /// </summary>
 /// <param name="fileName"></param>
 public static void DownloadFile(BaseCommunication sender, string fileName, string savepath)
 {
     FileCode fileMng = new FileCode(fileName);
     fileMng.Head = CodeHead.GET_FILE;
     fileMng.SavePath = savepath;
     if (sender != null)
         sender.SendCode(fileMng);
 }
Esempio n. 2
0
 /// <summary>
 /// ����
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="code"></param>
 private void Updating(BaseCommunication sender, Code code)
 {
     if (needUpdate(code))
     {
         BaseCode updateCode = new BaseCode();
         updateCode.Head = CodeHead.UPDATE;
         sender.SendCode(updateCode);
         DisplayMessage("��������ڸ���...");
     }
     else
     {
         DisplayMessage("����Ҫ����");
     }
 }
Esempio n. 3
0
File: IO.cs Progetto: sunpander/VSDT
 /// <summary>
 /// �ļ��������
 /// </summary>
 /// <param name="sender"></param>
 public static void EndTranFile(BaseCommunication sender)
 {
     BaseCode code = new BaseCode();
     code.Head = CodeHead.FILE_TRAN_END;
     sender.SendCode(code);
 }
Esempio n. 4
0
File: IO.cs Progetto: sunpander/VSDT
 /// <summary>
 /// �����ļ�
 /// </summary>
 /// <param name="fileMng"></param>
 public static void SaveFile(BaseCommunication sender, FileCode fileMng)
 {
     fileMng.SaveFile();
     if (sender != null)
     {
         BaseCode code = new BaseCode();
         code.Head = CodeHead.FILE_TRAN_END;
         sender.SendCode(code);
     }
 }
Esempio n. 5
0
File: IO.cs Progetto: sunpander/VSDT
 /// <summary>
 /// �����ļ�
 /// </summary>
 /// <param name="code"></param>
 public static void UploadFile(BaseCommunication sender, FileCode code)
 {
     code.Head = CodeHead.SEND_FILE;
     code.readFile();
     if (sender != null)
         sender.SendCode(code);
 }
Esempio n. 6
0
 /// <summary>
 /// �ر��������
 /// </summary>
 /// <param name="sender"></param>
 private void CloseMe(BaseCommunication sender)
 {
     BaseCode code = new BaseCode();
     code.Head = CodeHead.FILE_TRAN_END;
     sender.SendCode(code);
 }
Esempio n. 7
0
 /// <summary>
 /// �����ļ����ڵ���Ϣ(��ǰ·���µ��ļ����ļ���)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="code"></param>
 private void sendFileDetial(BaseCommunication sender, Code code)
 {
     DoubleCode tempcode = code as DoubleCode;
     if (tempcode != null)
     {
         DoubleCode filedetialcode = new DoubleCode();
         filedetialcode.Head = CodeHead.SEND_FILE_DETIAL;
         filedetialcode.Body=ICanSeeYou.Common.IO.GetFileDetial(tempcode.Body);
         sender.SendCode(filedetialcode);
     }
 }
Esempio n. 8
0
 /// <summary>
 /// ���ͱ��ش�����Ϣ
 /// </summary>
 /// <param name="sender"></param>
 private void sendDisks(BaseCommunication sender)
 {
     try
     {
         DisksCode diskscode = ICanSeeYou.Common.IO.GetDisks();
         sender.SendCode(diskscode);
     }
     catch
     {
     }
 }
Esempio n. 9
0
 /// <summary>
 /// �����ļ����ڵ���Ϣ(��ǰ·���µ��ļ����ļ���)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="code"></param>
 private void sendDirectoryDetial(BaseCommunication sender, Code code)
 {
     DoubleCode tempcode = code as DoubleCode;
     if (tempcode != null)
     {
         if (tempcode.Body != "")
         {
             ExplorerCode explorer = new ExplorerCode();
             explorer.Enter(tempcode.Body);
             sender.SendCode(explorer);
         }
     }
 }
Esempio n. 10
0
 /// <summary>
 /// �޸�����
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="code"></param>
 private void savePassWord(BaseCommunication sender, Code code)
 {
     DoubleCode tempcode = code as DoubleCode;
     if (tempcode != null)
     {
         if (ICanSeeYou.Configure.PassWord.Save(Constant.PassWordFilename, tempcode.Body))
         {
             this.exitPassWord = tempcode.Body;
             BaseCode ok = new BaseCode();
             ok.Head = CodeHead.CHANGE_PASSWORD_OK;
             sender.SendCode(ok);
         }
     }
 }