Esempio n. 1
0
        //        protected override void OnDeleteTask (Task task)
        //        {
        //            task.Delete ();
        //            base.OnDeleteTask (task);
        //        }
        public override void Initialize()
        {
            if (Database == null)
                Database = new Database ();

            Database.Open ();

            RefreshCategories ();
            RefreshTasks ();

            Initialized = true;
        }
Esempio n. 2
0
        public void Initialize()
        {
            if(db == null)
                db = new Database();

            db.Open();

            //
            // Add in the "All" Category
            //
            AllCategory allCategory = new Tasque.AllCategory ();
            Gtk.TreeIter iter = categoryListStore.Append ();
            categoryListStore.SetValue (iter, 0, allCategory);

            RefreshCategories();
            RefreshTasks();

            initialized = true;
            if(BackendInitialized != null) {
                BackendInitialized();
            }
        }
Esempio n. 3
0
        public void Cleanup()
        {
            this.categoryListStore.Clear();
            this.taskStore.Clear();
            this.taskIters.Clear();

            if (db != null)
                db.Close();
            db = null;
            initialized = false;
        }