private ListViewItem GetListViewItemFromNotification(Notification notif)
        {
            ListViewItem item = new ListViewItem();

            switch (notif.Type)
            {
                case NotificationType.Log:
                    LogInfo log = (LogInfo)notif.Tag;
                    item.Text = log.Name;                                    // 0
                    item.SubItems.Add(log.Target);                           // 1
                    item.SubItems.Add(log.Status);                           // 2
                    item.SubItems.Add(log.UpdatedTime.ToString());           // 3
                    item.SubItems.Add(log.StartedTime.ToString());           // 4
                    if (log.CompletedTime.Equals(DateTime.MinValue))
                    {
                        item.SubItems.Add("-");                              // 5
                    }
                    else
                    {
                        item.SubItems.Add(log.CompletedTime.ToString());     // 5
                    }
                    item.Tag = log.Id;

                    break;

                case NotificationType.DatabaseReplaced:
                case NotificationType.DatabaseMerged:
                    item.Text = IsJapanese ? "�f�[�^�x�[�X���ύX����܂���" : "Database changed"; // 0
                    item.SubItems.Add("-"); // 1
                    item.SubItems.Add("-"); // 2
                    item.SubItems.Add("-"); // 3
                    item.SubItems.Add("-"); // 4
                    item.SubItems.Add("-"); // 5
                    break;

                default:
                    break;
            }

            return item;
        }
        private void AddNotification(Notification notif)
        {
            lock (_notificationLock)
            {
                // �Â��̂͂����ō폜���Ă��܂��B
                for (int i = _notificationList.Count - 1; i >= 0; i--)
                {
                    Notification n = (Notification)_notificationList[i];
                    if (DateTime.Now - n.CreatedTime > MaxNotificationLife)
                    {
                        _notificationList.RemoveAt(i);
                    }
                }

                // �lj����āA
                _notificationList.Add(notif);

                // ����������
                Monitor.PulseAll(_notificationLock);
            }
        }
        public void ReplaceDataSet(DataSet ds, Database.ChangeReason reason)
        {
            Database.Instance.Replace(ds);

            // ���R�ɉ����āANotification���΂��B
            Notification notif = new Notification();
            notif.Type = NotificationType.DatabaseReplaced;

            // �^�O�ɂ̓f�[�^�Z�b�g���̂�̂�����B
            notif.Tag = ds;

            AddNotification(notif);
        }
 public void RegisterJob(int jobId)
 {
     Notification notif = new Notification();
     notif.Type = NotificationType.Log;
     LogInfo info = new LogInfo();
     info.Name = "RegisterJob";
     notif.Tag = info;
     AddNotification(notif);
 }