Advertisement
Guest User

RPNV0.2

a guest
Nov 27th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApplication2
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void btnCalculate_Click(object sender, EventArgs e)
  21.         {
  22.             var MainStack = new Stack<float>();
  23.             Int32 top = 0;
  24.  
  25.             if (string.IsNullOrEmpty(txtInput.Text))
  26.             {
  27.                 MessageBox.Show("Sorry, no input was found");
  28.             }
  29.             else
  30.             {
  31.                 NewCalc(MainStack, Top);
  32.             }
  33.         }
  34.  
  35.         private void NewCalc(Stack<float> mainstack, Int32 top)
  36.         {
  37.             Boolean ValidExpression = true;
  38.             String Temp = "";
  39.             Char Current;
  40.             String Input = txtInput.Text;
  41.  
  42.             for (int i = 0; i < txtInput.Text.Length; i++)
  43.             {
  44.                 Current = Input[i];
  45.  
  46.                 if (char.IsWhiteSpace(Current))
  47.                 {
  48.                     MessageBox.Show("Test");
  49.                 }
  50.             }
  51.  
  52.         }
  53.     }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement