示例#1
0
        public StatsSyncher(Session par1Session, StatFileWriter par2StatFileWriter, string par3File)
        {
            IsBusy         = false;
            Field_27437_b  = null;
            Field_27436_c  = null;
            Field_27427_l  = 0;
            Field_27426_m  = 0;
            UnsentDataFile = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append("_unsent.dat").ToString());
            DataFile       = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append(".dat").ToString());
            UnsentOldFile  = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append("_unsent.old").ToString());
            OldFile        = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append(".old").ToString());
            UnsentTempFile = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append("_unsent.tmp").ToString());
            TempFile       = IOPath.Combine(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username.ToLower()).Append(".tmp").ToString());

            if (!par1Session.Username.ToLower().Equals(par1Session.Username))
            {
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append("_unsent.dat").ToString(), UnsentDataFile);
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append(".dat").ToString(), DataFile);
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append("_unsent.old").ToString(), UnsentOldFile);
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append(".old").ToString(), OldFile);
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append("_unsent.tmp").ToString(), UnsentTempFile);
                Func_28214_a(par3File, (new StringBuilder()).Append("stats_").Append(par1Session.Username).Append(".tmp").ToString(), TempFile);
            }

            StatFileWriter = par2StatFileWriter;
            TheSession     = par1Session;

            if (File.Exists(UnsentDataFile))
            {
                par2StatFileWriter.Func_27179_a(Func_27415_a(UnsentDataFile, UnsentTempFile, UnsentOldFile));
            }

            BeginReceiveStats();
        }
 public GuiStats(GuiScreen par1GuiScreen, StatFileWriter par2StatFileWriter)
 {
     StatsTitle     = "Select world";
     SelectedSlot   = null;
     ParentGui      = par1GuiScreen;
     StatFileWriter = par2StatFileWriter;
 }
示例#3
0
        public GuiAchievements(StatFileWriter par1StatFileWriter)
        {
            AchievementsPaneWidth  = 256;
            AchievementsPaneHeight = 202;
            MouseX            = 0;
            MouseY            = 0;
            isMouseButtonDown = 0;
            statFileWriter    = par1StatFileWriter;
            int c  = 215;
            int c1 = 215;

            Field_27116_m = GuiMapX = Field_27112_q = AchievementList.OpenInventory.DisplayColumn * 24 - c / 2 - 12;
            Field_27115_n = GuiMapY = Field_27111_r = AchievementList.OpenInventory.DisplayRow * 24 - c1 / 2;
        }