Close() public method

public Close ( ) : void
return void
Ejemplo n.º 1
0
    /* ---------------------------------------------------------
     * ----------------  EVENTS PLAY VIDEO ---------------------
     *  --------------------------------------------------------
     */
    //Not used on encoder
    private bool playVideo(string fileName, bool play)
    {
        if(File.Exists(fileName)) {
            LogB.Information("Play video starting...");
            PlayerBin player = new PlayerBin();
            player.Open(fileName);

            //without these lines works also but has less functionalities (speed, go to ms)
            Gtk.Window d = new Gtk.Window(Catalog.GetString("Playing video"));
            d.Add(player);
            d.Modal = true;
            d.SetDefaultSize(500,400);
            d.ShowAll();
            d.DeleteEvent += delegate(object sender, DeleteEventArgs e) {player.Close(); player.Dispose();};

            if(play) {
                LogB.Information("Play video playing...");
                player.Play();
            }
            return true;
        }
        return false;
    }
Ejemplo n.º 2
0
    private void on_button_video_watch_clicked(object o, EventArgs args)
    {
        if(File.Exists(videoFileName)) {
            Log.WriteLine("Exists and clicked " + videoFileName);

            PlayerBin player = new PlayerBin();
            player.Open(videoFileName);

            Gtk.Window d = new Gtk.Window(Catalog.GetString("Playing video"));
            d.Add(player);
            d.Modal = true;
            d.ShowAll();
            d.DeleteEvent += delegate(object sender, DeleteEventArgs e) {player.Close(); player.Dispose();};
            player.Play();
        }
    }