當前位置: 首頁>>代碼示例>>C#>>正文


C# EventDB.AddSpecial方法代碼示例

本文整理匯總了C#中PurplePen.EventDB.AddSpecial方法的典型用法代碼示例。如果您正苦於以下問題:C# EventDB.AddSpecial方法的具體用法?C# EventDB.AddSpecial怎麽用?C# EventDB.AddSpecial使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PurplePen.EventDB的用法示例。


在下文中一共展示了EventDB.AddSpecial方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AddRectangleSpecial

 public static Id<Special> AddRectangleSpecial(EventDB eventDB, RectangleF rect, SpecialColor color, LineKind lineKind, float lineWidth, float gapSize, float dashSize, float cornerRadius)
 {
     Special special = new Special(SpecialKind.Rectangle, new PointF[] { rect.Location, new PointF(rect.Right, rect.Bottom)});
     special.color = color;
     special.lineKind = lineKind;
     special.lineWidth = lineWidth;
     special.gapSize = gapSize;
     special.dashSize = dashSize;
     special.cornerRadius = cornerRadius;
     return eventDB.AddSpecial(special);
 }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:11,代碼來源:ChangeEvent.cs

示例2: AddTextSpecial

        // Add a text special to the event
        public static Id<Special> AddTextSpecial(EventDB eventDB, RectangleF boundingRectangle, string text, string fontName, bool bold, bool italic, SpecialColor color)
        {
            Special special = new Special(SpecialKind.Text, new PointF[2] { new PointF(boundingRectangle.Left, boundingRectangle.Bottom), new PointF(boundingRectangle.Right, boundingRectangle.Top) });
            special.text = text;
            special.fontName = fontName;
            special.fontBold = bold;
            special.fontItalic = italic;
            special.color = color;

            return eventDB.AddSpecial(special);
        }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:12,代碼來源:ChangeEvent.cs

示例3: AddPointSpecial

 // Add a point special to the event. The special is visible in all courses.
 public static Id<Special> AddPointSpecial(EventDB eventDB, SpecialKind specialKind, PointF location, float orientation)
 {
     Special special = new Special(specialKind, new PointF[1] { location });
     special.orientation = orientation;
     return eventDB.AddSpecial(special);
 }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:7,代碼來源:ChangeEvent.cs

示例4: AddLineSpecial

 public static Id<Special> AddLineSpecial(EventDB eventDB, PointF[] locations, SpecialColor color, LineKind lineKind, float lineWidth, float gapSize, float dashSize)
 {
     Special special = new Special(SpecialKind.Line, locations);
     special.color = color;
     special.lineKind = lineKind;
     special.lineWidth = lineWidth;
     special.gapSize = gapSize;
     special.dashSize = dashSize;
     return eventDB.AddSpecial(special);
 }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:10,代碼來源:ChangeEvent.cs

示例5: AddLineAreaSpecial

 // Add a line or area special to the event. The special is visible in all courses.
 public static Id<Special> AddLineAreaSpecial(EventDB eventDB, SpecialKind specialKind, PointF[] locations)
 {
     Special special = new Special(specialKind, locations);
     return eventDB.AddSpecial(special);
 }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:6,代碼來源:ChangeEvent.cs

示例6: AddImageSpecial

        // Add a text special to the event
        public static Id<Special> AddImageSpecial(EventDB eventDB, RectangleF boundingRectangle, Bitmap imageBitmap, string imageName)
        {
            Debug.Assert(imageBitmap != null);
            Debug.Assert(imageName != null);

            Special special = new Special(SpecialKind.Image, new PointF[2] { new PointF(boundingRectangle.Left, boundingRectangle.Bottom), new PointF(boundingRectangle.Right, boundingRectangle.Top) });
            special.text = imageName;
            special.imageBitmap = imageBitmap;

            return eventDB.AddSpecial(special);
        }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:12,代碼來源:ChangeEvent.cs

示例7: AddDescription

        // Add a description to the event.
        public static Id<Special> AddDescription(EventDB eventDB, bool allCourses, CourseDesignator[] courses, PointF topLeft, float cellSize, int numColumns)
        {
            Special special = new Special(SpecialKind.Descriptions, new PointF[2] { topLeft, new PointF(topLeft.X + cellSize, topLeft.Y) });
            special.allCourses = allCourses;
            if (! allCourses)
                special.courses = courses;
            special.numColumns = numColumns;
            Id<Special> specialId =  eventDB.AddSpecial(special);

            // Descriptions special are unique per course -- enforce this.
            UpdateDescriptionCourses(eventDB, specialId);

            return specialId;
        }
開發者ID:petergolde,項目名稱:PurplePen,代碼行數:15,代碼來源:ChangeEvent.cs


注:本文中的PurplePen.EventDB.AddSpecial方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。