Exemplo n.º 1
0
        void tvResultGuide_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Tag != null)
            {
                OutputReader reader = e.Node.Tag as OutputReader;

                if (reader != null)
                {
                    //Display the result on the Excel
                    // Globals.ThisWorkbook.DisplayResult(reader.Load ( ));
                    ResultLoadedAlarm(reader.Load( ));

                    ////Test the result
                    //Result1D result1D = result as Result1D;
                    //if (result1D != null)
                    //{
                    //    StringBuilder builder = new StringBuilder ( );
                    //    foreach (KeyValuePair<float , float> kvp in result1D.KeyValuePairs)
                    //    {
                    //        builder.AppendFormat ( "key = {0} , value = {1}\n" , kvp.Key , kvp.Value );
                    //    }

                    //    MessageBox.Show ( builder.ToString ( ) );
                    //}
                }
            }
        }
Exemplo n.º 2
0
        private void btnFFT_Click(object sender, EventArgs e)
        {
            if (tvResultGuide.SelectedNode != null &&
                tvResultGuide.SelectedNode.Tag != null)
            {
                OutputReader reader = tvResultGuide.SelectedNode.Tag as OutputReader;

                Result1D result1d = reader.Load() as Result1D;

                if (result1d != null && result1d.Domain == DataDomainType.TimeDomain)
                {
                    FFTForm fft = new FFTForm(result1d, this);
                    fft.Show( );
                }
            }
        }