Exemple #1
0
 //List<Element> elements;
 public Core(PlotReceiver r)
 {
    interp_visitor=new InterpreterVisitor();
     interp_visitor.errorcore_ += new InterpreterVisitor.errorcoremsg(sendres);
      interp_visitor.rescore_ += new InterpreterVisitor.resultcore(result);
      interp_visitor.setPlotObj(r);
 }
Exemple #2
0
 public static void Main(string[] args)
 {
     PlotReceiver plot = new PlotReceiver();
     Core obj = new Core(plot);
     executor obj1 = new executor(plot);
     obj1.errEvent += new executor.err(error);
     obj1.VisitLine("ubPlot(1,a,\"abc\",1D);vec[i]=i + 2;mat[i][j] = i + 2;");
 }
Exemple #3
0
 public executor(PlotReceiver plot)
 {
     coreObject = new Core(plot);
     frontEnd = new exec();
     frontEnd.error_ +=new exec.errorreport(Onerror);
     frontEnd.astEvent += new Spinach.exec.ast(AST);
     coreObject.errorcore_ +=new Core.errorcoremsg(Onerror);
     coreObject.rescore_ += new Core.resultcore(coreObject_rescore_);
 }
Exemple #4
0
        //private PngBitmapEncoder PBE;
        //private ImageSource Img;
        //private Image img;
        //private BitmapImage bmpSource = null;
        public ProgPlot(string path, List<double> Vals, PlotReceiver p)
        {
            InitializeComponent();
            plot = p;
            plot.newimage += new PlotReceiver.BmpImage(plot_newimage);
            OrgImgPath = path.Split('.')[0];
            imagepath = OrgImgPath+".png";
            //Img = (ImageSource)new ImageSourceConverter().ConvertFromString(imagepath);
            //Img.clo
            if (Vals.Count != 0)
            {
                if (Vals[0] == -1)
                {
                    if (Vals.Count >= 10)
                    {
                        gridParam.Visibility = Visibility.Visible;
                        txtCamPosX.Text = Vals[1].ToString();
                        txtCamPosY.Text = Vals[2].ToString();
                        txtCamPosZ.Text = Vals[3].ToString();
                        txtLookDirX.Text = Vals[4].ToString();
                        txtLookDirY.Text = Vals[5].ToString();
                        txtLookDirZ.Text = Vals[6].ToString();
                        txtNearPlane.Text = Vals[7].ToString();
                        txtFieldView.Text = Vals[8].ToString();
                        txtRotAngle.Text = Vals[9].ToString();
                    }
                }
                else
                {
                    gridParam.Visibility = Visibility.Hidden;
                    imgPlot.Margin.Left.Equals(10);
                    imgPlot.Margin.Right.Equals(10);
                    imgPlot.Margin.Top.Equals(10);
                    imgPlot.Margin.Bottom.Equals(10);

                }
            }
        }
Exemple #5
0
 public void setPlotObject(PlotReceiver plot)
 {
     coreObject.setPlotObject(plot);
 }
Exemple #6
0
 public void setPlotObject(PlotReceiver plotObj)
 {
     interp_visitor.setPlotObj(plotObj);
 }
 public void setPlotObj(PlotReceiver pr)
 {
     p = pr;
     if (p != null)
         p.checklist();
 }
Exemple #8
0
 public void SetPlotObject(PlotReceiver p)
 {
     plot = p;
     plot.error +=new PlotReceiver.PlotError(ErrorMsg);
 }