Ejemplo n.º 1
0
        /// <summary>
        /// 終了処理
        /// </summary>
        public void Dispose()
        {
            if (_Calendar != null)
            {
                _Calendar.Dispose();
                _Calendar = null;
            }

            if (_Timer != null)
            {
                _Timer.PropertyChanged -= OnTimerPropertyChanged;
                _Timer.Dispose();
                _Timer = null;
            }

            if (_Schedule != null)
            {
                _Schedule.Dispose();
                _Schedule = null;
            }

            if (_TabItem != null)
            {
                _TabItem.PropertyChanged -= OnTabItemPropertyChanged;
                _TabItem.Dispose();
                _TabItem = null;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// メニュー.ViewModel
        /// </summary>
        public MainMenu()
        {
            _Calendar = new Model::Calendar();

            _Timer = new Model::Timer();
            _Timer.PropertyChanged += OnTimerPropertyChanged;

            _Schedule = new Model::Schedule();

            _TabItem = new Model::TabItem();
            _TabItem.PropertyChanged += OnTabItemPropertyChanged;

            // 初期値表示
            _TabItem.AddTabItem(Properties.Title.Calendar, new Calendar::Calendar());
            _TabItem.AddTabItem(Properties.Title.JobList, new Job::JobList());
            SelectedTabIndex = 0;
        }