private void cmdNew_Click(object sender, EventArgs e) { // create a new profile, give it a name frmProfileName fpn = new frmProfileName(); fpn.ShowDialog(); String pf = fpn.ProfileName; if (pf.Length > 0) { //create a new profile with that name String fn = UVDLPApp.Instance().m_PathMachines; fn += UVDLPApp.m_pathsep; fn += pf; fn += ".machine"; MachineConfig mc = new MachineConfig(); mc.m_name = pf; if (!mc.Save(fn, txtIp.Text)) { DebugLogger.Instance().LogRecord("Error Saving new machine profile " + fn); return; } UpdateProfiles(); } }
private void cmdNew_Click(object sender, EventArgs e) { // prompt for a new name frmProfileName frm = new frmProfileName(); if (frm.ShowDialog() == DialogResult.OK) { //create a new profile SliceBuildConfig bf = new SliceBuildConfig(); //save it string shortname = frm.ProfileName; string fname = GetSlicingFilename(shortname); if (!bf.Save(fname)) { MessageBox.Show("Error saving new profile " + fname); } //re-display the new list PopulateProfiles(); } }
private void cmdNewResin_Click(object sender, EventArgs e) { frmProfileName frm = new frmProfileName(); frm.Text = "New Resin Profile"; if (frm.ShowDialog() == DialogResult.OK) { //create a new resin profile string res = m_config.AddNewResin(frm.ProfileName); if (res != "OK") { MessageBox.Show(res, "Error"); return; } UpdateResinList(); SetResinValues(); //comboResin.Items.Add(frm.ProfileName); //comboResin.SelectedIndex = comboResin.Items.Count - 1; } }
private void cmdNewFluid_Click(object sender, EventArgs e) { frmProfileName frm = new frmProfileName(); frm.Text = ((DesignMode) ? "NewFluidProfile" : UVDLPApp.Instance().resman.GetString("NewFluidProfile", UVDLPApp.Instance().cul)); if (frm.ShowDialog() == DialogResult.OK) { //create a new resin profile string res = m_config.AddNewFluid(frm.ProfileName); if (res != "OK") { MessageBox.Show(res, ((DesignMode) ? "Error" : UVDLPApp.Instance().resman.GetString("Error", UVDLPApp.Instance().cul))); return; } UpdateFluidList(); SetFluidValues(); //comboResin.Items.Add(frm.ProfileName); //comboResin.SelectedIndex = comboResin.Items.Count - 1; } }
private void cmdNew_Click(object sender, EventArgs e) { // prompt for a new name frmProfileName frm = new frmProfileName(); if (frm.ShowDialog() == DialogResult.OK) { //create a new profile SliceBuildConfig bf = new SliceBuildConfig(); //save it string shortname = frm.ProfileName; string fname = GetSlicingFilename(shortname); if (!bf.Save(fname)) { MessageBox.Show(((DesignMode) ? "ErrorSavingNewProfile" :UVDLPApp.Instance().resman.GetString("ErrorSavingNewProfile", UVDLPApp.Instance().cul)) + fname); } //re-display the new list PopulateProfiles(); } }
private void cmdNew_Click(object sender, EventArgs e) { // create a new profile, give it a name frmProfileName fpn = new frmProfileName(); fpn.ShowDialog(); String pf = fpn.ProfileName; if (pf.Length > 0) { //create a new profile with that name String fn = UVDLPApp.Instance().m_PathMachines; fn += UVDLPApp.m_pathsep; fn += pf; fn += ".machine"; MachineConfig mc = new MachineConfig(); mc.m_name = pf; if (!mc.Save(fn)) { DebugLogger.Instance().LogRecord("Error Saving new machine profile " + fn); return; } UpdateProfiles(); } }