Close() 공개 메소드

public Close ( ) : void
리턴 void
예제 #1
0
파일: person.cs 프로젝트: GNOME/chronojump
    void on_button_take_photo_clicked(object o, EventArgs args)
    {
        List<LongoMatch.Video.Utils.Device> devices = LongoMatch.Video.Utils.Device.ListVideoDevices();
        if(devices.Count == 0) {
            new DialogMessage(Constants.MessageTypes.WARNING, Constants.CameraNotFound);
            return;
        }

        //deactivate camera to allow camera on edit person. videoOn will have same value to light checkbutton again later
        app1_checkbutton_video.Active = false;

        capturer = new CapturerBin();
        CapturePropertiesStruct s = new CapturePropertiesStruct();

        s.DeviceID = devices[0].ID;

        s.CaptureSourceType = CaptureSourceType.System;

        capturer.CaptureProperties = s;
        capturer.Type = CapturerType.Snapshot;
        capturer.Visible=true;
        capturer.NewSnapshot += on_snapshot_done;
        capturer.NewSnapshotMini += on_snapshot_mini_done;

        capturerWindow = new Gtk.Window("Capturer");
        capturerWindow.Add(capturer);
        capturerWindow.Modal=true;
        capturerWindow.SetDefaultSize(400,400);

        person_win.Hide();

        capturerWindow.ShowAll();
        capturerWindow.Present();
        capturerWindow.DeleteEvent += delegate(object sender, DeleteEventArgs e) {capturer.Close(); capturer.Dispose(); person_win.Show(); };

        capturer.Run();
    }
예제 #2
0
    void on_button_take_photo_clicked(object o, EventArgs args)
    {
        capturer = new CapturerBin();
        CapturePropertiesStruct s = new CapturePropertiesStruct();

        s.CaptureSourceType = CaptureSourceType.Raw;

        capturer.CaptureProperties = s;
        capturer.Type = CapturerType.Snapshot;
        capturer.Visible=true;
        capturer.NewSnapshot += on_snapshot_done;
        capturer.NewSnapshotMini += on_snapshot_mini_done;

         		capturerWindow = new Gtk.Window("Capturer");
        capturerWindow.Add(capturer);
        capturerWindow.Modal=true;

        person_win.Hide();

        capturerWindow.ShowAll();
        capturerWindow.Present();
        capturerWindow.DeleteEvent += delegate(object sender, DeleteEventArgs e) {capturer.Close(); capturer.Dispose(); person_win.Show(); };
        capturer.Run();
    }