private SliceBuildConfig LoadProfile(string shortname)
        {
            SliceBuildConfig profile = new SliceBuildConfig();

            try
            {
                string fname = GetSlicingFilename(shortname);
                if (!profile.Load(fname))
                {
                    DebugLogger.Instance().LogError(((DesignMode) ? "CouldNotLoad" :UVDLPApp.Instance().resman.GetString("CouldNotLoad", UVDLPApp.Instance().cul)) + fname);
                    return(null);
                }
                else
                {
                    UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSlicedLoaded, ((DesignMode) ? "SliceProfileLoaded" :UVDLPApp.Instance().resman.GetString("SliceProfileLoaded", UVDLPApp.Instance().cul)));
                    UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSliceProfileChanged, ((DesignMode) ? "SliceProfileLoaded" :UVDLPApp.Instance().resman.GetString("SliceProfileLoaded", UVDLPApp.Instance().cul)));
                    return(profile);
                }
            }
            catch (Exception ex)
            {
                DebugLogger.Instance().LogError(ex.Message);
            }
            return(null);
        }
Beispiel #2
0
        private SliceBuildConfig LoadProfile(string shortname)
        {
            SliceBuildConfig profile = new SliceBuildConfig();

            try
            {
                string fname = GetSlicingFilename(shortname);
                if (!profile.Load(fname))
                {
                    DebugLogger.Instance().LogError("Could not load " + fname);
                    return(null);
                }
                else
                {
                    UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSlicedLoaded, "Slice Profile loaded");
                    UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSliceProfileChanged, "Slice Profile loaded");
                    return(profile);
                }
            }
            catch (Exception ex)
            {
                DebugLogger.Instance().LogError(ex.Message);
            }
            return(null);
        }
 private void cmdEdit_Click(object sender, EventArgs e)
 {
     if (lstSliceBuildProfiles.SelectedIndex != -1)
     {
         string fn = FNFromIndex(lstSliceBuildProfiles.SelectedIndex);
         if (fn != null)
         {
             SliceBuildConfig sbc = null;
             if (UVDLPApp.Instance().m_buildparms.m_filename.Equals(fn))
             {
                 sbc = UVDLPApp.Instance().m_buildparms; // current slicing profile
             }
             else
             {
                 sbc = new SliceBuildConfig(); // existing but not current
                 sbc.Load(fn);
             }
             frmSliceOptions m_frmsliceopt = new frmSliceOptions(ref sbc);
             m_frmsliceopt.ShowDialog();
         }
     }
 }
 private void cmdEdit_Click(object sender, EventArgs e)
 {
     if (lstSliceBuildProfiles.SelectedIndex != -1)
     {
         string fn = FNFromIndex(lstSliceBuildProfiles.SelectedIndex);
         if (fn != null)
         {
             SliceBuildConfig sbc = null;
             if (UVDLPApp.Instance().m_buildparms.m_filename.Equals(fn))
             {
                 sbc = UVDLPApp.Instance().m_buildparms; // current slicing profile
             }
             else
             {
                 sbc = new SliceBuildConfig(); // existing but not current
                 sbc.Load(fn);
             }
             frmSliceOptions m_frmsliceopt = new frmSliceOptions(ref sbc);
             m_frmsliceopt.ShowDialog();
         }
     }
 }
        /*public override void ApplyStyle(ControlStyle ct)
         * {
         *  //base.ApplyStyle(ct);
         *  //cmdCreate.ApplyStyle(ct);
         *  //cmdRemove.ApplyStyle(ct);
         *  this.BackColor = Control.DefaultBackColor;
         *  this.ForeColor = Control.DefaultForeColor;
         *  if (ct.ForeColor != ControlStyle.NullColor)
         *  {
         *
         *  }
         * }*/

        private SliceBuildConfig LoadProfile(string shortname)
        {
            SliceBuildConfig profile = new SliceBuildConfig();

            try
            {
                string fname = GetSlicingFilename(shortname);
                if (!profile.Load(fname))
                {
                    DebugLogger.Instance().LogError("Could not load " + fname);
                    return(null);
                }
                else
                {
                    return(profile);
                }
            }
            catch (Exception ex)
            {
                DebugLogger.Instance().LogError(ex.Message);
            }
            return(null);
        }
 private SliceBuildConfig LoadProfile(string shortname)
 {
     SliceBuildConfig profile = new SliceBuildConfig();
     try
     {
         string fname = GetSlicingFilename(shortname);
         if (!profile.Load(fname))
         {
             DebugLogger.Instance().LogError("Could not load " + fname);
             return null;
         }
         else
         {
             return profile;
         }
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogError(ex.Message);
     }
     return null;
 }
 private SliceBuildConfig LoadProfile(string shortname)
 {
     SliceBuildConfig profile = new SliceBuildConfig();
     try
     {
         string fname = GetSlicingFilename(shortname);
         if (!profile.Load(fname))
         {
             DebugLogger.Instance().LogError("Could not load " + fname);
             return null;
         }
         else
         {
             UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSlicedLoaded, "Slice Profile loaded");
             UVDLPApp.Instance().RaiseAppEvent(eAppEvent.eSliceProfileChanged, "Slice Profile loaded");
             return profile;
         }
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogError(ex.Message);
     }
     return null;
 }
 private SliceBuildConfig LoadProfile(string shortname)
 {
     SliceBuildConfig profile = new SliceBuildConfig();
     try
     {
         string fname = UVDLPApp.Instance().m_PathProfiles;
         fname += UVDLPApp.m_pathsep + shortname + ".slicing";
         if (!profile.Load(fname))
         {
             DebugLogger.Instance().LogError("Could not load " + fname);
             return null;
         }
         else
         {
             return profile;
         }
     }
     catch (Exception ex)
     {
         DebugLogger.Instance().LogError(ex.Message);
     }
     return null;
 }