Vydělávej až 160.000 Kč měsíčně! Akreditované rekvalifikační kurzy s garancí práce od 0 Kč. Více informací.
Hledáme nové posily do ITnetwork týmu. Podívej se na volné pozice a přidej se do nejagilnější firmy na trhu - Více informací.

mainform

/*
 * Created by SharpDevelop.
 * User: kotyza lukas
 * Date: 13.4.2016
 * Time: 19:11
 * 
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

using System.IO;

namespace a
{
	/// <summary>
	/// Description of MainForm.
	/// </summary>
	public partial class MainForm : Form
	{	
		

		public MainForm()
		{
			
			using (StreamWriter sw = new StreamWriter(@"uloziste.txt"))
			{
				
				decimal x = vnt001.Value;
				sw.WriteLine(x.ToString());
			}
			using (StreamReader sr = new StreamReader(@"uloziste.txt"))
			{
       				string s;
       				while ((s = sr.ReadLine()) != null)
        			{
       					MessageBox.Show(s);
        			}
			}
			

			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			
			//
			// TODO: Add constructor code after the InitializeComponent() call.
			//
			
			
		}
			
		//všechny fce jsou pro jeden výrobek jsou v jednom tlačítku!
		void Btnvyrob1Click(object sender, EventArgs e)
		{
			vnt001.Value = vnt001.Value - (10 * numnasobic.Value) ;
			vnt003.Value = vnt003.Value - (10 * numnasobic.Value);
			
			int j = 200;
			int i = Convert.ToInt32(vnt001.Value);
			if ( i <= j){
			
				panel1.Visible=true;
			}
			else panel1.Visible=false;
			
			int l = Convert.ToInt32(vnt003.Value);
			if ( l <= j){
			
				panel3.Visible=true;
			}
			else panel3.Visible=false;
			

			
		}
		//konec tlačítka
		
		//začátek kontroly
		void BtnkontrolaClick(object sender, EventArgs e)
		{
			int j = 200;
			int i = Convert.ToInt32(vnt001.Value);
			if ( i <= j){
			
				panel1.Visible=true;
			}
			else panel1.Visible=false;
			
			
			int k = Convert.ToInt32(vnt002.Value);
			if ( k <= j){
			
				panel2.Visible=true;
			}
			else panel2.Visible=false;
			
			
			int l = Convert.ToInt32(vnt003.Value);
			if ( l <= j){
			
				panel3.Visible=true;
			}
			else panel3.Visible=false;
			
			
			int m = Convert.ToInt32(vnt003.Value);
			if ( m <= j){
			
				panel4.Visible=true;
			}
			else panel4.Visible=false;
			
			
			
		}
		//konec kontroly
		
	}
}

Neformátovaný

Přidáno: 26.4.2016
Expirace: Neuvedeno

Aktivity