private void SetModel(IDsmModel model) { _model = model; _matrixControl.MatrixModel = _model; _matrixControl.Enabled = true; toolStrip.Enabled = true; }
public AlphabeticalSortAlgorithm(object[] args) { Debug.Assert(args.Length == 2); _model = args[0] as IDsmModel; Debug.Assert(_model != null); _element = args[1] as IDsmElement; Debug.Assert(_element != null); }
public DsmResolvedRelation(IDsmModel model, IDsmRelation relation) { Id = relation.Id; ConsumerElement = model.GetElementById(relation.ConsumerId); ProviderElement = model.GetElementById(relation.ProviderId); Type = relation.Type; Weight = relation.Weight; }
public ActionStore(IDsmModel model, IActionManager actionManager) { _model = model; _actionManager = actionManager; _types = new Dictionary <string, Type>(); RegisterActionTypes(); }
public DsmBuilder(IDsiModel dsiModel, IDsmModel dsmModel, IImportPolicy importPolicy, bool autoPartition) { _dsiModel = dsiModel; _dsmModel = dsmModel; _importPolicy = importPolicy; _autoPartition = autoPartition; _dsiToDsmMapping = new Dictionary <int, int>(); }
public ElementMoveDownAction(IDsmModel model, IDsmElement element) { _model = model; Debug.Assert(_model != null); _element = element; Debug.Assert(_element != null); }
public ElementCreateAction(IDsmModel model, string name, string type, IDsmElement parent) { _model = model; Debug.Assert(_model != null); _name = name; _type = type; _parent = parent; }
public UpdateExistingModelPolicy(IDsmModel dsmmodel, string dsmFilename, IActionManager actionManager, IProgress <ProgressInfo> progress) { _dsmModel = dsmmodel; _dsmFilename = dsmFilename; _dsmModel.LoadModel(_dsmFilename, progress); _actionManager = actionManager; _notFoundElements = _dsmModel.GetElements().ToDictionary(x => x.Id, x => x); _notFoundRelations = _dsmModel.GetRelations().ToDictionary(x => x.Id, x => x); }
protected CommandOpen(IDsmModel model, FileInfo file, DirectoryInfo startDirectory) { if (model == null) { throw new ArgumentNullException(nameof(model)); } _model = model; _file = file; _directory = startDirectory; }
public ElementChangeNameAction(IDsmModel model, IDsmElement element, string name) { _model = model; Debug.Assert(_model != null); _element = element; Debug.Assert(_element != null); _old = _element.Name; _new = name; }
public ElementSortAction(IDsmModel model, IDsmElement element, string algorithm) { _model = model; Debug.Assert(_model != null); _element = element; Debug.Assert(_element != null); _algorithm = algorithm; _order = ""; }
public ElementChangeTypeAction(IDsmModel model, IDsmElement element, string type) { _model = model; Debug.Assert(_model != null); _element = element; Debug.Assert(_element != null); _old = _element.Type; _new = type; }
public DsmApplication(IDsmModel dsmModel) { _dsmModel = dsmModel; _actionManager = new ActionManager(); _actionManager.ActionPerformed += OnActionPerformed; _actionStore = new ActionStore(_dsmModel, _actionManager); _queries = new DsmQueries(dsmModel); _metrics = new DsmMetrics(dsmModel); }
public static ISortAlgorithm CreateAlgorithm(IDsmModel model, IDsmElement element, string algorithName) { ISortAlgorithm algoritm = null; if (Algorithms.ContainsKey(algorithName)) { Type type = Algorithms[algorithName]; object[] args = { model, element }; object argumentList = args; algoritm = Activator.CreateInstance(type, argumentList) as ISortAlgorithm; } return(algoritm); }
public ElementMoveDownAction(object[] args) { Debug.Assert(args.Length == 2); _model = args[0] as IDsmModel; Debug.Assert(_model != null); IReadOnlyDictionary <string, string> data = args[1] as IReadOnlyDictionary <string, string>; Debug.Assert(data != null); ActionReadOnlyAttributes attributes = new ActionReadOnlyAttributes(_model, data); _element = attributes.GetElement(nameof(_element)); Debug.Assert(_element != null); }
public ElementChangeParentAction(IDsmModel model, IDsmElement element, IDsmElement newParent) { _model = model; Debug.Assert(_model != null); _element = element; Debug.Assert(_element != null); _old = element.Parent; Debug.Assert(_old != null); _new = newParent; Debug.Assert(_new != null); }
public RelationCreateAction(IDsmModel model, int consumerId, int providerId, string type, int weight) { _model = model; Debug.Assert(_model != null); _consumer = model.GetElementById(consumerId); Debug.Assert(_consumer != null); _provider = model.GetElementById(providerId); Debug.Assert(_provider != null); _type = type; _weight = weight; }
public RelationDeleteAction(IDsmModel model, IDsmRelation relation) { _model = model; Debug.Assert(_model != null); _relation = relation; Debug.Assert(_relation != null); _consumer = model.GetElementById(_relation.ConsumerId); Debug.Assert(_consumer != null); _provider = model.GetElementById(_relation.ProviderId); Debug.Assert(_provider != null); }
public MakeSnapshotAction(object[] args) { Debug.Assert(args.Length == 2); IDsmModel model = args[0] as IDsmModel; Debug.Assert(model != null); IReadOnlyDictionary <string, string> data = args[1] as IReadOnlyDictionary <string, string>; Debug.Assert(data != null); ActionReadOnlyAttributes attributes = new ActionReadOnlyAttributes(model, data); _name = attributes.GetString(nameof(_name)); }
public RelationChangeTypeAction(IDsmModel model, IDsmRelation relation, string type) { _model = model; Debug.Assert(_model != null); _relation = relation; Debug.Assert(_relation != null); _consumer = model.GetElementById(_relation.ConsumerId); Debug.Assert(_consumer != null); _provider = model.GetElementById(_relation.ProviderId); Debug.Assert(_provider != null); _old = relation.Type; _new = type; }
public RelationChangeWeightAction(IDsmModel model, IDsmRelation relation, int weight) { _model = model; Debug.Assert(_model != null); _relation = relation; Debug.Assert(_relation != null); _consumer = model.GetElementById(_relation.ConsumerId); Debug.Assert(_consumer != null); _provider = model.GetElementById(_relation.ProviderId); Debug.Assert(_provider != null); _old = relation.Weight; _new = weight; }
public RelationDeleteAction(object[] args) { Debug.Assert(args.Length == 2); _model = args[0] as IDsmModel; Debug.Assert(_model != null); IReadOnlyDictionary <string, string> data = args[1] as IReadOnlyDictionary <string, string>; Debug.Assert(data != null); ActionReadOnlyAttributes attributes = new ActionReadOnlyAttributes(_model, data); _relation = attributes.GetRelation(nameof(_relation)); Debug.Assert(_relation != null); _consumer = attributes.GetRelationConsumer(nameof(_relation)); Debug.Assert(_consumer != null); _provider = attributes.GetRelationProvider(nameof(_relation)); Debug.Assert(_provider != null); }
public ElementCreateAction(object[] args) { Debug.Assert(args.Length == 2); _model = args[0] as IDsmModel; Debug.Assert(_model != null); IReadOnlyDictionary <string, string> data = args[1] as IReadOnlyDictionary <string, string>; Debug.Assert(data != null); ActionReadOnlyAttributes attributes = new ActionReadOnlyAttributes(_model, data); _element = attributes.GetElement(nameof(_element)); Debug.Assert(_element != null); _name = attributes.GetString(nameof(_name)); _type = attributes.GetString(nameof(_type)); int?parentId = attributes.GetNullableInt(nameof(_parent)); if (parentId.HasValue) { _parent = _model.GetElementById(parentId.Value); } }
public CellConsumersReport(IDsmModel model) : base(model) { }
public DsmQueries(IDsmModel model) { _model = model; }
protected BaseReport(IDsmModel model) { _model = model; }
public OverviewReport(IDsmModel model) : base(model) { }
public CellProvidersReport(IDsmModel model, IElement provider, IElement consumer) : base(model) { _provider = provider; _consumer = consumer; }
public DsmMetrics(IDsmModel model) { _model = model; }
public ElementProvidedInterfacesReport(IDsmModel model, IElement element) : base(model) { _element = element; }