Exemplo n.º 1
0
        public void addData(int newID, String newData)
        {
            Data newDataObj = new Data(newID, newData);

            //if first data item in DataList
            //if should be last item in DataList
            //find location in list
            //  if exist replace with new data(higher page assumed)
            //  if not exist now know where newDataObj should go
            if (DataList.Count == 0)
            {
                DataList.Add(newDataObj);
            }
            else if (DataList[DataList.Count - 1].CompareTo(newDataObj) < 0)
            {
                DataList.Add(newDataObj);
            }
            else
            {
                int index = DataList.BinarySearch(newDataObj);
                if (index < 0)
                {
                    DataList.Insert(~index, newDataObj);
                }
                else
                {
                    DataList[index].replaceData(newDataObj);
                }
            }
        }
Exemplo n.º 2
0
 public Processo(String reu, String especie, int numProcesso, double valorAjuizado, Data dataAjuizamento,
         Data periodo, Data ultMov)
 {
     this.reu = reu; this.especie = especie; this.numProcesso = numProcesso; this.valorAjuizado = valorAjuizado;
     this.dataAjuizamento = dataAjuizamento; this.periodo = periodo; this.ultMov = ultMov;
     ajuizado = null; //chamar metodo
     custas = null; //chamar metodo
 }
Exemplo n.º 3
0
        private string createFatherLine(Data data, int counter)
        {
            string cancer = "0";

            return "fid" + counter.ToString() + " " + "Anone" + counter.ToString() + " " + "0" + " " + "5" + " " + "0" + " " +
                "0" + " " + "M" + " " + "0" + " " + 1 + " " +
                data.fatherAge.ToString() + " " + data.fatherYob.ToString() + " " + cancer + " " +
                "0 0 0 0" + " " + "0" + " " + "0" + " " + "0";
        }
Exemplo n.º 4
0
 public void DataConstructorTest()
 {
     string[] families = new string[4];
     families[0] = "65	0	0";
     families[1] = "53	0	0";
     families[2] = "68	0	0";
     families[3] = "43	0	0";
     Data target = new Data(families);
     Assert.Inconclusive(target.probandAge ==43);
 }
Exemplo n.º 5
0
 /******************************PROCESSOS****************************************************/
 public void addProcesso(String reu, String especie, int numProcesso, double valorAjuizado, Data dataAjuizamento,
         Data periodo, Data ultMov)
 {
     int pos = 0;
     for(Processo aux : processos){
     if(aux.getNumProcesso() > numProcesso) break;
     pos++;
     }
     Processo p = new Processo(reu, especie, numProcesso, valorAjuizado, dataAjuizamento, periodo, ultMov);
     processos.add(pos,p);
 }
Exemplo n.º 6
0
 public void writePedigree(int i, string OutputFolder, Data data, int counter)
 {
     System.IO.StreamWriter file = new System.IO.StreamWriter(Path.Combine(OutputFolder + "/" + i, counter.ToString("D6") + ".txt"));
     file.WriteLine("BOADICEA import pedigree file format 1.0");
     file.WriteLine("FamID Name Target IndivID FathID MothID Sex Twin Dead Age Yob 1BrCa 2BrCa OvCa ProCa PanCa   Gtest   Mutn   Ashkn");
     file.WriteLine(createProbandLine(data, counter));
     file.WriteLine(createSiblingFirstLine(data, counter));
     file.WriteLine(createSiblingSecondLine(data, counter));
     file.WriteLine(createMotherLine(data, counter));
     file.WriteLine(createFatherLine(data, counter));
     file.Close();
 }
Exemplo n.º 7
0
Arquivo: Data.cs Projeto: rigst/csharp
 public bool after(Data d)
 {
     if (this.ano > d.getAno()) return true;  //ano desse é maior
     else if (d.getAno() == this.ano)
     { //anos são iguais
         if (this.mes > d.getMes()) return true; //mes desse é maior
         else if (this.mes == d.getMes())
         { //meses são iguais
             if (this.dia > d.getDia()) return true; //dia desse é maior
             return false; //senão vem antes
         }
         return false; //mes desse é menor
     }
     return false; //ano do outro é menor
 }
Exemplo n.º 8
0
 /******************************COTAS*****************************************************/
 public void addCota(String nome, double valOriginal, double valPago, Data dataVencimento, Data dataPagamento, String obs)
 {
     int pos = 0;
     foreach (Cota aux in cotas)
     {
         if (aux.getDataVencimento().after(dataVencimento)) break;
         pos++;
     }
     cotas.Add(new Cota(valPago, dataVencimento, dataPagamento, obs));
     /***organizar lista***/
     /***
      *
      *
      *
      * */
 }
Exemplo n.º 9
0
        public void createPedigrees(string inputFile, string OutputFolder)
        {
            List<string[]> families = new List<string[]>();
            Data tmp;
            int counter = 0;

            families = createListFromFile(inputFile);
            int i = 1;
            int x = 1;
            int folder = 1;
            foreach (string[] family in families)
            {
              //  if (i > x * families.Count / 5)
                //{
             //       folder = x;
             //       x++;
             //   }

                i++;
                tmp = new Data(family);
                writePedigree(folder,OutputFolder, tmp, counter++);
            }
        }
Exemplo n.º 10
0
Arquivo: Cota.cs Projeto: rigst/csharp
 public Cota(double valP, Data dVenc, Data dPag, String obs)
 {
     valPago = valP; dataVencimento = dVenc; dataPagamento = dPag; this.obs = obs;
 }
Exemplo n.º 11
0
 private string createMotherLine(Data data, int counter)
 {
     string cancer;
     string BRCA = "N";
     if (data.motherBrca == 1)
     {
         BRCA = "1";
     }
     if (data.motherCancer == 1)
     {
         cancer = "AU";
     }
     else
     {
         cancer = "0";
     }
     return "fid" + counter.ToString() + " " + "mothF" + counter.ToString() + " " + "0" + " " + "1" + " " + "0" + " " +
         "0" + " " + "F" + " " + "0" + " " + (1 - data.motherAlive).ToString() + " " +
         data.motherAge.ToString() + " " + data.motherYob.ToString() + " " + cancer + " " +
         "0 0 0 0" + " " + "T" + " " + BRCA + " " + "0";
 }
Exemplo n.º 12
0
 public void addCustas(Data d, double v)
 {
     custas.Add(new Custa(d,v));
 }
Exemplo n.º 13
0
 public void addItemTabela(int numAcordo, String parcela, double valO, double valP, Data vencO, Data dataP)
 {
     acordos.get(numAcordo).addItemTabela(parcela, valO, valP, vencO, dataP);
 }
Exemplo n.º 14
0
 public void addItemDebitos(int numAcordo, Data c)
 {
     acordos.get(numAcordo).addItemDebitos(c);
 }
Exemplo n.º 15
0
            public void Store(object sender, EventArgs e)
            {
                List<Data> info = new List<Data>();

                for(int i = 0; i < 100; i++)
                {
                    MouseEventArgs me = e as MouseEventArgs;
                    Data data = new Data(me.Location.ToString());
                    info.Add(data);

                }
            }
Exemplo n.º 16
0
 public void addAjuizado(Data d)
 {
     ajuizado.Add(d);
 }
Exemplo n.º 17
0
 private string createSiblingSecondLine(Data data, int counter)
 {
     string cancer;
     string BRCA = "N";
     if (data.siblingSecondBrca == 1)
     {
         BRCA = "1";
     }
     if (data.siblingSecondCancer == 1)
     {
         cancer = "AU";
     }
     else
     {
         cancer = "0";
     }
     return "fid" + counter.ToString() + " " + "siblS" + counter.ToString() + " " + "0" + " " + "3" + " " + "5" + " " +
         "1" + " " + "F" + " " + "0" + " " + (1 - data.siblingSecondAlive).ToString() + " " +
         data.siblingSecondAge.ToString() + " " + data.siblingSecondYob.ToString() + " " + cancer + " " +
         "0 0 0 0" + " " + "T" + " " + BRCA + " " + "0";
 }
Exemplo n.º 18
0
 public Custa(Data d, double v)
 {
     this.Data = Data; this.Valor = v;
 }
Exemplo n.º 19
0
 private static bool test(Data dat)
 {
     return true;
 }