//-----------Top Path-----------
  //路徑鈕 註冊的function
function main_PathPidOperation_click(that)
{
	var Class = new Path();
	Class.ClearTheDivOfTheTail(that, "#Main_Top-Path");
	$("#Main_Left-List").css("display", "block");
	Class = new PidOperationSecondPage();
	Class.NoConfirmButton();
	Class = null;
}
//-----------Left List-----------
function main_PidOperation_click(that)
{
	var LeftDivId="#Main_Left-List";
	var Class = new ListCommon();
	Class.ChangeDivCss(that, LeftDivId);
	Class = new Path();
	Class.LoadPathHtml($(that).text(), 1, "main_PathPidOperation_click(this)");
	Class = new LoadHtml();
	var Html = Class.ReadTranslateAfterOfHtml("./Plugin/PidOperation/html/Css.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/PidOperation/html/UpdatePage.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/PidOperation/html/FirstPage.html");
	Html = Html + Class.ReadTranslateAfterOfHtml("./Plugin/PidOperation/html/SecondPage.html");
	$("#Main_Center-Content").empty();
	$("#Main_Center-Content").append(Html);
	Class = new PidOperationUpdatePage();
	Class.Initialization();
	Class = null;
}
//-----------PID運算-----------
  //第1頁
function main_PidOperationFirstPageAddNewRow_click(that)
{
	var Class = new PidOperationFirstPage();
	Class.AddNewRow(that);
	Class = null;
}
function main_PidOperationFirstPageShowPreviousPage_click()
{
	var Class = new PidOperationFirstPage();
	Class.ShowPreviousPage();
	Class = null;
}
function main_PidOperationFirstPageShowNextPage_click()
{
	var Class = new PidOperationFirstPage();
	Class.ShowNextPage();
	Class = null;
}
function main_PidOperationFirstPageChangeAllCheckbox_click(that)
{
	var DataModelId = $(that).closest(".Table").attr("id");
	var Bool = $(that).closest(".Row").find(":checkbox").prop("checked");
	$("#"+DataModelId).find(".DynamicRow").find(":checkbox").prop("checked",Bool);
}
function main_PidOperationFirstPageDelete_click(that)
{
	var Class = new PidOperationFirstPage();
	if(Class.IsTickedPid() == false)
	{
		$(that).closest(".Column").find(".Message").eq(0).show();
		return 0;
	}
	$(that).closest(".Column").find(".Message").eq(0).hide();
	Class.DeletePid(that);
	Class = null;
}
function main_PidOperationFirstPageEditButton_click(that)
{
	var Class = new PidOperationFirstPage();
	Class.EditButton(that);
	Class = null;
}
function main_PidOperationFirstPageSaveButton_click(that)
{
	var Class = new PidOperationFirstPage();
	Class.SaveButton(that);
	Class = null;
}
  //第2頁
function main_PidOperationSecondPageConfirmButton_click(that)
{
	var Class = new PidOperationSecondPage();
	Class.ConfirmButton(that);
	Class = null;
}
function main_PidOperationSecondPageNoConfirmButton_click()
{
	var Class = new PidOperationSecondPage();
	Class.NoConfirmButton();
	Class = null;
}
function main_PidOperationSecondPageCheckAutoTune_click()
{
	var Class = new PidOperationSecondPage();
	Class.CheckAutoTune();
	Class = null;
}