public void loadvalues()
        {
            ScenarioId = this.ReferenceProcessorScenarioForm.uc_scenario1.txtScenarioId.Text.Trim().ToLower();
            if (!ReferenceProcessorScenarioForm.m_bUsingSqlite)
            {
                ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.LoadMoveInCosts
                    (frmMain.g_oFrmMain.frmProject.uc_project1.txtRootDirectory.Text.Trim() +
                    "\\processor\\db\\scenario_processor_rule_definitions.mdb",
                    ReferenceProcessorScenarioForm.m_oProcessorScenarioItem);
            }
            else
            {
                ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.LoadMoveInCostsSqlite
                    (frmMain.g_oFrmMain.frmProject.uc_project1.txtRootDirectory.Text.Trim() +
                    "\\processor\\" + Tables.ProcessorScenarioRuleDefinitions.DefaultSqliteDbFile,
                    ReferenceProcessorScenarioForm.m_oProcessorScenarioItem);
            }

            FIA_Biosum_Manager.ProcessorScenarioItem oItem = ReferenceProcessorScenarioForm.m_oProcessorScenarioItem;
            if (ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.m_intError == 0)
            {
                this.txtYardDistThreshold.Text    = oItem.m_oMoveInCosts.YardDistThreshold;
                this.txtAssumedHarvestArea.Text   = oItem.m_oMoveInCosts.AssumedHarvestAreaAc;
                this.txtMoveInTimeMultiplier.Text = oItem.m_oMoveInCosts.MoveInTimeMultiplier;
                this.txtMoveInAddend.Text         = oItem.m_oMoveInCosts.MoveInHoursAddend;
            }
        }
示例#2
0
        private void btnCopy_Click(object sender, EventArgs e)
        {
            if (lvProcessorScenario.SelectedItems.Count == 0)
            {
                return;
            }
            int          x      = 0;
            string       strMsg = "Copy scenario properties\r\n\r\nFROM\r\n-------\r\n" + lvProcessorScenario.SelectedItems[0].SubItems[1].Text.Trim() + "\r\n\r\nTO\r\n-------\r\n" + ReferenceCurrentScenarioItem.ScenarioId;
            DialogResult result = MessageBox.Show(strMsg, "FIA Biosum", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                CheckIfScenarioLoaded(lvProcessorScenario.SelectedItems[0].SubItems[1].Text.Trim(), out x);

                this.m_oProcessorScenarioItem = m_oProcessorScenarioItem_Collection.Item(x);

                ReferenceCurrentScenarioItem.Description      = m_oProcessorScenarioItem.Description;
                ReferenceCurrentScenarioItem.Notes            = m_oProcessorScenarioItem.Notes;
                ReferenceCurrentScenarioItem.SourceScenarioId = m_oProcessorScenarioItem.ScenarioId;

                ReferenceCurrentScenarioItem.m_oTreeDiamGroupsItem_Collection.Copy(m_oProcessorScenarioItem.m_oTreeDiamGroupsItem_Collection,
                                                                                   ref ReferenceCurrentScenarioItem.m_oTreeDiamGroupsItem_Collection, true);

                ReferenceCurrentScenarioItem.m_oEscalators.Copy(m_oProcessorScenarioItem.m_oEscalators, ReferenceCurrentScenarioItem.m_oEscalators);

                ReferenceCurrentScenarioItem.m_oHarvestCostItem_Collection.Copy(
                    m_oProcessorScenarioItem.m_oHarvestCostItem_Collection,
                    ref ReferenceCurrentScenarioItem.m_oHarvestCostItem_Collection, true);

                ReferenceCurrentScenarioItem.m_oHarvestMethod.Copy(m_oProcessorScenarioItem.m_oHarvestMethod, ReferenceCurrentScenarioItem.m_oHarvestMethod);

                ReferenceCurrentScenarioItem.m_oMoveInCosts.Copy(m_oProcessorScenarioItem.m_oMoveInCosts, ReferenceCurrentScenarioItem.m_oMoveInCosts);

                ReferenceCurrentScenarioItem.m_oTreeSpeciesAndDbhDollarValuesItem_Collection.Copy(
                    m_oProcessorScenarioItem.m_oTreeSpeciesAndDbhDollarValuesItem_Collection,
                    ref ReferenceCurrentScenarioItem.m_oTreeSpeciesAndDbhDollarValuesItem_Collection, true);

                ReferenceCurrentScenarioItem.m_oTreeDiamGroupsItem_Collection.Copy(
                    m_oProcessorScenarioItem.m_oTreeDiamGroupsItem_Collection,
                    ref ReferenceCurrentScenarioItem.m_oTreeDiamGroupsItem_Collection, true);

                ReferenceCurrentScenarioItem.m_oSpcGroupItem_Collection.Copy(
                    m_oProcessorScenarioItem.m_oSpcGroupItem_Collection,
                    ref ReferenceCurrentScenarioItem.m_oSpcGroupItem_Collection, true);

                ReferenceCurrentScenarioItem.m_oSpcGroupListItem_Collection.Copy(
                    m_oProcessorScenarioItem.m_oSpcGroupListItem_Collection,
                    ref ReferenceCurrentScenarioItem.m_oSpcGroupListItem_Collection, true);

                _frmDialog.DialogResult = DialogResult.OK;
                _frmDialog.Close();
            }
        }
示例#3
0
        private void FullDetails()
        {
            int x = 0;

            this.txtDetails.Text = "";

            CheckIfScenarioLoaded(lvProcessorScenario.SelectedItems[0].SubItems[1].Text.Trim(), out x);

            this.m_oProcessorScenarioItem = m_oProcessorScenarioItem_Collection.Item(x);

            this.txtDetails.Text = m_oProcessorScenarioTools.ScenarioProperties(m_oProcessorScenarioItem);
        }
 public void loadvalues_FromProperties()
 {
     if (ReferenceProcessorScenarioForm.m_oProcessorScenarioItem.m_oMoveInCosts != null)
     {
         FIA_Biosum_Manager.ProcessorScenarioItem oItem = ReferenceProcessorScenarioForm.m_oProcessorScenarioItem;
         if (ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.m_intError == 0)
         {
             this.txtYardDistThreshold.Text    = oItem.m_oMoveInCosts.YardDistThreshold;
             this.txtAssumedHarvestArea.Text   = oItem.m_oMoveInCosts.AssumedHarvestAreaAc;
             this.txtMoveInTimeMultiplier.Text = oItem.m_oMoveInCosts.MoveInTimeMultiplier;
             this.txtMoveInAddend.Text         = oItem.m_oMoveInCosts.MoveInHoursAddend;
         }
     }
 }
示例#5
0
        public int val_processorscenario()
        {
            if (this.lvProcessorScenario.Items.Count == 0)
            {
                MessageBox.Show("Run Scenario Failed: No Processor Scenarios exist. At least one Processor Scenario must exist to run a Processor Scenario", "FIA Biosum", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
                return(-1);
            }
            if (this.lvProcessorScenario.CheckedItems.Count == 0)
            {
                MessageBox.Show("Run Scenario Failed: Select at least one Processor Scenario in <Processor Scenario>", "FIA Biosum", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
                return(-1);
            }
            this.m_oProcessorScenarioItem = this.m_oProcessorScenarioItem_Collection.Item(lvProcessorScenario.CheckedItems[0].Index);

            return(0);
        }
 public void loadvalues_FromProperties()
 {
     if (ScenarioType.Trim().ToUpper() == "OPTIMIZER")
     {
         FIA_Biosum_Manager.OptimizerScenarioItem oItem = ReferenceOptimizerScenarioForm.m_oOptimizerScenarioItem;
         this.txtNotes.Text = oItem.Notes.Trim();
     }
     else
     {
         if (!String.IsNullOrEmpty(ReferenceProcessorScenarioForm.m_oProcessorScenarioItem.Notes))
         {
             FIA_Biosum_Manager.ProcessorScenarioItem oItem = ReferenceProcessorScenarioForm.m_oProcessorScenarioItem;
             this.txtNotes.Text = oItem.Notes.Trim();
         }
     }
 }
        public void loadvalues()
        {
            ScenarioId = this.ReferenceProcessorScenarioForm.uc_scenario1.txtScenarioId.Text.Trim().ToLower();
            m_oAdo     = new ado_data_access();
            m_oAdo.OpenConnection(m_oAdo.getMDBConnString(this.ReferenceProcessorScenarioForm.LoadedQueries.m_strTempDbFile, "", ""));

            ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.LoadMoveInCosts
                (frmMain.g_oFrmMain.frmProject.uc_project1.txtRootDirectory.Text.Trim() +
                "\\processor\\db\\scenario_processor_rule_definitions.mdb",
                ReferenceProcessorScenarioForm.m_oProcessorScenarioItem);

            FIA_Biosum_Manager.ProcessorScenarioItem oItem = ReferenceProcessorScenarioForm.m_oProcessorScenarioItem;
            if (ReferenceProcessorScenarioForm.m_oProcessorScenarioTools.m_intError == 0)
            {
                this.txtYardDistThreshold.Text    = oItem.m_oMoveInCosts.YardDistThreshold;
                this.txtAssumedHarvestArea.Text   = oItem.m_oMoveInCosts.AssumedHarvestAreaAc;
                this.txtMoveInTimeMultiplier.Text = oItem.m_oMoveInCosts.MoveInTimeMultiplier;
                this.txtMoveInAddend.Text         = oItem.m_oMoveInCosts.MoveInHoursAddend;
            }
        }