/// <summary>
        /// 建立年班檢視。
        /// </summary>
        public TreeNavViewBase()
        {
            InitializeComponent();

            NameComparer = new CustomStringComparer();
            KCFactory    = new KeyCatalogFactory()
            {
                NameSorter = KeyCatalogComparer, ToStringFormatter = KeyCatalogTitleFormat
            };
            ShowRoot      = true;
            RootCaption   = "所有項目";
            Loading       = new Node("讀取中...");
            UISyncContext = TaskScheduler.FromCurrentSynchronizationContext();

            //當 Student.SetFilteredSource 被呼叫時。
            SourceChanged += new EventHandler(StudentGradeClassView_SourceChanged);

            try
            {//在設計模式下會爆炸,懶得處理了...
                if (Backend == null)
                {
                    Backend = new FISCA.Data.QueryHelper();
                }
            }
            catch { }
        }
Esempio n. 2
0
 internal KeyCatalog(string name, KeyCatalogFactory factory)
 {
     Tag         = null;
     Name        = name;
     Factory     = factory == null ? new KeyCatalogFactory() : factory;
     Subcatalogs = new KeyCatalogCollection(factory);
     _keys       = new HashSet <string>();
 }
        /// <summary>
        /// 建立年班檢視。
        /// </summary>
        public TreeNavViewBase()
        {
            InitializeComponent();

            NameComparer = new CustomStringComparer();
            KCFactory = new KeyCatalogFactory() { NameSorter = KeyCatalogComparer, ToStringFormatter = KeyCatalogTitleFormat };
            ShowRoot = true;
            RootCaption = "所有項目";
            Loading = new Node("讀取中...");
            UISyncContext = TaskScheduler.FromCurrentSynchronizationContext();

            //當 Student.SetFilteredSource 被呼叫時。
            SourceChanged += new EventHandler(StudentGradeClassView_SourceChanged);

            try
            {//在設計模式下會爆炸,懶得處理了...
                if (Backend == null)
                    Backend = new FISCA.Data.QueryHelper();
            }
            catch { }
        }
 /// <summary>
 ///
 /// </summary>
 public KeyCatalogCollection(KeyCatalogFactory factory)
 {
     Factory = factory == null ? new KeyCatalogFactory() : factory;
 }
 /// <summary>
 /// 
 /// </summary>
 public KeyCatalogCollection(KeyCatalogFactory factory)
 {
     Factory = factory == null ? new KeyCatalogFactory() : factory;
 }