private void SpawnAlertButton_Click(object sender, EventArgs e) { this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = this.GetAlertBoxKind(); this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; }
private void ProgressButton_Click(object sender, EventArgs e) { EnterBaseDrive ebd = new EnterBaseDrive(); ebd.ShowDialog(); // RedemptionAntiRansomwareEntities db = new RedemptionAntiRansomwareEntities(); Anti_Ransomware.Database db = new Anti_Ransomware.Database(); listBox5.DataSource = db.Extension.Select(x => new { x.Ext }.Ext).ToList(); List <string> lst = new List <string>(); foreach (var item in listBox5.Items) { lst.Add(item.ToString()); } FlatAlertBox.Text = "Scan for special Directory Started ."; this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Success; this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; SearchFiles sf = new SearchFiles(); Thread t3 = new Thread(delegate() { sf.ApplyAllFiles(ebd.Folder, sf.ProcessFile, lst.ToArray(), false); }); t3.Start(); }
public void ShowControl(FlatAlertBox._Kind Kind, string Str, int Interval) { this.K = Kind; this.Text = Str; this.Visible = true; this.T = new System.Windows.Forms.Timer(); this.T.Interval = Interval; this.T.Enabled = true; }
/// <summary> /// /// </summary> /// <param name="title"></param> /// <param name="text"></param> /// <param name="type"></param> /// <param name="buttons"></param> public LamaDialog(String title, String text, FlatAlertBox._Kind type = 0, MessageBoxButtons buttons = 0) { InitializeComponent(); nbInst++; this.formSkin1.Text = title; this.label.Text = text; this.alertBox.kind = type; this.alertBox.Text = type.ToString(); this.buttons = buttons; this.isLamaButtons = false; switch (buttons) { case MessageBoxButtons.OK: b_green.Visible = true; b_green.Text = "OK"; break; case MessageBoxButtons.OKCancel: b_red.Visible = true; b_red.Text = "Cancel"; b_green.Visible = true; b_green.Text = "OK"; break; case MessageBoxButtons.AbortRetryIgnore: b_red.Visible = true; b_red.Text = "Abort"; b_blue.Visible = true; b_blue.Text = "Retry"; b_green.Visible = true; b_green.Text = "Ignore"; break; case MessageBoxButtons.YesNoCancel: b_red.Visible = true; b_red.Text = "Cancel"; b_blue.Visible = true; b_blue.Text = "No"; b_green.Visible = true; b_green.Text = "Yes"; break; case MessageBoxButtons.YesNo: b_red.Visible = true; b_red.Text = "No"; b_green.Visible = true; b_green.Text = "Yes"; break; case MessageBoxButtons.RetryCancel: b_red.Visible = true; b_red.Text = "Cancel"; b_green.Visible = true; b_green.Text = "Retry"; break; } }
public void ShowControl(FlatAlertBox._Kind Kind, string Str, int Interval) { this.K = Kind; this.Text = Str; this.Visible = true; this.T = new Timer() { Interval = Interval, Enabled = true }; }
private void FormSkin_Enter(object sender, EventArgs e) { try { var a = System.Diagnostics.Process.GetProcessesByName("Watchdog")[0]; FlatToggleStyle3.Checked = true; } catch (Exception ff) { FlatToggleStyle3.Checked = false; } Database db = new Database(); if (db.AuditingZones.Select(x => new { x.ZoneID }.ZoneID).Count() == 0) { flatToggle2.Checked = false; } else { flatToggle2.Checked = true; } if (db.Honeypots.Select(x => new { x.HoneypotID }.HoneypotID).Count() == 0) { flatToggle1.Checked = false; } else { flatToggle1.Checked = true; } if (!flatToggle1.Checked || !flatToggle2.Checked || !FlatToggleStyle3.Checked) { FlatToggleStyle2.Checked = false; } else { FlatToggleStyle2.Checked = true; } /***************************/ FirstRun f = new FirstRun(); listBox1.BackColor = Color.FromArgb(60, 70, 73); listBox2.BackColor = Color.FromArgb(60, 70, 73); listBox3.BackColor = Color.FromArgb(60, 70, 73); this.Icon = Icon.ExtractAssociatedIcon("icon.ico"); FlatAlertBox.Text = "You can Monitor and Configure your Anti Ransomware here..."; this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Info; this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; }
private void __Set_AlertMsg(FlatAlertBox._Kind type, string msg) { if (__isMinimized) { __Set_NotifyBallon(msg, null, ToolTipIcon.Info, 10000); } else { flatThreadSafe.Run(this, (Action)(() => this.flatAlertBoxInfo.ShowControl( type, msg, ((type == FlatAlertBox._Kind.Error) ? 20000 : 10000) ) )); } }
/// <summary> /// /// </summary> /// <param name="title"></param> /// <param name="text"></param> /// <param name="type"></param> /// <param name="buttons"></param> public LamaDialog(String title, String text, FlatAlertBox._Kind type, LamaSpecialButtons buttons) { InitializeComponent(); nbInst++; this.formSkin1.Text = title; this.label.Text = text; this.alertBox.kind = type; this.alertBox.Text = type.ToString(); this.lamaButtons = buttons; this.isLamaButtons = true; switch (buttons) { case LamaSpecialButtons.GameSlect: b_red.Visible = true; b_red.Text = "ShootMania"; b_green.Visible = true; b_green.Text = "TrackMania"; break; } }
private void flatButton3_Click(object sender, EventArgs e) { try { System.Diagnostics.Process.Start("Watchdog.exe"); FlatAlertBox.Text = "Watchdog is running ..."; this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Success; this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; } catch (Exception) { FlatAlertBox.Text = "Watchdog is probably disabled ! Please enable watchdog and do the starting manually."; this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Error; this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; } }
private void flatButton2_Click(object sender, EventArgs e) { if (FlatNumeric.Value == 0) { MessageBox.Show("Please specify how much honeypot you need ! It cannot be zero ..."); return; } EnterBaseDrive ebd = new EnterBaseDrive(); ebd.ShowDialog(); // RedemptionAntiRansomwareEntities db = new RedemptionAntiRansomwareEntities(); Anti_Ransomware.Database db = new Anti_Ransomware.Database(); listBox5.DataSource = db.Extension.Select(x => new { x.Ext }.Ext).ToList(); List <string> lst = new List <string>(); foreach (var item in listBox5.Items) { lst.Add(item.ToString()); } FlatAlertBox.Text = "Put for Honeypot Directory Started ."; this.FlatAlertBox.Visible = false; FlatAlertBox._Kind kind = FlatUI.FlatAlertBox._Kind.Success; this.FlatAlertBox.kind = kind; this.FlatAlertBox.Visible = true; SearchFiles sf = new SearchFiles(); SearchFiles.HoneyCount = Convert.ToInt32(FlatNumeric.Value) - 1; Thread t3 = new Thread(delegate() { sf.ApplyAllFiles(ebd.Folder, sf.ProcessFile, lst.ToArray(), true); }); t3.Start(); }
private void _winMessage(FlatAlertBox._Kind type, string msg, int delay) { flatThreadSafe.Run(this, (Action)(() => this.flatAlertBoxMain.ShowControl(type, msg, delay))); }