private void cmdApply_Click(object sender, EventArgs e)
 {
     if (m_config == null)
     {
         return;
     }
     if (lstSliceProfiles.SelectedIndex == -1)
     {
         return;
     }
     try
     {
         if (GetValues())
         {
             string shortname = lstSliceProfiles.SelectedItem.ToString();
             string fname     = GetSlicingFilename(shortname);
             m_config.Save(fname);
             // make sure main build params are updated if needed
             if (cmbSliceProfiles.SelectedItem.ToString() == shortname)
             {
                 UVDLPApp.Instance().LoadBuildSliceProfile(fname);
             }
         }
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogError(ex.Message);
     }
 }
        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_PathProfiles;
                fn += UVDLPApp.m_pathsep;
                fn += pf;
                fn += ".slicing";
                // MachineConfig mc = new MachineConfig();
                SliceBuildConfig sbc = new SliceBuildConfig();

                if (!sbc.Save(fn))
                {
                    DebugLogger.Instance().LogRecord("Error Saving new slice and build 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 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)
 {
     // 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 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_PathProfiles;
                fn += UVDLPApp.m_pathsep;
                fn += pf;
                fn += ".slicing";
               // MachineConfig mc = new MachineConfig();
                SliceBuildConfig sbc = new SliceBuildConfig();

                if (!sbc.Save(fn))
                {
                    DebugLogger.Instance().LogRecord("Error Saving new slice and build profile " + fn);
                    return;
                }
                UpdateProfiles();
            }
        }