Files
Pilz.Updating/Pilz.Updating.Administration.GUI/PackageDescriptionEditor.cs
2022-07-01 22:12:50 +02:00

62 lines
1.7 KiB
C#

using System;
using Microsoft.VisualBasic.CompilerServices;
using Telerik.WinControls.UI;
namespace Pilz.Updating.Administration.GUI
{
public partial class PackageDescriptionEditor
{
// C o n s t r u c t o r s
public PackageDescriptionEditor()
{
InitializeComponent();
radDropDownList_Formatting.Items.AddRange(new RadListDataItem[]
{
new RadListDataItem { Text = "Nur Text", Tag = UpdateNotesContentType.PlainText },
new RadListDataItem { Text = "Markdown", Tag = UpdateNotesContentType.Markdown },
new RadListDataItem { Text = "HTML", Tag = UpdateNotesContentType.HTML },
});
}
// P r o p e r t i e s
public string Titel
{
get
{
return radTextBoxControl_Titel.Text;
}
set
{
radTextBoxControl_Titel.Text = value;
}
}
public string Description
{
get
{
return radRichTextEditor_Description.Text;
}
set
{
radRichTextEditor_Description.Text = value ?? String.Empty;
}
}
public UpdateNotesContentType DescriptionType
{
get =>
(UpdateNotesContentType)radDropDownList_Formatting.SelectedItem?.Tag;
set
{
foreach (var item in radDropDownList_Formatting.Items)
if ((UpdateNotesContentType)item.Tag == value)
radDropDownList_Formatting.SelectedItem = item;
}
}
}
}