public DSIntToFloatNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds) { rect = new Rect(position.x, position.y, 250, 80); title = "Int. to Float"; nodeType = DSNodeType.IntToFloat; inPoint = new DSConnectionPoint(id, DSConnectionPointType.In, ds); outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds); }
public DSSetValueNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds) { rect = new Rect(position.x, position.y, 250, 110); title = "Set Value"; nodeType = DSNodeType.SetValue; inPoint = new DSConnectionPoint(id, DSConnectionPointType.In, ds); outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds); }
public DSIfNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds) { rect = new Rect(position.x, position.y, 260, 110); title = "If Statement"; nodeType = DSNodeType.IfStatement; ifStatements = new List <DSIfStatement> (); logicOperators = new List <DSLogicGateType> (); }
public DSFloatCalNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds) { rect = new Rect(position.x, position.y, 250, 140); title = "Float Calculation"; nodeType = DSNodeType.FloatCal; inPoint = new DSConnectionPoint(id, DSConnectionPointType.In, ds); outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds); }
public DSOutputNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds) { dataList = new List <DSOutputData> (); rect = new Rect(position.x, position.y, 250f, 80f); title = "Output"; nodeType = DSNodeType.Output; inPoint = new DSConnectionPoint(id, DSConnectionPointType.In, ds); outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds); }
public DSNode(int id, Vector2 position, DataSimulator ds) { this.ds = ds; this.id = id; rect = new Rect(position.x, position.y, 50, 25); title = "Start"; nodeType = DSNodeType.Start; outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds); }
public DSSelectionNode(int id, Vector2 position, DataSimulator ds) { this.id = id; this.ds = ds; isSelectionNode = true; inPoint = new DSConnectionPoint(id, DSConnectionPointType.In, ds); trueOutPoint = new DSConnectionPoint(id, DSConnectionPointType.TrueOut, ds); falseOutPoint = new DSConnectionPoint(id, DSConnectionPointType.FalseOut, ds); }
private MarketQuotes BuildMarketQuotes(IEnumerable <MarketIndex> markets) { var rdm = new Random((int)DateTime.Now.Ticks); var mult = ((decimal)rdm.NextDouble() / 100) + 1; MarketQuotes marketQuotes; if (markets != null) { marketQuotes = new MarketQuotes { DOW = markets.Single(m => m.Symbol == ".DJI"), NASDAQ = markets.Single(m => m.Symbol == ".IXIC"), SP500 = markets.Single(m => m.Symbol == ".INX") }; } else { marketQuotes = new MarketQuotes { DOW = new MarketIndex { Change = 0, DayHigh = 0, DayLow = 0, Last = 12000 }, NASDAQ = new MarketIndex { Change = 0, DayHigh = 0, DayLow = 0, Last = 2700 }, SP500 = new MarketIndex { Change = 0, DayHigh = 0, DayLow = 0, Last = 800 } }; } marketQuotes.DOW.Last = marketQuotes.DOW.Last * mult; marketQuotes.DOW.Change = Math.Round(marketQuotes.DOW.Change * mult, 2); marketQuotes.DOW.PercentChange = Math.Round(marketQuotes.DOW.PercentChange * mult, 2); marketQuotes.NASDAQ.Last = marketQuotes.NASDAQ.Last * mult; marketQuotes.NASDAQ.Change = Math.Round(marketQuotes.NASDAQ.Change * mult, 2); marketQuotes.NASDAQ.PercentChange = Math.Round(marketQuotes.NASDAQ.PercentChange * mult, 2); marketQuotes.SP500.Last = marketQuotes.SP500.Last * mult; marketQuotes.SP500.Change = Math.Round(marketQuotes.SP500.Change * mult, 2); marketQuotes.SP500.PercentChange = Math.Round(marketQuotes.SP500.PercentChange * mult, 2); var sim = new DataSimulator(); marketQuotes.DOWDataPoints = sim.GetDataPoints(marketQuotes.DOW.Last); marketQuotes.NASDAQDataPoints = sim.GetDataPoints(marketQuotes.NASDAQ.Last); marketQuotes.SP500DataPoints = sim.GetDataPoints(marketQuotes.SP500.Last); return(marketQuotes); }
public bool processEvent(Event e, Rect eventArea, DataSimulator ds) { switch (e.type) { case EventType.MouseDown: if (e.button == 0) { if (rect.Contains(e.mousePosition - eventArea.position)) { isDragged = true; } GUI.changed = true; } else if (e.button == 1 && rect.Contains(e.mousePosition - eventArea.position)) { showNodeMenu(ds, e.mousePosition - eventArea.position); e.Use(); } break; case EventType.MouseUp: isDragged = false; break; case EventType.MouseDrag: if (e.button == 0 && isDragged) { drag(e.delta); e.Use(); return(true); } break; } return(false); }
public DSConnection(DataSimulator ds) { this.ds = ds; removeButtonRect = new Rect(0f, 0f, 20f, 20f); }
//movies public ActionResult Index(int?pageIndex, string sortBy) { return(View(DataSimulator.GetAllMovies())); }
public ActionResult GetCustomerDetails(int id) { Customer cust = DataSimulator.GetCustomerData(id); return(View("CustomerDetails", cust)); }
// GET: Customers public ActionResult Index() { return(View(DataSimulator.GetAllCustomers())); }