Esempio n. 1
0
        /*
         * Loads the selected database
         * returns true if OK.
         */
        private bool LoadDB(string filename)
        {
            Kvadblib.Hnd    hnd = new Kvadblib.Hnd();
            Kvadblib.Status status;

            Kvadblib.Open(out hnd);

            status = Kvadblib.ReadFile(hnd, filename);

            if (status == Kvadblib.Status.OK)
            {
                dh = hnd;
            }

            return(status == Kvadblib.Status.OK);
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();

            Kvadblib.Status dbstatus;
            //Load database
            dbhandle = new Kvadblib.Hnd();
            dbstatus = Kvadblib.Open(out dbhandle);
            dbstatus = Kvadblib.ReadFile(dbhandle, DBCPath);

            idBox.Text    = "318";
            DLCBox.Text   = "8";
            dataBox0.Text = "02";
            flagsBox.Text = "0";

            //Sets up a BackgroundWorker and adds delegates to
            //the DumpMessageLoop and ProcessMessage methods
            dumper         = new BackgroundWorker();
            dumper.DoWork += DumpMessageLoop;
            dumper.WorkerReportsProgress = true;
            dumper.ProgressChanged      += new ProgressChangedEventHandler(ProcessMessage);
        }