Example #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);
        }
Example #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();
     }
 }
Example #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);
        }
Example #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();
 }
Example #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();
 }
Example #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);
     }
 }
Example #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);
     }
 }
Example #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);
            }
        }
Example #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);
     }
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #15
0
        /// <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);
        }
Example #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);
        }
Example #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());
 }
Example #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);
 }
Example #19
0
        /// <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);
        }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
        }