示例#1
0
        private void InitView()
        {
            PropertyView newView = null;

            if (_component.FunctionParameters.SourceType == SourceType.Equation)
            {
                newView = new EquationView();
                ((EquationView)newView).Component = _component;
            }
            else
            {
                newView = new ExpressionView();
                ((ExpressionView)newView).Component = _component;
            }

            this.panel1.Controls.Add(newView);
            newView.Dock = DockStyle.Fill;
            if (_currentView != null)
            {
                _currentView.SaveData();
                _currentView.Dispose();
                _currentView = null;
            }
            _currentView = newView;
        }
示例#2
0
		private void InitView()
		{
			PropertyView newView = null;
			if (_component.FunctionParameters.SourceType == SourceType.Equation)
			{
				newView = new EquationView();
				((EquationView)newView).Component = _component;
			}
			else
			{
				newView = new ExpressionView();
				((ExpressionView)newView).Component = _component;
			}

			this.panel1.Controls.Add(newView);
			newView.Dock = DockStyle.Fill;
			if (_currentView != null)
			{
				_currentView.SaveData();
				_currentView.Dispose();
				_currentView = null;
			}
			_currentView = newView;
		}
		private void btClose_Click(object sender, System.EventArgs e)
		{
			if (_currentView != null)
			{
				_currentView.SaveData();
				_currentView.Dispose();
				_currentView = null;
			}
			this.Close();
		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="action"></param>
		private void SelectView(string action)
		{
			PropertyView newView = null;
			switch(action)
			{
				case "Source Properties":
					newView = new SourceView(this._component);
					break;
				case "Code Expression Repository":
					newView = new ExpressionRepositoryView(this._component);
					break;
				case "Equation Repository":
					newView = new EquationRepositoryView(this._component);
					break;
				case "Destination Properties":
					newView = new DestinationView(this._component);
					break;
			}

			this.rightpanel.Controls.Add(newView);
			newView.Dock = DockStyle.Fill;
			if (_currentView != null)
			{
				_currentView.SaveData();
				_currentView.Dispose();
				_currentView = null;
			}
			_currentView = newView;
			_currentView.OnViewStatusChange +=new ViewStatusChangeHandler(_currentView_OnViewStatusChange);
		}