using EasyPipes; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; namespace SoraV2Utils_Service { public interface IToastNotification { void SendToastNotification(string xml, string title); } public class Notification { public static void SingleLine(string line1) { var client = new Client("SoraV2UtilsNotifcation"); var service = client.GetServiceProxy(); string xml = @" {0} "; xml = String.Format(xml, line1); try { service.SendToastNotification(xml, "SoraV2 Utils"); } catch (System.TimeoutException) { ServiceLogger.Instance.Log("SoraV2Utils_Agent is not responding..."); } } public static void TwoLine(string line1, string line2) { var client = new Client("SoraV2UtilsNotifcation"); var service = client.GetServiceProxy(); string xml = @" {0} {1} "; xml = String.Format(xml, line1, line2); try { service.SendToastNotification(xml, "SoraV2 Utils"); } catch (System.TimeoutException) { ServiceLogger.Instance.Log("SoraV2Utils_Agent is not responding..."); } } } }