FileCheck() public method

public FileCheck ( string header ) : string
header string
return string
Example #1
0
        public Toast(string header, string body)
        {
            XmlDocument doc = new XmlDocument();;

            doc = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);

            var        test  = doc.DocumentElement;
            XmlElement audio = doc.CreateElement("audio");

            if (!string.IsNullOrEmpty(sound.FileCheck(header)))
            {
                audio.SetAttribute("silent", "true");
            }
            test.AppendChild(audio);
            doc = test.OwnerDocument;

            var toastXml = doc;

            var stringElements = toastXml.GetElementsByTagName("text");

            if (stringElements.Length == 2)
            {
                stringElements[0].AppendChild(toastXml.CreateTextNode(header));
                stringElements[1].AppendChild(toastXml.CreateTextNode(body));
            }

            this.toast = new ToastNotification(toastXml);
        }
Example #2
0
        public Toast(string header, string body)
        {
            this.request = new ToastRequest
            {
                ToastHeadline = header,
                ToastBody     = body,
#if DEBUG
                ShortcutFileName = "제독업무도 바빠! (debug).lnk",
#else
                ShortcutFileName = "제독업무도 바빠!.lnk",
#endif
                ShortcutTargetFilePath = Assembly.GetEntryAssembly().Location,
                AppId = AppId,
            };

            if (!string.IsNullOrEmpty(sound.FileCheck(header)))
            {
                this.request.ToastAudio = ToastAudio.Silent;
            }

            if (KanColleViewer.Models.Settings.KanColleSettings.NotifyMuteOnMute)
            {
                if (KanColleViewer.Models.Volume.GetInstance().IsMute)
                {
                    // 칸코레 뷰어가 음소거 상태라면 알람도 음소거
                    this.request.ToastAudio = ToastAudio.Silent;
                }
            }
        }
Example #3
0
        public Toast(string header, string body)
        {
            this.request = new ToastRequest
            {
                ToastHeadline = header,
                ToastBody     = body,
#if DEBUG
                ShortcutFileName = "제독업무도 바빠! (debug).lnk",
#else
                ShortcutFileName = "제독업무도 바빠!.lnk",
#endif
                ShortcutTargetFilePath = Assembly.GetEntryAssembly().Location,
                AppId = AppId,
            };

            if (!string.IsNullOrEmpty(sound.FileCheck(header)))
            {
                this.request.ToastAudio = ToastAudio.Silent;
            }
        }