Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 public MainIcon()
 {
     _mainIcon = new NotifyIcon
     {
         Visible = true,
         Text = "ECB migration number tray utility",
         BalloonTipIcon = ToolTipIcon.Info,
         Icon = Resources.MainIcon,
     };
     _mainIcon.MouseClick += MainIconClick;
     _leftClickContextMenuStrip = GenerateLeftClickMenu();
     _rightClickContextMenuStrip = GenerateRightClickMenu();
     _migrationNumberTrackerClient = new MigrationNumberTrackerClient
     {
         Url = Settings.Default.ServerUrl,
     };
 }
        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,
                });
            }
        }