示例#1
0
 /// <summary>
 /// Initializes a new instance of the VGSharp class.
 /// Clone Constructor. Creates new sharp that is
 /// identical to the given <see cref="VGSharp"/>
 /// </summary>
 /// <param name="sharp">Sharp to clone</param>
 private VGSharp(VGSharp sharp)
     : base(
         sharp.ShapeDrawAction,
         sharp.Pen,
         sharp.Brush,
         sharp.Font,
         sharp.FontColor,
         sharp.Bounds,
         sharp.StyleGroup,
         sharp.Name,
         sharp.ElementGroup,
         sharp.Sound)
 {
 }
示例#2
0
    ///////////////////////////////////////////////////////////////////////////////
    // Eventhandler for Custom Defined Events                                    //
    ///////////////////////////////////////////////////////////////////////////////
    #region CUSTOMEVENTHANDLER
    #endregion //CUSTOMEVENTHANDLER

    #endregion //EVENTS

    ///////////////////////////////////////////////////////////////////////////////
    // Methods and Eventhandling for Background tasks                            //
    ///////////////////////////////////////////////////////////////////////////////
    #region BACKGROUNDWORKER
    #endregion //BACKGROUNDWORKER

    ///////////////////////////////////////////////////////////////////////////////
    // Inherited methods                                                         //
    ///////////////////////////////////////////////////////////////////////////////
    #region OVERRIDES
    #endregion //OVERRIDES

    ///////////////////////////////////////////////////////////////////////////////
    // Methods for doing main class job                                          //
    ///////////////////////////////////////////////////////////////////////////////
    #region METHODS

    /// <summary>
    /// This method creates the shape that is defined in this dialog to be added to a slide.
    /// </summary>
    /// <returns>The ready to use <see cref="VGElement"/>.</returns>
    private VGElement GenerateNewShape()
    {
      VGElement element = null;
      if (this.rdbRectangle.Checked)
      {
        element = new VGRectangle(
          this.pbcStyle.DrawAction,
          this.pbcStyle.NewPen,
          this.pbcStyle.NewBrush,
          this.pbcStyle.NewFont, 
          this.pbcStyle.NewFontColor,
          new RectangleF(0, 0, 100, 100), 
          VGStyleGroup.None,
          this.pbcStyle.NewName,
          string.Empty);
      }
      else if (this.rdbEllipse.Checked)
      {
        element = new VGEllipse(
          this.pbcStyle.DrawAction,
          this.pbcStyle.NewPen,
          this.pbcStyle.NewBrush, 
          this.pbcStyle.NewFont, 
          this.pbcStyle.NewFontColor,
          new RectangleF(0, 0, 100, 100),
          VGStyleGroup.None, 
          this.pbcStyle.NewName,
          string.Empty);
      }
      else if (this.rdbPolyline.Checked)
      {
        element = new VGPolyline(
          this.pbcStyle.DrawAction,
          this.pbcStyle.NewPen,
          this.pbcStyle.NewBrush,
          this.pbcStyle.NewFont,
          this.pbcStyle.NewFontColor, 
          VGStyleGroup.None,
          this.pbcStyle.NewName,
          string.Empty);
      }
      else if (this.rdbSharp.Checked)
      {
        element = new VGSharp(
          this.pbcStyle.DrawAction,
          this.pbcStyle.NewPen, 
          this.pbcStyle.NewFont, 
          this.pbcStyle.NewFontColor,
          new RectangleF(0, 0, 100, 100), 
          VGStyleGroup.None,
          this.pbcStyle.NewName,
          string.Empty);
      }
      else if (this.rdbLine.Checked)
      {
        element = new VGLine(
          this.pbcStyle.DrawAction,
          this.pbcStyle.NewPen, 
          this.pbcStyle.NewFont, 
          this.pbcStyle.NewFontColor,
          VGStyleGroup.None, 
          this.pbcStyle.NewName,
          string.Empty);
      }

      element.Sound = this.audioControl.Sound;

      return element;
    }
示例#3
0
文件: VGSharp.cs 项目: DeSciL/Ogama
 /// <summary>
 /// Initializes a new instance of the VGSharp class.
 /// Clone Constructor. Creates new sharp that is
 /// identical to the given <see cref="VGSharp"/>
 /// </summary>
 /// <param name="sharp">Sharp to clone</param>
 private VGSharp(VGSharp sharp)
   : base(
   sharp.ShapeDrawAction,
   sharp.Pen,
   sharp.Brush,
   sharp.Font,
   sharp.FontColor,
   sharp.Bounds,
   sharp.StyleGroup,
   sharp.Name,
   sharp.ElementGroup,
   sharp.Sound)
 {
 }