static public Timeline LoadFromText(string name, string text)
 {
     TimelineConfig config = TimelineConfigParser.TimelineConfig.Parse(text);
     foreach (AlertAll alertAll in config.AlertAlls)
     {
         foreach (TimelineActivity matchingActivity in config.Items.FindAll(activity => activity.Name == alertAll.ActivityName))
         {
             var alert = new ActivityAlert { Activity = matchingActivity, ReminderTimeOffset = alertAll.ReminderTime, Sound = alertAll.AlertSound };
             config.Alerts.Add(alert);
         }
     }
     foreach (string activityName in config.HideAlls)
     {
         foreach (TimelineActivity matchingActivity in config.Items.FindAll(activity => activity.Name == activityName))
         {
             matchingActivity.Hidden = true;
         }
     }
     return new Timeline(name, config.Items, config.Anchors, config.Alerts, config.AlertSoundAssets);
 }
Example #2
0
        void ProcessAlert(ActivityAlert alert)
        {
            //TTSクラスならACT本体に読み上げさせる
            if (alert.Sound is AlertTTS)
            {
                ActGlobals.oFormActMain.TTS(alert.Sound.Filename);
            }
            else
            if (PlaySoundByACT)
            {
                ActGlobals.oFormActMain.PlaySoundMethod(alert.Sound.Filename, 100);
            } else {
                soundplayer.PlaySound(alert.Sound.Filename);
            }

            alert.Processed = true;
        }
Example #3
0
        void ProcessAlert(ActivityAlert alert)
        {
            if (PlaySoundByACT)
            {
                ActGlobals.oFormActMain.PlaySoundMethod(alert.Sound.Filename, 100);
            } else {
                soundplayer.PlaySound(alert.Sound.Filename);
            }

            alert.Processed = true;
        }