Exemplo n.º 1
0
        public ComponentBitbucket(BitbucketAdapter adapter)
        {
            _adapter = adapter;

            InitializeComponent();
            Init();
        }
        public void AddInfra(string type, string name = null, string url = null)
        {
            if (string.IsNullOrEmpty(type))
            {
                return;
            }
            InfraAdapter ia = null;

            switch (type.ToLower())
            {
            case "server":
                ia = new ComputerAdapter(this);
                break;

            case "sonarqube":
                ia = new SonarAdapter(this);
                break;

            case "sql":
                ia = new SqlAdapter(this);
                break;

            //case "vpn":
            //    ia = _openvpnAdapter;
            //    break;
            //case "docker":
            //    ia = _dockerAdapter;
            //    break;
            case "team city":
                ia = new TeamCityAdapter(this);
                break;

            case "bitbucket":
                ia = new BitbucketAdapter(this);
                break;

            case "postgresql":
                ia = new PostGreAdapter(this);
                break;

            case "syncany":
                ia = new SyncanyAdapter(this);
                break;

            default:
                break;
            }

            if (ia != null)
            {
                try
                {
                    ia.Name = name != null ? name : ia.GetType().ToString().Split('.')[ia.GetType().ToString().Split('.').Length - 1].Replace("Adapter", string.Empty);
                    ia.Url  = url;
                    InfraFarm.Add(ia);
                    //GoAction("Infra_Save");
                }
                catch (Exception e)
                {
                }
            }
        }
Exemplo n.º 3
0
 public ViewBitBucketRepository(BitbucketAdapter adapter)
 {
     _adapter = adapter;
     InitializeComponent();
     Init();
 }
 public ViewBitBucketLogin(BitbucketAdapter adapter)
 {
     this._adapter = adapter;
     InitializeComponent();
 }
 public ViewBitbucketManage(BitbucketAdapter adapter)
 {
     _adapter = adapter;
     InitializeComponent();
     Init();
 }
Exemplo n.º 6
0
 public ViewBitBucketSetting(BitbucketAdapter adapter)
 {
     _bitbucketAdapter = adapter;
     InitializeComponent();
 }