Esempio n. 1
0
	internal DbImageCollection (IDbConnection dbc,
				    int _c_id,
				    DbImageRepository _repo)
	{
		db_conn = dbc;
		id_array = new ArrayList ();
		c_id = _c_id;
		repo = _repo;
		freeze_count = 0;
		updates_pending = false;

		this.UpdateCollectionInfo ();
		this.UpdateImageIDs ();
	}
Esempio n. 2
0
    internal DbImageCollection(IDbConnection dbc,
                               int _c_id,
                               DbImageRepository _repo)
    {
        db_conn         = dbc;
        id_array        = new ArrayList();
        c_id            = _c_id;
        repo            = _repo;
        freeze_count    = 0;
        updates_pending = false;

        this.UpdateCollectionInfo();
        this.UpdateImageIDs();
    }
Esempio n. 3
0
    static int Main(string [] args)
    {
        Application.Init();
//		string dbname = "mphoto";
        string dbname;
        string dirtoimport;
        string mphotodir = System.Environment.GetEnvironmentVariable("HOME") + "/.mphoto";

        dbname = "URI=file:" + mphotodir + "/" + "mphoto.db";

        IImageRepository repo;

        System.IO.DirectoryInfo dinfo = new System.IO.DirectoryInfo(mphotodir);
        dinfo.Create();

        // turn on sqlite debugging
//                int fd = open ("/tmp/sqlite.debug", 576, 420);
//                sqliteParserTrace (fdopen (fd, "rw"), ">");

        if (args.Length != 0)
        {
            repo = new DirImageRepository(args);
        }
        else
        {
            repo = new DbImageRepository(dbname);
        }

        MphotoToplevel tl = new MphotoToplevel(repo, args);

        tl.Toplevel.Show();

        try {
            Application.Run();
        } catch (TargetInvocationException e) {
            Console.WriteLine("TIE: " + e.InnerException);
        } finally {
            // yuck
            DbProvider.CloseProviders();
            Thumbnailer.KillThreads();
        }

        return(0);
    }
Esempio n. 4
0
	static int Main (string [] args)
	{
		Application.Init ();
//		string dbname = "mphoto";
                string dbname;
                string dirtoimport;
                string mphotodir = System.Environment.GetEnvironmentVariable ("HOME") + "/.mphoto";

                dbname = "URI=file:" + mphotodir + "/" + "mphoto.db";

                IImageRepository repo;

                System.IO.DirectoryInfo dinfo = new System.IO.DirectoryInfo (mphotodir);
                dinfo.Create ();

                // turn on sqlite debugging
//                int fd = open ("/tmp/sqlite.debug", 576, 420);
//                sqliteParserTrace (fdopen (fd, "rw"), ">");

		if (args.Length != 0) {
                    repo = new DirImageRepository (args);
                } else {
                    repo = new DbImageRepository (dbname);
                }

                MphotoToplevel tl = new MphotoToplevel (repo, args);
                tl.Toplevel.Show ();

		try {
			Application.Run ();
		} catch (TargetInvocationException e) {
			Console.WriteLine ("TIE: " + e.InnerException);
		} finally {
                        // yuck
                        DbProvider.CloseProviders ();
                        Thumbnailer.KillThreads ();
		}
		
		return 0;
	}