Team Updates

safe
safe
buraxonBuraga Mihail
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Windows.Forms;
namespaceWindowsFormsApplication1
{
publicpartialclassForm1 : Form
{
publicForm1()
{
InitializeComponent();
}
privatevoidpictureBox1_Click(objectsender, EventArgse)
{
}
voidAppendText(TextBoxbox, Colorcolor, stringtext)
{
intstart=box.TextLength;
box.AppendText(text);
intend=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
}
privatevoidbutton1_Click(objectsender, EventArgse)
{
richTextBox1.Clear();
richTextBox1.BackColor=Color.Lime;
richTextBox1.SelectionAlignment=HorizontalAlignment.Center;
richTextBox1.SelectionFont=newFont("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");
}
privatevoidbutton3_Click(objectsender, EventArgse)
{
richTextBox1.Clear();
richTextBox1.BackColor=Color.Red;
richTextBox1.SelectionAlignment=HorizontalAlignment.Center;
richTextBox1.SelectionFont=newFont("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");
}
privatevoidbutton2_Click(objectsender, EventArgse)
{
richTextBox1.Clear();
richTextBox1.BackColor=Color.Yellow;
richTextBox1.SelectionAlignment=HorizontalAlignment.Center;
richTextBox1.SelectionFont=newFont("Lucinda Console", 20);
richTextBox1.AppendText(System.Environment.NewLine+System.Environment.NewLine+System.Environment.NewLine+"PROBLEMS ???");
}
privatevoidbutton4_Click(objectsender, EventArgse)
{
richTextBox1.Clear();
richTextBox1.BackColor=Color.Blue;
richTextBox1.SelectionColor=Color.White;
richTextBox1.SelectionAlignment=HorizontalAlignment.Center;
richTextBox1.SelectionFont=newFont("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
namespaceWindowsFormsApplication1
{
partialclassForm1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainercomponents=null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <paramname="disposing">true if managed resources should be disposed; otherwise, false.</param>
protectedoverridevoidDispose(booldisposing)
{
if (disposing&& (components!=null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#regionWindows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
privatevoidInitializeComponent()
{
System.ComponentModel.ComponentResourceManagerresources=newSystem.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1=newSystem.Windows.Forms.PictureBox();
this.button1=newSystem.Windows.Forms.Button();
this.button2=newSystem.Windows.Forms.Button();
this.button3=newSystem.Windows.Forms.Button();
this.richTextBox1=newSystem.Windows.Forms.RichTextBox();
this.button4=newSystem.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=newSystem.Drawing.Point(0, 0);
this.pictureBox1.Name="pictureBox1";
this.pictureBox1.Size=newSystem.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=newSystem.Drawing.Point(82, 414);
this.button1.Name="button1";
this.button1.Size=newSystem.Drawing.Size(75, 23);
this.button1.TabIndex=1;
this.button1.Text="I\'M SAFE";
this.button1.UseVisualStyleBackColor=false;
this.button1.Click+=newSystem.EventHandler(this.button1_Click);
//
// button2
//
this.button2.BackColor=System.Drawing.Color.Yellow;
this.button2.Location=newSystem.Drawing.Point(82, 385);
this.button2.Name="button2";
this.button2.Size=newSystem.Drawing.Size(75, 23);
this.button2.TabIndex=2;
this.button2.Text="Problem??";
this.button2.UseVisualStyleBackColor=false;
this.button2.Click+=newSystem.EventHandler(this.button2_Click);
//
// button3
//
this.button3.BackColor=System.Drawing.Color.Red;
this.button3.Location=newSystem.Drawing.Point(82, 327);
this.button3.Name="button3";
this.button3.Size=newSystem.Drawing.Size(75, 23);
this.button3.TabIndex=3;
this.button3.Text="S.O.S";
this.button3.UseVisualStyleBackColor=false;
this.button3.Click+=newSystem.EventHandler(this.button3_Click);
//
// richTextBox1
//
this.richTextBox1.Location=newSystem.Drawing.Point(22, 30);
this.richTextBox1.Name="richTextBox1";
this.richTextBox1.Size=newSystem.Drawing.Size(190, 293);
this.richTextBox1.TabIndex=5;
this.richTextBox1.Text="";
//
// button4
//
this.button4.BackColor=System.Drawing.Color.Blue;
this.button4.Location=newSystem.Drawing.Point(82, 356);
this.button4.Name="button4";
this.button4.Size=newSystem.Drawing.Size(75, 23);
this.button4.TabIndex=6;
this.button4.Text="Coming";
this.button4.UseVisualStyleBackColor=false;
this.button4.Click+=newSystem.EventHandler(this.button4_Click);
//
// Form1
//
this.AutoScaleDimensions=newSystem.Drawing.SizeF(6F, 13F);
this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize=newSystem.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.PictureBoxpictureBox1;
private System.Windows.Forms.Buttonbutton1;
private System.Windows.Forms.Buttonbutton2;
private System.Windows.Forms.Buttonbutton3;
private System.Windows.Forms.RichTextBoxrichTextBox1;
private System.Windows.Forms.Buttonbutton4;
}
}
B
Barbir Dimitris
Team Stream Item
B
Barbir Dimitris
NASA Logo

SpaceApps is a NASA incubator innovation program.