示例#1
0
        private void AutoComplitTreament(Machine Machine, DataManager d)
        {
            var t = new ReportsInMap();

            if (Rf is null)
            {
                Rf = new ReportForm(loge, Machine, d);
            }
            else
            {
                List <Entities.Report> q = new List <Entities.Report>();
                if (!(Rf.s.internet.data is null))
                {
                    foreach (var i in Rf.s.internet.data)
                    {
                        q.Add(new Entities.Report()
                        {
                            p1 = ((dynamic)i)["lat"],
                            p2 = ((dynamic)i)["lon"]
                        });
                    }
                }
                ;
                t.DataContext2 = q;
            }
            rightTab = t;
            leftTab  = Rf;
        }
示例#2
0
        private void stateConfigure(Machine Machine, DataManager D)
        {
            var w  = Machine.SetTriggerParameters <Entities.Cluster>(ViewTrigger.ShowReports);
            var w1 = Machine.SetTriggerParameters <string>(ViewTrigger.ImageView);

            Machine.Configure(ViewState.Start).OnExit(() => { wellcome.Close(); D.labelDataAsync(GlobFuncs.getConfig("serviceMap"), GlobFuncs.getConfig("token")); });
            Machine.Configure(ViewState.ClusterList).OnEntry(() => { var t = new ListOfCluster(); t.DataContext = D.List; leftTab = t; });
            Machine.Configure(ViewState.ClusterMap).OnEntry(() => { var t = new ReportsInMap(); t.DataContext2 = D.Point; leftTab = t; });
            Machine.Configure(ViewState.ClusterTabs).OnEntry(() => { var t = new ClusterTab(Machine, w); t.DataContext = D.List; leftTab = t; });
            Machine.Configure(ViewState.ClusterCombina).OnEntry(() => { var t = new ReportsInMap(); t.DataContext2 = D.Point; var t2 = new ListOfCluster(); t2.DataContext = D.List; leftTab = t; rightTab = t2; });
            Machine.Configure(ViewState.AnalizeData).OnEntry(() => { var t = new Analysis(D); leftTab = t; var t2 = new linarChart(D); rightTab = t2; });
            Machine.Configure(ViewState.NewReport).OnEntry(() => { AutoComplitTreament(Machine, D); });
            //Machine.Configure(ViewState.ReportList).OnEntryFrom<Entities.Cluster>(w, (C) => { listOfReports t = new listOfReports(); corentCluster = C; t.DataContext = C; rightTab = t; });
            Machine.Configure(ViewState.ReportTabs).OnEntryFrom <Entities.Cluster>(w, (C) => { ReportTab t = new ReportTab(w1, Machine, corentCluster); rightTab = t; corentCluster = C; t.DataContext = C; });
            Machine.Configure(ViewState.ReportTabs).OnEntryFrom <string>(w1, (C) => { ImageView t = new ImageView(); t.DataContext = C; t.Show(); });
            Machine.Configure(ViewState.ReportMap).OnEntry(() => { ReportsInMap t = new ReportsInMap(); t.DataContext2 = corentCluster.ToList(); rightTab = t; });
            Machine.Configure(ViewState.ReportTabs).OnEntry(() => { ReportTab t = new ReportTab(w1, Machine, corentCluster); rightTab = t; });
            Machine.Configure(ViewState.ReportList).OnEntry(() => { listOfReports t = new listOfReports(); t.DataContext = corentCluster; rightTab = t; });
            Machine.Configure(ViewState.AllReports).OnEntry(() =>
            {
                listOfReports t = new listOfReports(); getAllReports(D); t.DataContext = corentCluster; rightTab = t;
                ReportsInMap t2 = new ReportsInMap(); t2.DataContext2 = corentCluster.ToList(); leftTab = t2;
            });
        }