Exemple #1
0
        /// <summary>
        /// Return Remove contaminant peak is Enabled.
        /// </summary>
        /// <param name="clrParams"></param>
        /// <returns></returns>
        public ClrVariant RemoveContaminantPeakIsEnabled(ClrParameters clrParams)
        {
            ClrVariant ret = new ClrVariant();

            ret.type = ClrVariant.DataType.BOOL;
            ret.obj  = false;

            try
            {
                ClrMsDataVariant msObj = new ClrMsDataVariant(ClrPluginCallTool.getActiveObject(clrParams));
                SampleWrapper    sw    = msObj.getSample();
                if (sw != null)
                {
                    DataGroupNodeWrapper dgnw = sw.getRootDataGroupNode();
                    if (1 < dgnw.getNumberOfSpectra())
                    {
                        ret.obj = true;
                    }
                }
            }
            catch
            {
                ret.obj = false;
            }
            return(ret);
        }
Exemple #2
0
        /// <summary>
        /// Remove contaminant peak is Enabled.
        /// </summary>
        /// <param name="clrParams">parameters for C# plug-in from Mass++</param>
        /// <returns></returns>
        public ClrVariant RemoveContaminantPeak(ClrParameters clrParams)
        {
            // Return value (Success: true, Failure: false)
            ClrVariant ret = new ClrVariant();

            // We initially set ret.prim.boolVal to false so that we can return a false
            // result easily using "return ret" if a failure condition occurs.
            ret.type = ClrVariant.DataType.BOOL;
            ret.obj  = false;

            // Convert clrParams to ActiveObject
            ClrVariant clrVar = ClrPluginCallTool.getActiveObject(clrParams);

            // Display main window.
            RemoveContaminantPeakManager.DisplayDlgRemovContamiPeak(clrVar);

            ret.obj = true;
            return(ret);
        }