From 776ec1a39831bc476caf389c7941188e4890585f Mon Sep 17 00:00:00 2001 From: Alee Date: Sun, 10 Feb 2019 12:55:48 -0500 Subject: Added a bunch of things and testing TravisCI --- .travis.yml | 24 +++++++++ BSODPrank/BSOD.Designer.cs | 90 +++++++++++++++++++++++++++++++++ BSODPrank/BSOD.cs | 47 +++++++++++++++++ BSODPrank/BSOD.resx | 120 ++++++++++++++++++++++++++++++++++++++++++++ BSODPrank/BSODPrank.csproj | 19 +++++-- BSODPrank/Boot.Designer.cs | 74 +++++++++++++++++++++++++++ BSODPrank/Boot.cs | 40 +++++++++++++++ BSODPrank/Boot.resx | 120 ++++++++++++++++++++++++++++++++++++++++++++ BSODPrank/Form1.Designer.cs | 90 --------------------------------- BSODPrank/Form1.cs | 41 --------------- BSODPrank/Form1.resx | 120 -------------------------------------------- BSODPrank/Program.cs | 2 +- 12 files changed, 530 insertions(+), 257 deletions(-) create mode 100644 .travis.yml create mode 100644 BSODPrank/BSOD.Designer.cs create mode 100644 BSODPrank/BSOD.cs create mode 100644 BSODPrank/BSOD.resx create mode 100644 BSODPrank/Boot.Designer.cs create mode 100644 BSODPrank/Boot.cs create mode 100644 BSODPrank/Boot.resx delete mode 100644 BSODPrank/Form1.Designer.cs delete mode 100644 BSODPrank/Form1.cs delete mode 100644 BSODPrank/Form1.resx diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2007c95 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: csharp +mono: none +solution: BSODPrank.sln +dotnet: 4.5.0 +script: +- msbuild /p:Configuration=Debug BSODPrank.sln +- dotnet restore +before_deploy: echo 'Starting the deploy...' +deploy: + provider: releases + api_key: + secure: QBxJAt+PtzRAtG5WT6UHaYNUX4oMvP/RoL/9NQTJxJUjrpKMePjNS/HXn3z1juEuxHGsW6Cq8IzaFqf3+r9qkYe8VrMaU784wTOpJZJKjLt5GrkbQ52deOORctAzfwYCG2djL2G7VRkmaipEyJsefHNjr1QfVhq1JagJ2E9W/TdWP0v0hwSO1x1f2OYi3z5kVBpeqQfTXCRqkH392yvswZeSR5ONv/Asstuoz74dG0xhpDtLcdBS9R6OGVkrZRWmCYcPcH9yDD6yhVYIFbk4HnHShjk1ltcHxHbvpqx6bJaojlKgHhzI54rjE//TcGSLugSjnpXKnI6N6zmj42DOw3OEDKNpzQYkJkDma0DGoIRR9oyMHm1OMFbh+IEd/hSoVXa5C1mpIK1j1Zst8sityuwfvCBPwgGrYmb8+WR0CVdt9FPkea7sgbZmtm7lWDgJ0vLnC7yKAw/hbotUtFTPPuOCK8hMvkcpN8/T+oIzYrTaS2BZn4I+iIFh6vW+ub72mPmo0ZI0X2GlgvMrZ715cs4Q57WsfOMwKwJnCPuNhDLUzYqpPfhe1WDkCKosxrCe5B58VUUhNlzTqHmLNpYJ6zkqVnjDL2OMnl1v6DvY7b5BYYs04khOHoyvZO8ORJvMmjeAqTIbbab8c5yqwPlsgRxe7hjlotCvNB1gdbIXBgU= + file: BSODPrank\bin\Debug\* + on: + repo: Alee14/BSODPrank +after_deploy: echo 'Deploy finished!' +after_success: + - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh success $WEBHOOK_URL +after_failure: + - wget https://raw.githubusercontent.com/k3rn31p4nic/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh failure $WEBHOOK_URL \ No newline at end of file diff --git a/BSODPrank/BSOD.Designer.cs b/BSODPrank/BSOD.Designer.cs new file mode 100644 index 0000000..64cd4f2 --- /dev/null +++ b/BSODPrank/BSOD.Designer.cs @@ -0,0 +1,90 @@ +namespace BSODPrank +{ + partial class BSOD + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.btnExitDebug = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox1.BackgroundImage = global::BSODPrank.Properties.Resources.bsod; + this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pictureBox1.Location = new System.Drawing.Point(-5, 0); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(823, 516); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // btnExitDebug + // + this.btnExitDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnExitDebug.BackColor = System.Drawing.Color.White; + this.btnExitDebug.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnExitDebug.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnExitDebug.Location = new System.Drawing.Point(687, 456); + this.btnExitDebug.Name = "btnExitDebug"; + this.btnExitDebug.Size = new System.Drawing.Size(92, 37); + this.btnExitDebug.TabIndex = 1; + this.btnExitDebug.Text = "exit"; + this.btnExitDebug.UseVisualStyleBackColor = false; + this.btnExitDebug.Visible = false; + this.btnExitDebug.Click += new System.EventHandler(this.btnExitDebug_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(813, 516); + this.Controls.Add(this.btnExitDebug); + this.Controls.Add(this.pictureBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Form1"; + this.ShowInTaskbar = false; + this.Text = "BSOD"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.Form1_Load); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Button btnExitDebug; + } +} + diff --git a/BSODPrank/BSOD.cs b/BSODPrank/BSOD.cs new file mode 100644 index 0000000..427121f --- /dev/null +++ b/BSODPrank/BSOD.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Media; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace BSODPrank +{ + public partial class BSOD : Form + { + public BSOD() + { + InitializeComponent(); + } + + private async void Form1_Load(object sender, EventArgs e) + { +#if DEBUG + MessageBox.Show("Debug mode is on."); + btnExitDebug.Visible = true; +#endif + this.KeyPreview = true; + this.KeyDown += new KeyEventHandler(Form1_KeyDown); + await Task.Delay(5000); + Boot boot = new Boot(); + boot.Show(); + this.Hide(); + } + + private void Form1_KeyDown(object sender, KeyEventArgs e) + { + System.IO.Stream str = Properties.Resources.bleep; + System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str); + snd.Play(); + } + + private void btnExitDebug_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/BSODPrank/BSOD.resx b/BSODPrank/BSOD.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/BSODPrank/BSOD.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BSODPrank/BSODPrank.csproj b/BSODPrank/BSODPrank.csproj index 78a54b9..fc4f65a 100644 --- a/BSODPrank/BSODPrank.csproj +++ b/BSODPrank/BSODPrank.csproj @@ -45,16 +45,25 @@ - + Form - - Form1.cs + + Boot.cs + + + Form + + + BSOD.cs - - Form1.cs + + Boot.cs + + + BSOD.cs ResXFileCodeGenerator diff --git a/BSODPrank/Boot.Designer.cs b/BSODPrank/Boot.Designer.cs new file mode 100644 index 0000000..27c2098 --- /dev/null +++ b/BSODPrank/Boot.Designer.cs @@ -0,0 +1,74 @@ +namespace BSODPrank +{ + partial class Boot + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtBoot = new System.Windows.Forms.RichTextBox(); + this.SuspendLayout(); + // + // txtBoot + // + this.txtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtBoot.BackColor = System.Drawing.Color.Black; + this.txtBoot.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtBoot.Cursor = System.Windows.Forms.Cursors.Arrow; + this.txtBoot.Font = new System.Drawing.Font("Consolas", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtBoot.ForeColor = System.Drawing.Color.White; + this.txtBoot.Location = new System.Drawing.Point(1, 0); + this.txtBoot.Name = "txtBoot"; + this.txtBoot.ReadOnly = true; + this.txtBoot.Size = new System.Drawing.Size(509, 392); + this.txtBoot.TabIndex = 0; + this.txtBoot.Text = ""; + this.txtBoot.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBoot_KeyDown); + // + // Boot + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(510, 393); + this.Controls.Add(this.txtBoot); + this.ForeColor = System.Drawing.Color.White; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Boot"; + this.Text = "Boot"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.Boot_Load); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Boot_KeyDown); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.RichTextBox txtBoot; + } +} \ No newline at end of file diff --git a/BSODPrank/Boot.cs b/BSODPrank/Boot.cs new file mode 100644 index 0000000..a42bcff --- /dev/null +++ b/BSODPrank/Boot.cs @@ -0,0 +1,40 @@ +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; + +namespace BSODPrank +{ + public partial class Boot : Form + { + public Boot() + { + InitializeComponent(); + } + + private async void Boot_Load(object sender, EventArgs e) + { + await Task.Delay(5000); + txtBoot.AppendText("[SYSTEM ERROR] BIOS Cannot Display." + Environment.NewLine); + } + + private void Boot_KeyDown(object sender, KeyEventArgs e) + { + System.IO.Stream str = Properties.Resources.bleep; + System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str); + snd.Play(); + } + + private void txtBoot_KeyDown(object sender, KeyEventArgs e) + { + System.IO.Stream str = Properties.Resources.bleep; + System.Media.SoundPlayer snd = new System.Media.SoundPlayer(str); + snd.Play(); + } + } +} diff --git a/BSODPrank/Boot.resx b/BSODPrank/Boot.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/BSODPrank/Boot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/BSODPrank/Form1.Designer.cs b/BSODPrank/Form1.Designer.cs deleted file mode 100644 index e4d2c77..0000000 --- a/BSODPrank/Form1.Designer.cs +++ /dev/null @@ -1,90 +0,0 @@ -namespace BSODPrank -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.btnExitDebug = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // pictureBox1 - // - this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBox1.BackgroundImage = global::BSODPrank.Properties.Resources.bsod; - this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pictureBox1.Location = new System.Drawing.Point(-5, 0); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(823, 516); - this.pictureBox1.TabIndex = 0; - this.pictureBox1.TabStop = false; - // - // btnExitDebug - // - this.btnExitDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnExitDebug.BackColor = System.Drawing.Color.White; - this.btnExitDebug.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnExitDebug.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnExitDebug.Location = new System.Drawing.Point(687, 456); - this.btnExitDebug.Name = "btnExitDebug"; - this.btnExitDebug.Size = new System.Drawing.Size(92, 37); - this.btnExitDebug.TabIndex = 1; - this.btnExitDebug.Text = "exit"; - this.btnExitDebug.UseVisualStyleBackColor = false; - this.btnExitDebug.Visible = false; - this.btnExitDebug.Click += new System.EventHandler(this.btnExitDebug_Click); - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(813, 516); - this.Controls.Add(this.btnExitDebug); - this.Controls.Add(this.pictureBox1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "Form1"; - this.ShowInTaskbar = false; - this.Text = "BSOD"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.Load += new System.EventHandler(this.Form1_Load); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Button btnExitDebug; - } -} - diff --git a/BSODPrank/Form1.cs b/BSODPrank/Form1.cs deleted file mode 100644 index 9ef6b14..0000000 --- a/BSODPrank/Form1.cs +++ /dev/null @@ -1,41 +0,0 @@ -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; - -namespace BSODPrank -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - - private void Form1_Load(object sender, EventArgs e) - { - #if DEBUG - MessageBox.Show("Debug mode is on."); - btnExitDebug.Visible = true; - #endif - //System.Media.SoundPlayer player = new System.Media.SoundPlayer(); - //player.SoundLocation = "Bleep-SoundBible.com-1927126940.wav"; - //player.Play(); - } - - private void Form1_KeyDown(object sender, KeyEventArgs e) - { - - } - - private void btnExitDebug_Click(object sender, EventArgs e) - { - this.Close(); - } - } -} diff --git a/BSODPrank/Form1.resx b/BSODPrank/Form1.resx deleted file mode 100644 index 1af7de1..0000000 --- a/BSODPrank/Form1.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/BSODPrank/Program.cs b/BSODPrank/Program.cs index 28455c4..a458684 100644 --- a/BSODPrank/Program.cs +++ b/BSODPrank/Program.cs @@ -16,7 +16,7 @@ namespace BSODPrank { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new BSOD()); } } } -- cgit v1.2.3