Exemple #1
0
        public void Receive(ReceiveCommandArgs args)
        {
            var infoId = args.Message.ReadString();

            DocumentInfo info;

            if (clientDelegate.DocumentInfos.TryGetValue(infoId, out info))
            {
                var doc = info.Create();
                doc.EditMode = true;
                doc.IsNew    = true;

                if (doc.LoadedFormat == null)             // When a New Text Document or Ripscript is created LoadedFormat is null. Set default format.
                {
                    doc.LoadedFormat = doc.Info.DefaultFormat;
                }

                if (infoId == "character")             // Set default for character (ansi) file
                {
                    ((Pablo.Formats.Character.CharacterDocument)doc).ICEColours = false;
                    ((Pablo.Formats.Character.CharacterDocument)doc).DosAspect  = false;
                    ((Pablo.Formats.Character.CharacterDocument)doc).Use9x      = false;
                }

                clientDelegate.SetDocument(doc);
            }
        }
Exemple #2
0
        public void Receive(ReceiveCommandArgs args)
        {
            var infoId = args.Message.ReadString();

            DocumentInfo info;

            if (clientDelegate.DocumentInfos.TryGetValue(infoId, out info))
            {
                var doc = info.Create();
                doc.EditMode = true;
                clientDelegate.SetDocument(doc);
            }
        }