示例#1
0
 public static void SavePnc(PNCInfo info, string fileName)
 {
     using (FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write))
     {
         XmlSerializer serializer = new XmlSerializer(typeof(PNCInfo));
         serializer.Serialize(fs, info);
     }
 }
示例#2
0
 private void LoadPnc()
 {
     pncInfo = PNCHelper.LoadPnc(setting.FilePath);
     this.bindingSourceCnc.DataSource = pncInfo.Holes;
     this.bindingSourceParam.DataSource = pncInfo.Params;
     this.bindingSourceParam.DataMember = this.tabE.SelectedTabPage.Text == L.R("FormMain.Throw", "穿透") ? L.R("FormMain.Manual", "手动") : this.tabE.SelectedTabPage.Text;
     this.bindingSourceThrowSet.DataSource = pncInfo.ThrowSet;
     fileName = setting.FilePath;
     //this.biFileName.Caption = File.Exists(setting.FilePath) ? setting.FilePath : "";
     this.gcFileName.Text = string.Format(L.R("FormMain.HoleList", "加工孔位列表{0}"), fileName == "" ? "" : "(" + fileName + ")");
     this.isChanged = false;
 }
示例#3
0
 public static void SavePnc(PNCInfo info, string fileName)
 {
     using (FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write))
     {
         XmlSerializer serializer = new XmlSerializer(typeof(PNCInfo));
         serializer.Serialize(fs, info);
     }
 }