Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            var currentDirectory = new DirectoryInfo(Environment.CurrentDirectory);

            if (currentDirectory != null)
            {
                AutoUpdater.InstallationPath = currentDirectory.FullName;
            }
            AutoUpdater.Start("https://lucasvor.github.io/STJ-Acordao/Files/autoUpdate.xml");

            tpb            = new TextProgressBar();
            tpb.Dock       = DockStyle.Fill;
            tpb.VisualMode = ProgressBarDisplayMode.TextAndPercentage;
            tpb.CustomText = "Informe a data";
            panel1.Controls.Add(tpb);

            //firstStepETB = new ExTextBox();
            //firstStepETB.Dock = DockStyle.Fill;
            //firstStepETB.Hint = "Primeira parte";
            //secondStepETB = new ExTextBox();
            //secondStepETB.Dock = DockStyle.Fill;
            //secondStepETB.Hint = "Segunda parte";
            //tableLayoutPanel1.Controls.Add(firstStepETB, 0, 0);
            //tableLayoutPanel1.Controls.Add(secondStepETB, 1, 0);

            browser = new ChromiumWebBrowser("https://processo.stj.jus.br/processo/dj/init");
            browser.FrameLoadEnd += Browser_FrameLoadEnd;
            panel3.Controls.Add(browser);
        }
Exemplo n.º 2
0
 private void updateProgressBar(TextProgressBar sender, int?valor = null, string text = null)
 {
     if (sender.InvokeRequired)
     {
         sender.Invoke(new Action(() =>
         {
             sender.Value      = valor.GetValueOrDefault();
             sender.CustomText = text;
         }));
     }
     else
     {
         sender.Value      = valor.GetValueOrDefault();
         sender.CustomText = text;
     }
 }