Exemplo n.º 1
0
 public BuildParameters(MainFormController controller, List <ParameterBase> buildParameters)
 {
     InitializeComponent();
     myController = controller;
     myParameters = new Dictionary <string, ParameterBase>();
     foreach (ParameterBase parameter in buildParameters)
     {
         myParameters.Add(parameter.Name, parameter);
     }
     myParameterHolder = GenerateParametersClass();
     ApplyParameters();
     parameters.SelectedObject = myParameterHolder;
 }
Exemplo n.º 2
0
 public BuildParameters(MainFormController controller, List<ParameterBase> buildParameters)
 {
     InitializeComponent();
     myController = controller;
     myParameters = new Dictionary<string, ParameterBase>();
     foreach (ParameterBase parameter in buildParameters)
     {
         myParameters.Add(parameter.Name, parameter);
     }
     myParameterHolder = GenerateParametersClass();
     ApplyParameters();
     parameters.SelectedObject = myParameterHolder;
 }
Exemplo n.º 3
0
        private void CreateController()
        {
            controller = new MainFormController(configuration, this);

            DataBindings.Add("Icon", controller.ProjectStateIconAdaptor, "Icon");

            controller.PopulateImageList(iconList);
            controller.PopulateImageList(largeIconList);
            controller.BindToTrayIcon(trayIcon);
            controller.BindToListView(lvProjects);

            controller.IsProjectSelectedChanged += new EventHandler(Controller_IsProjectSelectedChanged);
            btnForceBuild.DataBindings.Add("Enabled", controller, "IsProjectSelected");
        }
        public BuildParameters(MainFormController controller, List <ParameterBase> buildParameters)
        {
            InitializeComponent();
            myController = controller;
            myParameters = new Dictionary <string, ParameterBase>();
            foreach (ParameterBase parameter in buildParameters)
            {
                myParameters.Add(parameter.Name, parameter);
            }
            myParameterHolder = GenerateParametersClass();
            ApplyParameters();
            parameters.SelectedObject = myParameterHolder;

            this.Text = string.Format("Build parameters for {0}", myController.SelectedProject.Detail.ProjectName);
            HookPersistentWindowState();
        }
Exemplo n.º 5
0
        public BuildParameters(MainFormController controller, List<ParameterBase> buildParameters)
        {
            InitializeComponent();
            myController = controller;
            myParameters = new Dictionary<string, ParameterBase>();
            foreach (ParameterBase parameter in buildParameters)
            {
                myParameters.Add(parameter.Name, parameter);
            }
            myParameterHolder = GenerateParametersClass();
            ApplyParameters();
            parameters.SelectedObject = myParameterHolder;

            this.Text = string.Format("Build parameters for {0}", myController.SelectedProject.Detail.ProjectName);
            HookPersistentWindowState();               
        }
Exemplo n.º 6
0
		static void Main(string[] args) {
			string settingsFilename = GetSettingsFilename(args.ToList());

			var remoteCruiseManagerFactory = new CruiseServerClientFactory();
			ICruiseServerManagerFactory cruiseServerManagerFactory = new CruiseServerManagerFactory(remoteCruiseManagerFactory);
			ICruiseProjectManagerFactory cruiseProjectManagerFactory = new CruiseProjectManagerFactory(remoteCruiseManagerFactory);
			CCTrayMultiConfiguration configuration = new CCTrayMultiConfiguration(cruiseServerManagerFactory, cruiseProjectManagerFactory, settingsFilename);
			var sync = new NoOpSynchronizeInvoke();

			var controller = new MainFormController(configuration, sync, null);

			controller.StartServerMonitoring();

			Console.ReadKey();

			controller.StopServerMonitoring();
		}
		public void SetUp()
		{
			mockProjectMonitor = new DynamicMock(typeof (IProjectMonitor));
			mockProjectMonitor.Strict = true;
			projectMonitor = (IProjectMonitor) mockProjectMonitor.MockInstance;

			mockConfiguration = new DynamicMock(typeof (ICCTrayMultiConfiguration));
			configuration = (ICCTrayMultiConfiguration) mockConfiguration.MockInstance;
            
            ISingleServerMonitor[] serverMonitors = new ISingleServerMonitor[0];
            mockConfiguration.SetupResult("GetServerMonitors", serverMonitors);
            mockConfiguration.SetupResult("GetProjectStatusMonitors", new IProjectMonitor[0], typeof(ISingleServerMonitor[]));
			mockConfiguration.SetupResult("Icons", new Icons());
            mockConfiguration.SetupResult("FixUserName", "John");
            GrowlConfiguration growlConfig = new GrowlConfiguration();
            mockConfiguration.SetupResult("Growl", growlConfig);            

			eventCount = 0;

			controller = new MainFormController(configuration, null, null);
		}
Exemplo n.º 8
0
        private void CreateController()
        {
            controller = new MainFormController(configuration, this, this);

            DataBindings.Add("Icon", controller.ProjectStateIconAdaptor, "Icon");

            controller.PopulateImageList(iconList);
            controller.PopulateImageList(largeIconList);
            controller.BindToTrayIcon(this.iconFacade);
            controller.BindToListView(lvProjects);
            controller.PopulateQueueImageList(queueIconList);
            controller.SetFormTopMost(this);
            controller.SetFormShowInTaskbar(this);

            if (queueViewPanelVisible)
                controller.BindToQueueTreeView(queueTreeView);

            foreach (IProjectMonitor mon in controller.Monitors)
                mon.Polled += mon_Polled;

            btnForceBuild.DataBindings.Add("Enabled", controller, "ShowForceBuildButton");
            btnStartStopProject.DataBindings.Add("Enabled", controller, "ShowStartStopButton");
        }
Exemplo n.º 9
0
        private void CreateController()
        {
            controller = new MainFormController(configuration, this);

            DataBindings.Add("Icon", controller.ProjectStateIconAdaptor, "Icon");

            controller.PopulateImageList(iconList);
            controller.PopulateImageList(largeIconList);
            controller.BindToTrayIcon(trayIcon);
            controller.BindToListView(lvProjects);

            controller.IsProjectSelectedChanged += new EventHandler(Controller_IsProjectSelectedChanged);
            btnForceBuild.DataBindings.Add("Enabled", controller, "IsProjectSelected");
        }