@@Shanker Nebunul, e C#. Program facut in Visual Studio. Sursa:
using B_Zone_Launcher.Properties;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace B_Zone_Launcher
{
public partial class BzoneLauncher : Form
{
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
[DllImportAttribute("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
[DllImportAttribute("user32.dll")]
public static extern bool ReleaseCapture();
public BzoneLauncher()
{
InitializeComponent();
userName.Text = (string)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\SAMP", "PlayerName", null);
rpg1Pic.ImageLocation = "https://www.game-state.com/89.33.242.95:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
rpg2Pic.ImageLocation = "https://www.game-state.com/89.33.242.97:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
rpg3Pic.ImageLocation = "https://www.game-state.com/89.33.242.92:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
rpg4Pic.ImageLocation = "https://www.game-state.com/89.33.242.96:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
mixPic.ImageLocation = "https://www.game-state.com/89.33.242.115:7777/350x20_FFFFFF_FFFFFF_000000_000000.png";
}
private void header_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
}
private void exit_Click(object sender, EventArgs e)
{
Close();
}
private void minimize_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Minimized;
}
object minimizeOnHover = Resources.ResourceManager.GetObject("minimize_hover");
object minimizeOutHover = Resources.ResourceManager.GetObject("minimize");
object exitOnHover = Resources.ResourceManager.GetObject("exit_hover");
object exitOutHover = Resources.ResourceManager.GetObject("exit");
private void minimize_MouseEnter(object sender, EventArgs e)
{
minimize.Image = (Image)minimizeOnHover;
}
private void minimize_MouseLeave(object sender, EventArgs e)
{
minimize.Image = (Image)minimizeOutHover;
}
private void exit_MouseEnter(object sender, EventArgs e)
{
exit.Image = (Image)exitOnHover;
}
private void exit_MouseLeave(object sender, EventArgs e)
{
exit.Image = (Image)exitOutHover;
}
private void connect_Click(object sender, EventArgs e)
{
RegistryKey myKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\SAMP", true);
if (myKey != null)
{
myKey.SetValue("PlayerName", userName.Text, RegistryValueKind.String);
}
myKey.Close();
string path = (string)Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\SAMP", "gta_sa_exe", null);
path = path.Replace("gta_sa.exe", "samp.exe");
ProcessStartInfo startInfo = new ProcessStartInfo(path);
if (serverChoice.Text == "RPG1 Server")
startInfo.Arguments = "-c -h89.33.242.95";
if (serverChoice.Text == "RPG2 Server")
startInfo.Arguments = "-c -h89.33.242.97";
if (serverChoice.Text == "RPG3 Server")
startInfo.Arguments = "-c -h89.33.242.92";
if (serverChoice.Text == "RPG4 Server")
startInfo.Arguments = "-c -h89.33.242.96";
if (serverChoice.Text == "MIX Server")
startInfo.Arguments = "-c -h89.33.242.115";
if (serverChoice.Text != "")
Process.Start(startInfo);
}
private void forum_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://forum.b-zone.ro");
}
}
}
Daca nu intelegi ceva intreaba si iti explic.