// after the editor, our fields should be updated with the new records.
        public void show_search(ACH_FILE open_file)
        {
#if UPDATE_20190718
            // we'll be using the following loop only when that record is broken.
            var m = new FORMS.ACCESS_RECORD(); // don't declare open_file here.
            // might add an option to prevent it from continuing after this loop - let's find out how it's going.
            m.InterruptShowDialog(open_file);  // allows it to be called with as many arguments.
#else
            // this is being changed based on the new format.
            var m = new FORMS.ACCESS_RECORD(open_file);
            m.ShowDialog();
#endif

            // technically everything from here should be viable to handle in the backgroung, once the new file is built.
#if DEBUG
            string fname = "./Outout_Test_2.txt";
            File.WriteAllText(fname, open_file.file_header + "\n");
            File.AppendAllText(fname, open_file.batch_header + "\n");
            // adding debug hook to try it out.
            foreach (var a in open_file.entryAddenda.Keys)
            {
                var myTup = open_file.entryAddenda[a];
                File.AppendAllText(fname, myTup.Item1 + "\n"); // should write the entry files.
                if (!new List <string> {
                    " ", "0", ""
                }.Contains(myTup.Item2))
                {
                    File.AppendAllText(fname, myTup.Item1 + "\n"); // should write the entry files.
                }
                // if this works and matches the record order, then I'll go ahead and add the logic to construct the batch components
                // *NEED TO ENSURE THAT ADDENDA GET HANDLED TOO.
            }
#else
#endif
            old_rex     = current_rex;
            current_rex = working_file.get_file(); // this should yield the final product.
#if DEBUG
            for (int i = 0; i < current_rex.Length; i++)
            {
                Console.WriteLine(current_rex[i]);
            }
            File.WriteAllLines("./test_final.ach", current_rex);
#endif
            //
            // add the condition for this one, wehere we automatically begin using save.
            // use Expert mode to minimize keystrokes
            //
            if (Program.SAVE_ON_CLOSE || Program.EXPERT_MODE)
            {
                this.ButtonObjectClick(button3, new EventArgs());
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Accessor method for the source_search object
 /// </summary>
 /// <param name="source"></param>
 public void set_source(ACCESS_RECORD source)
 {
     source_search = source;
 }