Conversation
updating from origin
This reverts commit 4d27a0f.
| open Repo | ||
| open Repo.DataLayer | ||
| open Repo.InfrastructureSemanticLayer | ||
| open System.Security.Policy |
| @@ -0,0 +1,93 @@ | |||
| namespace Repo.Metametamodels | |||
There was a problem hiding this comment.
Надо ещё шапку с лицензией, здесь и ниже
| this.Graph = new Graph(model); | ||
| this.Graph.DrawGraph += (sender, args) => this.DrawGraph(); | ||
| this.Graph.RelayoutGraph += (sender, args) => this.scene.RelayoutGraph(true); | ||
| this.Graph.ZoomToFeel += (sender, args) => this.zoomControl.ZoomToFill(); |
| foreach (var x in vertex.Value.VertexConnectionPointsList) | ||
| { | ||
| var aVCPforGH = x as StaticVertexConnectionPointForGH; | ||
| if (aVCPforGH != null && aVCPforGH.IsOccupied == false && aVCPforGH.IsSource == false) |
There was a problem hiding this comment.
Лучше !aVCPforGH.IsOccupied
| else | ||
| { | ||
| // if the model is initially incorrect | ||
| if (vertex.Key.Node.Name == "aInterval") |
There was a problem hiding this comment.
Что за хардкод в редакторе? :)
|
|
||
| private void AddNewEdgeControl(EdgeViewModel edgeViewModel) | ||
| { | ||
| if (this.model.ModelName == "GreenhouseTestModel") |
There was a problem hiding this comment.
А как это обобщить, чтобы не хардкодить в редакторе имя конкретной модели?
| } | ||
| else | ||
| { | ||
| if (ctrlVerVertex.Node.Name == "aInterval") |
There was a problem hiding this comment.
И не хардкодить в редакторе имя конкретного узла?
| { | ||
| using GraphX.Controls; | ||
|
|
||
| public class StaticVertexConnectionPointForGH : StaticVertexConnectionPoint |
| { | ||
| get; | ||
| set; | ||
| } |
There was a problem hiding this comment.
Это обычно в одну строчку пишется
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Мне кажется, это лишнее :)
This reverts commit 37b9f44.
appveyor.yml
Outdated
|
|
||
| before_build: | ||
| - .paket\paket.exe update | ||
| - .paket\paket.exe install |
There was a problem hiding this comment.
Мне кажется, этого в билд-скрипте лучше не делать, иначе билд будет ломаться каждый раз, когда кто-нибудь решит обновить один из пакетов, от которых мы зависим, на NuGet-е. Лучше фиксировать версии пакетов в paket.lock, использовать в CI его, и обновлять пакеты вручную и проверяя, что ничего не отвалилось.
| @@ -0,0 +1,47 @@ | |||
| /* Copyright 2017-2018 REAL.NET group | |||
There was a problem hiding this comment.
Ну если бы в REAL.NET предполагался один-единственный генератор, то такое название проекта было бы оправданно. Но это уже не так, а дальше будет только ещё более не так :)
src/Generator/Actuator.cs
Outdated
| if (value > 0) | ||
| { | ||
| Console.WriteLine("----- Actuator {0} TRUE!!! -----", Num); | ||
| this.Event(this, 1); |
There was a problem hiding this comment.
Ой. this.Event?.Invoke(this, 1). Иначе упадёт, если на нас никто пока не подписался.
| /// </summary> | ||
| public class Actuator | ||
| { | ||
| public int Num { get; } |
There was a problem hiding this comment.
Я бы сказал, что нужен комментарий. И я бы сказал это не из объектно-ориентированного чистоплюйства, а потому что я реально без идей, что делает эта штука :)
src/Generator/Actuator.cs
Outdated
| { | ||
| if (value > 0) | ||
| { | ||
| Console.WriteLine("----- Actuator {0} TRUE!!! -----", Num); |
There was a problem hiding this comment.
| Console.WriteLine("----- Actuator {0} TRUE!!! -----", Num); | |
| Console.WriteLine($"----- Actuator {Num} TRUE!!! -----"); |
src/Generator/Sensor.cs
Outdated
| /// <summary> | ||
| /// Helps to represent sensors from model in repo. | ||
| /// </summary> | ||
|
|
There was a problem hiding this comment.
Пустая строка между комментарием и классом обычно не ставится
| aLink.Target <- Some dst | ||
| dst | ||
|
|
||
| airTemperature --> interval1 --> openWindow |> ignore*) |
There was a problem hiding this comment.
Мм? Можно две тестовые модели сделать :)
src/RobotSimulation/SensorSim.cs
Outdated
| public class SensorSim | ||
| { | ||
| private Timer timer; | ||
| private Random rnd = new Random(unchecked((int)(DateTime.Now.Ticks))); |
There was a problem hiding this comment.
Просто new Random() делает то же самое.
| /*var fileName = (model == null || model.CurrentFileName == "") | ||
| ? "(unsaved)" | ||
| : model.CurrentFileName; | ||
| var unsavedChanges = model?.HasUnsavedChanges == true ? "*" : "";*/ |
| private void AddNewVertexControl(NodeViewModel vertex) | ||
| { | ||
| var vc = new VertexControl(vertex); | ||
| if (this.model.ModelName == "GreenhouseTestModel") |
There was a problem hiding this comment.
А как это по-нормальному сделать?
No description provided.