Пример #1
0
        public RemotesToolbar(RemotesView remotesView)
        {
            Verify.Argument.IsNotNull(remotesView, "remotesView");

            _remotesView = remotesView;

            Items.Add(new ToolStripButton(Resources.StrRefresh, CachedResources.Bitmaps["ImgRefresh"],
                (sender, e) =>
                {
                    _remotesView.RefreshContent();
                })
            {
                DisplayStyle = ToolStripItemDisplayStyle.Image,
            });
            Items.Add(new ToolStripSeparator());
            Items.Add(_btnAddRemote = new ToolStripButton(Resources.StrAddRemote, CachedResources.Bitmaps["ImgRemoteAdd"],
                (sender, e) =>
                {
                    using(var dlg = new AddRemoteDialog(_remotesView.Repository))
                    {
                        dlg.Run(_remotesView);
                    }
                }));
        }
Пример #2
0
 public void StartAddRemoteDialog()
 {
     using(var dlg = new AddRemoteDialog(Repository))
     {
         dlg.Run(Environment.MainForm);
     }
 }