本文整理汇总了C#中Snapshot.Load方法的典型用法代码示例。如果您正苦于以下问题:C# Snapshot.Load方法的具体用法?C# Snapshot.Load怎么用?C# Snapshot.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Snapshot
的用法示例。
在下文中一共展示了Snapshot.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btn_Setting_Fill_SWCP_Click
private void btn_Setting_Fill_SWCP_Click(object sender, EventArgs e)
{
//Test Codes
/*
Snapshot a = new Snapshot();
a.Load(this.tbx_Setting_Snapshot.Text);
test = a.CompareData("ABS", "F190", "L2CVA2BG6FG000518");
*/
//End of Test Codes
tbx_SWCP_Result.Text = "";
try
{
tbc_Main.SelectTab(tbp_SWCPGen.Name);
IVSStructure EBOM = new IVSStructure(tbx_Setting_EBOM.Text);
Snapshot theSS = new Snapshot();
DirectoryInfo theVBFDir;
DirectoryInfo ExportVBFDir;
string[] VBFFileNameList = new string[1];
if (cbx_SWCP_ifCompare.Checked == true)
{
if (theSS.Load(this.tbx_Setting_Snapshot.Text))
{
}
else
{
throw new Exception("SnapShot File Error, Please choose again");
}
}
if (cbx_SWCP_CompareVBF.Checked)
{
theVBFDir = new DirectoryInfo(this.tbx_Setting_VBFFolder.Text);
FileInfo[] VBFList = theVBFDir.GetFiles();
VBFFileNameList = new string[VBFList.Length];
for (int j = 0; j < VBFList.Length; j++)
{
VBFFileNameList[j] = VBFList[j].Name.ToUpper();
}
}
if (cbx_SWCP_ExportVBF.Checked)
{
theVBFDir = new DirectoryInfo(this.tbx_Setting_VBFFolder.Text);
FileInfo[] VBFList = theVBFDir.GetFiles();
VBFFileNameList = new string[VBFList.Length];
for (int j = 0; j < VBFList.Length; j++)
{
VBFFileNameList[j] = VBFList[j].Name.ToUpper();
}
if (fbd_SWCP_ExportVBF.ShowDialog() == DialogResult.OK)
{
ExportVBFDir = new DirectoryInfo(fbd_SWCP_ExportVBF.SelectedPath);
}
else
{
throw new Exception("Please select VBF Export Folder");
}
}
if (tbx_Setting_EBOMExtra.Text != "")
EBOM.LoadEBOMExtra(tbx_Setting_EBOMExtra.Text);
if (tbx_Setting_EBOMExtra.Text != "")
EBOM.LoadEBOMExtra(tbx_Setting_EBOMExtra.Text);
Microsoft.Office.Interop.Excel.Application xlApp = null;
Microsoft.Office.Interop.Excel.Workbook xlBook = null;
Microsoft.Office.Interop.Excel.Worksheet xlSheet = null;
object missing = Missing.Value;
xlApp = new Microsoft.Office.Interop.Excel.Application();
xlBook = xlApp.Workbooks.Add(tbx_Setting_SWCP.Text);
xlSheet = xlBook.Sheets[tbx_Setting_SWCPSheetName.Text];
int i = 2;
while (IVSStructure.isValidPN(xlSheet.Cells[Convert.ToInt32(nud_Setting_SWCPTopAssyCol.Value)][i].Value))
{
PartLineage PN = EBOM.GetModuleByAssyPN(xlSheet.Cells[nud_Setting_SWCPTopAssyCol.Value][i].Value);
if (PN == null)
{
tbx_SWCP_Result.AppendText("Warning:" + xlSheet.Cells[nud_Setting_SWCPTopAssyCol.Value][i].Value + " Data NOT Found in EBOM\r\n");
xlSheet.Cells[nud_Setting_Comment_Column.Value][i].Value = "Part Number NOT Found in EBOM";
}
else
{
tbx_SWCP_Result.AppendText("Working on " + xlSheet.Cells[nud_Setting_SWCPTopAssyCol.Value][i].Value);
//ECU Address
if (PN.NodeAddr != null)
{
xlSheet.Cells[(Convert.ToInt32(nud_Setting_EDUAddress_Column.Value))][i].Value = ("0x" + PN.NodeAddr);
}
//.........这里部分代码省略.........