public BroadcastEngine(SlideGenerator slidegen) { this.slidegen = slidegen; this.slidecart = new List<string>(); try { this.broadcastperiod = CMSConfig.broadcastdelay; } catch { this.broadcastperiod = 10; } this.timer = new DispatcherTimer(); this.timer.Interval = TimeSpan.FromSeconds(broadcastperiod); this.timer.Tick += new EventHandler(timer_Tick); this.outputStomp = new OutputStomp(this.slidegen); this.outputFtp = new OutputFtp(); this.outputFtp.onUploadEnd += this.outputStomp.sendToStompProcess; this.outputFtp.onUploadEnd += new OutputFtp.OutputEvent(outputFtp_onUploadEnd); timer_Tick(this, new EventArgs()); }
private ContentManagerCore() { try { debug = System.Configuration.ConfigurationManager.AppSettings["debug"].Equals("true"); datafolder = System.Configuration.ConfigurationManager.AppSettings["DataFolder"]; tmpfolder = System.Configuration.ConfigurationManager.AppSettings["TmpFolder"]; if (!Directory.Exists(datafolder) && !File.Exists(datafolder + "\\config.xml") && ApplicationDeployment.IsNetworkDeployed) datafolder = ApplicationDeployment.CurrentDeployment.DataDirectory + "\\" + datafolder; if (!Directory.Exists(tmpfolder) && ApplicationDeployment.IsNetworkDeployed) tmpfolder = ApplicationDeployment.CurrentDeployment.DataDirectory + "\\" + tmpfolder; try { if (!Directory.Exists(tmpfolder)) Directory.CreateDirectory(tmpfolder); this.slidegen = new SlideGenerator(datafolder + "\\config.xml", datafolder + "\\variables.xml", datafolder, tmpfolder); } catch (Exception e) { MessageBox.Show(e.Message); Environment.Exit(1); } try { if (CMSConfig.inputtype.ToUpper() == "HTTP") this.input = new InputHTTPKayak(this); else if (CMSConfig.inputtype.ToUpper() == "WCF") this.input = new InputWCF(this); else { MessageBox.Show("There is no InputMethod key in the configuration file", "Error: Bad Configuration"); Environment.Exit(1); } } catch (Exception e) { MessageBox.Show(e.Message); } this.engine = new BroadcastEngine(slidegen); this.engine.setSlideCart(this.getAutoSlides()); if(this.engine.slidecart.Count != 0) this.engine.startAutoBroadcast(); } catch(Exception e) { MessageBox.Show("Error when starting: "+e.Message); } }
public ContentAutoBroadcast(SlideGenerator slidegen, ServiceHost host) { this.slides = new List<String>(); this.slidegen = slidegen; this.host = host; timer = new DispatcherTimer(); this.timer.Interval = TimeSpan.FromSeconds(10); this.timer.Tick += new EventHandler(timer_Tick); }
private ContentManagerCore() { datafolder = System.Configuration.ConfigurationSettings.AppSettings["DataFolder"]; if (!Directory.Exists(datafolder) && !File.Exists(datafolder + "\\conf.xml") && ApplicationDeployment.IsNetworkDeployed) datafolder = ApplicationDeployment.CurrentDeployment.DataDirectory + "\\" + datafolder; this.slidegen = new SlideGenerator(datafolder + "\\conf.xml"); if (System.Configuration.ConfigurationSettings.AppSettings["InputMethod"] == "HTTP") this.input = new InputHTTP(this); else if (System.Configuration.ConfigurationSettings.AppSettings["InputMethod"] == "WCF") this.input = new InputWCF(this); else { MessageBox.Show("There is no InputMethod key in the configuration file", "Error: Bad Configuration"); } this.engine = new BroadcastEngine(slidegen); this.engine.setSlideCart(this.getAutoSlides()); this.engine.startAutoBroadcast(); }
public OutputStomp(SlideGeneratorLib.SlideGenerator slidegen) { this.slidegen = slidegen; }