Example #1
0
        private static Image DrawOverlay(Image img, OverlayEnum overlay, bool drawStatic)
        {
            Bitmap bmp = new Bitmap(img);

            img.Dispose();
            using (var g = Graphics.FromImage(bmp))
            {
                if (overlay == OverlayEnum.Private)
                {
                    g.DrawImage(Resources.OverlayPrivate, new Point(0, 0));
                }
                else if (overlay == OverlayEnum.Internal)
                {
                    g.DrawImage(Resources.OverlayInternal, new Point(0, 0));
                }
                else if (overlay == OverlayEnum.InternalProtected)
                {
                    g.DrawImage(Resources.OverlayProtectedInternal, new Point(0, 0));
                }
                else if (overlay == OverlayEnum.Protected)
                {
                    g.DrawImage(Resources.OverlayProtected, new Point(0, 0));
                }

                if (drawStatic)
                {
                    g.DrawImage(Resources.OverlayStatic, new Point(0, 0));
                }
            }
            return(bmp);
        }
Example #2
0
 /// <summary>
 /// returns an attribute struct with <see cref="LeftSide"/> == false,
 ///  <see cref="OverlayType"/> == inAttribute (to be updated later)
 ///  and <see cref="Implementation"/> == <see cref="ParameterImplementation.NotAssigned"/>
 /// </summary>
 /// <param name="type">The type of the attribute (e.g. Int32)</param>
 /// <param name="name">The name / identifier  of the attribute</param>
 /// <param name="level">the level of parenthesis (lowest level is level 0)</param>
 /// <param name="positionInProduction">first attribute of left side has position 1, 1st attribute of right side equally has position 1</param>
 internal AttributeStruct(UnifiedString typeString, UnifiedString nameString, Int32 level, Int32 positionInProduction)
 {
     TypeString           = typeString;
     NameString           = nameString;
     PositionInProduction = positionInProduction;
     LeftSide             = false; // has to be added later (as soon as the left side is recognized)
     Level          = level;       // may be changed if in left side within parentheses
     OverlayType    = OverlayEnum.inAttribute;
     Implementation = ParameterImplementation.NotAssigned;
 }