예제 #1
0
 public virtual void ViewDestroy()
 {
     CrossView.UnbindAllClicks();
     RemoveSubViews();
     RemoveView();
     UnbindAll();
 }
예제 #2
0
        public void FillCrossView()
        {
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Дата", DataType = typeof(String), IsUsedInFilter = false
            });
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Не судебный", DataType = typeof(String), IsUsedInFilter = false
            });
            //CrossView.Columns.Add(new DataGridColumn { Caption = "Возбуждение", DataType = typeof(String), IsUsedInFilter = false });
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Подготовка", DataType = typeof(String), IsUsedInFilter = false
            });
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Разбирательство", DataType = typeof(String), IsUsedInFilter = false
            });
            //CrossView.Columns.Add(new DataGridColumn { Caption = "Апелляция", DataType = typeof(String), IsUsedInFilter = false });
            //CrossView.Columns.Add(new DataGridColumn { Caption = "Кассация", DataType = typeof(String), IsUsedInFilter = false });
            //CrossView.Columns.Add(new DataGridColumn { Caption = "Надзор", DataType = typeof(String), IsUsedInFilter = false });
            //CrossView.Columns.Add(new DataGridColumn { Caption = "Пересмотр", DataType = typeof(String), IsUsedInFilter = false });
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Исполнение", DataType = typeof(String), IsUsedInFilter = false
            });
            CrossView.Columns.Add(new DataGridColumn {
                Caption = "Завершено", DataType = typeof(String), IsUsedInFilter = false
            });

            DataTable cdt = HomeData.Reports.GetR3CrossTable();

            if ((cdt != null) && (cdt.Rows.Count > 0))
            {
                foreach (DataRow dr in cdt.Rows)
                {
                    DataGridRow r = CrossView.NewRow();
                    //r.Attributes.Add("data-sud-iddoc", (String)dr["iddoc"]);
                    r[0] = (((DateTime)dr["date"]).ToString("yyyy-MM-dd"));
                    r[1] = (((Int32)dr["0"]).ToString());
                    //r.Cells.Add(((Int32)dr["1"]).ToString());
                    r[2] = (((Int32)dr["2"]).ToString());
                    r[3] = (((Int32)dr["3"]).ToString());
                    //r.Cells.Add(((Int32)dr["4"]).ToString());
                    //r.Cells.Add(((Int32)dr["5"]).ToString());
                    //r.Cells.Add(((Int32)dr["6"]).ToString());
                    //r.Cells.Add(((Int32)dr["7"]).ToString());
                    r[4] = (((Int32)dr["8"]).ToString());
                    r[5] = (((Int32)dr["9"]).ToString());
                    CrossView.Rows.Add(r);
                }
            }
        }
예제 #3
0
        public ICrossContainerView FindCrossContainerView(string containerId)
        {
            if (!containerViewCache.ContainsKey(containerId))
            {
                var matchingContainers = CrossView.FindViewsOfTypeInTree <ICrossContainerView>().Where(v => v.ContainerId == containerId);
                if (matchingContainers.Count() > 1)
                {
                    throw new Exception($"More than one ICrossContainerView with the id {containerId} exists.");
                }

                var container = matchingContainers.FirstOrDefault();
                //if (container == null) {
                //    throw new Exception($"Container view with Id {containerId} could not be found");
                //}
                containerViewCache[containerId] = container;
            }
            return(containerViewCache[containerId]);
        }
예제 #4
0
 public void Show(bool animated = true)
 {
     CrossView.Show(animated);
     //CrossView.ShowAsync();
 }
예제 #5
0
 public async Task ShowOverAsync(bool animated = true)
 {
     await CrossView.ShowOverAsync(animated);
 }
예제 #6
0
 public void ShowOver(bool animated = true)
 {
     //CrossView.ShowOver();
     CrossView.ShowOverAsync(animated);
 }
예제 #7
0
        public void BuildTemplate()
        {
            // create temporary descriptors
            if (!CrossView.Data.SourceAssigned)
            {
                CrossView.Data.columnDescriptorsIndexes = new int[] { 0 };
                CrossView.Data.rowDescriptorsIndexes    = new int[] { 0 };
                CrossView.Data.columnTerminalIndexes    = new int[] { 0 };
                CrossView.Data.rowTerminalIndexes       = new int[] { 0 };
                CrossView.Data.Columns.Add(noColumnsDescriptor);
                CrossView.Data.Rows.Add(noRowsDescriptor);
                CrossView.Data.Cells.Add(noCellsDescriptor);
            }

            UpdateTemplateSizes();

            // create the result table
            designTime  = true;
            resultTable = new TableResult();
            InitTemplateTable();
            PrintHeaders();
            PrintXAxisTemplate();
            PrintYAxisTemplate();
            PrintDataTemplate();

            // copy the result table to the Matrix
            CrossView.ColumnCount  = ResultTable.ColumnCount;
            CrossView.RowCount     = ResultTable.RowCount;
            CrossView.FixedColumns = HeaderWidth;
            CrossView.FixedRows    = HeaderHeight;
            CrossView.CreateUniqueNames();

            for (int x = 0; x < CrossView.ColumnCount; x++)
            {
                CrossView.Columns[x].Assign(ResultTable.Columns[x]);
            }
            for (int y = 0; y < CrossView.RowCount; y++)
            {
                CrossView.Rows[y].Assign(ResultTable.Rows[y]);
            }
            for (int x = 0; x < CrossView.ColumnCount; x++)
            {
                for (int y = 0; y < CrossView.RowCount; y++)
                {
                    TableCell cell = CrossView[x, y];
                    cell.AssignAll(ResultTable[x, y]);
                    cell.SetFlags(Flags.CanEdit, true);
                }
            }
            UpdateDescriptors();
            resultTable.Dispose();

            // clear temporary descriptors, set hints
            if (!CrossView.Data.SourceAssigned)
            {
                SetHint(CrossView[HeaderWidth, (CrossView.ShowTitle ? 1 : 0) + (CrossView.ShowXAxisFieldsCaption ? 1 : 0)], Res.Get("ComponentsMisc,CrossView,SetSource"));
                CrossView.Data.Columns.Clear();
                SetHint(CrossView[0, HeaderHeight], Res.Get("ComponentsMisc,CrossView,SetSource"));
                CrossView.Data.Rows.Clear();
                SetHint(CrossView[HeaderWidth, HeaderHeight], Res.Get("ComponentsMisc,CrossView,SetSource"));
                CrossView.Data.Cells.Clear();
                CrossView.Data.columnDescriptorsIndexes = new int[0];
                CrossView.Data.rowDescriptorsIndexes    = new int[0];
                CrossView.Data.columnTerminalIndexes    = new int[0];
                CrossView.Data.rowTerminalIndexes       = new int[0];
            }
            else
            {
                noColumnsDescriptor.TemplateColumn = CrossView.Data.Columns[0].TemplateColumn;
                noColumnsDescriptor.TemplateRow    = CrossView.Data.Columns[0].TemplateRow;
                noColumnsDescriptor.TemplateCell   = CrossView.Data.Columns[0].TemplateCell;
                noRowsDescriptor.TemplateColumn    = CrossView.Data.Rows[0].TemplateColumn;
                noRowsDescriptor.TemplateRow       = CrossView.Data.Rows[0].TemplateRow;
                noRowsDescriptor.TemplateCell      = CrossView.Data.Rows[0].TemplateCell;
                noCellsDescriptor.TemplateColumn   = CrossView.Data.Cells[0].TemplateColumn;
                noCellsDescriptor.TemplateRow      = CrossView.Data.Cells[0].TemplateRow;
                noCellsDescriptor.TemplateCell     = CrossView.Data.Cells[0].TemplateCell;
            }
        }