public SettingsPage2(Form parent) { this.parent = parent; InitializeComponent(); btnAutoAlarm = new ALSButton(); alarm = new ALSAlarm(); goBack = new ALSButton(); int btnWidth = (Width - MainMenu.GAP * 8) / 7; btnAutoAlarm.Text = CVInterface.GetAutoAlarm() ? "Disable\nauto-alarm" : "Enable\nauto-alarm"; btnAutoAlarm.Size = new Size(btnWidth, btnWidth); btnToggleDecay = new ALSButton(); btnToggleDecay.Text = isDecay ? "Prevent\nDecay" : "Allow\nDecay"; btnToggleDecay.Size = new Size(btnWidth, btnWidth); btnToggleDecay.Click += btnDecay_Click; Controls.Add(btnToggleDecay); Controls.Add(btnAutoAlarm); Controls.Add(goBack); Controls.Add(alarm); goBack.Click += new System.EventHandler(this.GoBack_Click); goBack.Text = "Go Back"; Resize += this.Resize_SettingsScreen; btnAutoAlarm.Click += this.btAutoAlarm_Click; }
public About() { InitializeComponent(); btnAlarm = new ALSAlarm(); btnBack = new ALSButton(); lblObjective = new Label(); btnBack.Text = "Back"; lblObjective.Text = "This application is an Oklahoma Christian University systems " + "design project. Team eyePad's members consist of " + "Allison Chilton, Daniel Griffin, and Drew Harris. The team mentor " + "is Professor Steve Maher, and the customer is Ash Srinivas.\n\n" + "Team eyePad’s goal is to create a series of products that increase " + "the quality of life of people that have Amyotrophic Lateral Sclerosis " + "the designing an assistive interface via an application suite that " + "the increase the ability to communicate and function independently.\n\n" + "This application is dedicated to " + "Dr. Weyton Tam."; btnBack.Click += BtnBack_Click; lblObjective.TextAlign = ContentAlignment.TopCenter; lblObjective.ForeColor = Color.AntiqueWhite; Controls.Add(btnAlarm); Controls.Add(btnBack); Controls.Add(lblObjective); btnAlarm.Location = new Point(MainMenu.GAP, MainMenu.GAP); }
private void Timer_Tick(object sender, EventArgs e) { ALSAlarm alarm = new ALSAlarm(); if (!alarm.isAlarmOn()) { alarm.PerformClick(); } timer.Stop(); }
private void EyeXHost_EyeTrackingDeviceStatusChanged(object sender, EngineStateValue <EyeTrackingDeviceStatus> e) { if (AutoAlarm && e.Value.Equals(EyeTrackingDeviceStatus.DeviceNotConnected)) { ALSAlarm alarm = new ALSAlarm(); if (!alarm.isAlarmOn()) { alarm.PerformClick(); } } }
private void InitializeControls() { btnAlarm = new ALSAlarm(); btnSwitchAccount = new ALSButton(); btnCompose = new ALSButton(); btnRefresh = new ALSButton(); btnDelete = new ALSButton(); btnMainMenu = new ALSButton(); btnMoveUp = new ALSButton(); btnMoveDown = new ALSButton(); btnSelect = new ALSButton(); lbEmails = new ListBox(); btnSwitchAccount.Text = "Switch\nAccount"; btnCompose.Text = "Compose"; btnRefresh.Text = "Refresh"; btnDelete.Text = "Delete"; btnMainMenu.Text = "Main\nMenu"; btnMoveUp.BackgroundImage = Properties.Resources.UpArrow; btnMoveUp.BackgroundImageLayout = ImageLayout.Zoom; btnMoveDown.BackgroundImage = Properties.Resources.DownArrow; btnMoveDown.BackgroundImageLayout = ImageLayout.Zoom; btnSelect.Text = "Select"; lbEmails.Font = new Font(lbEmails.Font.FontFamily, 20); btnSwitchAccount.Click += BtnSwitchAccount_Click; btnCompose.Click += BtnCompose_Click; btnRefresh.Click += BtnRefresh_Click; btnDelete.Click += BtnDelete_Click; btnMainMenu.Click += BtnMainMenu_Click; btnMoveUp.Click += BtnMoveUp_Click; btnMoveDown.Click += BtnMoveDown_Click; btnSelect.Click += BtnSelect_Click; Controls.Add(btnAlarm); Controls.Add(btnSwitchAccount); Controls.Add(btnCompose); Controls.Add(btnRefresh); Controls.Add(btnDelete); Controls.Add(btnMainMenu); Controls.Add(btnMoveUp); Controls.Add(btnMoveDown); Controls.Add(btnSelect); Controls.Add(lbEmails); lbEmails.Focus(); lbEmails.SelectedIndexChanged += LbEmails_SelectedIndexChanged; }
public LockScreen() { InitializeComponent(); _lock = new ALSButton(); alarm = new ALSAlarm(); Controls.Add(_lock); Controls.Add(alarm); _lock.Click += new System.EventHandler(this.Lock_Click); _lock.BackgroundImage = Properties.Resources.Unlock; _lock.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom; Resize += this.Resize_LockScreen; }
private void InitializeControls(bool isQwerty) { btnAlarm = new ALSAlarm(); txtTo = new ALSTextbox(); txtSubject = new ALSTextbox(); txtBody = new ALSTextbox(); btnCancel = new ALSButton(); btnSend = new ALSButton(); if (isQwerty) { keyboard = new LargeButtonKeyboard(); } else { keyboard = new QwertyKeyboard(); } txtTo.Multiline = true; txtSubject.Multiline = true; btnCancel.Text = "Cancel"; btnSend.Text = "Send"; txtTo.Text = "To:"; txtSubject.Text = "Subject:"; txtBody.Text = "Body:"; Controls.Add(btnAlarm); Controls.Add(txtTo); Controls.Add(txtSubject); Controls.Add(txtBody); Controls.Add(btnCancel); Controls.Add(btnSend); Controls.Add(keyboard); btnCancel.Click += BtnCancel_Click; btnSend.Click += BtnSend_Click; txtTo.Click += TxtTo_Click; txtSubject.Click += TxtSubject_Click; txtBody.Click += TxtBody_Click; txtTo.Font = new Font(txtTo.Font.FontFamily, 20); txtSubject.Font = new Font(txtSubject.Font.FontFamily, 20); txtBody.Font = new Font(txtBody.Font.FontFamily, 20); keyboard.HideTextBox(); txtBody.Multiline = true; }
private void InitializeControls(bool isQwerty) { btnAlarm = new ALSAlarm(); btnLogout = new ALSButton(); btnCancel = new ALSButton(); btnLogin = new ALSButton(); txtLoginBox = new ALSTextbox(); txtPassword = new ALSTextbox(); if (isQwerty) { keyboard = new LargeButtonKeyboard(); } else { keyboard = new QwertyKeyboard(); } txtLoginBox.Multiline = true; txtPassword.Multiline = true; btnLogout.Text = "Log\nOut"; btnCancel.Text = "Cancel"; btnLogin.Text = "Log\nIn"; Controls.Add(btnAlarm); Controls.Add(btnLogout); Controls.Add(btnCancel); Controls.Add(btnLogin); Controls.Add(txtLoginBox); Controls.Add(txtPassword); Controls.Add(keyboard); btnLogout.Click += BtnLogout_Click; btnCancel.Click += BtnCancel_Click; btnLogin.Click += BtnLogin_Click; txtLoginBox.Font = new Font(txtLoginBox.Font.FontFamily, 20); txtPassword.Font = new Font(txtPassword.Font.FontFamily, 20); keyboard.HideTextBox(); txtLoginBox.Focus(); }
private void InitializeControls() { btnAlarm = new ALSAlarm(); btnRespond = new ALSButton(); btnPageUp = new ALSButton(); btnUp = new ALSButton(); btnDown = new ALSButton(); btnPageDown = new ALSButton(); btnBack = new ALSButton(); tbEmail = new TextBox(); panel = new Panel(); btnRespond.Text = "Respond"; btnPageUp.Text = "Page\nup"; btnUp.Text = "Scroll\nUp"; btnDown.Text = "Scroll\nDown"; btnPageDown.Text = "Page\nDown"; btnBack.Text = "Back"; btnRespond.Click += BtnRespond_Click; btnPageUp.Click += BtnPageUp_Click; btnUp.Click += BtnUp_Click; btnDown.Click += BtnDown_Click; btnPageDown.Click += BtnPageDown_Click; btnBack.Click += BtnBack_Click; panel.Controls.Add(tbEmail); Controls.Add(btnAlarm); Controls.Add(btnRespond); Controls.Add(btnPageUp); Controls.Add(btnUp); Controls.Add(btnDown); Controls.Add(btnPageDown); Controls.Add(btnBack); Controls.Add(panel); tbEmail.Multiline = true; tbEmail.ReadOnly = true; panel.AutoScroll = true; tbEmail.Size = new Size(100, 700); }
private void EyeXHost_EyeTrackingDeviceStatusChanged(object sender, EngineStateValue<EyeTrackingDeviceStatus> e) { if (AutoAlarm && e.Value.Equals(EyeTrackingDeviceStatus.DeviceNotConnected)) { ALSAlarm alarm = new ALSAlarm(); if (!alarm.isAlarmOn()) { alarm.PerformClick(); } } }
private void InitializeControls(bool isQwerty) { btnAlarm = new ALSAlarm(); txtTo = new ALSTextbox(); txtSubject = new ALSTextbox(); txtBody = new ALSTextbox(); btnCancel = new ALSButton(); btnSend = new ALSButton(); if (isQwerty) keyboard = new LargeButtonKeyboard(); else keyboard = new QwertyKeyboard(); txtTo.Multiline = true; txtSubject.Multiline = true; btnCancel.Text = "Cancel"; btnSend.Text = "Send"; txtTo.Text = "To:"; txtSubject.Text = "Subject:"; txtBody.Text = "Body:"; Controls.Add(btnAlarm); Controls.Add(txtTo); Controls.Add(txtSubject); Controls.Add(txtBody); Controls.Add(btnCancel); Controls.Add(btnSend); Controls.Add(keyboard); btnCancel.Click += BtnCancel_Click; btnSend.Click += BtnSend_Click; txtTo.Click += TxtTo_Click; txtSubject.Click += TxtSubject_Click; txtBody.Click += TxtBody_Click; txtTo.Font = new Font(txtTo.Font.FontFamily, 20); txtSubject.Font = new Font(txtSubject.Font.FontFamily, 20); txtBody.Font = new Font(txtBody.Font.FontFamily, 20); keyboard.HideTextBox(); txtBody.Multiline = true; }
public Callout(bool isQwerty) { InitializeComponent(); ac = new AddCallout(isQwerty); ac.Callouts_Click += Ac_Callouts_Click; //setup callout list phrases = new List <String>(); populateList(); //this.Parent = parent; topRowButtons = new ALSButton[6]; topRowButtons[0] = new ALSAlarm(); for (int i = 1; i < topRowButtons.Length; i++) { topRowButtons[i] = new ALSButton(); } topRowButtons[1].Text = "Edit"; topRowButtons[2].Text = "Page\nLeft"; topRowButtons[3].Text = "Page\nRight"; topRowButtons[4].Text = "Text to\nSpeech"; topRowButtons[5].Text = "Main\nMenu"; topRowButtons[1].Click += new System.EventHandler(this.edit_Click); topRowButtons[2].Click += new System.EventHandler(this.pageLeft); topRowButtons[3].Click += new System.EventHandler(this.pageRight); topRowButtons[4].Click += new System.EventHandler(this.btnTextToSpeech_Click); topRowButtons[5].Click += new System.EventHandler(this.btnMainMenu_Click); ac.getSaveButton().Click += new EventHandler(this.addToList); foreach (ALSButton btn in topRowButtons) { Controls.Add(btn); btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); } callouts = new ALSButton[4, NUM_CALLOUTS]; for (int i = 0; i < callouts.GetLength(0); i++) { for (int j = 0; j < callouts.GetLength(1); j++) { callouts[i, j] = new ALSButton(); Controls.Add(callouts[i, j]); } } for (int i = 0; i < callouts.GetLength(1); i++) { callouts[0, i].Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); callouts[0, i].Click += new EventHandler(this.speakCallout); } for (int i = 1; i < callouts.GetLength(0); i++) { for (int j = 0; j < callouts.GetLength(1); j++) { switch (i) { case 1: callouts[i, j].BackgroundImage = Properties.Resources.trashcan; callouts[i, j].Name = "btnDel" + j; callouts[i, j].Click += new System.EventHandler(this.deleteItem); break; case 2: callouts[i, j].Text = "Up"; callouts[i, j].Name = "btnUp" + j; callouts[i, j].Click += new System.EventHandler(this.moveItemUp); break; case 3: callouts[i, j].Text = "Down"; callouts[i, j].Name = "btnDown" + j; callouts[i, j].Click += new EventHandler(this.moveItemDown); break; } callouts[i, j].BackgroundImageLayout = ImageLayout.Zoom; callouts[i, j].Visible = false; } } refreshCalloutList(); }
private void InitializeControls(bool isQwerty) { btnAlarm = new ALSAlarm(); btnLogout = new ALSButton(); btnCancel = new ALSButton(); btnLogin = new ALSButton(); txtLoginBox = new ALSTextbox(); txtPassword = new ALSTextbox(); if (isQwerty) keyboard = new LargeButtonKeyboard(); else keyboard = new QwertyKeyboard(); txtLoginBox.Multiline = true; txtPassword.Multiline = true; btnLogout.Text = "Log\nOut"; btnCancel.Text = "Cancel"; btnLogin.Text = "Log\nIn"; Controls.Add(btnAlarm); Controls.Add(btnLogout); Controls.Add(btnCancel); Controls.Add(btnLogin); Controls.Add(txtLoginBox); Controls.Add(txtPassword); Controls.Add(keyboard); btnLogout.Click += BtnLogout_Click; btnCancel.Click += BtnCancel_Click; btnLogin.Click += BtnLogin_Click; txtLoginBox.Font = new Font(txtLoginBox.Font.FontFamily, 20); txtPassword.Font = new Font(txtPassword.Font.FontFamily, 20); keyboard.HideTextBox(); txtLoginBox.Focus(); }
ALSButton[] topRowButtons; //[Alarm, Add, Edit, PageLeft, PageRight, Back] #endregion Fields #region Constructors public Notebook(bool isQwerty) { InitializeComponent(); notepage = new Notepage(isQwerty); indexBeingEdited = -1; //setup note list phrases = new List<String>(); populateList(); //this.Parent = parent; topRowButtons = new ALSButton[6]; topRowButtons[0] = new ALSAlarm(); for (int i = 1; i < topRowButtons.Length; i++) topRowButtons[i] = new ALSButton(); topRowButtons[1].Text = "Delete"; topRowButtons[2].Text = "Page\nLeft"; topRowButtons[3].Text = "Page\nRight"; topRowButtons[4].Text = "New\nNote"; topRowButtons[5].Text = "Main\nMenu"; topRowButtons[1].Click += new System.EventHandler(this.edit_Click); topRowButtons[2].Click += new System.EventHandler(this.pageLeft); topRowButtons[3].Click += new System.EventHandler(this.pageRight); topRowButtons[4].Click += new System.EventHandler(this.NewNote_Click); topRowButtons[5].Click += new System.EventHandler(this.btnMainMenu_Click); notepage.getBackBtn().Click += new System.EventHandler(this.Notebook_Show); //notepage.getSaveButton().Click += new EventHandler(this.addToList); // there is no save button... notepage.Back_Click += Notepage_Back_Click; topRowButtons[2].Enabled = false; if (NUM_NOTES > phrases.Count) topRowButtons[3].Enabled = false; foreach (ALSButton btn in topRowButtons) { Controls.Add(btn); btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); } notes = new ALSButton[2, NUM_NOTES]; for (int i = 0; i < notes.GetLength(0); i++) for (int j = 0; j < notes.GetLength(1); j++) { notes[i, j] = new ALSButton(); Controls.Add(notes[i, j]); } for (int i = 0; i < notes.GetLength(1); i++) { notes[0, i].Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); notes[0, i].Click += new EventHandler(this.EditNote); notes[0, i].Name = "btnNotepage" + i; } for (int i = 1; i < notes.GetLength(0); i++) for (int j = 0; j < notes.GetLength(1); j++) { switch (i) { case 1: notes[i, j].BackgroundImage = Properties.Resources.trashcan; notes[i, j].Name = "btnDel" + j; notes[i, j].Click += new System.EventHandler(this.deleteItem); break; } notes[i, j].BackgroundImageLayout = ImageLayout.Zoom; notes[i, j].Visible = false; } flipToPage(0); }
public Notebook(bool isQwerty) { InitializeComponent(); notepage = new Notepage(isQwerty); indexBeingEdited = -1; //setup note list phrases = new List <String>(); populateList(); //this.Parent = parent; topRowButtons = new ALSButton[6]; topRowButtons[0] = new ALSAlarm(); for (int i = 1; i < topRowButtons.Length; i++) { topRowButtons[i] = new ALSButton(); } topRowButtons[1].Text = "Delete"; topRowButtons[2].Text = "Page\nLeft"; topRowButtons[3].Text = "Page\nRight"; topRowButtons[4].Text = "New\nNote"; topRowButtons[5].Text = "Main\nMenu"; topRowButtons[1].Click += new System.EventHandler(this.edit_Click); topRowButtons[2].Click += new System.EventHandler(this.pageLeft); topRowButtons[3].Click += new System.EventHandler(this.pageRight); topRowButtons[4].Click += new System.EventHandler(this.NewNote_Click); topRowButtons[5].Click += new System.EventHandler(this.btnMainMenu_Click); notepage.getBackBtn().Click += new System.EventHandler(this.Notebook_Show); //notepage.getSaveButton().Click += new EventHandler(this.addToList); // there is no save button... notepage.Back_Click += Notepage_Back_Click; topRowButtons[2].Enabled = false; if (NUM_NOTES > phrases.Count) { topRowButtons[3].Enabled = false; } foreach (ALSButton btn in topRowButtons) { Controls.Add(btn); btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); } notes = new ALSButton[2, NUM_NOTES]; for (int i = 0; i < notes.GetLength(0); i++) { for (int j = 0; j < notes.GetLength(1); j++) { notes[i, j] = new ALSButton(); Controls.Add(notes[i, j]); } } for (int i = 0; i < notes.GetLength(1); i++) { notes[0, i].Font = new System.Drawing.Font("Microsoft Sans Serif", 40F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); notes[0, i].Click += new EventHandler(this.EditNote); notes[0, i].Name = "btnNotepage" + i; } for (int i = 1; i < notes.GetLength(0); i++) { for (int j = 0; j < notes.GetLength(1); j++) { switch (i) { case 1: notes[i, j].BackgroundImage = Properties.Resources.trashcan; notes[i, j].Name = "btnDel" + j; notes[i, j].Click += new System.EventHandler(this.deleteItem); break; } notes[i, j].BackgroundImageLayout = ImageLayout.Zoom; notes[i, j].Visible = false; } } flipToPage(0); }