Beispiel #1
0
 private void CreateControls()
 {
     if (_chkAbbreviate != null)
     {
         _chkAbbreviate.Dispose();
     }
     _chkAbbreviate                   = Style.CreateCheckBox();
     _chkAbbreviate.IsChecked         = Column.Abbreviate;
     _chkAbbreviate.IsCheckedChanged += OnAbbreviateCheckedChanged;
     _chkAbbreviate.Text              = Resources.StrAbbreviate;
     _chkAbbreviate.Control.Bounds    = new Rectangle(6, 0, 127, 27);
     _chkAbbreviate.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkAbbreviate.Control.Parent    = this;
 }
Beispiel #2
0
 private void CreateControls()
 {
     if (_chkShowColors != null)
     {
         _chkShowColors.Dispose();
     }
     _chkShowColors                   = Style.CreateCheckBox();
     _chkShowColors.IsChecked         = Column.ShowColors;
     _chkShowColors.IsCheckedChanged += OnShowColorsCheckedChanged;
     _chkShowColors.Text              = Resources.StrShowColors;
     _chkShowColors.Control.Bounds    = new Rectangle(6, 0, 127, 27);
     _chkShowColors.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkShowColors.Control.Parent    = this;
 }
Beispiel #3
0
 private void CreateControls()
 {
     if (_chkShowEmail != null)
     {
         _chkShowEmail.Dispose();
     }
     _chkShowEmail                   = Style.CreateCheckBox();
     _chkShowEmail.IsChecked         = Column.ShowEmail;
     _chkShowEmail.IsCheckedChanged += OnShowEmailCheckedChanged;
     _chkShowEmail.Image             = CachedResources.Bitmaps["ImgMail"];
     _chkShowEmail.Text              = Resources.StrShowEmail;
     _chkShowEmail.Control.Bounds    = new Rectangle(6, 0, 127, 27);
     _chkShowEmail.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkShowEmail.Control.Parent    = this;
 }
Beispiel #4
0
        public StartPageView(IWorkingEnvironment environment, StartPageViewFactory factory)
            : base(Guids.StartPageView, environment)
        {
            Verify.Argument.IsNotNull(factory, "factory");

            InitializeComponent();

            _picLogo.Image  = GetLogo();
            _picLogo2.Image = GetGradient();

            _factory = factory;

            Text = Resources.StrStartPage;

            _lstLocalRepositories.ItemActivated  += OnLocalRepositoriesListItemActivated;
            _lstRecentRepositories.ItemActivated += OnRecentRepositoriesListItemActivated;

            _lstLocalRepositories.DragEnter += OnLocalRepositoriesDragEnter;
            _lstLocalRepositories.DragDrop  += OnLocalRepositoriesDragDrop;

            _lstLocalRepositories.KeyDown  += OnLocalRepositoriesKeyDown;
            _lstRecentRepositories.KeyDown += OnRecentRepositoriesKeyDown;

            _chkClosePageAfterRepositoryLoad                   = GitterApplication.Style.CreateCheckBox();
            _chkClosePageAfterRepositoryLoad.Text              = Resources.StrsClosePageAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.Control.Bounds    = new Rectangle(9, 491, 199, 20);
            _chkClosePageAfterRepositoryLoad.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkClosePageAfterRepositoryLoad.Control.Parent    = this;
            _chkClosePageAfterRepositoryLoad.IsChecked         = _factory.CloseAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.IsCheckedChanged += _chkClosePageAfterRepositoryLoad_CheckedChanged;

            _chkShowPageAtStartup                   = GitterApplication.Style.CreateCheckBox();
            _chkShowPageAtStartup.Text              = Resources.StrsShowPageOnStartup;
            _chkShowPageAtStartup.Control.Bounds    = new Rectangle(9, 511, 199, 20);
            _chkShowPageAtStartup.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkShowPageAtStartup.Control.Parent    = this;
            _chkShowPageAtStartup.IsChecked         = _factory.ShowOnStartup;
            _chkShowPageAtStartup.IsCheckedChanged += _chkShowPageAtStartup_CheckedChanged;

            _separator1.BackColor = GitterApplication.Style.Colors.Separator;
            _separator2.BackColor = GitterApplication.Style.Colors.Separator;

            _recentRepositoriesBinding = new NotifyCollectionBinding <RepositoryLink>(
                _lstRecentRepositories.Items,
                WorkingEnvironment.RepositoryManagerService.RecentRepositories,
                repo => new RecentRepositoryListItem(repo));
        }
Beispiel #5
0
        public StartPageView(IWorkingEnvironment environment, StartPageViewFactory factory)
            : base(Guids.StartPageView, environment)
        {
            Verify.Argument.IsNotNull(factory, "factory");

            InitializeComponent();

            _picLogo.Image = GetLogo();
            _picLogo2.Image = GetGradient();

            _factory = factory;

            Text = Resources.StrStartPage;

            _lstLocalRepositories.ItemActivated += OnLocalRepositoriesListItemActivated;
            _lstRecentRepositories.ItemActivated += OnRecentRepositoriesListItemActivated;

            _lstLocalRepositories.DragEnter += OnLocalRepositoriesDragEnter;
            _lstLocalRepositories.DragDrop += OnLocalRepositoriesDragDrop;

            _lstLocalRepositories.KeyDown += OnLocalRepositoriesKeyDown;
            _lstRecentRepositories.KeyDown += OnRecentRepositoriesKeyDown;

            _chkClosePageAfterRepositoryLoad = GitterApplication.Style.CreateCheckBox();
            _chkClosePageAfterRepositoryLoad.Text = Resources.StrsClosePageAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.Control.Bounds = new Rectangle(9, 491, 199, 20);
            _chkClosePageAfterRepositoryLoad.Control.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkClosePageAfterRepositoryLoad.Control.Parent = this;
            _chkClosePageAfterRepositoryLoad.IsChecked = _factory.CloseAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.IsCheckedChanged += _chkClosePageAfterRepositoryLoad_CheckedChanged;

            _chkShowPageAtStartup = GitterApplication.Style.CreateCheckBox();
            _chkShowPageAtStartup.Text = Resources.StrsShowPageOnStartup;
            _chkShowPageAtStartup.Control.Bounds = new Rectangle(9, 511, 199, 20);
            _chkShowPageAtStartup.Control.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkShowPageAtStartup.Control.Parent = this;
            _chkShowPageAtStartup.IsChecked = _factory.ShowOnStartup;
            _chkShowPageAtStartup.IsCheckedChanged += _chkShowPageAtStartup_CheckedChanged;

            _separator1.BackColor = GitterApplication.Style.Colors.Separator;
            _separator2.BackColor = GitterApplication.Style.Colors.Separator;

            _recentRepositoriesBinding = new NotifyCollectionBinding<RepositoryLink>(
                _lstRecentRepositories.Items,
                WorkingEnvironment.RepositoryManagerService.RecentRepositories,
                repo => new RecentRepositoryListItem(repo));
        }
Beispiel #6
0
 private void CreateControls()
 {
     if(_chkShowEmail != null) _chkShowEmail.Dispose();
     _chkShowEmail = Style.CreateCheckBox();
     _chkShowEmail.IsChecked = Column.ShowEmail;
     _chkShowEmail.IsCheckedChanged += OnShowEmailCheckedChanged;
     _chkShowEmail.Image = CachedResources.Bitmaps["ImgMail"];
     _chkShowEmail.Text = Resources.StrShowEmail;
     _chkShowEmail.Control.Bounds = new Rectangle(6, 0, 127, 27);
     _chkShowEmail.Control.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkShowEmail.Control.Parent = this;
 }
Beispiel #7
0
 private void CreateControls()
 {
     if(_chkShowColors != null) _chkShowColors.Dispose();
     _chkShowColors = Style.CreateCheckBox();
     _chkShowColors.IsChecked = Column.ShowColors;
     _chkShowColors.IsCheckedChanged += OnShowColorsCheckedChanged;
     _chkShowColors.Text = Resources.StrShowColors;
     _chkShowColors.Control.Bounds = new Rectangle(6, 0, 127, 27);
     _chkShowColors.Control.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkShowColors.Control.Parent = this;
 }
Beispiel #8
0
 private void CreateControls()
 {
     if(_chkAbbreviate != null) _chkAbbreviate.Dispose();
     _chkAbbreviate = Style.CreateCheckBox();
     _chkAbbreviate.IsChecked = Column.Abbreviate;
     _chkAbbreviate.IsCheckedChanged += OnAbbreviateCheckedChanged;
     _chkAbbreviate.Text = Resources.StrAbbreviate;
     _chkAbbreviate.Control.Bounds = new Rectangle(6, 0, 127, 27);
     _chkAbbreviate.Control.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     _chkAbbreviate.Control.Parent = this;
 }
Beispiel #9
0
        private void CreateControls()
        {
            const int height   = 27;
            const int hmargin  = 6;
            const int vspacing = -4;
            int       width    = Width - hmargin * 2;
            int       yoffset  = 0;

            if (_chkAlignToGraph != null)
            {
                _chkAlignToGraph.Dispose();
            }
            _chkAlignToGraph                   = Style.CreateCheckBox();
            _chkAlignToGraph.Text              = Resources.StrAlignToGraph;
            _chkAlignToGraph.Image             = CachedResources.Bitmaps["ImgAlignToGraph"];
            _chkAlignToGraph.Control.Bounds    = new Rectangle(hmargin, yoffset, width, height);
            _chkAlignToGraph.Control.Parent    = this;
            _chkAlignToGraph.IsChecked         = Column.AlignToGraph;
            _chkAlignToGraph.IsCheckedChanged += OnAlignToGraphCheckedChanged;
            yoffset += height + vspacing;

            if (_grpVisibleReferences == null)
            {
                _grpVisibleReferences = new GroupSeparator()
                {
                    Text   = Resources.StrVisibleReferences,
                    Bounds = new Rectangle(0, yoffset + 2, Width - hmargin, height),
                    Parent = this,
                };
            }
            yoffset += height + vspacing;

            if (_chkLocalBranches != null)
            {
                _chkLocalBranches.Dispose();
            }
            _chkLocalBranches                   = Style.CreateCheckBox();
            _chkLocalBranches.Text              = Resources.StrLocalBranches;
            _chkLocalBranches.Image             = CachedResources.Bitmaps["ImgBranch"];
            _chkLocalBranches.Control.Bounds    = new Rectangle(hmargin, yoffset, width, height);
            _chkLocalBranches.Control.Parent    = this;
            _chkLocalBranches.IsChecked         = Column.ShowLocalBranches;
            _chkLocalBranches.IsCheckedChanged += OnLocalBranchesCheckedChanged;
            yoffset += height + vspacing;

            if (_chkRemoteBranches != null)
            {
                _chkRemoteBranches.Dispose();
            }
            _chkRemoteBranches                   = Style.CreateCheckBox();
            _chkRemoteBranches.Text              = Resources.StrRemoteBranches;
            _chkRemoteBranches.Image             = CachedResources.Bitmaps["ImgBranchRemote"];
            _chkRemoteBranches.Control.Bounds    = new Rectangle(hmargin, yoffset, width, height);
            _chkRemoteBranches.Control.Parent    = this;
            _chkRemoteBranches.IsChecked         = Column.ShowRemoteBranches;
            _chkRemoteBranches.IsCheckedChanged += OnRemoteBranchesCheckedChanged;
            yoffset += height + vspacing;

            if (_chkTags != null)
            {
                _chkTags.Dispose();
            }
            _chkTags                   = Style.CreateCheckBox();
            _chkTags.Text              = Resources.StrTags;
            _chkTags.Image             = CachedResources.Bitmaps["ImgTag"];
            _chkTags.Control.Bounds    = new Rectangle(hmargin, yoffset, width, height);
            _chkTags.Control.Parent    = this;
            _chkTags.IsChecked         = Column.ShowTags;
            _chkTags.IsCheckedChanged += OnTagsCheckedChanged;
            yoffset += height + vspacing;

            if (_chkStash != null)
            {
                _chkStash.Dispose();
            }
            _chkStash                   = Style.CreateCheckBox();
            _chkStash.Text              = Resources.StrStash;
            _chkStash.Image             = CachedResources.Bitmaps["ImgStash"];
            _chkStash.Control.Bounds    = new Rectangle(hmargin, yoffset, width, height);
            _chkStash.Control.Parent    = this;
            _chkStash.IsChecked         = Column.ShowStash;
            _chkStash.IsCheckedChanged += OnStashCheckedChanged;
        }
Beispiel #10
0
        private void CreateControls()
        {
            const int height = 27;
            const int hmargin = 6;
            const int vspacing = -4;
            int width = Width - hmargin * 2;
            int yoffset = 0;

            if(_chkAlignToGraph != null) _chkAlignToGraph.Dispose();
            _chkAlignToGraph = Style.CreateCheckBox();
            _chkAlignToGraph.Text = Resources.StrAlignToGraph;
            _chkAlignToGraph.Image = CachedResources.Bitmaps["ImgAlignToGraph"];
            _chkAlignToGraph.Control.Bounds = new Rectangle(hmargin, yoffset, width, height);
            _chkAlignToGraph.Control.Parent = this;
            _chkAlignToGraph.IsChecked = Column.AlignToGraph;
            _chkAlignToGraph.IsCheckedChanged += OnAlignToGraphCheckedChanged;
            yoffset += height + vspacing;

            if(_grpVisibleReferences == null)
            {
                _grpVisibleReferences = new GroupSeparator()
                {
                    Text = Resources.StrVisibleReferences,
                    Bounds = new Rectangle(0, yoffset + 2, Width - hmargin, height),
                    Parent = this,
                };
            }
            yoffset += height + vspacing;

            if(_chkLocalBranches != null) _chkLocalBranches.Dispose();
            _chkLocalBranches = Style.CreateCheckBox();
            _chkLocalBranches.Text = Resources.StrLocalBranches;
            _chkLocalBranches.Image = CachedResources.Bitmaps["ImgBranch"];
            _chkLocalBranches.Control.Bounds = new Rectangle(hmargin, yoffset, width, height);
            _chkLocalBranches.Control.Parent = this;
            _chkLocalBranches.IsChecked = Column.ShowLocalBranches;
            _chkLocalBranches.IsCheckedChanged += OnLocalBranchesCheckedChanged;
            yoffset += height + vspacing;

            if(_chkRemoteBranches != null) _chkRemoteBranches.Dispose();
            _chkRemoteBranches = Style.CreateCheckBox();
            _chkRemoteBranches.Text = Resources.StrRemoteBranches;
            _chkRemoteBranches.Image = CachedResources.Bitmaps["ImgBranchRemote"];
            _chkRemoteBranches.Control.Bounds = new Rectangle(hmargin, yoffset, width, height);
            _chkRemoteBranches.Control.Parent = this;
            _chkRemoteBranches.IsChecked = Column.ShowRemoteBranches;
            _chkRemoteBranches.IsCheckedChanged += OnRemoteBranchesCheckedChanged;
            yoffset += height + vspacing;

            if(_chkTags != null) _chkTags.Dispose();
            _chkTags = Style.CreateCheckBox();
            _chkTags.Text = Resources.StrTags;
            _chkTags.Image = CachedResources.Bitmaps["ImgTag"];
            _chkTags.Control.Bounds = new Rectangle(hmargin, yoffset, width, height);
            _chkTags.Control.Parent = this;
            _chkTags.IsChecked = Column.ShowTags;
            _chkTags.IsCheckedChanged += OnTagsCheckedChanged;
            yoffset += height + vspacing;

            if(_chkStash != null) _chkStash.Dispose();
            _chkStash = Style.CreateCheckBox();
            _chkStash.Text = Resources.StrStash;
            _chkStash.Image = CachedResources.Bitmaps["ImgStash"];
            _chkStash.Control.Bounds = new Rectangle(hmargin, yoffset, width, height);
            _chkStash.Control.Parent = this;
            _chkStash.IsChecked = Column.ShowStash;
            _chkStash.IsCheckedChanged += OnStashCheckedChanged;
        }
Beispiel #11
0
        public StartPageView(IWorkingEnvironment environment, StartPageViewFactory factory)
            : base(Guids.StartPageView, environment)
        {
            Verify.Argument.IsNotNull(factory, nameof(factory));

            InitializeComponent();

            _picLogo.Image  = GetLogo();
            _picLogo2.Image = GetGradient();

            _factory      = factory;
            _repositories = new List <RepositoryListItem>();

            Text = Resources.StrStartPage;

            _txtFilter.BackColor     = GitterApplication.Style.Colors.Window;
            _txtFilter.HintForeColor = GitterApplication.Style.Colors.GrayText;
            _txtFilter.TextForeColor = GitterApplication.Style.Colors.WindowText;

            _lstLocalRepositories.SizeChanged += (s, e) =>
            {
                var x = _lstLocalRepositories.Width + _lstLocalRepositories.Left - _txtFilter.Width;
                if (x > _lblLocalRepositories.Left + _lblLocalRepositories.Width)
                {
                    _txtFilter.Left    = x;
                    _txtFilter.Visible = true;
                }
                else
                {
                    _txtFilter.Visible = false;
                }
            };

            _txtFilter.TextChanged += OnFilterTextChanged;

            _lstLocalRepositories.ItemActivated  += OnLocalRepositoriesListItemActivated;
            _lstRecentRepositories.ItemActivated += OnRecentRepositoriesListItemActivated;

            _lstLocalRepositories.DragEnter += OnLocalRepositoriesDragEnter;
            _lstLocalRepositories.DragDrop  += OnLocalRepositoriesDragDrop;

            _lstLocalRepositories.KeyDown  += OnLocalRepositoriesKeyDown;
            _lstRecentRepositories.KeyDown += OnRecentRepositoriesKeyDown;

            _chkClosePageAfterRepositoryLoad                   = GitterApplication.Style.CreateCheckBox();
            _chkClosePageAfterRepositoryLoad.Text              = Resources.StrsClosePageAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.Control.Bounds    = new Rectangle(9, 491, 199, 20);
            _chkClosePageAfterRepositoryLoad.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkClosePageAfterRepositoryLoad.Control.Parent    = this;
            _chkClosePageAfterRepositoryLoad.IsChecked         = _factory.CloseAfterRepositoryLoad;
            _chkClosePageAfterRepositoryLoad.IsCheckedChanged += _chkClosePageAfterRepositoryLoad_CheckedChanged;

            _chkShowPageAtStartup                   = GitterApplication.Style.CreateCheckBox();
            _chkShowPageAtStartup.Text              = Resources.StrsShowPageOnStartup;
            _chkShowPageAtStartup.Control.Bounds    = new Rectangle(9, 511, 199, 20);
            _chkShowPageAtStartup.Control.Anchor    = AnchorStyles.Left | AnchorStyles.Bottom;
            _chkShowPageAtStartup.Control.Parent    = this;
            _chkShowPageAtStartup.IsChecked         = _factory.ShowOnStartup;
            _chkShowPageAtStartup.IsCheckedChanged += _chkShowPageAtStartup_CheckedChanged;

            _separator1.BackColor = GitterApplication.Style.Colors.Separator;
            _separator2.BackColor = GitterApplication.Style.Colors.Separator;

            _recentRepositoriesBinding = new NotifyCollectionBinding <RepositoryLink>(
                _lstRecentRepositories.Items,
                WorkingEnvironment.RepositoryManagerService.RecentRepositories,
                repo => new RecentRepositoryListItem(repo));
        }