コード例 #1
0
        private void mnuItemMergeCols_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

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

            var dataset = mclsSelected.mstrRdatasetName;

            if (!ValidateExpressionsLoaded("merge columns"))
            {
                return;
            }

            if (!ValidateFactorsDefined("merge columns"))
            {
                return;
            }

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

            #region Hook Threading events

            m_BackgroundWorker.DoWork             += m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MergeCCompleted;

            #endregion

            var mfrmMergeC  = new frmMergeColsPar();
            var mclsFactors = mhtDatasets["Factors"];
            mfrmMergeC.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable);
            mfrmMergeC.DataSetName            = mclsSelected.mstrDataText;

            if (mfrmMergeC.ShowDialog() == DialogResult.OK)
            {
                var pmode  = mfrmMergeC.pMode;
                var factor = mfrmMergeC.SelectedFactor;

                var rcmd = "mergedData <- mergeColumns(" + dataset + "," + factor + ",";
                rcmd += pmode + ")";
                m_BackgroundWorker.RunWorkerAsync(rcmd);
                mfrmShowProgress.Message = "Merging Columns ...";
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading events

            m_BackgroundWorker.DoWork             -= m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MergeCCompleted;

            #endregion
        }
コード例 #2
0
        private void mnuItemMergeCols_Click(object sender, EventArgs e)
        {
            var selectedNodeTag = (clsDatasetTreeNode)ctlTreeView.SelectedNode.Tag;

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

            var dataset = selectedNodeTag.RDatasetName;

            if (!ValidateExpressionsLoaded("merge columns"))
            {
                return;
            }

            if (!ValidateFactorsDefined("merge columns"))
            {
                return;
            }

            if (!ValidateDataMatrixTableSelected(selectedNodeTag))
            {
                return;
            }

            #region Hook Threading events

            m_BackgroundWorker.DoWork             += m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MergeCCompleted;

            #endregion

            var mergeColumnsParams = new frmMergeColsPar();
            var factorTable        = mhtDatasets["Factors"];
            mergeColumnsParams.PopulateFactorComboBox = clsDataTable.DataTableRows(factorTable.mDTable);
            mergeColumnsParams.DataSetName            = selectedNodeTag.DataText;

            if (mergeColumnsParams.ShowDialog() == DialogResult.OK)
            {
                var pmode  = mergeColumnsParams.pMode;
                var factor = mergeColumnsParams.SelectedFactor;

                var rcmd = "mergedData <- mergeColumns(" + dataset + "," + factor + "," + pmode + ")";
                m_BackgroundWorker.RunWorkerAsync(rcmd);
                mProgressForm.Reset("Merging Columns ...");
                mProgressForm.ShowDialog();
            }

            #region Unhook Threading events

            m_BackgroundWorker.DoWork             -= m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MergeCCompleted;

            #endregion
        }
コード例 #3
0
        private void mnuItemMergeCols_Click(object sender, EventArgs e)
        {
            var mclsSelected = (clsDatasetTreeNode)ctltreeView.SelectedNode.Tag;

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

            var dataset = mclsSelected.mstrRdatasetName;

            if (!ValidateExpressionsLoaded("merge columns"))
            {
                return;
            }

            if (!ValidateFactorsDefined("merge columns"))
            {
                return;
            }

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

            #region Hook Threading events

            m_BackgroundWorker.DoWork += m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted += m_BackgroundWorker_MergeCCompleted;

            #endregion

            var mfrmMergeC = new frmMergeColsPar();
            var mclsFactors = mhtDatasets["Factors"];
            mfrmMergeC.PopulateFactorComboBox = clsDataTable.DataTableRows(mclsFactors.mDTable);
            mfrmMergeC.DataSetName = mclsSelected.mstrDataText;

            if (mfrmMergeC.ShowDialog() == DialogResult.OK)
            {
                var pmode = mfrmMergeC.pMode;
                var factor = mfrmMergeC.SelectedFactor;

                var rcmd = "mergedData <- mergeColumns(" + dataset + "," + factor + ",";
                rcmd += pmode + ")";
                m_BackgroundWorker.RunWorkerAsync(rcmd);
                mfrmShowProgress.Message = "Merging Columns ...";
                mfrmShowProgress.ShowDialog();
            }

            #region Unhook Threading events

            m_BackgroundWorker.DoWork -= m_BackgroundWorker_MergeC;
            m_BackgroundWorker.RunWorkerCompleted -= m_BackgroundWorker_MergeCCompleted;

            #endregion
        }