Beispiel #1
0
 private void SocketServerTCP_GetNewMessage(MessageModel Msg, EndPoint FromIP)
 {
     if (Msg.MessageType == MessageType.DataPacket)
     {
         MessageContent_DataPacket packet = MessageModel.ToModel <MessageContent_DataPacket>(Msg.MessageContent);
         if (packet.PacketIndex == 1)
         {
             WritingFile file = new WritingFile(StaticResource.MessageImagePath + packet.FileName);
             WritingFiles.Add(packet.FileName, file);
         }
         WritingFiles[packet.FileName].Writer(packet.Content);
     }
 }
Beispiel #2
0
 internal void Save()
 {
     if (Editor.IsChanged)
     {
         if (WritingFile != null)
         {
             WritingFile.Invoke(this, EventArgs.Empty);
         }
         Application.DoEvents();
         Editor.SaveToFile();
         if (WritingFileDone != null)
         {
             WritingFileDone.Invoke(this, EventArgs.Empty);
         }
         Application.DoEvents();
     }
 }