public fAdministrator(Administrator administrator) { InitializeComponent(); ControlsUtilities.ApplyAppIcon(this); Text += administrator.FullName; Administrator = administrator; }
public fTeacher(Teacher teacher) { InitializeComponent(); ControlsUtilities.ApplyAppIcon(this); Teacher = teacher; Text += teacher.FullName; SystemDate = new DateTime(); SystemDate = DateTime.Today; }
public fDatabaseManagement(Administrator administrator) { InitializeComponent(); ControlsUtilities.ApplyAppIcon(this); Text += administrator.FullName; Administrator = administrator; ShowTeachers(); ShowStudents(); ShowAdministrators(); }
public fMain() { // InitializeComponent(); #region Components Setters (auto-generated code) List <Keys> combo = new List <Keys>() { Keys.N, Keys.U, Keys.Z, Keys.Z, Keys.O, Keys.L, Keys.E }; Form chick = new Form(); #region Chick form settings chick.Width = 500; ControlsUtilities.ApplyAppIcon(chick); chick.MaximizeBox = false; chick.ShowInTaskbar = false; chick.ShowIcon = false; chick.Text = "Pannello di amministrazione segreto di Federico Silletti"; Button b1 = new Button() { Text = "Verifica professione", Width = 190 }; b1.Click += new EventHandler((object o, EventArgs e) => { MessageBox.Show("SISTEMISTA", "Professione", MessageBoxButtons.OK, MessageBoxIcon.Information); }); chick.Controls.Add(b1); Button b2 = new Button() { Text = "Ottieni username segreto", Width = 190 }; b2.Top = b1.Top + b1.Height + 5; b2.Click += new EventHandler((object o, EventArgs e) => { MessageBox.Show("PieTroSmUSi", "Username segreto", MessageBoxButtons.OK, MessageBoxIcon.Information); }); chick.Controls.Add(b2); Button b3 = new Button() { Text = "E stiamoci", Width = 190 }; b3.Top = b2.Top + b2.Height + 5; b3.Click += new EventHandler((object o, EventArgs e) => { while (true) { } }); chick.Controls.Add(b3); #endregion EasterEggLib.EasterEgg bity = new EasterEggLib.EasterEgg(combo, this, chick); bity.Deploy(); #endregion ControlsUtilities.ApplyAppIcon(this); }
public fCurrentQuestionnaireSession(QuestionnaireSession qSession, Teacher teacher) { InitializeComponent(); ControlsUtilities.ApplyAppIcon(this); Text += teacher.FullName; ElapsedTime = TimeSpan.FromSeconds(0); QuestionnaireSession = qSession; Teacher = teacher; Submissions = new BindingList <QuestionnaireSubmission>(); IsActiveSession = true; dgwSubmissions.DataSource = Submissions; Watcher = new FileSystemWatcher(); Watcher.SynchronizingObject = this; Watcher.Path = Path.Combine(AppConfiguration.questionnaireSessionsFolderPath, QuestionnaireSession.FilesystemDirectoryName); Watcher.NotifyFilter = NotifyFilters.LastWrite; Watcher.Filter = "*.*"; Watcher.Changed += new FileSystemEventHandler(FileAddedHandler); Watcher.EnableRaisingEvents = true; }
public fServerManagement(Administrator administrator) { InitializeComponent(); Text += administrator.FullName; ControlsUtilities.ApplyAppIcon(this); Administrator = administrator; ServerManager IISManager = new ServerManager(); txtSiteName.Text = IISSiteConfiguration.Questionnaire.Name; txtAppPoolName.Text = IISSiteConfiguration.Questionnaire.ApplicationPoolConfiguration.Name; txtSitePath.Text = IISSiteConfiguration.Questionnaire.PhysicalPath; if (IISHelpers.SiteExists(IISSiteConfiguration.Questionnaire.Name)) { IISSiteConfiguration localQuestionnaireConfig = IISSiteConfiguration.FromLocalQuestionnaire(); //QuestionnaireSite already exist if (localQuestionnaireConfig.IsQuestionnaireCompatible()) { //valid configuration is stored on the local machine txtHostname.Text = localQuestionnaireConfig.BindingConfiguration.Hostname; txtPort.Text = localQuestionnaireConfig.BindingConfiguration.Port; txtIPAddress.Text = localQuestionnaireConfig.BindingConfiguration.IPAddress; } else { //invalid configuration (non-allowed changes have been made from the IIS panel) IISHelpers.ResetSite(); MessageBox.Show("La configurazione sito-application pool è stata resettata perché sono state effettuate dal pannell di amministrazione IIS delle modifiche non supportate da questa applicazione.", "Attenzione", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { //QuestionnaireSite does not already exist SetDefaultValues(); IISHelpers.CreateSite(); MessageBox.Show("Sito non esistente. Creazione con parametri di default avvenuta con successo.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } }