Ejemplo n.º 1
0
 public frmVennDisplay(clsVennPar clsVennPar)
 {
     mclsVennPar = clsVennPar;
     InitializeComponent();
     this.mnuItemPara.Click += new System.EventHandler(this.mnuItemPara_Click);
     this.parametersToolStripMenuItem.Click += new System.EventHandler(this.mnuItemPara_Click);
     this.mtBtnParam.Click += new System.EventHandler(this.mnuItemPara_Click);
 }
Ejemplo n.º 2
0
        private void mnuItemVenn_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

            if (!ValidateNodeIsSelected(mclsSelected))
            {
                return;
            }

            if (!ValidateIsPlottable(mclsSelected, 2))
            {
                return;
            }

            mclsVennPar = new clsVennPar();
            var datasetNameInR = mclsSelected.mstrRdatasetName;

            mclsVennPar.tempFile = mRTempFilePath;
            mclsVennPar.Rdataset = datasetNameInR;
            mclsVennPar.mhtDatasets = mhtDatasets;
            mclsVennPar.marrDatasets = AvailableDataSources();

            mclsVennPar.mstrDatasetName = mclsSelected.mstrDataText;
            if (mhtDatasets.ContainsKey("Factors"))
            {
                var mclsFactors = mhtDatasets["Factors"];
                mclsVennPar.marrFactorNames = clsDataTable.DataTableRows(mclsFactors.mDTable);
                mclsVennPar.marrFactors = marrFactorInfo;
            }
            else
                mclsVennPar.marrFactorNames = null;

            PlotVenn(mclsVennPar);
        }
Ejemplo n.º 3
0
        public void PlotVenn(clsVennPar vennParameters)
        {
            if (mtabControlData.Controls.Count != 0)
            {
                #region Hook Threading Events
                m_BackgroundWorker.DoWork += m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_VennCompleted;
                #endregion

                var mfrmVennPar = new frmVennDiagramPar(vennParameters);
                var res = mfrmVennPar.ShowDialog();
                if (res == DialogResult.OK)
                {
                    vennParameters = mfrmVennPar.clsVennPar;
                    var mclsRplots = new clsRplotData(vennParameters.Rcmd, "Venn");

                    m_BackgroundWorker.RunWorkerAsync(mclsRplots);
                    mfrmShowProgress.Message = "Generating Venn Diagram ...";
                    mfrmShowProgress.ShowDialog();
                }

                #region Unhook Threading Events
                m_BackgroundWorker.DoWork -= m_BackgroundWorker_GeneratePlots;
                m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_VennCompleted;
                #endregion
            }
        }