public Parse ( IProject p_Context ) : bool | ||
p_Context | IProject | The project in which to parse the object. |
return | bool |
/// <summary> /// Based on the values of the form initializes the array of dates. /// </summary> private void InitializeModelParameter() { this.publishingInfoControl.DataExchange(false, this.editedObject); if (this.editedObject is ModelParameterDateSequence) { // Initialize the model parameter representing the sequence of dates ModelParameterDateSequence modelParameterDateSequence = (ModelParameterDateSequence)this.editedObject; modelParameterDateSequence.StartDateExpression = this.expressionStartDate.Text; modelParameterDateSequence.SkipPeriods = this.expressionSkipPeriods.Text; modelParameterDateSequence.FollowFrequency = this.checkBoxFollowFrequency.Checked; modelParameterDateSequence.EndDateExpression = this.expressionEndDate.Text; modelParameterDateSequence.FrequencyExpression = this.comboBoxFrequency.Text; modelParameterDateSequence.GenerateSequenceFromStartDate = this.comboBoxDatesGeneration.SelectedIndex == 0; modelParameterDateSequence.VarName = this.textBoxName.Text; modelParameterDateSequence.Tag = null; modelParameterDateSequence.VectorReferenceExpr = this.expressionVectorRef.Text; modelParameterDateSequence.SkipPeriodsArray = this.expressionSkipPeriodsArray.Text; // Parse the object to generate the array of dates modelParameterDateSequence.Parse(this.project); } else { // Initialize the array to the sequence of dates ModelParameterDateSequence modelParameterDateSequence = new ModelParameterDateSequence(this.expressionStartDate.Text, this.expressionEndDate.Text, this.comboBoxFrequency.Text); modelParameterDateSequence.SkipPeriods = this.expressionSkipPeriods.Text; modelParameterDateSequence.VectorReferenceExpr = this.expressionVectorRef.Text; modelParameterDateSequence.GenerateSequenceFromStartDate = this.comboBoxDatesGeneration.SelectedIndex == 0; modelParameterDateSequence.Parse(this.project); this.editedObject.Values = modelParameterDateSequence.Values; } }
/// <summary> /// Initializes the edited object in order to show its preview. /// </summary> private void InitializeDatesPreview() { if (Validation(true)) { ModelParameterDateSequence preview = new ModelParameterDateSequence(this.expressionStartDate.Text, this.expressionEndDate.Text, this.comboBoxFrequency.Text); preview.ExcludeStartDate = this.excludeStartDate; preview.Parse(project); this.dataGridViewDates.Rows.Clear(); this.labelElementsCount.Text = preview.Values.Count + " Elements"; for (int i = 0; i < preview.Values.Count; i++) { this.dataGridViewDates.Rows.Add(preview.Values[i]); } } }
/// <summary> /// Based on the values of the form initializes the array of dates. /// </summary> private void InitializeModelParameter() { this.publishingInfoControl.DataExchange(false, this.editedObject); if (this.editedObject is ModelParameterDateSequence) { // Initialize the model parameter representing the sequence of dates ModelParameterDateSequence modelParameterDateSequence = (ModelParameterDateSequence)this.editedObject; modelParameterDateSequence.StartDateExpression = this.expressionStartDate.Text; modelParameterDateSequence.ExcludeStartDate = this.excludeStartDate; modelParameterDateSequence.EndDateExpression = this.expressionEndDate.Text; modelParameterDateSequence.FrequencyExpression = this.comboBoxFrequency.Text; modelParameterDateSequence.VarName = this.textBoxName.Text; modelParameterDateSequence.Tag = null; // Parse the object to generate the array of dates modelParameterDateSequence.Parse(this.project); } else { // Initialize the array to the sequence of dates ModelParameterDateSequence modelParameterDateSequence = new ModelParameterDateSequence(this.expressionStartDate.Text, this.expressionEndDate.Text, this.comboBoxFrequency.Text); modelParameterDateSequence.ExcludeStartDate = this.excludeStartDate; modelParameterDateSequence.Parse(this.project); this.editedObject.Values = modelParameterDateSequence.Values; } this.DialogResult = DialogResult.OK; this.Close(); }
/// <summary> /// Based on the values of the form initializes the array of dates. /// </summary> private void InitializeModelParameter() { this.publishingInfoControl.DataExchange(false, this.editedObject); if (this.editedObject is ModelParameterDateSequence) { // Initialize the model parameter representing the sequence of dates ModelParameterDateSequence modelParameterDateSequence = (ModelParameterDateSequence)this.editedObject; modelParameterDateSequence.StartDateExpression = this.expressionStartDate.Text; modelParameterDateSequence.SkipPeriods = this.expressionSkipPeriods.Text; modelParameterDateSequence.FollowFrequency = this.checkBoxFollowFrequency.Checked; modelParameterDateSequence.EndDateExpression = this.expressionEndDate.Text; modelParameterDateSequence.FrequencyExpression = this.comboBoxFrequency.Text; modelParameterDateSequence.GenerateSequenceFromStartDate = this.comboBoxDatesGeneration.SelectedIndex == 0; modelParameterDateSequence.VarName = this.textBoxName.Text; modelParameterDateSequence.Tag = null; // Parse the object to generate the array of dates modelParameterDateSequence.Parse(this.project); } else { // Initialize the array to the sequence of dates ModelParameterDateSequence modelParameterDateSequence = new ModelParameterDateSequence(this.expressionStartDate.Text, this.expressionEndDate.Text, this.comboBoxFrequency.Text); modelParameterDateSequence.SkipPeriods = this.expressionSkipPeriods.Text; modelParameterDateSequence.Parse(this.project); modelParameterDateSequence.GenerateSequenceFromStartDate = this.comboBoxDatesGeneration.SelectedIndex == 0; this.editedObject.Values = modelParameterDateSequence.Values; } }