void ReleaseDesignerOutlets() { if (ButtonSend != null) { ButtonSend.Dispose(); ButtonSend = null; } if (LabelParticipantCount != null) { LabelParticipantCount.Dispose(); LabelParticipantCount = null; } if (LabelTitle != null) { LabelTitle.Dispose(); LabelTitle = null; } if (TableViewMessages != null) { TableViewMessages.Dispose(); TableViewMessages = null; } if (TextNewMessage != null) { TextNewMessage.Dispose(); TextNewMessage = null; } }
private void InputTextBox_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { ButtonSend.PerformClick(); } }
private void PassTextBox_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Up: LabelUserText.Text = String.Empty; e.SuppressKeyPress = true; LabelUserText.Focus(); break; case Keys.Enter: case Keys.Down: if (LabelUserText.Text.Length > 3 && PassTextBox.Text.Length > 3) { e.SuppressKeyPress = true; ButtonSend.Focus(); } else { BackPanelPassText.BackColor = Color.Red; } break; case Keys.Escape: PassTextBox.Text = String.Empty; break; } }
/// <summary> /// Device disconnected /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void DeviceDisConnected() { statusLabel.Text = "Disconnected"; ButtonConnect.Show(); ButtonDisconnect.Hide(); ButtonInit.Hide(); ButtonWash.Hide(); ButtonSend.Hide(); TextBoxCmd.Hide(); sendGroupBox.Hide(); }
void ReleaseDesignerOutlets() { if (Image != null) { Image.Dispose(); Image = null; } if (HeaderText != null) { HeaderText.Dispose(); HeaderText = null; } if (FooterText != null) { FooterText.Dispose(); FooterText = null; } if (ButtonDetails != null) { ButtonDetails.Dispose(); ButtonDetails = null; } if (ButtonCancel != null) { ButtonCancel.Dispose(); ButtonCancel = null; } if (ButtonSend != null) { ButtonSend.Dispose(); ButtonSend = null; } if (Details != null) { Details.Dispose(); Details = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } }
/// <summary> /// Выделенная из списка задача клонируется. /// Выведенные в таблице строки параметров позволяют установить желаемые значения. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <remarks></remarks> private void ComboBoxTasks_SelectedIndexChanged(object sender, EventArgs e) { if (ComboBoxTasks.SelectedIndex != -1) { ManagerTaskApplication.TaskApplication selectedTask = (ManagerTaskApplication.TaskApplication)ComboBoxTasks.SelectedItem; ButtonSend.Select(); dgvParameters.Rows.Clear(); if (selectedTask.Parameters.Values.Count > 0) { dgvParameters.Rows.Add(selectedTask.Parameters.Count); foreach (ManagerTaskApplication.TaskApplication.Parameter itemParameter in selectedTask.Parameters.Values) { dgvParameters.Rows[itemParameter.Number - 1].Cells[0].Value = (object)itemParameter.Number; dgvParameters.Rows[itemParameter.Number - 1].Cells[1].Value = (object)itemParameter.Value; dgvParameters.Rows[itemParameter.Number - 1].Cells[2].Value = (object)itemParameter.Type; dgvParameters.Rows[itemParameter.Number - 1].Cells[3].Value = (object)itemParameter.Description; } } } }
void ReleaseDesignerOutlets() { if (ButtonSend != null) { ButtonSend.Dispose(); ButtonSend = null; } if (SwitchIsPriority != null) { SwitchIsPriority.Dispose(); SwitchIsPriority = null; } if (TextFieldSubject != null) { TextFieldSubject.Dispose(); TextFieldSubject = null; } if (TextViewBody != null) { TextViewBody.Dispose(); TextViewBody = null; } }