Esempio n. 1
0
        private void TfoDownload_FormCreate(object sender, EventArgs e)
        {
            TGnuGettextInstance.TranslateComponent(this);
            appFile   = Path.GetFileName(Application.ExecutablePath);
            appFolder = Utils.IncludeTrailingPathDelimiter(Path.GetDirectoryName(Application.ExecutablePath));
            if (ApplicationDeployment.IsNetworkDeployed)
            {
                baseFolder = Utils.IncludeTrailingPathDelimiter(ApplicationDeployment.CurrentDeployment.DataDirectory);
            }
            else
            {
                baseFolder = Utils.IncludeTrailingPathDelimiter(Application.StartupPath);
            }
            LogFile = new TStringList();
            Log("Update Log " + DateTime.Now.ToString());
            DataStream   = new MemoryStream();
            step         = 1;
            selfUpdate   = false;
            filesUpdated = false;
            newsUpdated  = false;
            errorUpdate  = false;
            bool done;

            idleHandler       = (s, args) => UpdateIdle(s, out done);
            Application.Idle += idleHandler;
        }
Esempio n. 2
0
        //---------------------------------------------------------------------------
        private void TfrmDBStatus_FormCreate(object sender, EventArgs e)
        {
            TGnuGettextInstance.TranslateComponent(this);
            string sql = "select alb.cnt as alb, hib.cnt as hib, mid.cnt as mid, arte.cnt as arte, alle.cnt as alle";

            sql = sql + " from (select count(*) as cnt from items where realm = 1) as alb,";
            sql = sql + " (select count(*) as cnt from items where realm = 2) as hib,";
            sql = sql + " (select count(*) as cnt from items where realm = 4) as mid,";
            sql = sql + " (select count(*) as cnt from items where maxlevel > 0) as arte,";
            sql = sql + " (select count(*) as cnt from items) as alle";
            ZQuery.CommandText = sql;
            ZQuery.Open();
            lbAlbion.Text    = ZQuery.FieldByName("alb").AsString;
            lbHibernia.Text  = ZQuery.FieldByName("hib").AsString;
            lbMidgard.Text   = ZQuery.FieldByName("mid").AsString;
            lbArtifacts.Text = ZQuery.FieldByName("arte").AsString;
            lbSum.Text       = ZQuery.FieldByName("alle").AsString;
            ZQuery.Close();

            lbDBVersion.Text = SQLiteUtils.SQLiteDBVersion(ZQuery).ToString();
            lbDBVersion.SetHint(ZQuery.Connection.GetDataSource());
            int size = (int)(new FileInfo(ZQuery.Connection.GetDataSource()).Length / 1024.0);

            lbDBSize.Text  = string.Format("{0:N0} KByte", size);
            lbSysLang.Text = Unit.xml_config.sysLanguage;
        }
Esempio n. 3
0
        //---------------------------------------------------------------------------

        private void TfrmManageDB_FormCreate(object sender, EventArgs e)
        {
            TGnuGettextInstance.TranslateComponent(this);
            LoadSettings();
            InitFilter();
            Unit.player.SetPreviewMode(true);
            Unit.player.UpdateAttributes();
        }
Esempio n. 4
0
        private void TfrmReport_FormCreate(object sender, EventArgs e)
        {
            TGnuGettextInstance.TranslateComponent(this);
            Utils.LoadWindowPosition("Report", this, true);
            int          l        = Utils.GetRegistryString("LastReport", "0").ToIntDef(0);
            TSpeedButton btReport = (TSpeedButton)this.FindComponent("btReport" + (l + 1).ToString());

            btReport.Checked = true;
            btReportClick(btReport, EventArgs.Empty);
        }
Esempio n. 5
0
 //---------------------------------------------------------------------------
 private void TfrmSetArmor_FormCreate(object sender, EventArgs e)
 {
     TGnuGettextInstance.TranslateComponent(this);
     cbQuality.SelectedIndex   = 5;
     cbArmorType.SelectedIndex = cbArmorType.Items.Count - 1;
     cbArmorTypeChange(null, EventArgs.Empty);
     cbSubClass.SelectedIndex = iSubClass;
     cbSubClassChange(null, EventArgs.Empty);
     cbMaterial.SelectedIndex = iMatLevel - Utils.ConvertTagToInt(cbMaterial.Tag);
 }
Esempio n. 6
0
 //---------------------------------------------------------------------------
 private void TfrmCraft_FormCreate(object sender, EventArgs e)
 {
     TGnuGettextInstance.TranslateComponent(this);
 }
Esempio n. 7
0
 private void TfrmOverWrite_FormCreate(object sender, EventArgs e)
 {
     TGnuGettextInstance.TranslateComponent(this);
     cbAllOptions.SelectedIndex = 0;
 }