public DialogResult ShowDialog(VW_BookingMinibooking mbRow, object muRow, Form assgnForm) { bkgNumbLabel.Text = mbRow.BookingNumber; bkgCustomerLabel.Text = mbRow.CustomerName; VW_UnitSourceMiniUnit mu = (VW_UnitSourceMiniUnit)muRow; unitSourvceNumbLabel.Text = Conversions.ToString(mu.MiniunitNumber); try { unitSourceCustomLabel.Text = Conversions.ToString(mu.CustomerName); } catch { unitSourceCustomLabel.Text = Conversions.ToString(mu.CustomerName); } _muID = Conversions.ToInteger(mu.MiniUnitId); PictureBox1.Hide(); changeUnitCustRadioButton.Checked = false; dontAsnRadioButton.Checked = true; checkUnit(); MdlLoadingSetting.showDialogForm(this, assgnForm); return(DialogResult); }
//Restaurar Windows private void PictureBox1_Click(object sender, EventArgs e) { PictureBox1.Hide(); circularProgressBar2.Show(); timer2.Stop(); circularProgressBar2.Value = 0; circularProgressBar2.Text = circularProgressBar2.Value.ToString(); timer2.Start(); Process process = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo { WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = @"/C net start CryptSvc & net start Winmgmt & net start Themes & net start SysMain & net start WbioSrvc & net start WSearch & net start DeviceAssociationService & exit" }; process.StartInfo = startInfo; process.Start(); Process proces = new Process(); ProcessStartInfo startInf = new ProcessStartInfo { WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = @"/C net start TimeBroker & net start VaultSvc & net start UsoSvc & net start wmiApSrv & net start SgrmBroker & net start Spooler & net start AppXSvs & net start InstallService & exit" }; proces.StartInfo = startInf; proces.Start(); Process proce = new Process(); ProcessStartInfo startIn = new ProcessStartInfo { WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = @"/C net start FontCache & net start TabletInputService & net start fsvc & net start SmsRouter & net start SDRSVC & net start NVDisplay.ContainerLocalSystem & net start AppXSvc & exit" }; proce.StartInfo = startIn; proce.Start(); Process proc = new Process(); ProcessStartInfo startI = new ProcessStartInfo { WindowStyle = ProcessWindowStyle.Hidden, FileName = "cmd.exe", Arguments = @"/C net start DeviceAssociationService & net start Dnscache & net start DisplayEnhancementService & net start RmSvc & net start FontCache & net start wuauserv & net start wscsvc & net start SENS & exit" }; proc.StartInfo = startI; proc.Start(); }
private void checkUnit() { PictureBox1.Hide(); var fBold = new Font("Segoe UI", 11f, FontStyle.Bold); var fNormal = new Font("Segoe UI", 11f, FontStyle.Regular); if (dontAsnRadioButton.Checked) { dontAsnLabel.Font = fBold; chageUnitCustLabel.Font = fNormal; warningLabel.Text = ""; openFormLinkLabel.Text = ""; saveButton.Enabled = true; } else if (changeUnitCustRadioButton.Checked) { dontAsnLabel.Font = fNormal; chageUnitCustLabel.Font = fBold; if (MdlBookingManagement.isAssignedToOthersMBs(_muID)) { PictureBox1.Show(); warningLabel.Text = "This unit is already assigned to another booking so the customer can not be changed. Please " + "create a Mini Unit with the desired customer."; openFormLinkLabel.Text = "Edit Unit Source"; PictureBox1.Image = My.Resources.Resources.icon_not_available; saveButton.Enabled = false; } else { PictureBox1.Show(); warningLabel.Text = "Able to change Customer Name"; openFormLinkLabel.Text = ""; PictureBox1.Image = My.Resources.Resources.icon_available; saveButton.Enabled = true; } } }