static void Main()
        {
            // .net stuff
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // initialize color palettes
            PalettesGDI.Initialize();

            // init bgf data model
            CurrentFile = new BgfFile();
            CurrentFile.Frames.AllowEdit = true;

            // init roomobject model for viewer
            RoomObject = new RoomObject();
            RoomObject.Resource = CurrentFile;

            // init imagecomposer for this roomobject
            ImageComposer = new ImageComposerGDI<RoomObject>();
            ImageComposer.UseViewerFrame = true;
            ImageComposer.DataSource = RoomObject;

            // init mainform
            MainForm = new MainForm();
            MainForm.FormClosed += OnMainFormFormClosed;
            MainForm.Show();

            // init shrinkform
            SettingsForm = new SettingsForm();
            SettingsForm.DataBindings.Add("Version", CurrentFile, "Version");
            SettingsForm.DataBindings.Add("ShrinkFactor", CurrentFile, "ShrinkFactor");
            SettingsForm.DataBindings.Add("Name", CurrentFile, "Name");

            // init addframsetindexform
            AddFrameSetIndexForm = new AddFrameSetIndexForm();

            // init ticker
            stopWatch = new Stopwatch();
            stopWatch.Start();

            // set running
            IsRunning = true;

            // start mainthread loop
            while (IsRunning)
            {
                long oldTick = Tick;

                // update current tick
                Tick = stopWatch.ElapsedTicks / MSTICKDIVISOR;

                long span = Tick - oldTick;

                // update roomobject
                if (IsPlaying)
                    RoomObject.Tick(Tick, span);

                // process window messages / events
                Application.DoEvents();

                // sleep
                Thread.Sleep(1);
            }
        }