L
LuigiB
Guest
si , hai provato te l icrea gl iarchivi ?Ok quindi una cosa del genere
Codice:Public Enum eValoriAppConfig Archivio RangeInizio Rangefine chkRuoteSel SfondoColoreNumeri ForeColorNumeri SfondoColoreNumEvidenziato ForeColorNumEvidenziato ArchivioCorrente ArchiviParalleli <================================ End Enum
Codice:Public Class frmCreaArchPar Private bStop As Boolean Dim cAp As ClsCreaArcParallelo Dim cApNew As ClsCreaArcParallelo Private Sub FrmArchiviParalleli_Load(sender As Object, e As EventArgs) Handles MyBase.Load AggiornaStatoComboBox() LoadComboQuantita() End Sub Sub AggiornaStatoComboBox() If ConvertToInt(GetValoreCfg(eValoriAppConfig.ArchiviParalleli)) = 0 Then SalvaValoreCfg(eValoriAppConfig.ArchiviParalleli, "0") End If End Sub Sub LoadComboQuantita() Me.ComboBox1.Items.Clear() For k As Integer = 1 To 5 ComboBox1.Items.Add(k) Next ComboBox1.SelectedIndex = GetValoreCfg(eValoriAppConfig.ArchiviParalleli) End Sub Sub GestioneEsegui() Dim nDaFare As Integer = ComboBox1.SelectedItem bStop = False cAp = New ClsCreaArcParallelo(cArchivio.FileEstrazioni, Nothing) For k As Integer = 1 To nDaFare cApNew = New ClsCreaArcParallelo(GetPercorsoFileArchivioParallelo(k), cAp) cApNew.CreaArchivioParallelo(CheckBox1.Checked, ProgressBar2) ProgressBar1.Value = Percentuale(k, nDaFare) Application.DoEvents() cAp = cApNew If bStop Then Exit For Next cAp = Nothing cApNew = Nothing End Sub Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click If ButtonOK.Text = "OK" Then SalvaValoreCfg(eValoriAppConfig.ArchiviParalleli, ComboBox1.SelectedIndex.ToString) ButtonOK.Text = "STOP" ButtonAnnulla.Enabled = False GroupBox1.Enabled = False GestioneEsegui() ButtonOK.Text = "OK" GroupBox1.Enabled = True ButtonAnnulla.Enabled = True MessageBox.Show("Fine processo", "Fine", MessageBoxButtons.OK, MessageBoxIcon.Information) Me.Close() Else cApNew.StopProcess() End If End Sub Private Sub ButtonAnnulla_Click(sender As Object, e As EventArgs) Handles ButtonAnnulla.Click Me.Close() End Sub End Class