Team Updates

safe
safe
buraxonBuraga Mihail
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
void AppendText(TextBox box, Color color, string text)
{
int start = box.TextLength;
box.AppendText(text);
int end = box.TextLength;
// Textbox may transform chars, so (end-start) != text.Length
box.Select(start, end - start);
{
box.BackColor = color;
// could set box.SelectionBackColor, box.SelectionFont too.
}
box.SelectionLength = 0; // clear
}
private void button1_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
richTextBox1.BackColor = Color.Lime;
richTextBox1.SelectionAlignment = HorizontalAlignment.Center;
richTextBox1.SelectionFont = new Font("Lucinda Console", 20);
richTextBox1.AppendText(System.Environment.NewLine + System.Environment.NewLine + System.Environment.NewLine + "I'M SAFE" + System.Environment.NewLine + "AT BUCHAREST RO HALELOR NR. 5");
}
private void button3_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
richTextBox1.BackColor = Color.Red;
richTextBox1.SelectionAlignment = HorizontalAlignment.Center;
richTextBox1.SelectionFont = new Font("Lucinda Console", 20);
richTextBox1.SelectionColor = Color.White;
richTextBox1.AppendText(System.Environment.NewLine + System.Environment.NewLine + System.Environment.NewLine + "S.O.S !!!" + System.Environment.NewLine + "I'M AT NASA Washington");
}
private void button2_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
richTextBox1.BackColor = Color.Yellow;
richTextBox1.SelectionAlignment = HorizontalAlignment.Center;
richTextBox1.SelectionFont = new Font("Lucinda Console", 20);
richTextBox1.AppendText(System.Environment.NewLine + System.Environment.NewLine + System.Environment.NewLine + "PROBLEMS ???");
}
private void button4_Click(object sender, EventArgs e)
{
richTextBox1.Clear();
richTextBox1.BackColor = Color.Blue;
richTextBox1.SelectionColor = Color.White;
richTextBox1.SelectionAlignment = HorizontalAlignment.Center;
richTextBox1.SelectionFont = new Font("Lucinda Console", 20);
richTextBox1.AppendText(System.Environment.NewLine + System.Environment.NewLine + System.Environment.NewLine + "Coming at NASA Washington D.C.");
}
}
}
view raw Form1.cs hosted with ❤ by GitHub
namespace WindowsFormsApplication1
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.button4 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(238, 457);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// button1
//
this.button1.BackColor = System.Drawing.Color.Lime;
this.button1.Location = new System.Drawing.Point(82, 414);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 1;
this.button1.Text = "I\'M SAFE";
this.button1.UseVisualStyleBackColor = false;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Yellow;
this.button2.Location = new System.Drawing.Point(82, 385);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "Problem??";
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackColor = System.Drawing.Color.Red;
this.button3.Location = new System.Drawing.Point(82, 327);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 3;
this.button3.Text = "S.O.S";
this.button3.UseVisualStyleBackColor = false;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(22, 30);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(190, 293);
this.richTextBox1.TabIndex = 5;
this.richTextBox1.Text = "";
//
// button4
//
this.button4.BackColor = System.Drawing.Color.Blue;
this.button4.Location = new System.Drawing.Point(82, 356);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 23);
this.button4.TabIndex = 6;
this.button4.Text = "Coming";
this.button4.UseVisualStyleBackColor = false;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(238, 457);
this.Controls.Add(this.button4);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.pictureBox1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button button4;
}
}
B
Barbir Dimitris
Team Stream Item
B
Barbir Dimitris
NASA Logo

SpaceApps is a NASA incubator innovation program.