Esempio n. 1
0
 public static void SaveGroups()
 {
     if (FileHandler.FolderExists(GroupsPath))
     {
         FileHandler.WriteToFile(GroupsFilePath, LunaXmlSerializer.SerializeToXml(Groups.Values.ToList()));
     }
 }
Esempio n. 2
0
        public static void GenerateNewModFile()
        {
            var defaultModFile = new ModControlStructure();

            defaultModFile.SetDefaultAllowedParts();

            FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(defaultModFile));
        }
Esempio n. 3
0
        public static void GenerateNewModFile()
        {
            ModControlStructure defaultModFile = new ModControlStructure();

            //defaultModFile.AllowedParts = new List<string>(DefaultAllowedParts);
            //defaultModFile.AllowedResources = new List<string>(DefaultAllowedResources);
            ModControl = defaultModFile;

            FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(defaultModFile));
        }
        public static void SendHandshakeReply(ClientStructure client, HandshakeReply enumResponse, string reason)
        {
            var msgData = ServerContext.ServerMessageFactory.CreateNewMessageData <HandshakeReplyMsgData>();

            msgData.Response = enumResponse;
            msgData.Reason   = reason;

            if (enumResponse == HandshakeReply.HandshookSuccessfully)
            {
                msgData.ModControl      = GeneralSettings.SettingsStore.ModControl;
                msgData.ServerStartTime = TimeContext.StartTime.Ticks;

                if (GeneralSettings.SettingsStore.ModControl)
                {
                    msgData.ModFileData = LunaXmlSerializer.SerializeToXml(ModFileSystem.ModControl);
                }
            }

            MessageQueuer.SendToClient <HandshakeSrvMsg>(client, msgData);
        }
Esempio n. 5
0
 public static void GenerateNewModFile()
 {
     FileHandler.WriteToFile(ServerContext.ModFilePath, LunaXmlSerializer.SerializeToXml(new ModControlStructure()));
 }