Skip to content

Commit

Permalink
Merge pull request #122 from cabbagecreek/develop
Browse files Browse the repository at this point in the history
Final testing before relaease of v0.19-beta
  • Loading branch information
cabbagecreek authored Feb 28, 2017
2 parents 23d9502 + 622ca12 commit 51efdb9
Show file tree
Hide file tree
Showing 16 changed files with 378 additions and 206 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 25 additions & 33 deletions Marlin3DprinterTool/Marlin3DprinterTool/DelegateAndInvoke.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using FastColoredTextBoxNS;
using Marlin3DprinterToolUserControls;
using MarlinComunicationHelper;
using Cursor = System.Windows.Forms.Cursor;


namespace Marlin3DprinterTool
{
Expand Down Expand Up @@ -420,24 +420,7 @@ public static TabPage GetSelectedTab(TabControl tabControl3DprinterTool)



/// <summary>
/// Change the cursor
/// </summary>
/// <param name="cursorType"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
public static void Cursor(Cursor cursorType)
{
if (_frm3DprinterTool.InvokeRequired)
{
CursorCallback d = Cursor;
try{_frm3DprinterTool.Invoke(d, cursorType);} catch (Exception){}
}
else
{
try{_frm3DprinterTool.Cursor = cursorType; } catch (Exception) { }
}
}



/// <summary>
Expand Down Expand Up @@ -477,7 +460,25 @@ public static void Kompass(Kompass kompass, MarlinCommunication communication)
}


/// <summary>
/// Adds data to the Chart for BindingControl
/// </summary>
/// <param name="chartBinding"></param>
/// <param name="corner"></param>
/// <param name="zDecimal"></param>
public static void ChartAddBinding(Chart chartBinding, string corner, decimal zDecimal)
{

if (chartBinding.InvokeRequired)
{
ChartAddBindingCallback d = ChartAddBinding;
_frm3DprinterTool.Invoke(d, chartBinding, corner, zDecimal);
}
else
{
chartBinding.Series[corner].Points.AddY(zDecimal);
}
}

// Delegate
private delegate void DelegateVerticalJogCallback(VerticalJog verticalJog, MarlinCommunication marlin);
Expand All @@ -493,37 +494,28 @@ public static void Kompass(Kompass kompass, MarlinCommunication communication)
private delegate void DisableTabsCallback(TabControl tabControl, bool enable);

private delegate void DelegateTextCallback(Control control, string text);

private delegate void TextBoxAddCallback(TextBox textbox, string text);

private delegate void MultiTextLinesCallback(TextBox textBox, List<string> responce);


private delegate void FastColoredTextBoxCallback(FastColoredTextBox marlinSyntaxTextBox, List<string> responces);

private delegate void FastColoredTextBoxCallbackText(FastColoredTextBox marlinSyntaxTextBox, string text);

private delegate void SetBedTempCallback(Chart chart, int time, int bedTemp, int setBedTemp);

private delegate void SetExtruderTempCallback(Chart chart, int time, int extruderTemp, int setExtruderTemp);


private delegate string TabControl3DprinterToolSelectedCallback(TabControl tabControl);

//TODO: TABORT private delegate void TabPageEnableCallback(TabPage tabPage, bool enable);

private delegate void ScrollToCallback(FastColoredTextBox marlinSyntaxTextBox, int row);

private delegate void SelectTabcontrolCallback(TabControl tabControl3DprinterTool, TabPage tabPage);

private delegate TabPage GetSelectedTabCallback(TabControl tabControl);

private delegate void CursorCallback(Cursor cursorType);

private delegate void VerticalJogCallback(VerticalJog verticalJog, MarlinCommunication communication);

private delegate void KompassCallback(Kompass kompass, MarlinCommunication communication);

private delegate void ChartAddBindingCallback(Chart chartBinding, string corner, decimal zDecimal);

//!Delegate



}
}
Loading

0 comments on commit 51efdb9

Please sign in to comment.