Пример #1
0
        public ProfileViewModel(ILog log, ProfilesViewModel profilesVM, ProfileInfo profileInfo)
        {
            _log = log;

            ProfilesVM  = profilesVM;
            ProfileInfo = profileInfo;

            Sql = new Binding <string>(() => ProfileInfo.GetSqlAsync().Result); // TODO: Make nicer

            RunProfileCommand = new RelayCommand(async param => await RunProfileAsync(), param => !ProfilesVM.ProjectVM.IsReadOnly.Value);
            SaveToFileCommand = new RelayCommand(param => SaveToFile());
        }