Exemplo n.º 1
0
 public void Reload(ProjectControlSourceItem item, ProjectControlSource source)
 {
     this.source          = source;
     this.item            = item;
     projectLabel.Content = item.Project;
     Timestamp            = item.Timestamp;
     bumper = new DeploymentManager(source, item);
     JSONinit();
     UpdateVersion();
 }
Exemplo n.º 2
0
        public static void Init()
        {
            ProjectControlSourceItem itemOne = new ProjectControlSourceItem()
            {
                Project = "Algo Service", StageDir = "Algo Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "Algo", FTPPath = "Algo Service"
            };
            ProjectControlSourceItem itemTwo = new ProjectControlSourceItem()
            {
                Project = "Matlab Server", StageDir = "Matlab Server Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "Matlab Server", FTPPath = "Matlab Server Service"
            };
            ProjectControlSourceItem itemThree = new ProjectControlSourceItem()
            {
                Project = "Optimizer", StageDir = "Optimizer Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "Optimizer", FTPPath = "Optimizer"
            };
            ProjectControlSourceItem itemFour = new ProjectControlSourceItem()
            {
                Project = "Task Scheduler", StageDir = "Task Scheduler Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "Task Scheduler", FTPPath = "Task Scheduler"
            };
            ProjectControlSourceItem itemFive = new ProjectControlSourceItem()
            {
                Project = "Trading Monitor", StageDir = "Task Scheduler Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "Trading Monitor", FTPPath = "Trading Montior"
            };
            ProjectControlSourceItem itemSix = new ProjectControlSourceItem()
            {
                Project = "TT Gateway", StageDir = "TT Gateway Windows Service", Timestamp = DateTime.UtcNow, BaseDir = "TT Gateway", FTPPath = "TT Gateway"
            };

            ProjectControlSource source = new ProjectControlSource();

            source.Items = new List <ProjectControlSourceItem>();
            source.Items.Add(itemOne);
            source.Items.Add(itemTwo);
            source.Items.Add(itemThree);
            source.Items.Add(itemFour);
            source.Items.Add(itemFive);
            source.Items.Add(itemSix);
            source.BaseDir  = @"c:\dev\projects\";
            source.FTPHosts = new List <FTPHost>();
            //  source.FTPHosts.Add(new FTPHost {IPAddress= });
            // source.FTPHosts.Add("10.10.100.35");
            source.Save();
        }
Exemplo n.º 3
0
 public void Reload()
 {
     log.Debug("Reload called");
     checkcount = 0;
     projectRowsPanel.Children.Clear();
     source = PersistableJson.Load <ProjectControlSource>();
     log.Debug(source.Items + "items are in the project control source");
     foreach (ProjectControlSourceItem item in source.Items)
     {
         ProjectControl row = new ProjectControl();
         row.StatusUpdated += Row_StatusUpdated;
         row.Reload(item, source);
         row.trivialBump_RB.GroupName = "bumpGroup" + item.Project;
         row.minorBump_RB.GroupName   = "bumpGroup" + item.Project;
         row.majorBump_RB.GroupName   = "bumpGroup" + item.Project;
         projectRowsPanel.Children.Add(row);
     }
     foreach (FTPHost host in source.FTPHosts)
     {
         CheckBox ftpcheck = new CheckBox {
             Content = host.IPAddress, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(10, 0, 0, 0)
         };
         ftpcheck.DataContext = host;
         ftpcheck.SetBinding(ToggleButton.IsCheckedProperty, "Checked");
         ftpcheck.Checked   += Ftpcheck_Checked;
         ftpcheck.Unchecked += Ftpcheck_Unchecked;
         if (host.Checked == true)
         {
             checkcount++;
         }
         ServerChoices.Children.Add(ftpcheck);
     }
     if (checkcount < 1)
     {
         foreach (ProjectControl pc in projectRowsPanel.Children)
         {
             pc.DeployButton.IsEnabled = false;
         }
     }
 }