private void SaveText() { if (_DbObjectText == null) { _DbObjectText = _IDEProvider.GetDbObject <IDbObjectText>(); } else { _DbObjectText.DirectoriesChecks(); } if (_BranchName == null) { _BranchName = _GitAPI.GetCurrentBranch(); } if (_Warnings.IsBranchUnexsepted(_BranchName)) { return; } string FilePath = _DbObjectText.GetRawFilePath(); Seri.Log.Here().Debug("FilePath={0}", FilePath); File.WriteAllText(FilePath, _DbObjectText.Text, _DbObjectText.GetSaveEncoding()); _IDEProvider.SetStatusMessage($"Объект БД сохранён в: {FilePath}"); }
private void LoadText() { if (_DbObjectText == null) { _DbObjectText = _IDEProvider.GetDbObject <IDbObjectText>(); } else { _DbObjectText.DirectoriesChecks(); } if (_ServerName == null) { _ServerName = _IDEProvider.GetDatabaseConnection(); } if (_Warnings.IsServerUnexsepted(_ServerName)) { return; } string FilePath = _DbObjectText.GetRawFilePath(); Seri.Log.Here().Debug("FilePath={0}", FilePath); string LocalText = File.ReadAllText(FilePath); _PlsqlCodeFormatter.RemoveSlash(ref LocalText); _IDEProvider.SetText(LocalText); _IDEProvider.SetStatusMessage($"Объект БД загружен из: {FilePath}"); }
public override void Execute(object parameter) { if (parameter is IDbObject dbObject) { if (!_TeamCodingProvider.CheckOut(_Settings.TEAMCODING_LOGIN, dbObject, out string ErrorMsg)) { Seri.Log.Here().Error(ErrorMsg); MessageBox.Show(ErrorMsg, "Team Coding Error", MessageBoxButton.OK, MessageBoxImage.Error); } else { var OutputString = $"Сделан CheckOut для объекта {dbObject.ToString()}"; MessageBox.Show(OutputString, "CheckOut", MessageBoxButton.OK, MessageBoxImage.Information); _IDEProvider.SetStatusMessage(OutputString); } } }