private void btnTextFile_Click(object sender, EventArgs e)
        {
            string input = tbInput.Text.Trim(' ');

            b.RootFunc = b.Insert(ref input);
            b.GenerateTextFile(b.RootFunc);

            Process dot = new Process();

            dot.StartInfo.FileName  = "dot.exe";
            dot.StartInfo.Arguments = "-Tpng -oabc.png " + "functions.dot";
            dot.Start();
            dot.WaitForExit();
            Process photoViewer = new Process();

            photoViewer.StartInfo.FileName = @"abc.png";
            photoViewer.Start();
        }
        private void btnTextFile_Click(object sender, EventArgs e)
        {
            string input = tbInput.Text.Trim(' ');

            b.RootFunc = b.Insert(ref input);

            if (rbMainFunction.Checked)
            {
                b.GenerateTextFile(b.RootFunc.SimplifyFunction());
            }
            else if (rbDerAnalytically.Checked)
            {
                b.GenerateTextFile(b.RootFunc.GetDerivativeAnalytically().SimplifyFunction());
            }

            //string filename = "";
            //using (OpenFileDialog ofd = new OpenFileDialog())
            //{
            //    if(ofd.ShowDialog()==DialogResult.OK)
            //    {
            //        filename = ofd.FileName;
            //    }
            //}

            Process dot = new Process();

            dot.StartInfo.FileName  = "dot.exe";
            dot.StartInfo.Arguments = "-Tpng -oabc.png " + "C://Users/Admin/Desktop/CPP/functions.dot";
            dot.Start();
            dot.WaitForExit();
            if (rbMainFunction.Checked)
            {
                TreeMainFun.ImageLocation = "abc.png";
            }
            else if (rbDerAnalytically.Checked)
            {
                TreeOtherOper.ImageLocation = "abc.png";
            }
        }