Exemplo n.º 1
0
        public static IEnumerator <IDrawing> GetDrawings()
        {
            List <IDrawing> drawingsToPrint = new List <IDrawing>();

            foreach (Matcher match in MatchList)
            {
                if (File.Exists(match.Drawing.Path))
                {
                    drawingsToPrint.Add(match.Drawing);
                }
            }

            return(ListToEnum.Convert(drawingsToPrint));
        }
Exemplo n.º 2
0
        public static IEnumerator <IDrawing> GetSelectedDrawings(DataGridView DGV)
        {
            List <IDrawing> items = new List <IDrawing>();

            foreach (DataGridViewRow row in DGV.SelectedRows)
            {
                items.Add(new Drawing()
                {
                    File  = row.Cells["File"].Value.ToString(),
                    Path  = row.Cells["Path"].Value.ToString(),
                    Group = row.Cells["Group"].Value.ToString()
                });
            }

            // Gets an enumearator from selected data grid items and sends those into the printer functions
            return(ListToEnum.Convert(items));
        }