示例#1
0
        public void NotifyEvent(SyncronizerEvent item)
        {
            string imgUrl = "";
            switch (item.Level)
            {
                case EventLevel.ERROR:
                    imgUrl = "pack://application:,,,/Resources/error_67.png";
                    break;
                case EventLevel.WARN:
                    imgUrl = "pack://application:,,,/Resources/warn_67.png";
                    break;
                case EventLevel.INFO:
                    imgUrl = "pack://application:,,,/Resources/info_67.png";
                    break;
            }

            notifications.AddNotification(new Notification
            {
                Title = item.SyncFolderInfo.DisplayName,
                ImageUrl = imgUrl,
                Message = item.Message
            });
        }
 protected virtual void OnEvent(SyncronizerEvent e)
 {
     SyncronizerEventHandler handler = Event;
     if (handler != null)
     {
         handler(e);
     }
 }
示例#3
0
 private void syncronizer_Event(SyncronizerEvent e)
 {
     if (e.Exception is MissingRootSyncFolderException)
     {
         handleMissingSyncFolder(e.SyncFolderInfo);
     }
 }