Beispiel #1
0
        public ManageManuallyWindow(MigrationNumberTrackerClient client, MainIcon icon)
        {
            InitializeComponent();

            const int initialTop         = 20;
            const int migrationBoxHeight = 40;
            const int initialLeft        = 10;

            var migrationTypes =
                Enum.GetValues(typeof(MigrationType)).Cast <MigrationType>().Except(new[] { MigrationType.None }).ToList();

            cbBranches.DisplayMember = "Name";
            cbBranches.ValueMember   = "Value";
            cbBranches.DataSource    =
                icon._branchProvider.GetAllRemoteBranches().Select(branch => new { Name = branch, Value = branch }).ToList();

            var currentBranch = Settings.Default.CurrentBranch;

            cbBranches.SelectedValue = currentBranch;

            for (int i = 0; i < migrationTypes.Count; ++i)
            {
                MigrationType migrationType = migrationTypes[i];
                grbxMigrations.Controls.Add(new MigrationBox(icon, client, migrationType, currentBranch)
                {
                    Top  = initialTop + migrationBoxHeight * i,
                    Left = initialLeft,
                });
            }
        }
 public MigrationBox(MainIcon icon, MigrationNumberTrackerClient client, MigrationType type)
 {
     _icon = icon;
     _client = client;
     _type = type;
     InitializeComponent();
     lblMigrationType.Text = type + ":";
     RefreshData();
     _timer = new Timer {Interval = 3000};
     _timer.Tick += TimerTick;
 }
Beispiel #3
0
 public MigrationBox(MainIcon icon, MigrationNumberTrackerClient client, MigrationType type, string branch)
 {
     _icon   = icon;
     _client = client;
     _type   = type;
     InitializeComponent();
     lblMigrationType.Text = type + ":";
     Branch = branch;
     RefreshData();
     _timer = new Timer {
         Interval = 3000
     };
     _timer.Tick += TimerTick;
 }
        public ManageManuallyWindow(MigrationNumberTrackerClient client, MainIcon icon)
        {
            InitializeComponent();

            const int initialTop = 20;
            const int migrationBoxHeight = 40;
            const int initialLeft = 10;

            var migrationTypes =
                Enum.GetValues(typeof (MigrationType)).Cast<MigrationType>().Except(new[] {MigrationType.None}).ToList();

            for (int i = 0; i < migrationTypes.Count; ++i)
            {
                MigrationType migrationType = migrationTypes[i];
                grbxMigrations.Controls.Add(new MigrationBox(icon, client, migrationType)
                {
                    Top = initialTop + migrationBoxHeight * i,
                    Left = initialLeft,
                });
            }
        }