private void Check_key(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) { e.Handled = this.Complete_Suggestion(); if (!e.Handled) { e.Handled = true; done_button_Click(sender, e); } } else if (e.KeyCode.ToString() == "Down") { e.Handled = true; Dialog_Helpers.suggestions_downarrow( this.textBox1, ref this.current_suggestion); } else if (e.KeyCode.ToString() == "Up") { e.Handled = true; Dialog_Helpers.suggestions_uparrow( this.textBox1, ref this.current_suggestion); } }
public Assignment_Dlg(Rectangle parent_Rec, Visual_Flow_Form form) { int index; Rec = parent_Rec; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); this.label1.Text = "Enter an assignment." + '\n' + '\n' + "Examples:" + '\n' + " Set Coins to 5" + '\n' + " Set Count to Count + 1" + '\n' + " Set Board[3,3] to 0"; this.labelGraphics = label2.CreateGraphics(); if (Rec.Text != null) { index = Rec.Text.IndexOf(":="); if (index > 0) { this.lhsTextBox.Text = Rec.Text.Substring(0, index); this.assignment_Text.Text = Rec.Text.Substring(index + 2, Rec.Text.Length - (index + 2)); } else { this.lhsTextBox.Text = Rec.Text; } } }
private void textBox2_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) { e.Handled = this.Complete_Suggestion_Lhs(); e.SuppressKeyPress = e.Handled; if (!e.Handled) { done_button_Click(sender, e); } } else if (e.KeyCode.ToString() == "Down") { e.Handled = true; e.SuppressKeyPress = e.Handled; Dialog_Helpers.suggestions_downarrow( this.suggestionTextBox, ref this.current_suggestion); } else if (e.KeyCode.ToString() == "Up") { e.Handled = true; e.SuppressKeyPress = e.Handled; Dialog_Helpers.suggestions_uparrow( this.suggestionTextBox, ref this.current_suggestion); } }
private void Check_key(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.Shift) { is_shifted = true; } else { is_shifted = false; } if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) { e.Handled = this.Complete_Suggestion(); if (!e.Handled) { e.Handled = true; this.assignment_Text.Select(this.assignment_Text.TextLength, 0); done_button_Click(sender, e); } } else if (e.KeyCode.ToString() == "Down") { e.Handled = true; Dialog_Helpers.suggestions_downarrow( this.suggestionTextBox, ref this.current_suggestion); } else if (e.KeyCode.ToString() == "Up") { e.Handled = true; Dialog_Helpers.suggestions_uparrow( this.suggestionTextBox, ref this.current_suggestion); } }
private void Check_key_expr(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) { e.Handled = this.Complete_Suggestion_Expr(); e.SuppressKeyPress = e.Handled; if (!e.Handled) { done_button_Click(sender, e); } } else if (e.KeyCode.ToString() == "Down") { e.Handled = true; e.SuppressKeyPress = e.Handled; Dialog_Helpers.suggestions_downarrow( this.suggestionTextBox, ref this.current_suggestion_expr); } else if (e.KeyCode.ToString() == "Up") { e.Handled = true; e.SuppressKeyPress = e.Handled; Dialog_Helpers.suggestions_uparrow( this.suggestionTextBox, ref this.current_suggestion_expr); } }
protected override void OnPaint(PaintEventArgs e) { int location; string error_text; Console.WriteLine(this.error); if (this.result != null && !this.result.valid) { location = this.result.location; error_text = this.variableTextBox.Text; } else { if (this.prompt_result != null && !this.prompt_result.valid) { location = this.prompt_result.location; error_text = this.exprTextBox.Text; } else { location = 0; error_text = ""; } } this.labelGraphics = this.errorLabel.CreateGraphics(); Dialog_Helpers.Paint_Helper(this.labelGraphics, error_text, this.examplesLabel, this.error_msg, location, this.error); }
private bool Complete_Suggestion() { return(Dialog_Helpers.Complete_Suggestion( this.assignment_Text, interpreter_pkg.call_dialog, this.current_suggestion, ref this.suggestion_result)); }
private bool Complete_Suggestion_Lhs() { return(Dialog_Helpers.Complete_Suggestion( this.lhsTextBox, interpreter_pkg.lhs_dialog, this.current_suggestion, ref this.suggestion_result)); }
private bool Complete_Suggestion_Var() { return(Dialog_Helpers.Complete_Suggestion( this.variableTextBox, interpreter_pkg.lhs_dialog, this.current_suggestion_var, ref this.suggestion_result_var)); }
private bool Complete_Suggestion() { return(Dialog_Helpers.Complete_Suggestion( this.Control_Text, interpreter_pkg.expr_dialog, this.current_suggestion, ref this.suggestion_result)); }
private bool Complete_Suggestion_Expr() { return(Dialog_Helpers.Complete_Suggestion( this.exprTextBox, interpreter_pkg.expr_dialog, this.current_suggestion_expr, ref this.suggestion_result_expr)); }
private void Check_Hint(object sender, System.EventArgs e) { Dialog_Helpers.Check_Hint( this.assignment_Text, this.textBox1, interpreter_pkg.call_dialog, ref this.current_suggestion, ref this.suggestion_result, ref this.error, this.Font); this.Invalidate(); }
private void variableTextBox_TextChanged(object sender, EventArgs e) { Dialog_Helpers.Check_Hint( this.variableTextBox, this.suggestionTextBox, interpreter_pkg.lhs_dialog, ref this.current_suggestion_var, ref this.suggestion_result_var, ref this.error, this.Font); this.Invalidate(); }
private void Check_Hint_Lhs(object sender, System.EventArgs e) { Dialog_Helpers.Check_Hint( this.lhsTextBox, this.suggestionTextBox, interpreter_pkg.lhs_dialog, ref this.current_suggestion, ref this.suggestion_result, ref this.error, this.Font); this.Invalidate(); }
private void textBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { bool Handled; Dialog_Helpers.suggestions_mousedown( this.textBox1, ref this.current_suggestion, e); if (e.Clicks == 2) { Handled = this.Complete_Suggestion(); } this.assignment_Text.Focus(); }
private void textBox2_TextChanged(object sender, System.EventArgs e) { if (exprTextBox.Lines.Length > 1) { exprTextBox.Text = exprTextBox.Lines[0] + exprTextBox.Lines[1]; exprTextBox.Select(exprTextBox.Text.Length, 0); } Dialog_Helpers.Check_Hint( this.exprTextBox, this.suggestionTextBox, interpreter_pkg.expr_dialog, ref this.current_suggestion_expr, ref this.suggestion_result_expr, ref this.error, this.Font); this.Invalidate(); }
public Return_Dlg(Oval_Return Parent_Oval, Visual_Flow_Form form) { RETURN = Parent_Oval; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); if ((RETURN.Text != null) && (RETURN.Text.CompareTo("") != 0)) { this.textBox1.Text = RETURN.Text; } this.labelGraphics = label4.CreateGraphics(); stringFormat = new System.Drawing.StringFormat(); // Center the block of text (top to bottom) in the rectangle. stringFormat.LineAlignment = System.Drawing.StringAlignment.Center; }
public Call_Dialog(Rectangle parent_Rec, Visual_Flow_Form form) { Rec = parent_Rec; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); this.label1.Text = "Enter a procedure call." + '\n' + '\n' + "Examples:" + '\n' + " Wait_For_Mouse_Button(Left_Button)" + '\n' + " Open_Graph_Window(300,300)"; this.labelGraphics = label2.CreateGraphics(); if (Rec.Text != null) { this.assignment_Text.Text = Rec.Text; } }
protected override void OnPaint(PaintEventArgs e) { int location; if (this.result != null) { location = this.result.location; } else { location = 0; } this.labelGraphics = this.label4.CreateGraphics(); Dialog_Helpers.Paint_Helper(this.labelGraphics, this.textBox1.Text, this.label2, this.error_msg, location, this.error); this.textBox1.Focus(); }
public Output_Dlg(Parallelogram Parent_Parallelogram, Visual_Flow_Form form) { PAR = Parent_Parallelogram; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); this.label2.Text = "Examples:" + '\n' + " " + '"' + "exact text" + '"' + '\n' + " Coins" + '\n' + " " + '"' + "Number of Coins: " + '"' + "+Coins" + '\n' + " Board[3,3]"; this.textBox1.Text = PAR.Text; this.new_line.Checked = PAR.new_line; this.labelGraphics = label4.CreateGraphics(); stringFormat = new System.Drawing.StringFormat(); // Center the block of text (top to bottom) in the rectangle. stringFormat.LineAlignment = System.Drawing.StringAlignment.Center; }
protected override void OnPaint(PaintEventArgs e) { int location; if (this.result != null) { location = this.result.location; } else { location = 0; } this.labelGraphics = this.label2.CreateGraphics(); Dialog_Helpers.Paint_Helper( this.labelGraphics, this.lhsTextBox.Text + ' ' + Component.assignmentSymbol + this.assignment_Text.Text, this.label1, this.error_msg, location, this.error); }
public Control_Dlg(Component parent_Cmp, Visual_Flow_Form form, bool is_loop) { Cmp = parent_Cmp; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); if (is_loop) { if (!Component.reverse_loop_logic) { this.label1.Text = "Enter loop exit condition." + '\n' + '\n' + this.examples; } else { this.label1.Text = "Enter loop condition." + '\n' + '\n' + this.examples; } this.Text = "Enter Loop Condition"; } else { this.label1.Text = "Enter selection condition." + '\n' + '\n' + this.examples; this.Text = "Enter Selection Condition"; } this.labelGraphics = label2.CreateGraphics(); if (Cmp.Text != null) { this.Control_Text.Text = Cmp.Text; } }
public Input_Dlg(Parallelogram Parent_Parallelogram, Visual_Flow_Form form) { PAR = Parent_Parallelogram; the_form = form; // // Required for Windows Form Designer support // InitializeComponent(); Dialog_Helpers.Init(); if ((PAR.Text != null) && (PAR.Text.CompareTo("") != 0)) { this.exprTextBox.Text = PAR.prompt; this.variableTextBox.Text = PAR.Text; } this.examplesLabel.Text = "Examples:" + '\n' + " Coins" + '\n' + " Board[3,3]"; this.labelGraphics = errorLabel.CreateGraphics(); stringFormat = new System.Drawing.StringFormat(); // Center the block of text (top to bottom) in the rectangle. stringFormat.LineAlignment = System.Drawing.StringAlignment.Center; }