Exemple #1
0
 /// <summary>
 /// Load the specified content info.
 /// </summary>
 public void LoadTab(QueryInfo query, Type content_type)
 {
     foreach (Content content in content_list)
         if (content.GetType() == content_type)
             LoadTab (content, query);
 }
Exemple #2
0
 /// <summary>
 /// Load the specified content info.
 /// </summary>
 public void LoadTab(QueryInfo query)
 {
     LoadTab (active_content, query);
 }
Exemple #3
0
 /// <summary>
 /// Load the specified content info.
 /// </summary>
 public void LoadTab(Content content, QueryInfo query)
 {
     tabs.Page = tabs.PageNum (content.DisplayWidget);
     LoadContent (active_content, query);
 }
Exemple #4
0
        /// <summary>
        /// Load the specified content info.
        /// </summary>
        public void LoadContent(Content content, QueryInfo query)
        {
            string url = content.GetQuery (query);
            if (url == null)
                return;

            content.ShowLoading ();

            XmlDocument doc = content.LoadXml (url);
            if (doc != null)
            {
                content.Load (doc, query);
                content.HideLoading ();
            }
        }
Exemple #5
0
 public abstract void Load(XmlDocument doc, QueryInfo query);
Exemple #6
0
 public abstract string GetQuery(QueryInfo query);
Exemple #7
0
        public bool Equals(QueryInfo query, params QueryField[] fields)
        {
            if (query == null)
                return false;

            foreach (QueryField field in fields)
            {
                switch (field)
                {
                    case QueryField.Artist:
                        if (this.Artist != query.Artist)
                            return false;
                        break;

                    case QueryField.Title:
                        if (this.Title != query.Title)
                            return false;
                        break;

                    case QueryField.Album:
                        if (this.Album != query.Album)
                            return false;
                        break;

                    case QueryField.Username:
                        if (this.Username != query.Username)
                            return false;
                        break;
                }
            }

            return true;
        }