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 (); }
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(); }
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); }
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; }