コード例 #1
0
 public NewJob(ListBox Jobs, Sentinel JenkinsSentinel)
 {
     InitializeComponent();
     this.persistor = Persistor.GetInstance();
     this.jobs      = Jobs;
     this.sentinel  = JenkinsSentinel;
 }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();
            persistor = Persistor.GetInstance();

            if (File.Exists(Persistor.CredentialsFileName))
            {
                JenkinsCredentials creds = persistor.ReadCredentials();
                txt_username.Text = creds.Username;
                txt_passkey.Text  = creds.Password;
            }

            sentinel = new Sentinel(CHECK_PERIOD, this);
            if (File.Exists(Persistor.SentinelFileName))
            {
                Sentinel sentinelSave = persistor.ReadJobs();
                sentinel.Jobs             = sentinelSave.Jobs;
                sentinel.LastIndex        = sentinelSave.LastIndex;
                sentinel.WindowTopmost    = sentinelSave.WindowTopmost;
                sentinel.DefaultCloud     = sentinelSave.DefaultCloud;
                sentinel.InspectFrequency = sentinelSave.InspectFrequency;
            }

            this.Topmost = sentinel.WindowTopmost;
            sentinel.AddReportListener(ShowNotification);
        }
コード例 #3
0
 public JobEditor(ListBox Jobs, Sentinel JenkinsSentinel, JenkinsJob Job)
 {
     InitializeComponent();
     this.persistor  = Persistor.GetInstance();
     this.jobs       = Jobs;
     this.sentinel   = JenkinsSentinel;
     this.currentJob = Job;
     LoadJobData(Job);
 }