public void LoadStockTypes(DataFeed dataFeed, List <int> stockTypeIds)
        {
            this.m_DataFeed     = dataFeed;
            this.m_StockTypeIds = stockTypeIds;

            WinFormSession sess = (WinFormSession)this.Project.Library.Session;

            this.m_FlowDiagramSheet = this.m_DataFeed.Scenario.GetDataSheet(Constants.DATASHEET_FLOW_PATHWAY_DIAGRAM_NAME);
            this.m_FlowDiagramData  = this.m_FlowDiagramSheet.GetData();

            this.m_FlowPathwaySheet = this.m_DataFeed.GetDataSheet(Constants.DATASHEET_FLOW_PATHWAY_NAME);
            this.m_FlowPathwayData  = this.m_FlowPathwaySheet.GetData();

            this.m_FlowPathwayView = (MultiRowDataFeedView)sess.CreateMultiRowDataFeedView(dataFeed.Scenario, dataFeed.Scenario);
            this.m_FlowPathwayView.LoadDataFeed(this.m_DataFeed, Constants.DATASHEET_FLOW_PATHWAY_NAME);

            this.m_FlowPathwayGrid = this.m_FlowPathwayView.GridControl;

            this.FilterFlowPathways();
            this.ConfigureContextMenus();
            this.InitializeColumnVisiblity();
            this.UpdateColumnVisibility();
            this.ConfigureColumnsReadOnly();

            this.PanelMain.Controls.Add(this.m_FlowPathwayView);
            this.m_FlowPathwayGrid.PaintGridBorders      = false;
            this.m_FlowPathwayView.ManageOptionalColumns = false;

            this.m_FlowPathwayGrid.CellBeginEdit += OnGridCellBeginEdit;
            this.m_FlowPathwayGrid.CellEndEdit   += OnGridCellEndEdit;
        }
        public override void EnableView(bool enable)
        {
            base.EnableView(enable);

            MultiRowDataFeedView v = (MultiRowDataFeedView)this.PanelJurisdictions.Controls[0];

            v.GridControl.IsReadOnly = (!enable);
        }
        protected override void InitializeView()
        {
            base.InitializeView();

            this.m_View = this.Session.CreateMultiRowDataFeedView(this.Project);
            this.m_Grid = this.m_View.GridControl;

            this.Controls.Add(this.m_View);

            this.m_Grid.CellValidating += this.OnCellValidating;
        }
Exemple #4
0
        public override void LoadDataFeed(Core.DataFeed dataFeed)
        {
            base.LoadDataFeed(dataFeed);

            MultiRowDataFeedView v = (MultiRowDataFeedView)this.PanelMain.Controls[0];

            this.m_Grid = v.GridControl;
            v.LoadDataFeed(dataFeed, Strings.DATASHEET_TRANSITION_SIMULATION_GROUP_NAME);

            this.m_Grid.CellBeginEdit += OnGridCellBeginEdit;
            this.m_Grid.CellEndEdit   += OnGridCellEndEdit;
        }
        protected override void InitializeView()
        {
            base.InitializeView();

            this.m_View = this.Session.CreateMultiRowDataFeedView(this.Project);
            this.m_Grid = this.m_View.GridControl;

            this.Controls.Add(this.m_View);

            this.m_Grid.CellDoubleClick += this.OnGridCellDoubleClick;
            this.m_Grid.CellPainting    += this.OnGridCellPainting;
            this.m_Grid.KeyDown         += this.OnGridKeyDown;
        }
Exemple #6
0
        public override void LoadDataFeed(Core.DataFeed dataFeed)
        {
            base.LoadDataFeed(dataFeed);

            MultiRowDataFeedView v = (MultiRowDataFeedView)this.PanelMain.Controls[0];

            this.m_Grid = v.GridControl;
            v.LoadDataFeed(dataFeed, Strings.DISTRIBUTION_VALUE_DATASHEET_NAME);

            this.m_Grid.CellBeginEdit    += OnGridCellBeginEdit;
            this.m_Grid.CellEndEdit      += OnGridCellEndEdit;
            this.m_Grid.CellFormatting   += OnGridCellFormatting;
            this.m_Grid.CellValueChanged += OnGridCellValueChanged;
        }
        public override void LoadDataFeed(DataFeed dataFeed)
        {
            base.LoadDataFeed(dataFeed);

            this.SetTextBoxBinding(
                this.TextBoxMaxIterations,
                Shared.DATASHEET_RUN_CONTROL_NAME,
                Shared.DATASHEET_RUN_CONTROL_MAX_ITERATION_COLUMN_NAME);

            MultiRowDataFeedView v = (MultiRowDataFeedView)this.PanelJurisdictions.Controls[0];

            v.LoadDataFeed(dataFeed, Shared.DATASHEET_RUNTIME_JURISDICTION_NAME);

            this.RefreshDateTimeControls();
            this.m_IsLoaded = true;
        }
Exemple #8
0
        private void SwitchToGridView()
        {
            if (this.TabStripMain.SelectedItem == this.m_StockTab)
            {
                if (this.m_StockTab.Control == null)
                {
                    MultiRowDataFeedView v = this.Session.CreateMultiRowDataFeedView(this.Scenario, this.ControllingScenario);

                    v.ShowBorder = false;
                    v.LoadDataFeed(DataFeed, Constants.DATASHEET_FLOW_PATHWAY_DIAGRAM_NAME);
                    v.EnableView(this.m_IsEnabled);

                    this.m_StockTab.Control = v;
                }
            }
            else
            {
                if (this.m_FlowTab.Control == null)
                {
                    MultiRowDataFeedView v = this.Session.CreateMultiRowDataFeedView(this.Scenario, this.ControllingScenario);

                    v.ShowBorder = false;
                    v.LoadDataFeed(DataFeed, Constants.DATASHEET_FLOW_PATHWAY_NAME);
                    v.EnableView(this.m_IsEnabled);

                    this.m_FlowTab.Control = v;
                }
            }

            this.ButtonZoomIn.Enabled        = false;
            this.ButtonZoomOut.Enabled       = false;
            this.PanelControlHost.Width      = this.PanelBottomControls.Width;
            this.ScrollBarVertical.Visible   = false;
            this.ScrollBarHorizontal.Enabled = false;

            this.SetCurrentControl();
        }