Exemplo n.º 1
0
        /// <summary>
        /// 指定したジョブを削除
        /// </summary>
        /// <param name="detail">指定したジョブの詳細</param>
        public void RemoveJob(ViewModel::JobDetail detail)
        {
            var index = Details.IndexOf(detail);

            if (!index.Equals(-1))
            {
                _File.Jobs.RemoveAt(index);
                Details.RemoveAt(index);

                Save();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// ジョブ詳細.View
        /// </summary>
        /// <param name="job">ジョブファイル</param>
        public JobDetail(ViewModel::JobDetail viewModel)
        {
            InitializeComponent();

            if (DataContext is IDisposable dispose)
            {
                dispose.Dispose();
                dispose = null;
            }

            viewModel.PropertyChanged += OnPropertyChanged;
            DataContext = viewModel;
        }