Beispiel #1
0
        static void Main(string[] args)
        {
            var grf = new GRF(GRF_PATH);

            System.Console.WriteLine(grf.FileCount);
            Game.Begin(new MainScene());
        }
Beispiel #2
0
    public static void Main(string[] args)
    {
#if LINUX
        //SharpGRF newGRF = new SharpGRF("/media/B06CC97A6CC93BBA/RO/data.grf");
        SharpGRF newGRF = new SharpGRF("/home/mercurial/GRF#/rwc.grf");
#else
        GRF newGRF = new GRF(@"C:\Documents and Settings\User\My Documents\Visual Studio 2008\Projects\mAthena\mAthena\Example\2011-12-03Example.gpf");
#endif
        newGRF.Open();

        List <GRFFile> GRFFiles = new List <GRFFile>();
        foreach (GRFFile file in newGRF.Files)
        {
            GRFFiles.Add(file);
        }
        Stopwatch st = new Stopwatch();
        st.Start();
        float percent = 0;
        for (int x = 0; x < GRFFiles.Count; x++)
        {
            GRFFiles[x].WriteToDisk("/home/mercurial/tempGRF/");
            percent = (float)(x + 1) / (float)GRFFiles.Count * 100.0f;
            //Console.WriteLine("{0}\t{1}%", GRFFiles[x].Name, percent);
        }
        st.Stop();
        Console.WriteLine(st.Elapsed);


        newGRF.Close();
    }
        public static void AddGrf(string file)
        {
            GRF grf = new GRF();

            grf.Open(file);

            _grfFiles.Add(grf);
        }
Beispiel #4
0
 private void BackstageTabItem_MouseUp_1(object sender, MouseButtonEventArgs e)
 {
     FileName = "Untitled.grf";
     baseGRF.Close();
     baseGRF = new GRF();
     InitGRFEventHandlers();
     UpdateGRFList();
     UpdateWindowTitle();
     mainRibbon.SelectedTabItem = mainTab;
 }