예제 #1
0
        public static CategoryManager getInstance()
        {
            if (instance == null)
                instance = new CategoryManager();

            return instance;
        }
        public CategoryWindow()
        {
            InitializeComponent();

            // Get CategoryManager
            categoryManager = CategoryManager.getInstance();

            // Bind Window list to Category list
            this.categoryList.ItemsSource = categoryManager.CategoryList;

            // Disable while no category is selected
            this.buttonEdit.IsEnabled = false;
            this.buttonDelete.IsEnabled = false;
        }