Ejemplo n.º 1
0
        void SetBackend(Backend value)
        {
            if (value == backend)
                return;

            OnBackendChanging ();

            if (backend != null) {
                // Cleanup the old backend
                try {
                    Debug.WriteLine ("Cleaning up backend: {0}", backend.Name);
                    backend.Dispose ();
                } catch (Exception e) {
                    Trace.TraceWarning ("Exception cleaning up '{0}': {1}", backend.Name, e);
                }
            }

            // Initialize the new backend
            backend = value;
            if (backend == null)
                return;

            Trace.TraceInformation ("Using backend: {0} ({1})", backend.Name, backend.GetType ().ToString ());
            backend.Initialize ();

            OnBackendChanged ();
        }
Ejemplo n.º 2
0
        void SetCustomBackend()
        {
            // See if a specific backend is specified
            if (potentialBackendClassName != null) {
                Debug.WriteLine ("Backend specified: " + potentialBackendClassName);

                Assembly asm = Assembly.GetCallingAssembly ();
                try {
                    customBackend = (Backend)asm.CreateInstance (potentialBackendClassName);
                } catch (Exception e) {
                    Trace.TraceWarning ("Backend specified on args not found: {0}\n\t{1}",
                        potentialBackendClassName, e.Message);
                }
            }
        }
Ejemplo n.º 3
0
        public TaskWindow(Backend aBackend)
            : base(Gtk.WindowType.Toplevel)
        {
            this.backend = aBackend;
            taskGroups = new List<TaskGroup> ();
            noteDialogs = new Dictionary<Task, NoteDialog> ();
            InitWindow();

            Realized += OnRealized;
        }