public ucCategoryXMLEditor()
 {
     this.InitializeComponent();
     this._aimlRegelwerk    = new AimlXmlRegelwerk(AIMLDTD.GetAIMLDTD());
     this._startupRegelwerk = new StartupDatei_XmlRegelwerk(StartupDateiDtd.GetStartupDtd());
     this.XmlEditor         = new XMLEditor(this._aimlRegelwerk, this);
     base.SetStyle(ControlStyles.UserPaint, true);
     base.SetStyle(ControlStyles.DoubleBuffer, true);
     base.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
     base.SetStyle(ControlStyles.ResizeRedraw, true);
     base.UpdateStyles();
 }
Esempio n. 2
0
 public override XMLElement createPaintElementForNode(
     XmlNode xmlNode,
     XMLEditor xmlEditor)
 {
     if (!(xmlNode is XmlText) || xmlNode.ParentNode == null || !(xmlNode.ParentNode.Name.ToLower() == "script"))
     {
         return(base.createPaintElementForNode(xmlNode, xmlEditor));
     }
     return((XMLElement) new XMLElement_TextNode(xmlNode, xmlEditor)
     {
         ZeichenZumUmbrechen = new char[3] {
             '}', '{', ';'
         }
     });
 }
Esempio n. 3
0
 public override XMLElement createPaintElementForNode(XmlNode xmlNode, XMLEditor xmlEditor)
 {
     if (xmlNode is XmlText && xmlNode.ParentNode != null && xmlNode.ParentNode.Name.ToLower() == "script")
     {
         XMLElement_TextNode xMLElement_TextNode = new XMLElement_TextNode(xmlNode, xmlEditor);
         xMLElement_TextNode.ZeichenZumUmbrechen = new char[3]
         {
             '}',
             '{',
             ';'
         };
         return(xMLElement_TextNode);
     }
     return(base.createPaintElementForNode(xmlNode, xmlEditor));
 }
Esempio n. 4
0
 public virtual bool PreviewKeyDown(
     PreviewKeyDownEventArgs e,
     out bool naechsteTasteBeiKeyPressAlsTextAufnehmen,
     XMLEditor editor)
 {
     naechsteTasteBeiKeyPressAlsTextAufnehmen = false;
     if (e.KeyData == (Keys.S | Keys.Control))
     {
         editor.AktionNeuesElementAnAktCursorPosEinfuegen("srai", XMLEditor.UndoSnapshotSetzenOptionen.ja, false);
         naechsteTasteBeiKeyPressAlsTextAufnehmen = false;
         return(true);
     }
     naechsteTasteBeiKeyPressAlsTextAufnehmen = true;
     return(false);
 }
Esempio n. 5
0
 public virtual XMLElement createPaintElementForNode(XmlNode xmlNode, XMLEditor xmlEditor)
 {
     if (xmlNode is XmlElement)
     {
         return(new XMLElement_StandardNode(xmlNode, xmlEditor));
     }
     if (xmlNode is XmlText)
     {
         return(new XMLElement_TextNode(xmlNode, xmlEditor));
     }
     if (xmlNode is XmlComment)
     {
         return(new XMLElement_Kommentar(xmlNode, xmlEditor));
     }
     return(new XMLElement_StandardNode(xmlNode, xmlEditor));
 }
Esempio n. 6
0
        public void apply(XMLEditor frm, Scintilla ctrl)
        {
            frm.toolStrip1.BackColor = frm.treeView1.BackColor = (Color)ControlBackground;

            frm.BackColor = (Color)Background;

            ctrl.CaretLineVisible        = true;
            ctrl.CaretLineBackColorAlpha = 30;
            ctrl.CaretLineBackColor      = Color.White;

            foreach (XMLStyle s in Styles)
            {
                s.apply(ctrl);
                if (s.type == Style.Default)
                {
                    ctrl.StyleClearAll();//apply default style to all style
                }
            }
        }
Esempio n. 7
0
 void OnEnable()
 {
     component = (XMLEditor)target;
 }
Esempio n. 8
0
 public ucXMLAddElementGruppe(XMLElementGruppe gruppe, XMLEditor xmlEditor)
 {
     this._xmlEditor = xmlEditor;
     this._gruppe    = gruppe;
     this.InitializeComponent();
 }
 public override XMLElement createPaintElementForNode(XmlNode xmlNode, XMLEditor xmlEditor)
 {
     return(base.createPaintElementForNode(xmlNode, xmlEditor));
 }
Esempio n. 10
0
 private void Awake()
 {
     xmlEditor = new XMLEditor();
     xmlEditor.Read();
 }