public static void Main(string[] args) { string FilePath_G = args[0]; string TcTLO_N = args[1]; string FilePath = args[2]; Staj_Projem_ARGS ARGS = new Staj_Projem_ARGS(); Filelist = ARGS.Filelist_C(FilePath_G); if (Filelist.Count == 0) { Console.WriteLine("Dosyanın İçeriği Boştur Lütfen Başka Bir Dosya Seçiniz."); return; } foreach (string var in Filelist) { FileStream fs = File.OpenRead(var); FileLen_G += (int)fs.Length / 32; fs.Close(); } LogElements = new LogElement[FileLen_G]; NotFound_V = null; int i = 0; LogElements = ARGS.FileOpen(Filelist); Year_list = new List <int>(); for (i = 0; i < (FileLen_G); i++) { if (Year_list.Contains(LogElements[i].LogTime.Year) == false) { Year_list.Add(LogElements[i].LogTime.Year); } } Year_list.Sort(); string file = @"" + FilePath; StreamWriter file_str = new StreamWriter(file); XElementsPL = ARGS.Xelement_C(TcTLO_N); for (i = 0; i < FileLen_G; i++) { file_str.WriteLine(LogElements[i].LogİD + ";" + LogElements[i].LogTime + ";" + LogElements[i].Logtype + ";" + LogElements[i].LibCode + ";" + LogElements[i].UnitNo + ";" + LogElements[i].EventCode + ";" + EventValue_O(i), LogElements[i].EventValue); } file_str.Close(); Console.WriteLine(ARGS.NotFound_L(NotFound_V)); Console.ReadKey(); }
private void FileList(object sender, EventArgs e) { if (Filelist == null) { MessageBox.Show("Lüen Bir Dosya Seçiz."); return; } if (TcTLO_N == "") { MessageBox.Show("Lüfen TcTLO Dosyasını Seçniz."); return; } if (NotFound_V == null) { NotFound_V = new List <string>(); } else { NotFound_V.Clear(); } int i; WL_Changes_4 = null; WL_Changes_6 = null; var iter = this.textview3.Buffer.GetIterAtLine(0); this.textview3.Buffer.InsertWithTags(ref iter, ""); XElementsPL = ARGS.Xelement_C(TcTLO_N); for (i = 0; i < FileLen_G; i++) { string temp = "" + LogElements[i].LogİD + " --> " + LogElements[i].LogTime + " --> " + LogElements[i].Logtype + " --> " + LogElements[i].LibCode + " --> " + LogElements[i].UnitNo + " --> " + LogElements[i].EventCode + " --> " + EventValue_O(i) + "\n"; this.textview3.Buffer.InsertWithTags(ref iter, "" + temp); } }