Пример #1
0
 public static void RefreshTable(string[] lista, int[] bazaTabela_ilosc, float[] bazaTabela_cena, string[] bazaTabela_x, string[] bazaTabela_y, string[] bazaTabela_jedn, NSTableView tabela)
        {

            string[] lista2 = CreateReadyElement(lista, bazaTabela_x, bazaTabela_y);

            var DataSource = new ProductTableDataSource();
            if (lista2.Length == 0)
     {
         DataSource.Products.Add(new Product("", "", ""));
     }
            else
     {
         int count = 0;
         do
         {
             DataSource.Products.Add(new Product(lista2[count], Convert.ToString(bazaTabela_ilosc[count]) + " " + bazaTabela_jedn[count], Convert.ToString(bazaTabela_cena[count]).Replace(".",",")));
             count++;
         } while (count < lista2.Length);
     }
            tabela.DataSource = DataSource;
            tabela.Delegate = new ProductTableDelegate(DataSource);

        }

        public static void LieferungskostenFix(NSTextField lieferung)
Пример #2
0
 public class ProductTableDelegate : NSTableViewDelegate
    { 

 private const string CellIndentifer = "ProdCell"; 

 private ProductTableDataSource DataSource; 

 public ProductTableDelegate(ProductTableDataSource datasource) 

                                                               {
                                                                   
            this.DataSource = datasource; 

                                                               }
Пример #3
0
 }

        public static void RefreshTable2(string[] lista, NSTableView tabela)
        {

            var DataSource = new ProductTableDataSource();
            if (lista.Length == 0)
            {
                DataSource.Products.Add(new Product("", "", ""));
            }
            else
            {
                int count = 0;
                do
                {
                    DataSource.Products.Add(new Product(lista[count], "", ""));
                    count++;
                } while (count < lista.Length);
            }
            tabela.DataSource = DataSource;
            tabela.Delegate = new ProductTableDelegate(DataSource);

        }

        public static void RefreshTable5(string[] lista, string[] data, NSTableView tabela)
        {

            var DataSource = new ProductTableDataSource_Tab5();
            if (lista.Length == 0)
            {
                DataSource.Products.Add(new Product_Tab5("", ""));
            }
            else
            {
                int count = 0;
                do
                {
                    DataSource.Products.Add(new Product_Tab5(lista[count], data[count]));
                    count++;
                } while (count < lista.Length);
            }
            tabela.DataSource = DataSource;
            tabela.Delegate = new ProductTableDelegate_Tab5(DataSource);

        }






        public static void RefreshComboBox(string[] lista, NSComboBox comboBox)
        {
            List<string> eldo = new List<string>(lista);
            comboBox.UsesDataSource = true;
            comboBox.DataSource = new BloomTypesDataSource(eldo);

        }

        public static string[] CreateReadyElement(string[] bazaTabela, string[] bazaTabela_x, string[] bazaTabela_y)