Beispiel #1
0
        private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var newDoc = new Document
            {
                Name = $"FlowDocument{project.Documents.Count + 1}"
            };

            SetupSolution();

            DataTable dt = (DataTable)gridControl1.DataSource;

            DataRow dr = dt.NewRow();

            dr["Icon"]     = null;
            dr["Name"]     = newDoc.Name;
            dr["Document"] = newDoc;

            dt.Rows.Add(dr);

            dt.AcceptChanges();

            project.Documents.Add(newDoc);

            FlowXtraTabPage.
            AddToXtraTabControl(xtraTabControl1, newDoc);
        }
Beispiel #2
0
        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0)
            {
                return;
            }

            FlowXtraTabPage.
            AddToXtraTabControl(xtraTabControl1, gridView1.GetFocusedRowCellValue("Document") as Document);
        }