public CodeSend(string post, string xml, string post2, string licensePath, EnteringCodes f) { this.InitializeComponent(); this.postWarning = post; this.postWarning2 = post2; this.con = new Connection(); this.licensePath = licensePath; this.f = f; this.xml = xml; }
private void committee_Click(object sender, System.EventArgs e) { this.buttonNext.Visible = true; if ((sender as Button).Name == "buttonNext") { this.buttonNext.Enabled = false; this.clicNext = true; this.protocolForm1.Enabled = true; this.protocolForm2.Enabled = true; this.protocolSummation.Enabled = true; this.protocolCommittee.Enabled = false; this.signProtocol.Enabled = false; this.wait.setWaitPanel("Trwa walidacja protokołu", "Proszę czekać"); this.wait.setVisible(true); this.rangeValidation(this.Form2panel); this.checkFieldValidation(); this.isNotEmpty(this.Form2panel); this.isNotEmpty(this.raportPanel); this.lastValidation(this.Form2panel); this.isNotEmpty(this.SummationPanel); this.checkadnotation(); this.wait.setVisible(false); if (this.IsValid()) { this.error = false; } else { this.error = true; } this.saves(this.currentStep); if (!this.error) { this.clicNext = false; if (this.errorProvider1.hasHardWarning() || this.errorProvider1.hasWarning()) { this.printErrors(this.currentStep); } else { this.errorPanel.Visible = false; this.warningPanel.Visible = false; this.errorWarningPanel.Visible = false; } if (this.errorProvider1.hasHardWarning()) { this.validateExportedXml(this.currentStep); string[] pathItem = this.savePath.Split(new char[] { '\\' }); EnteringCodes entry = new EnteringCodes(pathItem[pathItem.Length - 1].Replace(".xml", ""), this.savePath, this.OU, this.licensePath, this); entry.ShowDialog(); if (this.goodcertificate) { this.raportPanel.Visible = false; this.currentStep = 4; this.protocolForm1.Enabled = true; this.protocolForm2.Enabled = true; this.protocolSummation.Enabled = true; this.protocolCommittee.Enabled = true; this.signProtocol.Enabled = false; this.committeePanel.Visible = true; this.errorPanel.Visible = false; this.Form1panel.Visible = false; this.Form2panel.Visible = false; this.personList.Visible = true; this.signPanel.Visible = false; this.SummationPanel.Visible = false; this.committeePanel.MaximumSize = new System.Drawing.Size(this.committeePanel.Size.Width, 0); this.committeePanel.Location = new System.Drawing.Point(0, this.protocolHeader.Size.Height + this.protocolHeader.Location.Y); this.committeePanel.AutoSize = true; this.protocolForm2.BackColor = System.Drawing.SystemColors.Control; this.protocolForm1.BackColor = System.Drawing.SystemColors.Control; this.protocolSummation.BackColor = System.Drawing.SystemColors.Control; this.protocolCommittee.BackColor = System.Drawing.SystemColors.GradientInactiveCaption; this.signProtocol.BackColor = System.Drawing.SystemColors.Control; this.getCommitee(); this.buttonNext.Click -= new System.EventHandler(this.protocolForm2_Click); this.buttonNext.Click -= new System.EventHandler(this.protocolSummation_Click); this.buttonNext.Click -= new System.EventHandler(this.committee_Click); this.buttonNext.Click -= new System.EventHandler(this.committeeValid_Click); this.buttonNext.Click -= new System.EventHandler(this.signProtocol_Click); this.buttonNext.Click += new System.EventHandler(this.committeeValid_Click); this.bottomPanel.Location = new System.Drawing.Point(this.committeePanel.Location.X, this.committeePanel.Location.Y + this.committeePanel.Size.Height); this.setFirstFocus(this.committeePanel); this.saves(this.currentStep); } this.goodcertificate = false; } else { this.currentStep = 4; this.protocolForm1.Enabled = true; this.protocolForm2.Enabled = true; this.protocolSummation.Enabled = true; this.protocolCommittee.Enabled = true; this.signProtocol.Enabled = false; this.committeePanel.Visible = true; this.errorPanel.Visible = false; this.Form1panel.Visible = false; this.Form2panel.Visible = false; this.personList.Visible = true; this.signPanel.Visible = false; this.SummationPanel.Visible = false; this.committeePanel.MaximumSize = new System.Drawing.Size(this.committeePanel.Size.Width, 0); this.committeePanel.Location = new System.Drawing.Point(0, this.protocolHeader.Size.Height + this.protocolHeader.Location.Y); this.committeePanel.AutoSize = true; this.protocolForm2.BackColor = System.Drawing.SystemColors.Control; this.protocolForm1.BackColor = System.Drawing.SystemColors.Control; this.protocolSummation.BackColor = System.Drawing.SystemColors.Control; this.protocolCommittee.BackColor = System.Drawing.SystemColors.GradientInactiveCaption; this.signProtocol.BackColor = System.Drawing.SystemColors.Control; this.getCommitee(); this.setFirstFocus(this.committeePanel); this.saves(this.currentStep); } } else { this.setFirstFocus(); this.printErrors(this.currentStep); } this.error = false; } else { this.raportPanel.Visible = false; this.lockHeader(); this.lockHeader(); this.setFirstFocus(this.committeePanel); this.committeePanel.Visible = true; this.errorPanel.Visible = false; this.Form1panel.Visible = false; this.Form2panel.Visible = false; this.personList.Visible = true; this.signPanel.Visible = false; this.SummationPanel.Visible = false; this.committeePanel.MaximumSize = new System.Drawing.Size(this.committeePanel.Size.Width, 0); this.committeePanel.Location = new System.Drawing.Point(0, this.protocolHeader.Size.Height + this.protocolHeader.Location.Y); this.committeePanel.AutoSize = true; this.protocolForm2.BackColor = System.Drawing.SystemColors.Control; this.protocolForm1.BackColor = System.Drawing.SystemColors.Control; this.protocolSummation.BackColor = System.Drawing.SystemColors.Control; this.protocolCommittee.BackColor = System.Drawing.SystemColors.GradientInactiveCaption; this.signProtocol.BackColor = System.Drawing.SystemColors.Control; if (this.currentStep != 4) { this.buttonNext.Text = "Dalej"; this.buttonNext.Enabled = false; } else { this.buttonNext.Text = "Dalej"; this.buttonNext.Click -= new System.EventHandler(this.protocolForm2_Click); this.buttonNext.Click -= new System.EventHandler(this.protocolSummation_Click); this.buttonNext.Click -= new System.EventHandler(this.committee_Click); this.buttonNext.Click -= new System.EventHandler(this.committeeValid_Click); this.buttonNext.Click -= new System.EventHandler(this.signProtocol_Click); this.buttonNext.Click += new System.EventHandler(this.committeeValid_Click); this.buttonNext.Enabled = true; } this.setFirstFocus(); this.bottomPanel.Location = new System.Drawing.Point(this.committeePanel.Location.X, this.committeePanel.Location.Y + this.committeePanel.Size.Height); this.saves(this.currentStep); } this.buttonNext.Enabled = true; }