Ejemplo n.º 1
0
        private void openFile(string fileName)
        {
            x12View.Nodes.Clear();
            errorList.Items.Clear();

            //Create our x12File object
            x12File = new x12File(fileName, null, true);

            //Read the format file for the x12 file selected
            //If we can't find the correct format file return
            if (ReadFormatFile() == false)
            {
                return;
            }

            //Show the file path in the textbox.
            this.Text = "X12Tool " + fileName;

            //Set up our progress handler
            x12File.ProgressUpdated += new System.ComponentModel.ProgressChangedEventHandler((object o, System.ComponentModel.ProgressChangedEventArgs args) => Invoke(new Action(() => {
                progressBar.Value = args.ProgressPercentage;
            })));

            //Setup x12View
            x12View.DrawMode            = TreeViewDrawMode.OwnerDrawText;
            x12View.ImageList           = new ImageList();
            x12View.ImageList.ImageSize = new System.Drawing.Size(16, 16);
            x12View.ImageList.Images.Add(Image.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Images\loop.png")));
            x12View.ImageList.Images.Add(Image.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Images\segment.png")));
            x12View.ImageList.Images.Add(Image.FromFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Images\selected.png")));

            DisplayX12();
        }
Ejemplo n.º 2
0
 public ReplaceDialog(x12File x12File)
 {
     InitializeComponent();
     this.x12File = x12File;
     ApplyConfig();
 }