Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool Contain(DatabaseScreen item)
 {
     for (int i = 0; i < this.Count; i++)
     {
         if (this[i] == item)
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        /// <exception cref="ArgumentNullException"><c>item</c> is null.</exception>
        /// <exception cref="ArgumentException"><c>ArgumentException</c>.</exception>
        public void Add(DatabaseScreen item)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            string screenCD = item.ScreenCD.NVL(string.Empty);

            if (m_databaseScreenList.FoundKey(screenCD))
            {
                throw new ArgumentException(String.Format("Key: \"{0}\" has already exists.", screenCD));
            }

            this.m_databaseScreenList.Put(screenCD, item);
        }
Exemple #3
0
        /// <summary>
        /// Check if that found database screen.
        /// If found database screen, will cache it.
        /// </summary>
        /// <param name="screenCode">screenCode</param>
        /// <returns>Boolean</returns>
        public bool IsFoundDatabaseScreen(string screenCode)
        {
            if (!DatabaseScreenList.ContainKeys(screenCode))
            {
                // Load from database and store into cache.
                DatabaseScreen databaseScreen = m_bizScreen.LoadScreen(new NZString(null, screenCode));

                if (databaseScreen == null)
                {
                    return(false);
                }

                // Add to image cache.
                DatabaseScreenList.Add(databaseScreen);
                return(true);
            }

            return(true);
        }
Exemple #4
0
 public ProgramScreen(InternalScreen internalScreen, DatabaseScreen databaseScreen)
 {
     this.m_internalScreen = internalScreen;
     this.m_databaseScreen = databaseScreen;
 }
Exemple #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="item"></param>
        public void Remove(DatabaseScreen item)
        {
            string screenCD = item.ScreenCD.NVL(string.Empty);

            this.m_databaseScreenList.Remove(screenCD);
        }