// Update is called once per frame void Update() { _selectionExistence = SelectionManager.selectionExists; if (_selectionExistence) { dataPlotterScript = plotter.GetComponent <DataPlotter>(); datapoint_values = dataPlotterScript.GetValues(selectedObject.name); Debug.Log("DataPoint Values: " + datapoint_values[0]); username = datapoint_values[0]; tweetLength = datapoint_values[2]; hashtagCount = datapoint_values[3]; followerCount = datapoint_values[1]; textboard_1.GetComponent <TextMeshProUGUI>().text = username; textboard_2.GetComponent <TextMeshProUGUI>().text = selectedObject.name; textboard_3.GetComponent <TextMeshProUGUI>().text = followerCount; textboard_4.GetComponent <TextMeshProUGUI>().text = hashtagCount; textboard_5.GetComponent <TextMeshProUGUI>().text = tweetLength; } else { textboard_1.GetComponent <TextMeshProUGUI>().text = ""; textboard_2.GetComponent <TextMeshProUGUI>().text = ""; textboard_3.GetComponent <TextMeshProUGUI>().text = ""; textboard_4.GetComponent <TextMeshProUGUI>().text = ""; textboard_5.GetComponent <TextMeshProUGUI>().text = ""; } }
// [END INTERALS] // [BEGIN GUI] // On Enable void OnEnable() { instance = this; refreshTime = 0.1f; prevTime = Time.time; GetTextures(); }
// Use this for initialization void Start() { // Set pointlist to results of function Reader with argument inputfile CSVläsare.Read(MainMenu.fileData); ThisInstans = this; targetFeatures = CSVläsare.targetFeatures; pointList = CSVläsare.pointList; // Declare list of strings, fill with keys (column names) columnList = CSVläsare.columnList; List <string> features = columnList.GetRange(1, columnList.Count - 2); AddDropDownListeners(features); PlottData(); }
private void oxyPlotterToolStripMenuItem_Click(object sender, EventArgs e) { DataPlotter Plt = new DataPlotter(DB); Plt.Show(); }
public static Async runInThread(ActionDelegate fn) { // If we are debugging, run threads in the main thread if (debugInMain) { return(runInMain(fn)); } // Otherwise proceed normally in the threadpool Async mainThread = new Async(true); Async poolThread = new Async(false); mainThread.proxy = poolThread; poolThread.proxy = mainThread; // Count thread scheduling lock (counterLock) { counter++; if (debugPlots) { if (firstTime == 0f) { firstTime = DateTime.Now.ToTimestamp(); } DataPlotter.AddDataPoint("Asyncs", "Async", (float)(DateTime.Now.ToTimestamp() - firstTime), counter); } } // Don't run the thread if things are going out of hand var running = true; lock (counterLock) { running = counter < 256; } if (running) { // Schedule thread Nanome.Core.Daemon.ThreadPool.queue(delegate() { poolThread.pushEvent("ASYNC-START", null); poolThread.pushEvent("ASYNC-START-THREADED", null); try { fn(poolThread); } catch (Exception exc) { Logs.errorOnChannel("Nanome.Core", "Error in a thread", exc); } poolThread.pushEvent("ASYNC-DONE", null); poolThread.pushEvent("ASYNC-DONE-THREADED", null); lock (counterLock) { counter--; if (debugPlots) { DataPlotter.AddDataPoint("Asyncs", "Async", (float)(DateTime.Now.ToTimestamp() - firstTime), counter); } } }); } else { Logs.errorOnChannel("Nanome.Core", "Too much threading load", "bailing out"); } return(mainThread); }