Brutte notizie: niente da fare, stesso errore...
Il codice l'ho transformato così:
[CODE] private void login_form_Load(object sender, EventArgs e)
{
Panel pnlTop = new Panel() { Height = 4, Dock = DockStyle.Top, BackColor = Color.FromArgb(0, 102, 204) };
this.Controls.Add(pnlTop);
Panel pnlRight = new Panel() { Width = 4, Dock = DockStyle.Right, BackColor = Color.FromArgb(0, 102, 204) };
this.Controls.Add(pnlRight);
Panel pnlBottom = new Panel() { Height = 4, Dock = DockStyle.Bottom, BackColor = Color.FromArgb(0, 102, 204) };
this.Controls.Add(pnlBottom);
Panel pnlLeft = new Panel() { Width = 4, Dock = DockStyle.Left, BackColor = Color.FromArgb(0, 102, 204) };
this.Controls.Add(pnlLeft);
using (OleDbConnection cnn1 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Config.FileUtenti() + ";Jet OLEDB:Database Password=" + Config.FileUtentiPWD()))
using (OleDbCommand cm1 = new OleDbCommand("Select * from Utenti WHERE NOT Nome_Utente='Administrator'", cnn1))
{
cnn1.Open();
OleDbDataReader reader = cm1.ExecuteReader();
while (reader.Read())
{
if(reader.GetString(2) == "Yes" || reader.GetString(2) == "yes" || reader.GetString(2) == "Si" || reader.GetString(2) == "si")
{
guna2ComboBox1.Items.Add(reader.GetString(0));
}
else
{
UtentiList.utenti.Add(reader.GetString(0));
guna2ComboBox1.Items.Add(reader.GetString(0));
}
}
reader.Close();
cnn1.Close();
}
UtentiList.utenti.Add("Administrator");
using (OleDbConnection cnn2 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Config.FileUtenti() + ";Jet OLEDB:Database Password=" + Config.FileUtentiPWD()))
using (OleDbCommand cm2 = new OleDbCommand("Select * from Utenti WHERE NOT Nome_Utente='Administrator'", cnn2))
{
cnn2.Open();
OleDbDataReader reader2 = cm2.ExecuteReader();
UtentiList.utenti.Clear();
while (reader2.Read())
{
UtentiList.utenti.Add(reader2.GetString(0));
}
reader2.Close();
cnn2.Close();
};
for (int k = 0; k < UtentiList.utenti.Count; k++)
{
if (UtentiList.utenti[k].ToString() == "Administrator")
{
UtentiList.utenti.RemoveAt(k);
break;
}
}
if(isAdmin())
{
for (int i = 0; i < guna2ComboBox1.Items.Count; i++)
{
if (guna2ComboBox1.Items[i].ToString() != "Administrator")
{
guna2ComboBox1.Items.Add("Administrator");
break;
}
}
}
else
{
for(int i = 0;i < guna2ComboBox1.Items.Count;i++)
{
if(guna2ComboBox1.Items[i].ToString() == "Administrator")
{
guna2ComboBox1.Items.RemoveAt(i);
}
}
}
Guna.UI2.WinForms.Guna2AnimateWindow animatewindow = new Guna.UI2.WinForms.Guna2AnimateWindow();
animatewindow.SetAnimateWindow(this, Guna.UI2.WinForms.Guna2AnimateWindow.AnimateWindowType.AW_BLEND, 700);
}
Ma da stesso errore, a questo punto penso che sia un problema del nas e non del software...