Пример #1
0
        public LayoutEntry Item(string key)
        {
            //Return an existing entry object from the layout view
            LayoutEntry entry = null;

            try {
                //Merge from collection (dataset)
                if (key.Length > 0)
                {
                    DataRow[] rows = this.mLayout.LayoutTable.Select("Key='" + key + "'");
                    if (rows.Length == 0)
                    {
                        throw new ApplicationException("Entry " + key + " does not exist in this view!\n");
                    }
                    LayoutDS.LayoutTableRow row = (LayoutDS.LayoutTableRow)rows[0];
                    entry = new LayoutEntry(row, this.mMediator);
                    //entry.DataFile = App.LAYOUT_FILE;
                    entry.EntryChanged += new EventHandler(OnEntryChanged);
                }
                else
                {
                    entry = (LayoutEntry)Item();
                }
            }
            catch (Exception ex) { throw ex; }
            return(entry);
        }
Пример #2
0
        public LayoutEntry Item()
        {
            //Return a new blank entry object
            LayoutEntry entry = null;

            try {
                entry = new LayoutEntry(this.mMediator);
                //entry.DataFile = App.LAYOUT_FILE;
                entry.EntryChanged += new EventHandler(OnEntryChanged);
            }
            catch (Exception ex) { throw ex; }
            return(entry);
        }
Пример #3
0
 public bool Add(LayoutEntry entry)
 {
     //Add a new entry to the layout
     throw new ApplicationException("A schedule layout cannot add new members.");
 }
Пример #4
0
 public bool Remove(LayoutEntry entry)
 {
     //Remove the specified entry from the layout
     throw new ApplicationException("A schedule layout cannot remove existing memebers.");
 }