コード例 #1
0
        private static void Main()
        {
            XmlConfigurator.Configure();
            ConnectionHelper.DefaultConnectionStringName = "Main";

            if (!Debugger.IsAttached)
            {
                AppDomain.CurrentDomain.UnhandledException += (sender, args) => {
                    ILog logger;
                    if (sender == null)
                    {
                        logger = LogManager.GetLogger(typeof(Program));
                    }
                    else
                    {
                        logger = LogManager.GetLogger(sender.GetType());
                    }
                    logger.Error(args.ExceptionObject);

                    MessageBox.Show("В приложении возникла необработанная ошибка.\r\nИнформация об ошибке была отправлена разработчику.");
                }
            }
            ;

            GlobalContext.Properties["Version"] = Assembly.GetExecutingAssembly().GetName().Version;
            InputLanguageHelper.SetToRussian();
            Application.Run(new frmUEEMain());
        }
    }
コード例 #2
0
ファイル: Program.cs プロジェクト: giorgizek/Apothex
        static void Main(string[] args)
        {
            if (!Win32Native.IsAlreadyRunning(true, true, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                ExceptionHelper.HandleAllExceptions();
                ExceptionHelper.CustomExceptionFormType = Zek.Windows.Forms.CustomExceptionFormTypes.XtraMessageBox;



                InitLicense();
                #region args
                var doSplash = true;

                foreach (var arg in args)
                {
                    switch (arg)
                    {
                    case "-nosplash":
                        doSplash = false;
                        break;
                    }
                }

                if (doSplash)
                {
                    SplashScreen.ShowSplashScreen();
                    Application.DoEvents();
                }
                #endregion

                InputLanguageHelper.InitCultureInfo();
                XtraControlHelper.InitDevExpress(new Font("BPG Glaho Arial", 9.75F));

                Thread.Sleep(1000);
                Application.Run(new frmMain());
            }
            else
            {
                MessageBox.Show("You can only run one copy of this application at a time", "Apothex", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                Win32Native.SwitchToCurrentInstance();
            }
        }
コード例 #3
0
        public void Run()
        {
            _iHelper = new InputLanguageHelper();

            DesiredCapabilities appCapabilities = new DesiredCapabilities();

            appCapabilities.SetCapability("app", _otimrotaAppId);



            Session = new WindowsDriver <WindowsElement>(new Uri(WindowsApplicationDriverUrl), appCapabilities);
            Assert.IsNotNull(Session);
            Assert.IsNotNull(Session.SessionId);
            Assert.AreEqual("OtimRota  v. 1.3.1.6  (Novo Projeto)", Session.Title);

            _iHelper.LoadBrazilianKeyboardLayout();
            Thread.Sleep(TimeSpan.FromSeconds(1.5));
            //Session.Manage().Timeouts().ImplicitWait.Seconds(1.5);
        }
コード例 #4
0
ファイル: Program.cs プロジェクト: molokovskikh/af_freditor
        private static void Main()
        {
            XmlConfigurator.Configure();
            ConnectionHelper.DefaultConnectionStringName = "Main";
            With.DefaultConnectionStringName             = ConnectionHelper.GetConnectionName();
            Application.ThreadException += OnThreadException;
            Application.ApplicationExit += ApplicationExit;
            GlobalContext.Properties["GlobalContext"] = Application.ProductVersion;


            //Эти две строчки есть в StatViewer'е, возможно, из-за одной из них не работает "корректное" отображение
            //значений столбца "Сегмент" в фильтрах компонентов DevExpress
            //Application.EnableVisualStyles();
            //Application.SetCompatibleTextRenderingDefault(false);

            InputLanguageHelper.SetToRussian();

            Application.Run(new frmFREMain());
        }