void OnEditInfoChanged()
 {
     #region EditItemType
     EditItemType editItemType = EditInfo.EditType;
     if (editItemType == EditItemType.Reserved)
     {
         ElpMarkup.Fill = Brushes.Gray;
         TbxMark.Text   = "保留";
     }
     else if (editItemType == EditItemType.Note)
     {
         ElpMarkup.Fill = Brushes.Violet;
         TbxMark.Text   = "笔记";
     }
     else if (editItemType == EditItemType.Daily)
     {
         ElpMarkup.Fill = Brushes.White;
         TbxMark.Text   = "日常";
     }
     else if (editItemType == EditItemType.Holiday)
     {
         ElpMarkup.Fill = Brushes.Orange;
         TbxMark.Text   = "假期";
     }
     else if (editItemType == EditItemType.Summervacation)
     {
         ElpMarkup.Fill = Brushes.SeaGreen;
         TbxMark.Text   = "暑假";
     }
     else if (editItemType == EditItemType.Wintervacation)
     {
         ElpMarkup.Fill = Brushes.SkyBlue;
         TbxMark.Text   = "寒假";
     }
     else if (editItemType == EditItemType.Hugeevent)
     {
         ElpMarkup.Fill = Brushes.OrangeRed;
         TbxMark.Text   = "重要";
     }
     if (editItemType == EditItemType.Reserved)
     {
         TbxTitle.IsReadOnly = true;
     }
     else
     {
         TbxTitle.IsReadOnly = false;
     }
     #endregion
     if (EditInfo.Title == null)
     {
         TbxTitle.Text = "";
     }
     else
     {
         TbxTitle.Text = EditInfo.Title;
     }
     TbxTime.Text = EditInfo.CreateTime.ToString();
 }
예제 #2
0
 public ItemEditor(EditItemType ItemType, string caption, string itemname)
 {
     InitializeComponent();
     txtName.Text  = this.ItemName;
     btnOK.Enabled = !string.IsNullOrEmpty(ItemName);
     if (ItemType == EditItemType.Category)
     {
         this.Text        = "ویرایش مشخصات بخش";
         this.lblCat.Text = "نام بخش:";
     }
     else
     if (ItemType == EditItemType.Poem)
     {
         this.Text        = "ویرایش مشخصات شعر";
         this.lblCat.Text = "نام شعر:";
     }
     else
     if (ItemType == EditItemType.General)
     {
         this.Text        = caption;
         this.lblCat.Text = itemname;
     }
 }
예제 #3
0
 public ItemEditor(EditItemType ItemType)
     : this(ItemType, "", "")
 {
 }