示例#1
0
        public GitDiffViewModel(IDbObjectText DbObjectText, IIDEProvider IDE, IGitAPI Git, IWarnings Warnings, ISettings Settings)
        {
            _DbObjectText = DbObjectText;
            IDiffText DiffText = Git.GitDiff(DbObjectText);

            FillDocument(DiffText);

            CurrentBranch   = Git.GetCurrentBranch();
            CurrentDataBase = IDE.GetDatabaseConnection();
            ObjectDescrName = DbObjectText.DescriptionName;
            ObjectFullPath  = DbObjectText.GetRawFilePath();

            if (Settings.UnexpectedBranch)
            {
                UnexpectedBranch = Warnings.IsBranchUnexsepted(CurrentBranch, true);
            }
            if (Settings.UnexpectedServer)
            {
                UnexpectedServer = Warnings.IsServerUnexsepted(CurrentDataBase, true);
            }

            SaveTextCommand = NinjectCore.Get <CommandSaveTextToRepository>();
            LoadTextCommand = NinjectCore.Get <CommandLoadTextFromRepository>();

            ButtonsClassicStyle = Settings.ClassicButtonsPosition;
        }
示例#2
0
 public CommandShowGitBlame(IIDEProvider IDEProvider, IGitAPI GitApi, ISettings Settings) : base("PluginCommandShowGitBlame")
 {
     _GitAPI        = GitApi;
     _IIDEProveider = IDEProvider;
     _Settings      = Settings;
 }
示例#3
0
 public CommandSaveTextToRepository(IIDEProvider IDEProvider, IGitAPI GitAPI, IWarnings Warnings) : base("SaveTextToRepository")
 {
     _IDEProvider = IDEProvider;
     _GitAPI      = GitAPI;
     _Warnings    = Warnings;
 }