public VMInformTable(double x, double y, int width, int height, IViewModelInterface myWind, int typeTable, int idDoor, string path, string text) { IdDoor = idDoor; TypeTable = (TypeInformTable)typeTable; MyWind = myWind; Height = height / Constants.MainScale; Width = width / Constants.MainScale; X = x; Y = y; New_x = x; New_y = y; GetScheme(path, text); ParentEl = new DeafultElement() { DataContext = this }; Panel.SetZIndex(ParentEl, 10); Canvas.SetLeft(ParentEl, X); Canvas.SetTop(ParentEl, Y); ParentEl.Height = height / Constants.MainScale; ParentEl.Width = width / Constants.MainScale; ParentEl.MouseDown += ParentEl_MouseDown; MyImage = BitMapDisel; UpdateCoord(); }
public static List <InformTable> GetInformTableByType(TypeInformTable type) { ContextDB db = new ContextDB(); db.InformTables.Load(); return(db.InformTables.Local.ToList().FindAll(x => x.TypeTable == (int)type)); }