/// <summary>
        /// Start the plugin.
        /// </summary>
        public void Start()
        {
            // create the notification dialog once
            LiveScoreNotifyDialog.CreateNotifyDialog();

            // create a watcher to watch for the live settings file
            FileSystemWatcher fsw = new FileSystemWatcher();

            fsw.Filter = ScoreCenterPlugin.LiveSettingsFileName;
            fsw.Path   = Config.GetFolder(Config.Dir.Config);
            fsw.EnableRaisingEvents = true;
            fsw.NotifyFilter        = NotifyFilters.FileName;
            fsw.Created            += new FileSystemEventHandler(OnLiveSettingsCreated);
            fsw.Deleted            += new FileSystemEventHandler(OnLiveSettingsDeleted);
        }
Example #2
0
        private void Notify(BaseScore score, string message)
        {
            //Tools.LogMessage("\n>> Notify: {0}", message);
            string title = "";
            string icon  = "";

            if (score != null)
            {
                title = score.LocName;
                icon  = score.Image;
            }

            LiveScoreNotifyDialog dlg = (LiveScoreNotifyDialog)GUIWindowManager.GetWindow(LiveScoreNotifyDialog.SCORE_NOTIFY_DIALOG_ID);

            dlg.PlaySound = m_center.Setup.LivePlaySound;
            dlg.SetScore(title, icon, message);
            dlg.TimeOut = m_center.Setup.LiveNotifTime;
            dlg.DoModal(GUIWindowManager.ActiveWindow);
            //Tools.LogMessage("<< Notify\n");
        }