Ejemplo n.º 1
0
        public MainForm()
        {
            InitializeComponent();

            #region tests
            FillTestCase();
            TestJsonParser();
            #endregion tests

            CaseKeeper.AppPath = Application.StartupPath;
            CaseKeeper.CurrentCase = m_currentCase;
            CaseKeeper.AppMainForm = this;
            TreeListCaseAdapter treeListCaseAdapter = new TreeListCaseAdapter(treeList);
            treeList.StateImageList = sharedTreeListImageCollection;

            //mainGridView.Images = sharedTreeListImageCollection;
            //mainGridView.CustomUnboundColumnData += new DevExpress.XtraGrid.Views.Base.CustomColumnDataEventHandler(tableGridCaseAdapter.gridView_CustomUnboundColumnData); image in grid
            TableGridCaseAdapter tableGridCaseAdapter = new TableGridCaseAdapter(mainGridControl);

            treeListCaseAdapter.focusedNodeChanged += new TreeListCaseAdapter.FocusedNodeChanged(tableGridCaseAdapter.TreeListFocusedNodeChanged);

            xtraTabControlCaseAdapter propertiesControlCaseAdapter = new xtraTabControlCaseAdapter(xtraTabControlNodesProperties);
            propertiesControlCaseAdapter.SetupControls();
            mainGridView.FocusedRowChanged += new DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventHandler(propertiesControlCaseAdapter.gridView_FocusedRowChanged);
            treeList.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(propertiesControlCaseAdapter.TreeListFocusedNodeChanged);

            tableGridPopupMenu = new TableGridPopupMenu(this, tableGridCaseAdapter); //Create popup menu
            treeListPopupMenu = new TreeListPopupMenu(this, treeListCaseAdapter);
            cloudTaskBackstageViewMenu = new CloudTaskBackstageViewMenu(this, ribbonControlTopMenu);

            TopMenuController m_topMenuController; m_topMenuController = new Controllers.TopMenuController();
            this.barButtonItemSaveCase.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(m_topMenuController.SaveCaseClick);
            this.barButtonItemOpenCase.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(m_topMenuController.OpenCaseClick);
            this.barButtonItemNewCase.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(m_topMenuController.NewCaseClick);
            this.barButtonItemTestDrive.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(m_topMenuController.TestDriveClick);
        }
Ejemplo n.º 2
0
 public TreeListPopupMenu(System.Windows.Forms.Control form, Controllers.TreeListCaseAdapter treeListCaseAdapter)
     : base(form)
 {
     m_treeListCaseAdapter = treeListCaseAdapter;
     m_treeListCaseAdapter.m_treeList.MouseDown += new MouseEventHandler(this.treeListMouseDown);
 }