--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="64"
+ height="64"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="IconAlerte.svg">
+ <metadata
+ id="metadata49">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="984"
+ id="namedview47"
+ showgrid="false"
+ fit-margin-top="1"
+ fit-margin-left="1"
+ fit-margin-right="1"
+ fit-margin-bottom="1"
+ inkscape:zoom="4.2211598"
+ inkscape:cx="60.205288"
+ inkscape:cy="44.735206"
+ inkscape:window-x="0"
+ inkscape:window-y="16"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" />
+ <defs
+ id="defs4">
+ <linearGradient
+ id="Grad1"
+ x1="41.194874"
+ y1="616.47717"
+ x2="118.93135"
+ y2="527.55511"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.48821801,0,0,-0.48010384,3.766054,311.02113)">
+ <stop
+ offset="0"
+ stop-color="#bb0000"
+ id="stop7" />
+ <stop
+ offset="1"
+ stop-color="#5f0000"
+ id="stop9" />
+ </linearGradient>
+ <linearGradient
+ id="Grad2"
+ x1="530.80951"
+ y1="486.63101"
+ x2="174.80548"
+ y2="211.22995"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.1028564,0,0,0.10681322,1.0000004,5.1888378)">
+ <stop
+ offset="0"
+ stop-color="#9a0000"
+ id="stop12" />
+ <stop
+ offset="1"
+ stop-color="#f22803"
+ id="stop14" />
+ </linearGradient>
+ <linearGradient
+ id="Grad3"
+ x1="187.87357"
+ y1="224.59892"
+ x2="581.83746"
+ y2="483.10001"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.1028564,0,0,0.10681322,1.0000004,5.1888372)">
+ <stop
+ offset="0"
+ stop-color="#ec6c60"
+ id="stop17" />
+ <stop
+ offset="1"
+ stop-color="#d11412"
+ id="stop19" />
+ </linearGradient>
+ <linearGradient
+ id="Grad4"
+ x1="250.39845"
+ y1="101.53633"
+ x2="412.0943"
+ y2="264.54187"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.1028564,0,0,0.10681322,1.0000004,5.1888378)">
+ <stop
+ offset="0"
+ stop-color="#ffd9d9"
+ id="stop22" />
+ <stop
+ offset="1"
+ stop-color="#ff2727"
+ id="stop24" />
+ </linearGradient>
+ <radialGradient
+ id="Grad5"
+ cx="295.47125"
+ cy="186.09634"
+ r="179.55"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0,0.17037225,-0.09390987,-2.4099214e-6,49.328051,-23.159866)">
+ <stop
+ offset="0"
+ stop-color="#ffffff"
+ id="stop27" />
+ <stop
+ offset="0.5"
+ stop-color="#ffffff"
+ id="stop29" />
+ <stop
+ offset="1"
+ stop-color="#d5d5d5"
+ id="stop31" />
+ </radialGradient>
+ </defs>
+ <path
+ d="m 30.5028,7.5139081 c 0,0 -27.8740714,47.5318579 -27.8740714,47.5318579 -0.5348541,0.907918 -0.5348541,2.029451 0,2.937368 0.5245675,0.897228 1.5119883,1.463345 2.5816945,1.463345 l 55.7481489,0 c 1.059418,0 2.046843,-0.566117 2.58169,-1.463345 0.524565,-0.907917 0.524565,-2.02945 0,-2.937368 L 35.666191,7.5139081 c -0.534848,-0.9079111 -1.522275,-1.4740216 -2.5817,-1.4740216 -1.059414,0 -2.04684,0.5661105 -2.581691,1.4740216 z"
+ style="fill-opacity:0.17857104"
+ id="path33"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 29.275219,6.6628606 c 0,0 -27.8740792,47.5318564 -27.8740792,47.5318564 -0.53485309,0.907918 -0.53485309,2.029463 0,2.937369 0.5245677,0.897237 1.5119881,1.463341 2.5816944,1.463341 l 55.7481458,0 c 1.059424,0 2.046838,-0.566104 2.581701,-1.463341 0.52456,-0.907906 0.52456,-2.029451 0,-2.937369 L 34.438597,6.6628606 C 33.903747,5.7549484 32.916334,5.188839 31.856907,5.188839 c -1.059426,0 -2.046838,0.5661094 -2.581688,1.4740216 z"
+ style="fill:url(#Grad1)"
+ id="path35"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 31.856907,7.6348601 c -0.174854,0 -0.339422,0.096135 -0.431993,0.2456701 L 17.487873,31.646467 3.550838,55.41239 c -0.092571,0.14954 -0.092571,0.341802 0,0.491339 0.09257,0.149539 0.2571403,0.245671 0.4319962,0.245671 l 55.7481458,0 c 0.174855,0 0.339424,-0.09613 0.432007,-0.245671 0.09256,-0.149537 0.09256,-0.341799 0,-0.491339 L 32.288901,7.8805302 C 32.196331,7.7309918 32.031763,7.6348601 31.856907,7.6348601 Z"
+ style="fill:url(#Grad2)"
+ id="path37"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 31.853051,7.6348601 c -0.174856,0 -0.339436,0.096135 -0.432004,0.2456701 L 17.484016,31.646467 3.5469789,55.41239 c -0.092572,0.14954 -0.092572,0.341802 0,0.491339 0.09257,0.149539 0.2571404,0.245671 0.4319963,0.245671 l 55.7481468,0 c 0.174855,0 0.339424,-0.09613 0.431994,-0.245671 0.09257,-0.149537 0.09257,-0.341799 0,-0.491339 L 32.285045,7.8805302 C 32.192475,7.7309918 32.027904,7.6348601 31.853051,7.6348601 Z"
+ style="fill:none;stroke:url(#Grad3);stroke-width:1.2577858;stroke-linejoin:round"
+ id="path39"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 31.8643,8.4908547 c -0.165609,0.00854 -0.319978,0.1044731 -0.408207,0.2470058 L 17.519052,32.503792 15.577638,35.815003 c 4.728601,2.947692 10.261233,4.646368 16.174165,4.646368 5.996896,0 11.604186,-1.744327 16.376659,-4.769869 L 32.320723,8.7378605 c -0.09257,-0.1495396 -0.255854,-0.2470058 -0.430709,-0.2470058 -0.0082,0 -0.01758,-4.087e-4 -0.02572,0 z"
+ style="fill:url(#Grad4);stroke-width:10;stroke-linejoin:round"
+ id="path41"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 30.437499,20.313589 -16.837595,28.70071 c -0.287995,0.502028 -0.287995,1.121539 0,1.612881 0.288007,0.502017 0.833143,0.811785 1.419421,0.811785 l 33.664901,0 c 0.58628,0 1.131427,-0.309768 1.419424,-0.811785 0.287994,-0.502022 0.287994,-1.110853 0,-1.612881 L 33.276338,20.313589 c -0.287995,-0.502021 -0.833141,-0.811777 -1.419419,-0.811777 -0.586279,0 -1.131423,0.309756 -1.41942,0.811777 z"
+ style="fill:url(#Grad5)"
+ id="path43"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 30.969176,50.420598 c -0.964669,-0.479803 -1.699326,-1.633479 -1.699326,-2.668545 0,-1.92727 1.939303,-3.37905 3.774142,-2.825358 1.237815,0.373544 2.079121,1.533547 2.068815,2.852514 -0.0088,1.120421 -0.475773,1.945794 -1.428956,2.525663 -0.729622,0.44385 -1.950349,0.495876 -2.714675,0.115726 z m 0.219256,-7.610173 c -0.120588,-0.06883 -0.404599,-0.308433 -0.631097,-0.532473 -0.791399,-0.78278 -0.790414,-0.775892 -1.30629,-9.151632 -0.458585,-7.445434 -0.462378,-7.561125 -0.265603,-8.095945 0.442678,-1.203277 1.429043,-1.730174 3.071401,-1.640697 1.043956,0.05689 1.847956,0.437609 2.370558,1.122567 0.446394,0.585054 0.543443,0.915796 0.543036,1.850484 -4.75e-4,1.015697 -0.625235,13.471485 -0.714045,14.234796 -0.116279,0.999709 -0.678344,1.810994 -1.502164,2.168205 -0.470757,0.204147 -1.247544,0.22632 -1.565796,0.04469 z"
+ id="path45"
+ inkscape:connector-curvature="0" />
+</svg>
--- /dev/null
+<svg width="32" height="32" xmlns="http://www.w3.org/2000/svg">
+ <!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
+ <g id="False">
+ <title>Layer 1</title>
+ <rect id="svg_1" height="27" width="27" y="2.5" x="2.5" stroke-width="5" stroke="#bf0000" fill="#fff"/>
+ <text font-weight="bold" xml:space="preserve" text-anchor="start" font-family="Helvetica, Arial, sans-serif" font-size="24" id="svg_2" y="24.84615" x="7.82692" stroke-width="0" stroke="#bf0000" fill="#000000">X</text>
+ </g>
+ <g id="True">
+ <title>Layer 2</title>
+ <path id="svg_1" d="m16.28846,3.46154l13.78846,26.61539l-27.57692,0l13.78846,-26.61539z" stroke-linecap="null" stroke-linejoin="null" stroke-width="3" stroke="#d1d100" fill-opacity="null" fill="#fff"/>
+ <text font-weight="bold" xml:space="preserve" text-anchor="start" font-family="Georgia, Times, 'Times New Roman', serif" font-size="24" id="svg_3" y="27.15385" x="12.44231" stroke-width="0" stroke="#bf0000" fill="#000000">!</text>
+ </g>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="378.30496" height="326.05325" id="svg2" sodipodi:version="0.32" inkscape:version="0.46" version="1.0" sodipodi:docbase="C:\Documents and Settings\KevinDuke\Desktop" sodipodi:docname="Ambox_warning_yellow.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.4225" inkscape:cx="90.333919" inkscape:cy="200" inkscape:document-units="px" inkscape:current-layer="layer1" width="400px" height="400px" showgrid="false" inkscape:window-width="1280" inkscape:window-height="750" inkscape:window-x="-8" inkscape:window-y="-8"/>
+ <defs id="defs4">
+ <linearGradient id="linearGradient3149">
+ <stop id="stop3151" style="stop-color:#f6eb71;stop-opacity:1;" offset="0"/>
+ <stop offset="0.5138889" style="stop-color:#ffeb00;stop-opacity:1;" id="stop3271"/>
+ <stop offset="1" style="stop-color:#f4c930;stop-opacity:1;" id="stop3153"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3134">
+ <stop offset="0" style="stop-color:#ffb300;stop-opacity:1;" id="stop3136"/>
+ <stop id="stop3165" style="stop-color:#ff9900;stop-opacity:1;" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3140" gradientUnits="userSpaceOnUse" inkscape:collect="always" x1="57.553783" x2="142.16243" xlink:href="#linearGradient3149" y1="-7.0170116" y2="123.27175"/>
+ <linearGradient id="linearGradient3148" gradientUnits="userSpaceOnUse" inkscape:collect="always" x1="57.553783" x2="142.16243" xlink:href="#linearGradient3149" y1="-7.0170116" y2="123.27175"/>
+ <filter inkscape:collect="always" id="filter3172">
+ <feGaussianBlur inkscape:collect="always" stdDeviation="5.0924795" id="feGaussianBlur3174"/>
+ </filter>
+ <linearGradient inkscape:collect="always" xlink:href="#linearGradient3134" id="linearGradient2184" gradientUnits="userSpaceOnUse" x1="-49.164131" y1="-82.266502" x2="227.38515" y2="216.95886" gradientTransform="matrix(1.2084425,0,0,1.2084425,89.669573,106.93911)"/>
+ </defs>
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <dc:title>3D effect warning triangle</dc:title>
+ <dc:date>18/9/07</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Tim O'Ryan</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/"/>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/">
+ <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Layer 1" id="layer1" inkscape:groupmode="layer" transform="translate(-15.90328,-38.352144)">
+ <path style="opacity:1;fill:#777777;fill-opacity:0.79729728;stroke:none;stroke-width:20.6877861;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3172)" d="M 213.05399,47.37801 C 208.83955,47.5955 205.01929,49.92458 202.89552,53.57127 L 33.940149,345.10803 C 31.700749,348.97294 31.693669,353.73905 33.921559,357.61061 C 36.149459,361.48217 40.273789,363.87084 44.740599,363.87665 L 381.66948,364.40534 C 386.13811,364.41875 390.27406,362.04591 392.51793,358.18147 C 394.7618,354.31704 394.77229,349.54876 392.54546,345.67448 L 224.53419,53.60904 C 222.18314,49.53899 217.74782,47.13166 213.05399,47.37801 L 213.05399,47.37801 z M 213.65821,84.83972 L 360.06857,339.36792 L 66.417039,338.91476 L 213.65821,84.83972 z" id="path3152"/>
+ <path style="opacity:1;fill:url(#linearGradient2184);fill-opacity:1;stroke:#a37900;stroke-width:6.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 199.82666,41.494396 C 195.61222,41.711894 191.79197,44.040971 189.66819,47.687664 L 20.712823,339.22442 C 18.473424,343.08933 18.466339,347.85544 20.694238,351.727 C 22.922136,355.59856 27.04646,357.98723 31.513278,357.99304 L 368.44215,358.52173 C 372.91078,358.53514 377.04674,356.1623 379.2906,352.29786 C 381.53447,348.43343 381.54497,343.66515 379.31813,339.79087 L 211.30686,47.725427 C 208.95581,43.655381 204.52049,41.248051 199.82666,41.494396 L 199.82666,41.494396 z M 200.43088,78.956113 L 346.84124,333.48431 L 53.189715,333.03115 L 200.43088,78.956113 z" id="path2178"/>
+ <path sodipodi:arg2="1.5723975" style="opacity:1;fill:url(#linearGradient3140);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3148);stroke-width:20.6877861;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path2160" sodipodi:cx="91.428574" sodipodi:cy="117.14286" sodipodi:arg1="0.52519998" sodipodi:type="star" d="M 230.71429,197.85715 L -48.114905,197.41068 L 91.686339,-43.839248 L 230.71429,197.85715 z" sodipodi:r2="80.491158" sodipodi:sides="3" inkscape:randomized="0" transform="matrix(1.2084425,0,0,1.2084425,89.669573,106.93911)" inkscape:rounded="0" sodipodi:r1="160.98232" inkscape:flatsided="true"/>
+ <path sodipodi:nodetypes="cccsccscccc" d="M 199.89464,117.765 C 197.29017,117.9016 194.92932,119.3644 193.61684,121.65473 L 89.204984,304.75655 C 87.82107,307.18391 87.81669,310.17731 89.193499,312.60887 C 90.570306,315.04044 93.119077,316.54066 95.879504,316.54431 L 304.09647,316.87636 C 306.85801,316.88477 309.41397,315.39449 310.80064,312.96739 C 312.18732,310.54032 312.1938,307.54558 310.81766,305.1123 L 206.98922,121.67846 C 205.53631,119.12222 202.79534,117.61029 199.89464,117.765 L 199.89464,117.765 z" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20.6877861;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" id="path19491"/>
+ <path style="font-size:333.22640991px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Angsana New" d="M 203.68708,256.44083 L 198.35371,256.44083 C 197.80195,246.98576 195.96287,235.6645 192.83645,222.47702 L 186.4916,195.60456 C 182.6908,179.49366 180.79042,167.95467 180.79043,160.9876 C 180.79042,146.92949 187.50308,139.90034 200.92845,139.90018 C 206.81347,139.90034 211.67173,141.84424 215.50321,145.73187 C 219.33458,149.61982 221.25031,154.58066 221.25036,160.61436 C 221.25031,167.0216 219.22731,178.685 215.18136,195.60456 L 208.74456,222.47702 C 206.47631,231.93222 204.79048,243.25347 203.68708,256.44083 L 203.68708,256.44083 z M 201.20431,274.07588 C 207.45715,274.07593 212.30007,276.20643 215.7331,280.46742 C 219.166,284.72848 220.88248,289.28498 220.88254,294.13692 C 220.88248,300.54403 218.79818,305.47375 214.62964,308.92611 C 210.461,312.37848 205.98588,314.10466 201.20431,314.10466 C 194.89007,314.10466 190.03183,311.98969 186.62953,307.75978 C 183.22721,303.52985 181.52605,298.9889 181.52607,294.13692 C 181.52605,288.47632 183.41112,283.71765 187.18126,279.86093 C 190.95137,276.00427 195.6257,274.07593 201.20431,274.07588 L 201.20431,274.07588 z" id="text2171"/>
+ </g>
+</svg>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="378.30496" height="326.05325" id="svg2" sodipodi:version="0.32" inkscape:version="0.46" version="1.0" sodipodi:docbase="C:\Documents and Settings\KevinDuke\Desktop" sodipodi:docname="Ambox_warning_orange.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.64877047" inkscape:cx="107.30042" inkscape:cy="95.503105" inkscape:document-units="px" inkscape:current-layer="layer1" width="400px" height="400px" showgrid="false" inkscape:window-width="1280" inkscape:window-height="750" inkscape:window-x="-8" inkscape:window-y="-8"/>
+ <defs id="defs4">
+ <linearGradient id="linearGradient3149">
+ <stop id="stop3151" style="stop-color:#f3c381;stop-opacity:1;" offset="0"/>
+ <stop offset="0.25" style="stop-color:#f4b24e;stop-opacity:1;" id="stop3172"/>
+ <stop offset="0.5" style="stop-color:#f39502;stop-opacity:1;" id="stop3171"/>
+ <stop offset="1" style="stop-color:#f67805;stop-opacity:1;" id="stop3153"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3134">
+ <stop offset="0" style="stop-color:#ffb300;stop-opacity:1;" id="stop3136"/>
+ <stop id="stop3165" style="stop-color:#ff9900;stop-opacity:1;" offset="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient3140" gradientUnits="userSpaceOnUse" inkscape:collect="always" x1="15.087464" x2="120.05667" xlink:href="#linearGradient3149" y1="9.8531685" y2="108.72849"/>
+ <linearGradient id="linearGradient3148" gradientUnits="userSpaceOnUse" inkscape:collect="always" x1="15.087464" x2="120.05667" xlink:href="#linearGradient3149" y1="9.8531685" y2="108.72849"/>
+ <filter inkscape:collect="always" id="filter3172">
+ <feGaussianBlur inkscape:collect="always" stdDeviation="5.0924795" id="feGaussianBlur3174"/>
+ </filter>
+ <linearGradient inkscape:collect="always" xlink:href="#linearGradient3134" id="linearGradient2184" gradientUnits="userSpaceOnUse" x1="-49.164131" y1="-82.266502" x2="227.38515" y2="216.95886" gradientTransform="matrix(1.2084425,0,0,1.2084425,89.669573,106.93911)"/>
+ </defs>
+ <metadata id="metadata7">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <dc:title>3D effect warning triangle</dc:title>
+ <dc:date>18/9/07</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Tim O'Ryan</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/"/>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/">
+ <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:label="Layer 1" id="layer1" inkscape:groupmode="layer" transform="translate(-15.90328,-38.352144)">
+ <path style="opacity:1;fill:#777777;fill-opacity:0.79729728;stroke:none;stroke-width:20.6877861;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3172)" d="M 213.05399,47.37801 C 208.83955,47.5955 205.01929,49.92458 202.89552,53.57127 L 33.940149,345.10803 C 31.700749,348.97294 31.693669,353.73905 33.921559,357.61061 C 36.149459,361.48217 40.273789,363.87084 44.740599,363.87665 L 381.66948,364.40534 C 386.13811,364.41875 390.27406,362.04591 392.51793,358.18147 C 394.7618,354.31704 394.77229,349.54876 392.54546,345.67448 L 224.53419,53.60904 C 222.18314,49.53899 217.74782,47.13166 213.05399,47.37801 L 213.05399,47.37801 z M 213.65821,84.83972 L 360.06857,339.36792 L 66.417039,338.91476 L 213.65821,84.83972 z" id="path3152"/>
+ <path style="opacity:1;fill:url(#linearGradient2184);fill-opacity:1;stroke:#a37900;stroke-width:6.25;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 199.82666,41.494396 C 195.61222,41.711894 191.79197,44.040971 189.66819,47.687664 L 20.712823,339.22442 C 18.473424,343.08933 18.466339,347.85544 20.694238,351.727 C 22.922136,355.59856 27.04646,357.98723 31.513278,357.99304 L 368.44215,358.52173 C 372.91078,358.53514 377.04674,356.1623 379.2906,352.29786 C 381.53447,348.43343 381.54497,343.66515 379.31813,339.79087 L 211.30686,47.725427 C 208.95581,43.655381 204.52049,41.248051 199.82666,41.494396 L 199.82666,41.494396 z M 200.43088,78.956113 L 346.84124,333.48431 L 53.189715,333.03115 L 200.43088,78.956113 z" id="path2178"/>
+ <path sodipodi:arg2="1.5723975" style="opacity:1;fill:url(#linearGradient3140);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient3148);stroke-width:20.68778610000000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" id="path2160" sodipodi:cx="91.428574" sodipodi:cy="117.14286" sodipodi:arg1="0.52519998" sodipodi:type="star" d="M 230.71429,197.85715 L -48.114905,197.41068 L 91.686339,-43.839248 L 230.71429,197.85715 z" sodipodi:r2="80.491158" sodipodi:sides="3" inkscape:randomized="0" transform="matrix(1.2084425,0,0,1.2084425,89.669573,106.93911)" inkscape:rounded="0" sodipodi:r1="160.98232" inkscape:flatsided="true"/>
+ <path sodipodi:nodetypes="cccsccscccc" d="M 199.89464,117.765 C 197.29017,117.9016 194.92932,119.3644 193.61684,121.65473 L 89.204984,304.75655 C 87.82107,307.18391 87.81669,310.17731 89.193499,312.60887 C 90.570306,315.04044 93.119077,316.54066 95.879504,316.54431 L 304.09647,316.87636 C 306.85801,316.88477 309.41397,315.39449 310.80064,312.96739 C 312.18732,310.54032 312.1938,307.54558 310.81766,305.1123 L 206.98922,121.67846 C 205.53631,119.12222 202.79534,117.61029 199.89464,117.765 L 199.89464,117.765 z" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20.6877861;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" id="path19491"/>
+ <path style="font-size:333.22640991px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Angsana New" d="M 203.68708,256.44083 L 198.35371,256.44083 C 197.80195,246.98576 195.96287,235.6645 192.83645,222.47702 L 186.4916,195.60456 C 182.6908,179.49366 180.79042,167.95467 180.79043,160.9876 C 180.79042,146.92949 187.50308,139.90034 200.92845,139.90018 C 206.81347,139.90034 211.67173,141.84424 215.50321,145.73187 C 219.33458,149.61982 221.25031,154.58066 221.25036,160.61436 C 221.25031,167.0216 219.22731,178.685 215.18136,195.60456 L 208.74456,222.47702 C 206.47631,231.93222 204.79048,243.25347 203.68708,256.44083 L 203.68708,256.44083 z M 201.20431,274.07588 C 207.45715,274.07593 212.30007,276.20643 215.7331,280.46742 C 219.166,284.72848 220.88248,289.28498 220.88254,294.13692 C 220.88248,300.54403 218.79818,305.47375 214.62964,308.92611 C 210.461,312.37848 205.98588,314.10466 201.20431,314.10466 C 194.89007,314.10466 190.03183,311.98969 186.62953,307.75978 C 183.22721,303.52985 181.52605,298.9889 181.52607,294.13692 C 181.52605,288.47632 183.41112,283.71765 187.18126,279.86093 C 190.95137,276.00427 195.6257,274.07593 201.20431,274.07588 L 201.20431,274.07588 z" id="text2171"/>
+ </g>
+</svg>
\ No newline at end of file
public bool IsParsed => root != null && Tokens.Length > 0;
public ReadOnlySpan<Token> Tokens => root.Tokens;
public IEnumerable<SyntaxNode> SyntaxRootChildNodes => root?.children;
+ public IEnumerable<SyntaxException> Exceptions => root?.AllExceptions;
public SyntaxException CurrentException {
get => CrowEditBase.App.CurrentException;
set {
if (cancel.IsCancellationRequested)
return;
- NotifyValueChanged("Exceptions", syntaxAnalyser?.Exceptions);
+ NotifyValueChanged("Exceptions", Exceptions);
NotifyValueChanged ("SyntaxRootChildNodes", (object)null);
NotifyValueChanged ("SyntaxRootChildNodes", SyntaxRootChildNodes);
}
protected ReadOnlyTextBuffer source;
protected SyntaxRootNode Root;
protected CancellationToken cancel;
- public IEnumerable<SyntaxException> Exceptions => null;// Root?.GetAllExceptions();
+ public IEnumerable<SyntaxException> Exceptions => Root?.GetAllExceptions(source);
public abstract Task<SyntaxRootNode> Process (CancellationToken cancel = default);
#region Token handling
}
}
+ public IEnumerable<SyntaxException> GetAllExceptions(ReadOnlyTextBuffer source) {
+ foreach (SyntaxNode n in children) {
+ if (n is UnexpectedTokenSyntax uts)
+ yield return new SyntaxException(uts.Message, source.Lines.GetLocation(uts.SpanStart));
+ else if (n is MultiNodeSyntax mns) {
+ foreach (SyntaxException se in mns.GetAllExceptions(source))
+ yield return se;
+ }
+ }
+ }
+
}
}
\ No newline at end of file
namespace CrowEditBase
{
public class UnexpectedTokenSyntax : SingleTokenSyntax {
- public UnexpectedTokenSyntax(Token tok) : base (tok) { }
+ public string Message;
+ public UnexpectedTokenSyntax(Token tok, string message = "Unexpected token") : base (tok) {
+ Message = message;
+ }
}
public class CommentTriviaSyntax : MultiNodeSyntax {
bool block;
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System;
+using System.Collections.Generic;
+using System.Linq;
using Crow.Text;
namespace CrowEditBase
protected readonly ReadOnlyTextBuffer buffer;
protected Token[] tokens;
public ReadOnlySpan<Token> Tokens => tokens;
-
public override SyntaxRootNode Root => this;
public override bool IsFoldable => false;
public override void UnfoldToTheTop() {}
public override SyntaxNode NextSiblingOrParentsNextSibling => null;
-
-
-
+ public IEnumerable<SyntaxException> AllExceptions => GetAllExceptions(buffer);
public string GetTokenStringByIndex (int idx) => tokens != null ?
idx >= 0 && idx < tokens.Length ? GetText(tokens[idx].Span).ToString() : null : null;
public Token GetTokenByIndex (int idx) => tokens != null ?
}
#endregion
-
-
public T GetService<T> () where T : Service {
T service = Services.OfType<T>().FirstOrDefault ();
if (service == null) {
-// Copyright (c) 2021-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+// Copyright (c) 2021-2025 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
using System.IO;
using System.Threading;
using Crow;
-using System.Runtime.CompilerServices;
-using System.Collections.Generic;
using static CrowEditBase.CrowEditBase;
namespace CrowEditBase
public void EnterWriteLock () => documentRWLock.EnterWriteLock ();
public void ExitWriteLock () => documentRWLock.ExitWriteLock ();
-
-
public string FullPath {
get => fullPath;
set {
-using System;
-using System.IO;
-using System.Linq;
-using System.Collections.Generic;
-using System.Text;
-using Crow;
-using Crow.Text;
+using Crow;
using CrowEditBase;
using System.Reflection;
{
public static class Extensions
{
- public static Picture GetIcon (this MemberInfo mi)
- => mi is EventInfo ? new BmpPicture("#Icons.event.png") : new BmpPicture("#Icons.property.png");
-
+ public static Picture GetIcon (this MemberInfo mi)
+ => mi is EventInfo ? new SvgPicture("#icons.event.svg") : new SvgPicture("#icons.property.svg");
+ public static Picture GetIcon (this SyntaxException se) => new SvgPicture("#icons.IconAlerte.svg");
}
}
--- /dev/null
+// Copyright (c) 2013-2025 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+using System;
+using System.Runtime.CompilerServices;
+using Crow;
+using Drawing2D;
+
+namespace CrowEditBase
+{
+ public class TextFormatting : IValueChange {
+ #region IValueChange implementation
+ public event EventHandler<ValueChangeEventArgs> ValueChanged;
+ public virtual void NotifyValueChanged (string MemberName, object _value) {
+ //Debug.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
+ if (ValueChanged != null)
+ ValueChanged.Invoke (this, new ValueChangeEventArgs (MemberName, _value));
+ }
+ public void NotifyValueChanged (object _value, [CallerMemberName] string caller = null) {
+ if (ValueChanged != null)
+ NotifyValueChanged (caller, _value);
+ }
+ #endregion
+ Color foreground, background;
+ bool bold, italic;
+ public Color Foreground {
+ get => foreground;
+ set {
+ if (foreground == value)
+ return;
+ foreground = value;
+ NotifyValueChanged (foreground);
+ }
+ }
+ public Color Background {
+ get => background;
+ set {
+ if (background == value)
+ return;
+ background = value;
+ NotifyValueChanged (background);
+ }
+ }
+ public bool Bold {
+ get => bold;
+ set {
+ if (bold == value)
+ return;
+ bold = value;
+ NotifyValueChanged (bold);
+ }
+ }
+ public bool Italic {
+ get => italic;
+ set {
+ if (italic == value)
+ return;
+ italic = value;
+ NotifyValueChanged (italic);
+ }
+ }
+
+ public TextFormatting(Color fg, Color bg, bool _bold = false, bool _italic = false){
+ Foreground = fg;
+ Background = bg;
+ Bold = _bold;
+ Italic = _italic;
+ }
+
+ public override string ToString ()
+ => $"{Foreground};{Background};{Bold};{Italic}";
+
+ public static TextFormatting Parse (string str) {
+ string[] tmp = str.Split (';');
+ return new TextFormatting (Color.Parse (tmp[0]), Color.Parse (tmp[1]), bool.Parse (tmp[2]), bool.Parse (tmp[3]));
+ }
+
+ }
+}
+
--- /dev/null
+<Popper Margin="0" Caption="{./CurrentColor}" Background="{./Background}" >
+ <Template>
+ <HorizontalStack Margin="1" Spacing="3" Background="{./Background}">
+ <Border Width="18" Height="12" CornerRadius="3"
+ Background="{../../../CurrentColor}">
+ </Border>
+ <Label Width="Stretched" Text="{./Caption}" Foreground="{./Foreground}" />
+ </HorizontalStack>
+ </Template>/>
+ <TabView MinimumSize="{../MinimumPopupSize}" Width="200" Height="200" >
+ <ColorPicker Name="HSV" CurrentColor="{²../../../CurrentColor}" Background="Onyx" BubbleEvents="None"/>
+ <ColorPicker IsVisible="false" Name="Names" CurrentColor="{²../../../CurrentColor}" Height="Stretched" Background="Onyx">
+ <Template>
+ <ListBox Width="Stretched" Data="{./AvailableColors}" SelectedItemChanged="./onSelectedItemChanged">
+ <Template>
+ <Scroller Name="scroller1" Margin="5" ClipToClientRect="true" Background="Onyx">
+ <Wrapper Name="ItemsContainer" Height="Fit" VerticalAlignment="Top"/>
+ </Scroller>
+ </Template>
+ <ItemTemplate>
+ <Border Width="16" Height="16" Background="{}" Foreground="Transparent" Tooltip="{}"
+ MouseEnter="{Foreground=Black}"
+ MouseLeave="{Foreground=Transparent}"/>
+ </ItemTemplate>
+ </ListBox>
+ </Template>
+ </ColorPicker>
+ </TabView>
+</Popper>
\ No newline at end of file
Template = "#ui.EnumSelector.template";
//ItemStyle = "CheckBox";
}
-CheckBox {
+/*CheckBox {
Template= "#Crow.CheckBox2.template";
Width = "Stretched";
Height = "Fit";
Unchecked = "{Background=${ControlIdle}}";
MouseEnter = "{Foreground=${ControlCaptionHoverColor}}";
MouseLeave = "{Foreground=${ControlForeground}}";
-}
+}*/
StateBox {
Template= "#Crow.CheckBox2.template";
Width = "Stretched";
--- /dev/null
+default = Jet;#DADADA;False;False
+leftMargin = Grey;Onyx;False;False
+Selection = White;#B6CEE1;False;False
+keyword = Blue;Transparent;False;False
+DocumentationComment = MediumSeaGreen;Transparent;False;True
+Region = DeepPink;Transparent;False;False
+FoldedRegion = #FFFFF8;#35B23C;True;False
+Documentation = GreenYellow;Transparent;False;False
+trivia = Grey;Transparent;False;True
+PreprocessorDirective = DeepPink;Transparent;True;False
+PreprocessorMessage = DeepPink;Transparent;True;False
+PredefinedType = DarkCyan;Transparent;False;False
+AccessibilityModifier = RoyalBlue;Transparent;False;False
+DisabledText = Grey;Transparent;False;False
+identifier = Onyx;Transparent;True;False
+Namespace = RoyalBlue;Transparent;True;False
+NamedType = DarkGreen;Transparent;True;False
+Property = Green;Transparent;True;False
+Field = Black;Transparent;False;False
+Method = DarkOliveGreen;Transparent;True;False
+LiteralExpression = FireBrick;Transparent;False;True
+error = Red;Transparent;False;False
+TypeSyntax = DarkCyan;Transparent;False;False
+TypeDeclaration = Lavender;Transparent;False;False
+Punctuation = Black;Transparent;False;False
+ContextualKeyword = DarkBlue;Transparent;True;False
+InstanceExpression = Jet;Transparent;False;False
+NamespaceMemberDeclaration = Jet;Transparent;False;False
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!-- Generated by: TmTheme-Editor -->
+<!-- ============================================ -->
+<!-- app: http://tmtheme-editor.herokuapp.com -->
+<!-- code: https://github.com/aziz/tmTheme-Editor -->
+<plist version="1.0">
+<dict>
+ <key>name</key>
+ <string>Visual Studio Dark</string>
+ <key>author</key>
+ <string>Niklas Mollenhauer</string>
+ <key>settings</key>
+ <array>
+ <dict>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#1E1E1E</string>
+ <key>caret</key>
+ <string>#DCDCDC</string>
+ <key>foreground</key>
+ <string>#DCDCDC</string>
+ <key>invisibles</key>
+ <string>#FFFFFF40</string>
+ <key>lineHighlight</key>
+ <string>#0F0F0F</string>
+ <key>selection</key>
+ <string>#264F78</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Comment</string>
+ <key>scope</key>
+ <string>comment</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#399812ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Variable</string>
+ <key>scope</key>
+ <string>variable</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Keyword</string>
+ <key>scope</key>
+ <string>keyword</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Comparision Operator</string>
+ <key>scope</key>
+ <string>keyword.operator.comparison</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Assignment Operator</string>
+ <key>scope</key>
+ <string>keyword.operator.assignment</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Arithmetic Operator</string>
+ <key>scope</key>
+ <string>keyword.operator.arithmetic</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Number</string>
+ <key>scope</key>
+ <string>constant.numeric</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#f5ffd8ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>User-defined constant</string>
+ <key>scope</key>
+ <string>constant</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#f3ffd8ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Built-in constant</string>
+ <key>scope</key>
+ <string>constant.language</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Boolean</string>
+ <key>scope</key>
+ <string>constant.language.boolean</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>String</string>
+ <key>scope</key>
+ <string>string</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffc08bff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>String interpolation</string>
+ <key>scope</key>
+ <string>constant.character.escape, string source</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffdfff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Preprocessor line</string>
+ <key>scope</key>
+ <string>meta.preprocessor</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#bcbcbcff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Preprocessor directive</string>
+ <key>scope</key>
+ <string>keyword.control.import</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#bcbcbcff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Function name</string>
+ <key>scope</key>
+ <string>entity.name.function, keyword.other.name-of-parameter.objc</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Class name</string>
+ <key>scope</key>
+ <string>entity.name.type</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#12ffeaff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Type name</string>
+ <key>scope</key>
+ <string>storage.type</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Type modifier</string>
+ <key>scope</key>
+ <string>storage.modifier</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Inherited class name</string>
+ <key>scope</key>
+ <string>entity.other.inherited-class</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#12ffeaff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Function parameter</string>
+ <key>scope</key>
+ <string>variable.parameter</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Function argument and result types</string>
+ <key>scope</key>
+ <string>storage.type.method</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#5d617cff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Section</string>
+ <key>scope</key>
+ <string>meta.section entity.name.section, declaration.section entity.name.section</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Library function</string>
+ <key>scope</key>
+ <string>support.function</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Library object</string>
+ <key>scope</key>
+ <string>support.class, support.type</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Library constant</string>
+ <key>scope</key>
+ <string>support.constant</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#f5ffd8ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Library variable</string>
+ <key>scope</key>
+ <string>support.variable</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>JS: Operator</string>
+ <key>scope</key>
+ <string>keyword.operator.js</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#4b6a8fff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Invalid</string>
+ <key>scope</key>
+ <string>invalid</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ff0000ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Invalid trailing whitespace</string>
+ <key>scope</key>
+ <string>invalid.deprecated.trailing-whitespace</string>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#ff0000ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Embedded source</string>
+ <key>scope</key>
+ <string>text source, string.unquoted</string>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#000000ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup XML declaration</string>
+ <key>scope</key>
+ <string>meta.xml-processing, declaration.xml-processing</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#4b4b2eff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup DOCTYPE</string>
+ <key>scope</key>
+ <string>meta.doctype, declaration.doctype</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#808080ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup DTD</string>
+ <key>scope</key>
+ <string>meta.doctype.DTD, declaration.doctype.DTD</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup tag</string>
+ <key>scope</key>
+ <string>meta.tag, declaration.tag</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#808080ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup name of tag</string>
+ <key>scope</key>
+ <string>entity.name.tag</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup tag attribute</string>
+ <key>scope</key>
+ <string>entity.other.attribute-name</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#a8ffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup: Attribute Value</string>
+ <key>scope</key>
+ <string>string.quoted.double.xml, string.quoted.double.html</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup: Heading</string>
+ <key>scope</key>
+ <string>markup.heading</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#23beffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup: Quote</string>
+ <key>scope</key>
+ <string>markup.quote</string>
+ <key>settings</key>
+ <dict>
+ <key>fontStyle</key>
+ <string></string>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Markup: List</string>
+ <key>scope</key>
+ <string>markup.list</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css tag-name</string>
+ <key>scope</key>
+ <string>meta.selector.css entity.name.tag</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffff79ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css:pseudo-class</string>
+ <key>scope</key>
+ <string>meta.selector.css entity.other.attribute-name.tag.pseudo-class</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffff79ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css#id</string>
+ <key>scope</key>
+ <string>meta.selector.css entity.other.attribute-name.id</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffff79ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css.class</string>
+ <key>scope</key>
+ <string>meta.selector.css entity.other.attribute-name.class</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffff79ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css property-name:</string>
+ <key>scope</key>
+ <string>support.type.property-name.css</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#beffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css property-value;</string>
+ <key>scope</key>
+ <string>meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ffffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>§ css @at-rule</string>
+ <key>scope</key>
+ <string>meta.preprocessor.at-rule keyword.control.at-rule</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#8fffffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>C#: XML Comment Tags</string>
+ <key>scope</key>
+ <string>source.cs comment.block.documentation.source.cs meta.tag.xml, source.cs comment.block.documentation.source.cs meta.tag.xml entity.name.tag.localname.xml, source.cs comment.block.documentation.source.cs meta.tag.xml entity.other.attribute-name</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#399812ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>GitGutter deleted</string>
+ <key>scope</key>
+ <string>markup.deleted.git_gutter</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#ff0061ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>GitGutter inserted</string>
+ <key>scope</key>
+ <string>markup.inserted.git_gutter</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#d4ff00ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>GitGutter changed</string>
+ <key>scope</key>
+ <string>markup.changed.git_gutter</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#b17cffff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>GitGutter ignored</string>
+ <key>scope</key>
+ <string>markup.ignored.git_gutter</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#232323ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>GitGutter untracked</string>
+ <key>scope</key>
+ <string>markup.untracked.git_gutter</string>
+ <key>settings</key>
+ <dict>
+ <key>foreground</key>
+ <string>#232323ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Git Modified Line</string>
+ <key>scope</key>
+ <string>git.changes.x</string>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#00001aff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Git Added Line</string>
+ <key>scope</key>
+ <string>git.changes.+</string>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#002800ff</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>Git Remove Line</string>
+ <key>scope</key>
+ <string>git.changes.-</string>
+ <key>settings</key>
+ <dict>
+ <key>background</key>
+ <string>#d60000ff</string>
+ </dict>
+ </dict>
+ </array>
+ <key>uuid</key>
+ <string>2fd1a8f9-ddfd-11e2-a28f-0800200c9a66</string>
+ <key>colorSpaceName</key>
+ <string>sRGB</string>
+ <key>semanticClass</key>
+ <string>theme.dark.visual_studio_dark</string>
+</dict>
+</plist>
\ No newline at end of file
--- /dev/null
+default = Red;Transparent;False;False
+keyword = Yellow;Transparent;False;False
+DocumentationComment = MediumSeaGreen;Transparent;False;True
+Documentation = GreenYellow;Transparent;False;False
+trivia = Grey;Transparent;False;True
+PreprocessorDirective = DeepPink;Transparent;True;False
+PreprocessorMessage = DeepPink;Transparent;True;False
+PredefinedType = DarkCyan;Transparent;False;False
+AccessibilityModifier = RoyalBlue;Transparent;False;False
+DisabledText = Grey;Transparent;False;False
+identifier = Onyx;Transparent;True;False
+Namespace = RoyalBlue;Transparent;True;False
+NamedType = DarkGreen;Transparent;True;False
+Property = Green;Transparent;True;False
+Field = Black;Transparent;False;False
+Method = DarkOliveGreen;Transparent;True;False
+LiteralExpression = FireBrick;Transparent;False;True
+error = Red;Transparent;False;False
+TypeSyntax = DarkCyan;Transparent;False;False
+TypeDeclaration = Lavender;Transparent;False;False
+Punctuation = Black;Transparent;False;False
+ContextualKeyword = DarkBlue;Transparent;True;False
+InstanceExpression = Jet;Transparent;False;False
+NamespaceMemberDeclaration = Jet;Transparent;False;False
MainWinWidth=1024
MainWinHeight=768
+SyntaxThemeName=Default
+SyntaxThemeDirectory=SyntaxThemes
using Drawing2D;
using System.Diagnostics;
using Crow;
+using System.ComponentModel;
+using CERoslynPlugin;
namespace CECrowPlugin
{
public class CrowService : Service {
+ #region CTOR/DTOR
public CrowService () : base () {
restoreCrowAssemblies ();
initCommands ();
~CrowService() {
App.ValueChanged -= app_ValueChanged;
}
+ #endregion
+
void app_ValueChanged(object instance, ValueChangeEventArgs e) {
if (e.MemberName == "CurrentProject") {
if (e.NewValue is CERoslynPlugin.SolutionProject sol)
NotifyValueChanged(HoverWidgetDesignId);
}
}
+
#region dbgIface delegates
Func<string,Type> delGetWidgetTypeFromName;
Action<int, int> delResize;
foreach (var style in csprj.Flatten.OfType<CERoslynPlugin.MSBuildProjectItemNode>()
.Where (pin=>pin.NodeType == NodeType.EmbeddedResource && pin.FullPath.EndsWith (".style", StringComparison.OrdinalIgnoreCase)))
yield return style.FullPath;
+ foreach (var refP in csprj.ReferencedProjects) {
+ foreach (var style in refP.Flatten.OfType<CERoslynPlugin.MSBuildProjectItemNode>()
+ .Where (pin=>pin.NodeType == NodeType.EmbeddedResource &&
+ pin.FullPath.EndsWith (".style", StringComparison.OrdinalIgnoreCase)))
+ yield return style.FullPath;
+ }
}
}
/*foreach (String item in crowAssemblies)
yield return crowAssembly;
}
Stream getStreamFromPath (string path) {
+ Stream stream = null;
if (App.CurrentProject is CERoslynPlugin.SolutionProject sol) {
if (sol.StartupProject is CERoslynPlugin.MSBuildProject csprj) {
- return csprj.GetStreamFromTargetPath (path);
+ if (!csprj.TryGetStreamFromTargetPath (path, out stream)) {
+ foreach (MSBuildProject refP in csprj.ReferencedProjects) {
+ if (refP.TryGetStreamFromTargetPath (path, out stream))
+ break;
+ }
+ }
}
}
- return null;
+ return stream;
}
#endregion
static string defaultCrowAssemblyLocation =>
public bool DebugSymbols => bool.Parse (project.GetProperty ("DebugSymbols").EvaluatedValue);
public int WarningLevel => int.Parse (project.GetProperty ("WarningLevel").EvaluatedValue);
- public Stream GetStreamFromTargetPath (string targetPath) {
+ public bool TryGetStreamFromTargetPath (string targetPath, out Stream stream) {
+ stream = null;
IEnumerable<MSBuildProjectItemNode> piNodes = Flatten.OfType<CERoslynPlugin.MSBuildProjectItemNode>();
if (targetPath.StartsWith ('#')) {
targetPath = targetPath.Substring (1);
MSBuildProjectItemNode pin = piNodes.FirstOrDefault (n =>
n.NodeType == NodeType.EmbeddedResource &&
n.HasMetadataValue ("LogicalName", targetPath));
- if (pin != null)
- return new FileStream (pin.FullPath, FileMode.Open);
+ if (pin != null) {
+ stream = new FileStream (pin.FullPath, FileMode.Open);
+ return true;
+ }
} else {
MSBuildProjectItemNode pin = piNodes.FirstOrDefault (n =>
n.NodeType == NodeType.None &&
(n.HasMetadataValue ("CopyToOutputDirectory", "PreserveNewest") || n.HasMetadataValue ("CopyToOutputDirectory", "Always")) &&
n.EvaluatedInclude == targetPath);
- if (pin != null)
- return new FileStream (pin.FullPath, FileMode.Open);
+ if (pin != null) {
+ stream = new FileStream (pin.FullPath, FileMode.Open);
+ return true;
+ }
+ }
+ return false;
+ }
+ public IEnumerable<MSBuildProject> ReferencedProjects {
+ get {
+ string rootPath = Path.GetDirectoryName(FullPath);
+ var allProjects = solutionProject.FlattenProjetcs.OfType<MSBuildProject>();
+ var refProjs = Flatten.OfType<CERoslynPlugin.MSBuildProjectItemNode>().
+ Where (r=>r.NodeType == NodeType.ProjectReference);
+ foreach (var r in refProjs) {
+ var refP = allProjects.FirstOrDefault(p=>Path.GetRelativePath(rootPath, p.FullPath) == r.EvaluatedInclude.Replace("\\","/"));
+ if (refP != null)
+ yield return refP;
+ }
}
- return null;
}
-
#region debug
void printEvaluatedProperties (ProjectInstance pi) {
mainDock = w.FindByName ("mainDock") as DockStack;
+ reloadSyntaxTheme ();
+
reloadWinConfigs ();
lock(UpdateMutex) {
}
public Command CMDSave, CMDSaveAs, CMDQuit, CMDHelp, CMDAbout, CMDOptions;
+ public Command CMDSyntaxTheme_Reload, CMDSyntaxTheme_Save, CMDSyntaxTheme_SaveAs;
void initCommands (){
FileCommands = new CommandGroup ("File",
new ActionCommand("Logs", () => LoadWindow ("#CrowEdit.ui.windows.winLogs.crow", this), "#icons.log.svg"),
new ActionCommand("Services", () => LoadWindow ("#CrowEdit.ui.windows.winServices.crow", this), "#icons.services.svg"),
new ActionCommand("Plugins", () => LoadWindow ("#CrowEdit.ui.windows.winPlugins.crow", this), "#icons.puzzle-piece.svg"),
- new ActionCommand("Syntax Tree", () => LoadWindow ("#CrowEdit.ui.windows.winSyntaxExplorer.crow", this), "#icons.plugins.svg")
+ new ActionCommand("Syntax Tree", () => LoadWindow ("#CrowEdit.ui.windows.winSyntaxExplorer.crow", this), "#icons.plugins.svg"),
+ new ActionCommand("Syntax Theme Editor", () => LoadWindow ("#CrowEdit.ui.windows.winThemeEditor.crow", this), "#icons.palette.svg")
);
CMDHelp = new ActionCommand("Help", () => System.Diagnostics.Debug.WriteLine("help"), "#icons.question.svg");
ViewCommands,
new CommandGroup ("Help", CMDHelp)
);
+
+ CMDSyntaxTheme_Reload = new ActionCommand ("Reload", () => reloadSyntaxTheme ());
+ CMDSyntaxTheme_Save = new ActionCommand ("Save", () => saveSyntaxTheme ());
+ CMDSyntaxTheme_SaveAs = new ActionCommand ("Save As...", () => saveSyntaxThemeAs ());
}
static void loadWindowWithThisDataSource(object sender, string path) {
return;
Document doc = OpenedDocuments.FirstOrDefault (d => d.FullPath == lastCurDoc);
if (doc != null)
- CurrentDocument = doc;
+ CurrentDocument = doc;
}
void saveProjectList () {
if (Projects.Count == 0)
{
return base.GetStreamFromPath(path);
}
+
+ #region syntax theme options/loading
+ Dictionary<string, TextFormatting> syntaxTheme;
+ public Dictionary<string, TextFormatting> SyntaxTheme {
+ get => syntaxTheme;
+ set {
+ if (syntaxTheme == value)
+ return;
+ syntaxTheme = value;
+ NotifyValueChanged (SyntaxTheme);
+ }
+ }
+ public string SyntaxThemeDirectory {
+ get => Configuration.Global.Get<string> ("SyntaxThemeDirectory") ??
+ Path.Combine (Path.GetDirectoryName (Assembly.GetEntryAssembly ().Location), "SyntaxThemes");
+ set {
+ if (SyntaxThemeDirectory == value)
+ return;
+ Configuration.Global.Set ("SyntaxThemeDirectory", value);
+ NotifyValueChanged ("SyntaxThemeDirectory", (object)SyntaxThemeDirectory);
+ NotifyValueChanged ("AvailableSyntaxThemes", (object)AvailableSyntaxThemes);
+ reloadSyntaxTheme();
+ }
+ }
+ public string syntaxThemeFile => Path.Combine (SyntaxThemeDirectory, $"{SyntaxThemeName}.syntax");
+ public string[] AvailableSyntaxThemes {
+ get {
+ if (!Directory.Exists(SyntaxThemeDirectory))
+ return null;
+ string[] tmp = Directory.GetFiles (SyntaxThemeDirectory);
+ for (int i = 0; i < tmp.Length; i++)
+ tmp[i] = Path.GetFileNameWithoutExtension (tmp[i]);
+ return tmp;
+ }
+ }
+ public string SyntaxThemeName {
+ get => Configuration.Global.Get<string> ("SyntaxThemeName");
+ set {
+ if (SyntaxThemeName == value)
+ return;
+ Configuration.Global.Set ("SyntaxThemeName", value);
+ NotifyValueChanged ("SyntaxThemeName", (object)SyntaxThemeName);
+ reloadSyntaxTheme ();
+ }
+ }
+ public Command CMDOptions_SyntaxThemeDirectory => new ActionCommand ("...",
+ () => {
+ FileDialog dlg = App.LoadIMLFragment<FileDialog> (@"
+ <FileDialog Caption='Select Syntax Themes Folder' CurrentDirectory='{SyntaxThemeDirectory}'
+ ShowFiles='false' ShowHidden='true' />");
+ dlg.OkClicked += (sender, e) => SyntaxThemeDirectory = (sender as FileDialog).SelectedFileFullPath;
+ dlg.DataSource = this;
+ }
+ );
+
+ void reloadSyntaxTheme () {
+ if (!File.Exists (syntaxThemeFile))
+ return;
+ Dictionary<string, TextFormatting> theme = new Dictionary<string, TextFormatting> ();
+ using (StreamReader sr = new StreamReader(syntaxThemeFile)) {
+ while (!sr.EndOfStream) {
+ string l = sr.ReadLine ();
+ string[] tmp = l.Split ('=');
+ theme.Add (tmp[0].Trim (), TextFormatting.Parse (tmp[1].Trim ()));
+ }
+ }
+ SyntaxTheme = theme;
+ }
+ void saveSyntaxTheme () {
+ using (StreamWriter sw = new StreamWriter (syntaxThemeFile)) {
+ foreach (string key in SyntaxTheme.Keys) {
+ sw.WriteLine ($"{key} = {SyntaxTheme[key]}");
+ }
+ }
+ }
+ void saveSyntaxThemeAs ()
+ {
+ FileDialog fd = LoadIMLFragment<FileDialog> (@"<FileDialog Width='60%' Height='50%' Caption='Save as ...' CurrentDirectory='" +
+ SyntaxThemeDirectory + "' SelectedFile='" +
+ Path.GetFileName(syntaxThemeFile) + "' OkClicked='saveSyntaxThemeAsDialog_OkClicked'/>");
+ fd.DataSource = this;
+ fd.OkClicked += (sender, e) => {
+ FileDialog fd = sender as FileDialog;
+
+ if (string.IsNullOrEmpty (fd.SelectedFileFullPath))
+ return;
+
+ if (File.Exists(fd.SelectedFileFullPath)) {
+ MessageBox mb = MessageBox.ShowModal (this, MessageBox.Type.YesNo, "File exists, overwrite?");
+ mb.Yes += (sender2, e2) => {
+ SyntaxThemeName = Path.GetFileNameWithoutExtension(fd.SelectedFile);
+ SyntaxThemeDirectory = fd.SelectedDirectory;
+ saveSyntaxTheme ();
+ };
+ return;
+ }
+
+ SyntaxThemeName = Path.GetFileNameWithoutExtension(fd.SelectedFile);
+ saveSyntaxTheme ();
+ };
+ }
+ #endregion
}
}
<Slider Template="#ui.slider.tmp" Height="Fit" Background="0.1,0.1,0.2,0.8"
Minimum="1" Maximum="50" SmallIncrement="1" LargeIncrement="10"
Caption="GLFW polling Interval (ms)" Value="{²CrowPollingInterval}" />
+ <HorizontalStack Height="Fit">
+ <Label Width="200" Text="Syntax themes folder"/>
+ <TextBox Width="Stretched" Text="{²SyntaxThemeDirectory}"/>
+ <Button Command="{CMDOptions_SyntaxThemeDirectory}" MinimumSize="0,0"/>
+ </HorizontalStack>
+ <ComboBox Data="{AvailableSyntaxThemes}" SelectedItem="{²SyntaxThemeName}"/>
</VerticalStack>
</Window>
\ No newline at end of file
<?xml version="1.0"?>
-<DockWindow Caption="Exceptions" Width="40%" Height="20%">
- <ListBox DataSource="{CurrentDocument}" Data='{Exceptions}' SelectedItem="{²CurrentException}"
+<DockWindow Caption="Exceptions" Width="40%" Height="20%">
+ <ListBox RootDataLevel="true" DataSource="{CurrentDocument}" Data='{Exceptions}' SelectedItem="{²CurrentException}"
Height='Stretched' Width='Stretched'>
<Template>
<Scroller Name="scroller1" >
- <Table Columns="Message,Stretched;Location,Fit"
+ <Table Columns="-, 28;Message,Stretched;Location,Fit"
Height="Fit" Name="ItemsContainer" VerticalAlignment="Top"/>
</Scroller>
</Template>
<ItemTemplate>
<TableRow Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
+ <Image Width="20" Height="20" Path="{GetIcon}" Margin="0" />
<Label Text="{Message}" />
<Label Text="{Location}"/>
</TableRow>
</ItemTemplate>
- </ListBox>
+ </ListBox>
</DockWindow>
--- /dev/null
+<?xml version="1.0"?>
+<DockWindow Caption="Syntax Theme Editor" Height="60%" Width="60%">
+ <VerticalStack Margin="4" RootDataLevel="true">
+ <Label Text="{SyntaxThemeName}"/>
+ <ListBox Data="{SyntaxTheme}">
+ <Template>
+ <Scroller Name="scroller1" >
+ <Table Columns="Name,Stretched;Foreground,150;Background,150;Bold,Fit;Italic,Fit"
+ Height="Fit" Name="ItemsContainer" VerticalAlignment="Top"/>
+ </Scroller>
+ </Template>
+ <ItemTemplate>
+ <TableRow>
+ <Label Margin="2" Text="{Key}" Height="Stretched"/>
+ <ColorPicker Margin="0" DataSource="{Value}" RootDataLevel="true" MinimumSize="0,0" CurrentColor="{²Foreground}" Height="Stretched" Width="Stretched"
+ Template="#ui.ColorPicker2.template"/>
+ <ColorPicker Margin="0" DataSource="{Value}" RootDataLevel="true" MinimumSize="0,0" CurrentColor="{²Background}" Height="Stretched" Width="Stretched"
+ Template="#ui.ColorPicker2.template"/>
+ <CheckBox DataSource="{Value}" RootDataLevel="true" Caption="" IsChecked="{²Bold}" />
+ <CheckBox DataSource="{Value}" RootDataLevel="true" Caption="" IsChecked="{²Italic}" />
+ </TableRow>
+ </ItemTemplate>
+ </ListBox>
+ <HorizontalStack Fit="True" HorizontalAlignment="Right">
+ <Button Command="{CMDSyntaxTheme_Reload}"/>
+ <Button Command="{CMDSyntaxTheme_Save}"/>
+ <Button Command="{CMDSyntaxTheme_SaveAs}"/>
+ <CheckBox Style="simpleCheckBox"/>
+ </HorizontalStack>
+ </VerticalStack>
+</DockWindow>