public static void Invoke() { _availableCityTags = App.DataBase.GetCollection <CityTags>().FindOne(ct => ct.IsPrimary); _availableTransportSystems = App.DataBase.GetCollection <TransportSystem>().FindAll().ToList(); _dialog = new GenericEntityDialog <City>() { Title = "Населенные пункты", ListTitle = "Доступные населенные пункты", OpenAddNewItemWindowButtonTitle = "Открыть окно для добавления населенного пункта", AddNewItemWindowTitle = "Добавить населенный пункт", UpdateItemWindowTitle = "Обновить населенный пункт", AddItemFunction = AddCity, UpdateItemFunction = UpdateCity, RemoveItemFunction = RemoveCity, UpdateCollectionFunction = UpdateCollection }; _dialog.AddColumns(City.PropertyMatcher()); InitNameProperty(); InitCostOfStayingProperty(); InitTagsProperty(); InitTransportSystemsProperty(); UpdateCollection(); _dialog.ShowDialog(); }
public GlobalParametersDialog() { InitializeComponent(); Owner = App.Window; Icon = AppResources.GetAppIcon; _cityTags = App.DataBase.GetCollection <CityTags>().FindOne(ct => ct.IsPrimary); _roadTypes = App.DataBase.GetCollection <RoadTypes>().FindOne(rt => rt.IsPrimary); InitCityTagsProperty(); InitRoadTypesProperty(); Closed += (sender, args) => CancelClick(); }
public TaskSpecificationDialog() { InitializeComponent(); Owner = App.Window; Icon = AppResources.GetAppIcon; _availableTransportSystems = App.DataBase.GetCollection <TransportSystem>().FindAll().ToList(); _availableCityTags = App.DataBase.GetCollection <CityTags>().FindOne(ct => ct.IsPrimary); _availableRoadTypes = App.DataBase.GetCollection <RoadTypes>().FindOne(rt => rt.IsPrimary); _config = App.DataBase.GetCollection <AlgorithmConfig>().FindOne(a => a.IsPrimary); InitTransportSystemsProperty(); InitAlgorithmTypeProperty(); InitMethodTypeProperty(); InitCityTagsProperty(); InitUnusedRoadTypesProperty(); Closed += (sender, args) => CancelClick(); }