bu linkdeki programın aynısını vb6 da yapmak istiyorum nasıl yapabilirim
http://futbolcuprehber.tk/gencoyuncu.html
JavaScript ile yazılmış bir programı nasıl vb6 ya dönüştüre bilirim |
2 Mesajlar | 604 Okunma |
using UnityEngine;
using System.Collections;
public class MYCLASSNAME : MonoBehaviour {
void Calc (){
FIXME_VAR_TYPE arrDate= document.FCup2.Date.value.split(".");
FIXME_VAR_TYPE Day= arrDate[0];
FIXME_VAR_TYPE Month= arrDate[1];
FIXME_VAR_TYPE Year= arrDate[2];
FIXME_VAR_TYPE Datum= "true";
if (Day > 0 && Day < 32 && Month > 0 && Month < 13) {
if (Month == 4 || Month == 6 || Month == 9 || Month == 11) {
if (Day == 31) {
Datum = "false";
alert("Fehlerhafte Datumseingabe!");
}
}
if (Month == 2 && Year%4 == 0) {
if (Day == 30 || Day == 31) {
Datum = "false";
alert("Fehlerhafte Datumseingabe!");
}
}
if (Month == 2 && Year%4 != 0) {
if (Day == 29 || Day == 30 || Day == 31) {
Datum = "false";
alert("Fehlerhafte Datumseingabe!");
}
}
} else {
Datum = "false";
alert("Fehlerhafte Datumseingabe!");
}
if (Datum == "true") {
FIXME_VAR_TYPE destination= new Date(arrDate[2],--arrDate[1],arrDate[0])
FIXME_VAR_TYPE jetzt= new Date();
FIXME_VAR_TYPE Jahr= jetzt.getFullYear();
FIXME_VAR_TYPE Monat= jetzt.getMonth() + 1;
FIXME_VAR_TYPE Tag= jetzt.getDate();
FIXME_VAR_TYPE Stunde= jetzt.getHours();
FIXME_VAR_TYPE Tageszeit= "";
if (Stunde < 10) Tageszeit = 2;
if (Stunde > 9 && Stunde < 15) Tageszeit = 1;
if (Stunde > 14) Tageszeit = 0;
jetzt.setHours(0);
jetzt.setMinutes(0);
jetzt.setSeconds(0);
jetzt.setMilliseconds(0);
FIXME_VAR_TYPE Differenz= (Date.parse(destination) - Date.parse(jetzt)) / (24 * 60 * 60 * 1000);
}
// Update 1.1f.4 Start
FIXME_VAR_TYPE Tag1970= Math.round((new Date(Year, Month-1, Day)) / 1000 / 60 / 60 / 24);
FIXME_VAR_TYPE TagHeute= Math.round((new Date(Jahr, Monat-1, Tag)) / 1000 / 60 / 60 / 24);
FIXME_VAR_TYPE Tagart= Tag1970 % 4;
FIXME_VAR_TYPE HeuteTagart= TagHeute % 4;
// Tagart 0 = Credits
// Tagart 1 = ohne
// Tagart 2 = Sonder
// Tagart 3 = ohne
FIXME_VAR_TYPE Sonder= 0;
FIXME_VAR_TYPE Credits= 0;
if (Tagart == 0) {
Credits = Math.floor(Differenz / 4 + 1);
if (HeuteTagart == 3 || HeuteTagart == 0) {
Sonder = Credits - 1;
} else {
Sonder = Credits;
}
}
if (Tagart == 1) {
Credits = Math.floor((Differenz - 1) / 4 + 1);
if (HeuteTagart == 3 || HeuteTagart == 0) {
Sonder = Credits - 1;
} else {
Sonder = Credits;
}
}
if (Tagart == 2) {
Sonder = Math.floor(Differenz / 4 + 1);
if (HeuteTagart == 1 || HeuteTagart == 2) {
Credits = Sonder - 1;
} else {
Credits = Sonder;
}
}
if (Tagart == 3) {
Sonder = Math.floor((Differenz - 1) / 4 + 1);
if (HeuteTagart == 1 || HeuteTagart == 2) {
Credits = Sonder - 1;
} else {
Credits = Sonder;
}
}
if (Stunde > 6 && HeuteTagart == 2) {
Sonder--;
}
if (Stunde > 6 && HeuteTagart == 0) {
Credits--;
}
FIXME_VAR_TYPE UserType= "";
for (i = 0; i if (document.FCup2.Credit[i].checked==true) {
FIXME_VAR_TYPE UserType= document.FCup2.Credit[i].value;
}
}
FIXME_VAR_TYPE Update= Sonder;
if (UserType == 1) {
Update = Sonder + Credits;
}
// Update 1.1f.4 Ende
FIXME_VAR_TYPE timeframe= "false";
if (Differenz < 0 != Differenz > 100) {
alert("Tarihi Yanlış Yazdınız Bida Kontrol Edin Geçmiş Tarih Girmiş Olabilrisiniz Yada 100 Günden Fazla Gelecek Zaman Girmiş Olabilrisiniz Sen Bide Bak Bi Kontrol Et Hadi Bakaım :)!");
} else {
timeframe = "true";
}
FIXME_VAR_TYPE Trainingseinheiten= "";
if (timeframe == "true") {
Trainingseinheiten = Differenz * 2 + Tageszeit + Update;
}
// Update 1.1f.4: "war Trainingseinheiten = Differenz * 2 + Tageszeit"
FIXME_VAR_TYPE Trainer= document.FCup2.Trainer.value;
FIXME_VAR_TYPE Skill1= document.FCup2.Skill1.value;
FIXME_VAR_TYPE Einheiten1= Math.ceil((990 - Skill1) / Trainer);
FIXME_VAR_TYPE Skill2= document.FCup2.Skill2.value;
FIXME_VAR_TYPE Einheiten2= Math.ceil((990 - Skill2) / Trainer);
FIXME_VAR_TYPE Skill3= document.FCup2.Skill3.value;
FIXME_VAR_TYPE Volumen1= 0;
FIXME_VAR_TYPE Volumen2= 0;
FIXME_VAR_TYPE Volumen3= 0;
if (Skill1 > 0 && Skill1 <= 1000 && Skill2 > 0 && Skill2 <= 1000 && Skill3 > 0 && Skill3 <= 1000) {
if (Trainingseinheiten > Einheiten1) {
FIXME_VAR_TYPE Volumen1= Einheiten1 * Trainer;
FIXME_VAR_TYPE Rest1= Trainingseinheiten - Einheiten1;
}
if (Trainingseinheiten <= Einheiten1) {
FIXME_VAR_TYPE Volumen1= Trainingseinheiten * Trainer;
}
if (Rest1 > Einheiten2) {
FIXME_VAR_TYPE Volumen2= Einheiten2 * Trainer;
FIXME_VAR_TYPE Rest2= Rest1 - Einheiten2;
FIXME_VAR_TYPE Volumen3= Rest2 * Trainer;
}
if (Rest1 <= Einheiten2) {
FIXME_VAR_TYPE Volumen2= Rest1 * Trainer;
}
} else {
alert("Hatalı giriş Beceri");
}
FIXME_VAR_TYPE Position= document.FCup2.Position.value;
if (Position == "Typ1") {
FIXME_VAR_TYPE Zuwachs= Math.round((Volumen1 * 2.5f + Volumen2 * 2.5f + Volumen3 * 2) / 70) * 5;
}
if (Position == "Typ2") {
FIXME_VAR_TYPE Zuwachs= Math.round((Volumen1 * 2 + Volumen2 * 2 + Volumen3 * 1.5f) / 70) * 5;
}
if (Position == "Typ3") {
FIXME_VAR_TYPE Zuwachs= Math.round((Volumen1 * 2 + Volumen2 * 1.5f + Volumen3 * 1.5f) / 70) * 5;
}
FIXME_VAR_TYPE Staerke= int.Parse(document.FCup2.Staerke.value);
if (Staerke > 0 && Staerke < 990 && Staerke%5 == 0) {
FIXME_VAR_TYPE Ergebnis= Staerke + Zuwachs;
document.OutPut.OutPutVal.value = Ergebnis;
} else {
alert("Gücü Yanlış Girmiş Olabilirsin Bida Kontrol Et");
}
FIXME_VAR_TYPE Alter= int.Parse(document.FCup2.Alter.value);
FIXME_VAR_TYPE Land= int.Parse(document.FCup2.Land.value);
FIXME_VAR_TYPE MonthNew= Month;
if (Year > Jahr) {
FIXME_VAR_TYPE MonthNew= int.Parse(Month) + 12;
}
FIXME_VAR_TYPE MDiffer= MonthNew - Monat;
FIXME_VAR_TYPE DDiffer= "";
if ((Day >= Land) && (Tag < Land)) {
FIXME_VAR_TYPE DDiffer= 1;
}
if ((Day >= Land) && (Tag >= Land)) {
FIXME_VAR_TYPE DDiffer= 0;
}
if ((Day < Land) && (Tag < Land)) {
FIXME_VAR_TYPE DDiffer= 0;
}
if ((Day < Land) && (Tag >= Land)) {
FIXME_VAR_TYPE DDiffer= -1;
}
FIXME_VAR_TYPE AlterNeu= Alter + MDiffer + DDiffer;
if ((Alter != 0) && (Land != 0)) {
document.OutPut1.OutPutVal1.value = AlterNeu;
}
}
}