/// <summary> /// Handles the create button event for a tag. /// </summary> public void CreateTagEvent() { TagForm tagForm = new TagForm(); tagForm.tagLabel.Text = createTagText; tagForm.AcceptEventHandler += AcceptCreateTagEvent; tagForm.Show(); }
private void buttonTagSettings_Click(object sender, EventArgs e) { // Show() will dispose itself on close, ShowDialog() will not however | Show() will allow you to click on other controls while ShowDialog() will not if (activeTagForm == null || activeTagForm.IsDisposed) { activeTagForm = new TagForm(); activeTagForm.Show(); } }
internal void AddNewTag(IAddressBookLocal addressBook) { var tagWindow = new TagForm(new ContactTagViewModel(addressBook.CreateTag())); if (tagWindow.ShowDialog() == DialogResult.OK) { NotifyPropertyChanged("Tags"); } }
public int AddTag(TagForm form) { using (var uow = UnitOfWorkFactory.Create <NovelContext>()) { var service = new TagService(uow); var id = service.SaveChanges(form); return(id); } }
/* Function: IsOn * Returns whether the iterator is on the passed <XMLElementType>, tag type, and <TagForm>. This function must be * used with <XMLElementType.Tag> since that's the only type where it's relevant. <XMLElementType> is passed anyway * for consistency with other IsOn() functions. */ public bool IsOn(XMLElementType elementType, string tagType, TagForm tagForm) { #if DEBUG if (elementType != XMLElementType.Tag) { throw new Exception("Can't call IsOn() with a tag form unless the element type is an XML tag."); } #endif return(IsOnTag(tagType, tagForm)); }
/// <summary> /// タグ編集画面を表示します /// </summary> /// <returns></returns> private IList <string> ShowTagForm() { //タグの編集画面を表示します using (var form = new TagForm(TagForm.Mode.Add, _db, tags: "")) { //画面を表示します form.ShowDialog(); //選択されたタグリストを取得します return(form.SelectedTagList); } }
public int SaveChanges(TagForm form) { var tTag = Table <Tag>(); var tag = tTag.GetOrAdd(w => w.ID == form.ID || (w.TagType == form.TagType && w.Name == form.Name)); UpdateAuditFields(tag, form.ByUserID); MapProperty(form, tag, form.InlineEditProperty); // save SaveChanges(); return(tag.ID); }
/// <summary> /// タグボタンクリック /// タグ一覧画面を表示します /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTag_Click(object sender, EventArgs e) { //タグの編集画面を表示します using (var form = new TagForm(TagForm.Mode.Select, _db, txtTag.Text)) { //画面を表示します form.ShowDialog(); if (form.SelectedTagList == null) { return; } //タグ欄に選択されたタグを設定します txtTag.Text = string.Join(" ", form.SelectedTagList); } }
/// <summary> /// Handles the click event on the edit button. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditTagEvent(object sender, EventArgs e) { if (sender is Button button) { Tag tag = GetTag(button.Name); TagForm tagForm = new TagForm(); tagForm.SetOriginalTag(tag); tagForm.tagLabel.Text = editTagText; tagForm.nameTextBox.Text = tag.Name; tagForm.colorButton.BackColor = ColorTranslator.FromHtml(tag.Color); tagForm.colorDialog.Color = ColorTranslator.FromHtml(tag.Color); tagForm.AcceptEventHandler += AcceptEditTagEvent; tagForm.Show(); } }
/// <summary> /// タグ編集画面を表示します /// </summary> /// <returns></returns> private IList <string> ShowTagForm(int topID) { //1番最初に選択されているデータのタグリストを取得します(子画面のデフォルト値として使用) string tags = ""; using (var connection = _db.GetConnection()) { tags = TagDataDao.GetTags(connection, topID); } //タグの編集画面を表示します using (var form = new TagForm(TagForm.Mode.Add, _db, tags)) { //画面を表示します form.ShowDialog(); //選択されたタグリストを取得します return(form.SelectedTagList); } }
/* Function: IsOnTag * Returns whether the iterator is on any XML tag of the passed <TagForm>. */ public bool IsOnTag(TagForm tagForm) { return(type == XMLElementType.Tag && this.TagForm == tagForm); }
public static TagForm onkeydown(this TagForm tag, string value) { tag.OnKeyDown = value; return(tag); }
public static TagForm lang(this TagForm tag, LangCode value) { tag.Lang = value; return(tag); }
public static TagForm title(this TagForm tag, string value) { tag.Title = value; return(tag); }
public static TagForm method(this TagForm tag, Method value) { tag.Method = value; return(tag); }
public static TagForm acceptcharset(this TagForm tag, Charset[] value) { tag.AcceptCharset = value; return(tag); }
public static TagForm onmouseout(this TagForm tag, string value) { tag.OnMouseOut = value; return(tag); }
public static TagForm onreset(this TagForm tag, string value) { tag.OnReset = value; return(tag); }
public static TagForm onkeyup(this TagForm tag, string value) { tag.OnKeyUp = value; return(tag); }
public static TagForm onsubmit(this TagForm tag, string value) { tag.OnSubmit = value; return(tag); }
public static TagForm target(this TagForm tag, Target value) { tag.Target = value; return(tag); }
public static TagForm enctype(this TagForm tag, MimeType value) { tag.EncType = value; return(tag); }
/* Function: IsOnTag * Returns whether the iterator is on the passed XML tag type and <TagForm>. */ public bool IsOnTag(string tagType, TagForm tagForm) { return(type == XMLElementType.Tag && this.tagType == tagType && this.TagForm == tagForm); }
public static TagForm id(this TagForm tag, string value) { tag.Id = value; return(tag); }
public static TagForm onkeypress(this TagForm tag, string value) { tag.OnKeyPress = value; return(tag); }
public static TagForm name(this TagForm tag, string value) { tag.Name = value; return(tag); }
public static TagForm onmousemove(this TagForm tag, string value) { tag.OnMouseMove = value; return(tag); }
public static TagForm @class(this TagForm tag, string value) { tag.Class = value; return(tag); }
public static TagForm accept(this TagForm tag, MimeType[] value) { tag.Accept = value; return(tag); }
public static TagForm action(this TagForm tag, string value) { tag.Action = value; return(tag); }