public ChatForm(PlayerForm parent, Stream stream) { InitializeComponent(); this.Chat.DoubleClick += ChatDoubleClick; // setup mouse handlers. this.Chat.MouseDown += ChatMouseDown; this.Chat.MouseUp += ChatMouseUp; this.Chat.MouseMove += ChatMouseMove; this._stream = stream; // set the stream. this._parent = parent; this._parent.Move += OnParentMove; this._parent.Resize += OnParentResize; this._parent.FormClosed += OnParentClose; this.Width = EmbeddedModules.Streams.Settings.ModuleSettings.Instance.ChatWindowWidth; this.Height = EmbeddedModules.Streams.Settings.ModuleSettings.Instance.ChatWindowHeight; }
void PlayerClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) { this._player = null; }
private void Play() { if (GlobalSettings.Instance.UseInternalViewers) // if internal-viewers method is selected { if (this._player == null) { this._player = new PlayerForm(this); this._player.FormClosed += PlayerClosed; this._player.Show(); } else this._player.Focus(); } else System.Diagnostics.Process.Start(this.Link, null); // render the stream with default web-browser. }