public FormSendeplan() { instance = this; InitializeComponent(); lastDownload = new DateTime(1990, 1, 1, 1, 1, 1); lblSendeplanTitle.Text = "Empfange Update.."; PlanScheduleUpdateTimer.Enabled = true; //Download new Schedule Data with a short delay }
private bool useRBTVAPI = true; // if false Google API will be used #endregion Fields #region Constructors public FormSendeplan() { instance = this; InitializeComponent(); lastDownload = new DateTime(1990, 1, 1, 1, 1, 1); lblSendeplanTitle.Text = "Empfange Update.."; PlanScheduleUpdateTimer.Enabled = true; //Download new Schedule Data with a short delay }
//private Point browserInitPosition; // Was used for an early version for twitter support, using twitters api is probably better. The browser had to be moved so that the twitter feed was fully shown in the small window public Form1() { instance = this; InitializeComponent(); // Register Handlers to detect mouse over, mouse leaving, mouse entering etc! // The Forms handlers don't detect mouse events in children btnMove.MouseMove += new MouseEventHandler(MainFormMouseMove); btnMove.MouseDown += new MouseEventHandler(MainFormMouseDown); btnScale.MouseMove += new MouseEventHandler(MainFormMouseScale); btnScale.MouseDown += new MouseEventHandler(MainFormMouseDown); this.MouseMove += new MouseEventHandler(Form1_MouseMove); Application.AddMessageFilter(this); // Create Schedule formSendeplan = new FormSendeplan(); this.AddOwnedForm(formSendeplan); // TWITCH PLAYERS // standard: // axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf"; // axShockwaveFlash1.FlashVars = "id=ember860-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=6e2bb194806590dc&test_environment_url=http://www.twitch.tv&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; // this one doesnt't show the twitch logo: axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf?channel=rocketbeanstv&playerType=facebook"; // register boss key! setHotKey(KeyModifiers.Alt, Keys.Y); // Display current verison and kick off Version Check lblVersion.Text = "Version: " + CURRENT_VERSION; tmrAsyncLoading.Start(); //Set perfect ratio Size tmpSize = this.Size; tmpSize = (Size)RocketbeansPIP.Properties.Settings.Default["Size"]; // Load last window size tmpSize.Width = (int)((tmpSize.Height) * 1.7778f); // 1.777778f = 16/9, probalby causes rounding errors tmpSize.Width += ExtraWidth; //add ChatSize (ExtraWidth) to perfect aspect ratio this.Size = tmpSize; axShockwaveFlash1.Width = Size.Width - ExtraWidth; //set size of flash object without ChatSize (ExtraWidth) this.Location = (Point)Properties.Settings.Default["Location"]; //Load last window location ChatState = (int)Properties.Settings.Default["ChatState"]; //Load last chat state // We need the display resultion, so that the schedule will never open outside of the screen Screen screen = GetCurrentScreen(); if (screen == null) { this.Location = new Point(640, 320); } }
public Form1() { InitializeComponent(); btnMove.MouseMove += new MouseEventHandler(MainFormMouseMove); btnMove.MouseDown += new MouseEventHandler(MainFormMouseDown); btnScale.MouseMove += new MouseEventHandler(MainFormMouseScale); btnScale.MouseDown += new MouseEventHandler(MainFormMouseDown); this.MouseMove += new MouseEventHandler(Form1_MouseMove); //this.OnMouseLeave += new MouseEventHandler(Form1_MouseMove); Application.AddMessageFilter(this); // axShockwaveFlash1.AllowFullScreen = "1"; axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf"; // axShockwaveFlash1.FlashVars = "id=ember891-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=96389b8253f808ef&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; axShockwaveFlash1.FlashVars = "id=ember860-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=6e2bb194806590dc&test_environment_url=http://www.twitch.tv&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; setHotKey(KeyModifiers.Alt, Keys.Y); //browserInitPosition = webBrowser1.Location; //Set perfect ratio Size tmpSize = this.Size; tmpSize = (Size)RocketbeansPIP.Properties.Settings.Default["Size"]; tmpSize.Width = (int)((tmpSize.Height) * 1.7778f); tmpSize.Width += ExtraWidth; this.Size = tmpSize; axShockwaveFlash1.Width = Size.Width - ExtraWidth; this.Location = (Point)Properties.Settings.Default["Location"]; setChatState(0); chatState = (int)Properties.Settings.Default["ChatState"]; /*if (chatState != 0) { tmrAsyncLoading.Start(); }*/ updateChatState(); Screen screen = GetCurrentScreen(); if (screen == null) { this.Location = new Point(640, 320); } formSendeplan = new FormSendeplan(); this.AddOwnedForm(formSendeplan); int currentVersion = 2; int newestVersion = -1; string newVersion = DownloadFileFromDropbox(""); if (newVersion == "") { newVersion = "-1"; } try { newestVersion = int.Parse(newVersion); } catch (Exception) { newestVersion = -1; } if (currentVersion < newestVersion) { MessageBox.Show("Eine neue Version ist Verfügbar!"); } }
//private Point browserInitPosition; // Was used for an early version for twitter support, using twitters api is probably better. The browser had to be moved so that the twitter feed was fully shown in the small window public Form1() { instance = this; SetBrowserFeatureControl(); InitializeComponent(); lastViewerUpdate = DateTime.Now; // Register Handlers to detect mouse over, mouse leaving, mouse entering etc! // The Forms handlers don't detect mouse events in children btnMove.MouseMove += new MouseEventHandler(MainFormMouseMove); btnMove.MouseDown += new MouseEventHandler(MainFormMouseDown); btnScale.MouseMove += new MouseEventHandler(MainFormMouseScale); btnScale.MouseDown += new MouseEventHandler(MainFormMouseDown); this.MouseMove += new MouseEventHandler(Form1_MouseMove); Application.AddMessageFilter(this); // Create Schedule formSendeplan = new FormSendeplan(); this.AddOwnedForm(formSendeplan); DownloadStringAsync("https://www.youtube.com/user/" + channelName + "/videos?sort=dd&view=2&shelf_id=4&live_view=501", DownloadYoutubeLivestreamListCompleted); // TWITCH PLAYERS // standard: // axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf"; // axShockwaveFlash1.FlashVars = "id=ember860-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=6e2bb194806590dc&test_environment_url=http://www.twitch.tv&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; // this one doesnt't show the twitch logo: //OLD TWITCH //axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf?channel=rocketbeanstv&playerType=facebook"; //NEW YOUTUBE //axShockwaveFlash1.Movie = "https://www.youtube.com/v/" + ytStreamid + "?version=3&autoplay=true"; // Works but is depricated ytStreamid = (string)Properties.Settings.Default["LastStreamId"]; //get last stream id if (ytStreamid != null && ytStreamid.Length > 0) { // MessageBox.Show("new stream: " + ytStreamid); webBrowserMovie.Url = new Uri("https://gaming.youtube.com/embed/" + ytStreamid + "/?autoplay=1&vq=hd1080&modestbranding=0&showinfo=0&theme=dark&iv_load_policy=1&fs=0"); //iv_load_policy 3 = hide video notes webBrowserMovie.Refresh(); } // DownloadStringAsync("https://www.youtube.com/user/"+ channelName + "/videos?view=2&live_view=501&flow=grid", DownloadYoutubePageCompleted); // // register boss key! setHotKey(KeyModifiers.Alt, Keys.Y); // Display current verison and kick off Version Check lblVersion.Text = "Version: " + CURRENT_VERSION; tmrAsyncLoading.Start(); SetPerfectAspectRatio(); this.Location = (Point)Properties.Settings.Default["Location"]; //Load last window location ChatState = (int)Properties.Settings.Default["ChatState"]; //Load last chat state // We need the display resultion, so that the schedule will never open outside of the screen Screen screen = GetCurrentScreen(); if (screen == null) { this.Location = new Point(640, 320); } }
public Form1() { InitializeComponent(); btnMove.MouseMove += new MouseEventHandler(MainFormMouseMove); btnMove.MouseDown += new MouseEventHandler(MainFormMouseDown); btnScale.MouseMove += new MouseEventHandler(MainFormMouseScale); btnScale.MouseDown += new MouseEventHandler(MainFormMouseDown); this.MouseMove += new MouseEventHandler(Form1_MouseMove); //this.OnMouseLeave += new MouseEventHandler(Form1_MouseMove); Application.AddMessageFilter(this); // axShockwaveFlash1.AllowFullScreen = "1"; axShockwaveFlash1.Movie = "http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf"; // axShockwaveFlash1.FlashVars = "id=ember891-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=96389b8253f808ef&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; axShockwaveFlash1.FlashVars = "id=ember860-flash-player&hide_chat=true&channel=rocketbeanstv&embed=0&auto_play=true&device_id=6e2bb194806590dc&test_environment_url=http://www.twitch.tv&eventsCallback=Twitch.player.FlashPlayer2.callbacks.callback0"; setHotKey(KeyModifiers.Alt, Keys.Y); //browserInitPosition = webBrowser1.Location; //Set perfect ratio Size tmpSize = this.Size; tmpSize = (Size)RocketbeansPIP.Properties.Settings.Default["Size"]; tmpSize.Width = (int)((tmpSize.Height) * 1.7778f); tmpSize.Width += ExtraWidth; this.Size = tmpSize; axShockwaveFlash1.Width = Size.Width - ExtraWidth; this.Location = (Point)Properties.Settings.Default["Location"]; setChatState(0); chatState = (int)Properties.Settings.Default["ChatState"]; /*if (chatState != 0) * { * tmrAsyncLoading.Start(); * }*/ updateChatState(); Screen screen = GetCurrentScreen(); if (screen == null) { this.Location = new Point(640, 320); } formSendeplan = new FormSendeplan(); this.AddOwnedForm(formSendeplan); int currentVersion = 2; int newestVersion = -1; string newVersion = DownloadFileFromDropbox(""); if (newVersion == "") { newVersion = "-1"; } try { newestVersion = int.Parse(newVersion); } catch (Exception) { newestVersion = -1; } if (currentVersion < newestVersion) { MessageBox.Show("Eine neue Version ist Verfügbar!"); } }