Esempio n. 1
0
        public TmpForm()
        {
            InitializeComponent();

            //GlobalSettings.Load();
            BasicMessagesHandler.SetLogFilePath(GlobalSettings.LogFilePath);
        }
Esempio n. 2
0
        public MainForm()
        {
            try
            {
                GlobalSettings.Load();
                BasicMessagesHandler.SetLogFilePath(GlobalSettings.LogFilePath);

                ezkoController = GlobalSettings.EzkoController;
                //ezkoController.CreateFirstUser();

                //loggin in the user
                if (new LoginForm(ezkoController).ShowDialog() == DialogResult.OK)
                {
                    //Set language for GUI items
                    System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(GlobalSettings.LanguagePrefix);
                    Thread.CurrentThread.CurrentCulture = culture;
                    Thread.CurrentThread.CurrentUICulture = culture;

                    InitializeComponent();

                    var workingArea = Screen.FromHandle(Handle).WorkingArea;
                    MaximizedBounds = new Rectangle(-8, -8, workingArea.Width + 16, workingArea.Height + 16);
                    userNameLabel.Text += " " + GlobalSettings.User.Login;

                    LoadPanels();
                }
                else
                {
                    Environment.Exit(0);
                }
            }
            catch (Exception ex)
            {
                BasicMessagesHandler.ShowErrorMessage("Vyskytla sa neočakávaná chyba!", ex);
            }
        }