示例#1
0
        /// <summary>
        /// Changes the page tags.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        private void changePageTags(object sender, PageArgs args)
        {
            TagsArgs newArgs = new TagsArgs("", this.Page, this.TagData);

            this.Page = paginationSearch.Page;
            this.ChangeTagsPage(sender, newArgs);
        }
示例#2
0
 /// <summary>
 /// Loads the tags.
 /// </summary>
 /// <param name="tags">The tags.</param>
 /// <param name="args">The args.</param>
 public void LoadTags(List <Model.Tag.Tag> tags, TagsArgs args)
 {
     this.TagArgs = args;
     if (this.TagArgs.Page == 0)
     {
         this.pagination.DisablePreviousLink();
     }
     else
     {
         this.pagination.EnablePreviousLink();
     }
     this.pTagsList.Controls.Clear();
     foreach (Model.Tag.Tag tag in tags)
     {
         TagResult newTag = new TagResult();
         newTag.LoadData(tag);
         newTag.SubscribeToTag += new Delegates.Delegates.SubscribeToTagHandler(newTag_SubscribeToTag);
         newTag.OpenTagResults += new Delegates.Delegates.OpenTagResultsHandler(newTag_OpenTagResults);
         newTag.Dock            = DockStyle.Top;
         this.pTagsList.Controls.Add(newTag);
     }
     if (this.pTagsList.Controls.Count == 10)
     {
         this.pagination.EnableNextLink();
     }
     else
     {
         this.pagination.DisableNextLink();
     }
 }
示例#3
0
        /// <summary>
        /// Calls the tags tab.
        /// </summary>
        /// <param name="args">The args.</param>
        private void callTagsTab(TagsArgs args)
        {
            Command command = new Command();

            command.Tab  = "tags";
            command.Args = args;
            this.Session.FormController.AddCommand(command);
        }
示例#4
0
 /// <summary>
 /// Opens the tags publications page.
 /// </summary>
 /// <param name="args">The args.</param>
 public void OpenTagsPublicationsPage(TagsArgs args)
 {
     if (this.searchPublicationPage == null)
     {
         this.CreateTagsPublicationsPage(args);
     }
     this.searchPublicationPage.LoadPublications(tagsController.GetPublicationsWithTag(args.Tag.Id, 10, 0));
     searchPublicationPage.BringToFront();
     searchPublicationPage.Show();
 }
示例#5
0
 /// <summary>
 /// Opens the tags search.
 /// </summary>
 /// <param name="args">The args.</param>
 public void OpenTagsSearch(TagsArgs args)
 {
     if (this.tagsPage == null)
     {
         this.CreateTagsPage();
     }
     this.tagsPage.LoadTags(tagsController.SearchTag(args.Text, 10, args.Page), args);
     tagsPage.BringToFront();
     tagsPage.Show();
 }
示例#6
0
 /// <summary>
 /// Controls the panel_ subscribe to tag.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 private void controlPanel_SubscribeToTag(object sender, TagsArgs args)
 {
     try
     {
         Forms.SubscribeToTag subscribeToTag = new SubscribeToTag();
         subscribeToTag.ShowDialog(this);
         //this.showControlPanel();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#7
0
 /// <summary>
 /// Subscribes to tag.
 /// </summary>
 /// <param name="args">The args.</param>
 private void subscribeToTag(TagsArgs args)
 {
     try
     {
         Guid newToken = Guid.Empty;
         this.tagsController.AddUserSubscription(out newToken, Session.User.Id, Session.CurrentToken, Session.User.Id, args.Tag.Id);
         this.Session.CurrentToken = newToken;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#8
0
        /// <summary>
        /// Executes the command tag.
        /// </summary>
        /// <param name="command">The command.</param>
        private void executeCommandTag(Command command)
        {
            TagsArgs args = ((TagsArgs)command.Args);

            if (args.Text == "" && args.Tag == null)
            {
                this.main.CreateTagsPage();
            }
            else if ((args.Tag == null) && (args.Text != ""))
            {
                this.main.OpenTagsSearch(args);
            }
            else
            {
                this.main.OpenTagsPublicationsPage(args);
            }
        }
示例#9
0
 /// <summary>
 /// Creates the tags publications page.
 /// </summary>
 /// <param name="args">The args.</param>
 public void CreateTagsPublicationsPage(TagsArgs args)
 {
     try
     {
         this.searchPublicationPage = new PublicationsSearchResult();
         this.searchPublicationPage.LoadTitle(args.Tag);
         this.searchPublicationPage.LoadPublications(tagsController.GetPublicationsWithTag(args.Tag.Id, 10, 0));
         this.searchPublicationPage.Dock            = DockStyle.Fill;
         this.searchPublicationPage.SubscribeToTag += new Delegates.Delegates.SubscribeToTagHandler(searchPage_SubscribeToTag);
         this.searchPublicationPage.ChangeTagsPage += new PublicationsSearchResult.ChangeTagsPageHandler(searchPage_ChangeTagsPage);
         this.pContent.Controls.Add(searchPublicationPage);
         searchPublicationPage.BringToFront();
         searchPublicationPage.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#10
0
 /// <summary>
 /// Tags_s the call previous page.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void tags_CallPreviousPage(object sender, TagsArgs args)
 {
     this.callTagsTab(args);
 }
示例#11
0
 /// <summary>
 /// Tags_s the subscribe to tag.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void tags_SubscribeToTag(object sender, TagsArgs args)
 {
     this.subscribeToTag(args);
 }
示例#12
0
 /// <summary>
 /// Searches the page_ subscribe to tag.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void searchPage_SubscribeToTag(object sender, TagsArgs args)
 {
     this.subscribeToTag(args);
 }
示例#13
0
 /// <summary>
 /// Tagses the groups box_ subscribe to tag.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 private void tagsGroupsBox_SubscribeToTag(object sender, TagsArgs args)
 {
     this.SubscribeToTag(sender, args);
 }
示例#14
0
 /// <summary>
 /// Searches the page_ change tags page.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void searchPage_ChangeTagsPage(object sender, TagsArgs args)
 {
     this.callTagsTab(args);
 }
示例#15
0
文件: TagResult.cs 项目: zapic0/tfm
        /// <summary>
        /// Handles the LinkClicked event of the lTagText control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Forms.LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
        private void lTagText_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            TagsArgs args = new TagsArgs("", 0, this.TagData);

            this.OpenTagResults(sender, args);
        }
示例#16
0
        /// <summary>
        /// Pagination_s the call previous page.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        private void pagination_CallPreviousPage(object sender, PageArgs args)
        {
            TagsArgs newArgs = new TagsArgs(this.TagArgs.Text, args.Page, this.TagArgs.Tag);

            this.CallPreviousPage(sender, newArgs);
        }
示例#17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TagsSearchPage"/> class.
 /// </summary>
 public TagsSearchPage()
 {
     InitializeComponent();
     this.TagArgs = new TagsArgs("", 0, new Model.Tag.Tag());
 }
示例#18
0
 /// <summary>
 /// News the tag_ open tag results.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void newTag_OpenTagResults(object sender, TagsArgs args)
 {
     this.OpenTagResults(sender, args);
 }
示例#19
0
文件: TagTitle.cs 项目: zapic0/tfm
        /// <summary>
        /// Handles the Click event of the bSubscribe control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        void bSubscribe_Click(object sender, EventArgs e)
        {
            TagsArgs args = new TagsArgs("", 0, this.tagData);

            this.SubscribeToTag(sender, args);
        }
示例#20
0
 /// <summary>
 /// News the tag_ subscribe to tag.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void newTag_SubscribeToTag(object sender, TagsArgs args)
 {
     this.SubscribeToTag(sender, args);
 }
示例#21
0
 /// <summary>
 /// Tags_s the call next page.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void tags_CallNextPage(object sender, TagsArgs args)
 {
     this.callTagsTab(args);
 }
示例#22
0
 /// <summary>
 /// Searches the text control_ search text.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 private void searchTextControl_SearchText(object sender, TagsArgs args)
 {
     this.SearchText(sender, args);
 }
示例#23
0
 /// <summary>
 /// Tags_s the search text.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void tags_SearchText(object sender, TagsArgs args)
 {
     this.callTagsTab(args);
 }
示例#24
0
 /// <summary>
 /// Tagses the page_ open tag results.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="args">The args.</param>
 void tagsPage_OpenTagResults(object sender, TagsArgs args)
 {
     this.callTagsTab(args);
 }
示例#25
0
        /// <summary>
        /// Handles the Click event of the bAddTag control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void bAddTag_Click(object sender, EventArgs e)
        {
            TagsArgs newArgs = new TagsArgs("", 0, new Model.Tag.Tag());

            this.SubscribeToTag(sender, newArgs);
        }