Ejemplo n.º 1
0
 private void Template_Playing(object sender, API.PlayingEventArgs e)
 {
     try
     {
         CheckExecuteOnGUIThread(() => CheckParameters());
     }
     catch (Exception ex) //Always catch exceptions in template calls. If not the template might restart in a new process.
     {
         m_Template.Debug(API.DebugLevel.High, API.DebugCategory.Error, "Failed to play " + Environment.NewLine + ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void Template_TemplateFileDeleted(object sender, API.TemplateFileEventArgs e)
 {
     m_Template.Debug(API.DebugLevel.High, API.DebugCategory.Information, "File deleted " + e.TemplateFile.Name);
     Console.WriteLine("File deleted " + e.TemplateFile.Name);
 }
Ejemplo n.º 3
0
        private void Template_Loaded(object sender, API.LoadedEventArgs e)
        {
            try
            {
                m_Template.SetState(API.State.Initializing, "Initializing MediaTemplate");

                Initialize();
            }
            catch (Exception ex) //Always catch exceptions in template calls. If not the template might restart in a new process.
            {
                m_Template.Debug(API.DebugLevel.High, API.DebugCategory.Error, "Failed to initialize" + Environment.NewLine + ex.ToString());
                m_Template.MediaEnded();
            }
        }