public MainForm() { InitializeComponent(); m_context = new Context(this); m_context.SetState(Context.State.Init); //policies summary panel setup m_policiesSummaryPanel = new PoliciesSummaryPanelControl(m_context); //policy panel setup m_policyPanel = new PolicyDetailsPanelControl(m_context); //conditions panel setup m_conditionsPanel = new ConditionsPanelControl(m_context); //action panel setup m_actionPanel = new ActionPanelControl(m_context); //Controller for policy tree view m_treeViewController = new TreeViewControllerPolicyOriented(m_context); m_treeViewController.View = this.TreeView; this.WindowState = FormWindowState.Maximized; }
public void DisplayContextPanel(Context.State statePanel, object model) { switch (statePanel) { case(Context.State.ShowPolicies): ShowContextPanel(this.m_policiesSummaryPanel, model); break; case (Context.State.ShowPolicy): ShowContextPanel(this.m_policyPanel, model); break; case (Context.State.ShowConditions): ShowContextPanel(this.m_conditionsPanel, model); break; case (Context.State.EditCondition): this.m_conditionsPanel.ChangeState(statePanel, this.m_context.PolicyObject); break; case (Context.State.ShowActions): ShowContextPanel(this.m_actionPanel, model); break; default: //TODO: better exception throw new ArgumentException("Unsupported panel type"); } }
private void DisplayContextPanel(Context.State panelState) { m_parent.DisplayContextPanel(panelState, m_policyObject); }