Esempio n. 1
0
        private void tbTransaction_TextChanged(object sender, EventArgs e)
        {
            if (FileMngr.IsTrsThere(tbTransaction.Text))
            {
                int count = 0;

                List <TextBox> tboxes = new List <TextBox>();
                tboxes.Add(tbPar1); tboxes.Add(tbPar2); tboxes.Add(tbPar3); tboxes.Add(tbPar4);

                foreach (string par in FileMngr.givePars(tbTransaction.Text))
                {
                    tboxes[count].Text = par;
                    count++;
                }
            }
            else
            {
                List <TextBox> tboxes = new List <TextBox>();
                tboxes.Add(tbPar1); tboxes.Add(tbPar2); tboxes.Add(tbPar3);
                tboxes.Add(tbPar4); tboxes.Add(tbVal1); tboxes.Add(tbVal2);
                tboxes.Add(tbVal3); tboxes.Add(tbVal4);
                foreach (TextBox tb in tboxes)
                {
                    tb.Text = String.Empty;
                }
            }
        }
Esempio n. 2
0
        public Form1()
        {
            InitializeComponent();
            //treeView1.Nodes.Add("test1");
            //treeView1.Nodes.Add("test2");
            //treeView1.Nodes.Add("test3");
            //var tree = new TreeNode("tNode1");
            //tree.Nodes.Add("tN1");
            //tree.Nodes.Add("tN2");
            //tree.Nodes.Add("tN3");
            //treeView1.Nodes.Add(tree);             //treeView1.Nodes.Add("lkjlk");
            DirectoryInfo di = new DirectoryInfo(Application.StartupPath);

            FileInfo[] files = di.GetFiles("*.txt");
            rtbHintArea.Text += "\n";
            foreach (var f in files)
            {
                rtbHintArea.Text += f.Name + "\n";

                trsList.Add(f.Name);
            }

            FileMngr.ReadTransactions();
            FileMngr.ReadPars();
        }