Beispiel #1
0
 public static Title CreateFromTitleModel(TitleModel titleModel)
 {
     var title = new Title()
     {
         Font = titleModel.Font,
         FontColor = titleModel.FontColor,
         FontSize = Int32.Parse(titleModel.FontSize),
         FontStyle = titleModel.FontStyle,
         Text = titleModel.Text,
         TitleId = titleModel.TitleId
     };
     return title;
 }
Beispiel #2
0
        public static TitleModel CreateFromTitle(Title title)
        {
            var titleModel = new TitleModel();

            titleModel.Font = title.Font;
            titleModel.FontColor = title.FontColor;
            titleModel.FontSize = title.FontSize.ToString();
            titleModel.FontStyle = title.FontStyle;
            titleModel.Text = title.Text;
            titleModel.TitleId = title.TitleId;

            return titleModel;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the Titles EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTitles(Title title)
 {
     base.AddObject("Titles", title);
 }
 /// <summary>
 /// Create a new Title object.
 /// </summary>
 /// <param name="titleId">Initial value of the TitleId property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 /// <param name="font">Initial value of the Font property.</param>
 /// <param name="fontSize">Initial value of the FontSize property.</param>
 /// <param name="fontColor">Initial value of the FontColor property.</param>
 /// <param name="fontStyle">Initial value of the FontStyle property.</param>
 public static Title CreateTitle(global::System.Guid titleId, global::System.String text, global::System.String font, global::System.Int32 fontSize, global::System.String fontColor, global::System.String fontStyle)
 {
     Title title = new Title();
     title.TitleId = titleId;
     title.Text = text;
     title.Font = font;
     title.FontSize = fontSize;
     title.FontColor = fontColor;
     title.FontStyle = fontStyle;
     return title;
 }