コード例 #1
0
        public static CategoryManager getInstance()
        {
            if (instance == null)
                instance = new CategoryManager();

            return instance;
        }
コード例 #2
0
        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;
        }