Beispiel #1
0
        public FrmMain2()
        {
            this.mTemporizador.Start();

            this.InitializeComponent();

            /*
             *  Dionei Beilke dos Santos
             *  Se habilitar alguma linha abaixo, deve obrigatoriamente re-definir o AutoHideDelay,
             * porquê ele volta para o valor default (5000), apresentando 'uma certa lentidão'.
             */

            //Infragistics.Win.AppStyling.StyleManager.Load(@"C:\Users\Public\Documents\Infragistics\2017.2\Windows Forms\AppStylist for Windows Forms\Styles\VS2013 - Dark.isl");
            //Infragistics.Win.AppStyling.StyleManager.Load(@"C:\Users\Public\Documents\Infragistics\2017.2\Windows Forms\AppStylist for Windows Forms\Styles\Metro.isl");
            //Infragistics.Win.AppStyling.StyleManager.Load(@"C:\Users\Public\Documents\Infragistics\2017.2\Windows Forms\AppStylist for Windows Forms\Styles\Office2013 - Dark Gray.isl");

            if (Objects.CfgAtual._Theme.ToUpper().Trim() != "PADRÃO")
            {
                String pathTheme = System.IO.Path.Combine(Application.StartupPath, String.Format("Themes\\{0}", Objects.CfgAtual._Theme));

                if (System.IO.File.Exists(pathTheme))
                {
                    Infragistics.Win.AppStyling.StyleManager.Load(pathTheme);
                }
            }

            this.ultraDockManager1.AutoHideDelay = 50;
            this.ultraToolbarsManager1.BeginUpdate();

            // Disable alpha-blending which may increase performance.
            this.ultraToolbarsManager1.AlphaBlendMode = Infragistics.Win.AlphaBlendMode.Disabled;

            Objects.BuscaVersaoBanco();

            //this.Text += String.Format(" - {0}", Objects.Versao.VersaoSistema);
            this.ultraToolbarsManager1.Ribbon.Caption += String.Format(" - {0}", Objects.Versao.VersaoSistema);

            //http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/WinToolbarsManager_Customize_Areas_of_Application_Menu_2010_and_File_Menu_Button.html
            this.ultraToolbarsManager1.Ribbon.FileMenuButtonCaption = "Arquivo";

            this.CarregaObjetosEstaticos();

            //Seta o valor máximo da barra de progresso.
            this.pb_Progresso.Maximum = 100;

            //lblNomeUsuario.Text = String.Format("{0} {1}", Objects.sUsuarioAtual.Nome, Objects.sUsuarioAtual.SobreNome);
            //Objects.DefineColorThemeInterface(this);
            this.DefineTextosInterface();

            this.udgvItensNaoSalvos.Visible = false;
        }