Ejemplo n.º 1
0
        private static void     OnGUIGeneral()
        {
            GUILayout.BeginHorizontal();
            {
                if (GUILayout.Toggle(ConsoleSettingsEditor.currentGeneralTab == GeneralTab.General, LC.G("ConsoleSettings_General_General"), ConsoleSettingsEditor.menuButtonStyle) == true)
                {
                    ConsoleSettingsEditor.currentGeneralTab = GeneralTab.General;
                }
                if (GUILayout.Toggle(ConsoleSettingsEditor.currentGeneralTab == GeneralTab.Log, LC.G("ConsoleSettings_General_Log"), ConsoleSettingsEditor.menuButtonStyle) == true)
                {
                    ConsoleSettingsEditor.currentGeneralTab = GeneralTab.Log;
                }
                if (GUILayout.Toggle(ConsoleSettingsEditor.currentGeneralTab == GeneralTab.StackTrace, LC.G("ConsoleSettings_General_StackTrace"), ConsoleSettingsEditor.menuButtonStyle) == true)
                {
                    ConsoleSettingsEditor.currentGeneralTab = GeneralTab.StackTrace;
                }
            }
            GUILayout.EndHorizontal();

            if (ConsoleSettingsEditor.currentGeneralTab == GeneralTab.General)
            {
                ConsoleSettingsEditor.OnGUIGeneralGeneral();
            }
            else if (ConsoleSettingsEditor.currentGeneralTab == GeneralTab.Log)
            {
                ConsoleSettingsEditor.OnGUIGeneralLog();
            }
            else if (ConsoleSettingsEditor.currentGeneralTab == GeneralTab.StackTrace)
            {
                ConsoleSettingsEditor.OnGUIGeneralStackTrace();
            }
        }
Ejemplo n.º 2
0
        public TestRunnerClass()
        {
            //Step-2 Initialize the Run-Time vars from the Config File
            RunTimeVars.ReadAppConfig();


            //Step-3 Create a reference to the UIMap(s)/Page Object(s)

            //**************************
            // Test Context Section
            //************************
            testContext                = new ProgramTestContext();
            providerApplicationData    = new ProviderApplicationData();
            scholarshipApplicationData = new ScholarshipApplicationData();

            //************************
            // Page Objects Section
            //************************
            adminPrograms             = new AdminPrograms();
            advancedStudentSearchPage = new AdvancedStudentSearchPage();
            applicationTab            = new ApplicationTab();
            commentsHistory           = new CommentsHistoryTab();
            creditHoursTab            = new CreditHoursTab();
            docsTab                   = new DocsTab();
            general                   = new GeneralTab();
            headerPage                = new HeaderPage();
            iepTab                    = new IEPTab();
            loginPage                 = new LoginPage();
            menu                      = new Menu();
            newProviderApplication    = new NewProviderApplication();
            newScholarshipApplication = new NewScholarshipApplication();
            parentGuardianTab         = new ParentGuardianTab();
            parentStudentTab          = new ParentStudentTab();
            personnel                 = new PersonnelTab();
            programSelectionPage      = new ProgramSelectionPage();
            providerSearchPage        = new ProviderSearchPage();
            renewProviderApplication  = new RenewProviderApplication();
            safePage                  = new SafePage();
            servicesTab               = new ServicesTab();
            staffTab                  = new StaffTab();
            statusFlagsTab            = new StatusFlagsTab();
            student                   = new Student();
            studentFinanceSearchPage  = new StudentFinanceSearchPage();
            studentSearchPage         = new StudentSearchPage();
            studentTab                = new StudentTab();
            testPage1                 = new TestPage1();
            testPage2                 = new TestPage2();
            verifyPageTabs            = new VerifyPageTabs();
        } //end Constructor
        public ActiveCustomerWindow(ApplicationHelper applicationHelper,
                                    GeneralTab generalTab,
                                    CorporateTab corpTab,
                                    RiskTabItem riskTab,
                                    ProfileTabItem profileTab)
            : base(applicationHelper)
        {
            this.GeneralTab = generalTab;
            this.CorporateTab = corpTab;
            this.RiskTab = riskTab;
            this.ProfileTab = profileTab;

            this.GeneralTab.Context = this.Context.FindFirstChild();
            this.CorporateTab.Context = this.Context.FindFirstChild();
            this.RiskTab.Context = this.Context.FindFirstChild();
            this.ProfileTab.Context = this.Context.FindFirstChild();
        }
Ejemplo n.º 4
0
        protected override void OnSettingsUI()
        {
            AddLanguage(GeneralTab);


            var generalGroup = GeneralTab.AddGroup(Localize.Settings_General);

            var keymappings = AddKeyMappingPanel(generalGroup);

            keymappings.AddKeymapping(NodeControllerTool.ActivationShortcut);

            AddCheckBox(generalGroup, Localize.Settings_SelectMiddleNodes, SelectMiddleNodes);
            AddLabel(generalGroup, Localize.Settings_SelectMiddleNodesDiscription, 0.8f, padding: 25);
            AddCheckBox(generalGroup, CommonLocalize.Settings_ShowTooltips, ShowToolTip);

            AddNotifications(GeneralTab);

#if DEBUG
            var debugTab = CreateTab("Debug");
            AddDebug(debugTab);
#endif
        }
Ejemplo n.º 5
0
        private bool SaveGeneralOptions()
        {
            if (txtPingInterval.Text.Length == 0)
            {
                GeneralTab.Focus();
                MessageBox.Show(
                    "Please enter a valid ping interval.",
                    "vmPing Error",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                txtPingInterval.Focus();
                return(false);
            }
            else if (txtPingTimeout.Text.Length == 0)
            {
                GeneralTab.Focus();
                MessageBox.Show(
                    "Please enter a valid ping timeout.",
                    "vmPing Error",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                txtPingTimeout.Focus();
                return(false);
            }
            else if (txtAlertThreshold.Text.Length == 0)
            {
                GeneralTab.Focus();
                MessageBox.Show(
                    "Please enter an alert threshold.",
                    "vmPing Error",
                    MessageBoxButton.OK,
                    MessageBoxImage.Error);
                txtPingTimeout.Focus();
                return(false);
            }


            // Ping interval
            int pingInterval;
            int multiplier = 1000;

            switch (cboPingInterval.Text)
            {
            case "Seconds":
                multiplier = 1000;
                break;

            case "Minutes":
                multiplier = 1000 * 60;
                break;

            case "Hours":
                multiplier = 1000 * 60 * 60;
                break;
            }

            if (int.TryParse(txtPingInterval.Text, out pingInterval) && pingInterval > 0 && pingInterval <= 86400)
            {
                pingInterval *= multiplier;
            }
            else
            {
                pingInterval = Constants.PING_INTERVAL;
            }

            ApplicationOptions.PingInterval = pingInterval;

            // Ping timeout
            int pingTimeout;

            if (int.TryParse(txtPingTimeout.Text, out pingTimeout) && pingTimeout > 0 && pingTimeout <= 60)
            {
                pingTimeout *= 1000;
            }
            else
            {
                pingTimeout = Constants.PING_TIMEOUT;
            }

            ApplicationOptions.PingTimeout = pingTimeout;

            // Alert threshold
            int alertThreshold;

            var isThresholdValid = int.TryParse(txtAlertThreshold.Text, out alertThreshold) && alertThreshold > 0 && alertThreshold <= 60;

            if (!isThresholdValid)
            {
                alertThreshold = 1;
            }

            ApplicationOptions.AlertThreshold = alertThreshold;

            return(true);
        }
 public void GoToGeneralTab()
 {
     GeneralTab.Click();
 }
        // Tries to save all the settings and gives a messgae if something fails
        private bool Save()
        {
            const string caption = "AIC - Fehler beim Speichern";

            #region General Settings

            // Fire Brigade Name
            try
            {
                mSettings.FireBrigadeName = FireBrigadeNameBox.Text;
            }
            catch
            {
                GeneralTab.Focus();
                MessageBox.Show("Der Name der Feuerwehr wurde nicht korrekt eingegeben.", caption);
                FireBrigadeNameBox.FocusAndSelectAll();
                return(false);
            }

            // Fire Brigade Address
            try
            {
                mSettings.FireBrigadeAddress = FireBrigadeAddressBox.Text;
            }
            catch
            {
                GeneralTab.Focus();
                MessageBox.Show("Die Adresse der Feuerwehr wurde nicht korrekt eingegeben.", caption);
                FireBrigadeAddressBox.FocusAndSelectAll();
                return(false);
            }

            // Fire Brigade Coordinates
            try
            {
                mSettings.FireBrigadeCoordinate = Coordinate.Parse(FireBrigadeCoordinatesBox.Text);
                FireBrigadeCoordinatesBox.Text  = mSettings.FireBrigadeCoordinate.ToDecimalString();
            }
            catch
            {
                GeneralTab.Focus();
                MessageBox.Show("Die Koordinaten des Feuerwehrhauses wurde nicht korrekt eingegeben.", caption);
                FireBrigadeCoordinatesBox.FocusAndSelectAll();
                return(false);
            }

            mSettings.StandAloneMode = ModeStandAloneBox.GetIsChecked();

            if (!ModeStandAloneBox.GetIsChecked())
            {
                // Service Host IP
                try
                {
                    mSettings.NetworkServiceIpString = NetworksServiceIpBox.Text;
                }
                catch
                {
                    GeneralTab.Focus();
                    MessageBox.Show("Der Service Hostname wurde nicht korrekt eingegeben.", caption);
                    NetworksServiceIpBox.FocusAndSelectAll();
                    return(false);
                }

                // Service Port
                try
                {
                    mSettings.NetworkServicePort = int.Parse(ServicePortBox.Text);
                }
                catch
                {
                    GeneralTab.Focus();
                    MessageBox.Show("Der Service Port wurde nicht korrekt eingegeben (1-65535).", caption);
                    ServicePortBox.FocusAndSelectAll();
                    return(false);
                }
            }
            else
            {
                // WAS IP
                try
                {
                    mSettings.WasIp = IPAddress.Parse(WasIpBox.Text);
                }
                catch
                {
                    GeneralTab.Focus();
                    MessageBox.Show("Die WAS IP-Adresse wurde nicht korrekt eingegeben.", caption);
                    WasIpBox.FocusAndSelectAll();
                    return(false);
                }

                // WAS Port
                try
                {
                    mSettings.WasPort = int.Parse(WasPortBox.Text);
                }
                catch
                {
                    GeneralTab.Focus();
                    MessageBox.Show("Der WAS Port wurde nicht korrekt eingegeben (1-65535).", caption);
                    WasPortBox.FocusAndSelectAll();
                    return(false);
                }
            }

            // Full Screen Mode
            mSettings.FullScreenMode = FullScreenModeBox.GetIsChecked();

            // Demo Mode
            mSettings.DemoMode = DemoModeBox.GetIsChecked();

            #endregion

            #region Alarm-Center Settings

            // Alarm display duration
            try
            {
                mSettings.AlarmDisplayDuration = int.Parse(AlarmDisplayDurationBox.Text);
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die Alarmanzeigedauer wurde nicht korrekt eingegeben (1-3600).", caption);
                AlarmDisplayDurationBox.FocusAndSelectAll();
                return(false);
            }

            // New alarm display duration
            try
            {
                mSettings.NewAlarmDisplayDuration = int.Parse(NewAlarmDisplayDurationBox.Text);
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die Anzeigedauer eines neuen Alarms wurde nicht korrekt eingegeben (1-3600).", caption);
                NewAlarmDisplayDurationBox.FocusAndSelectAll();
                return(false);
            }

            // Basic alarm info
            mSettings.ShowBasicAlarmInfo = ShowBasicAlarmInfoBox.GetIsChecked();

            // Turn screen off
            try
            {
                mSettings.TurnScreenOffDelayMinutes = int.Parse(TurnScreenOffDelayBox.Text);
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die Abschaltzeit des Bildschirms nach einem Einsatz wurde nicht korrekt eingegeben.", caption);
                TurnScreenOffDelayBox.FocusAndSelectAll();
                return(false);
            }

            // Play alarm sound
            mSettings.PlayAlarmSound = PlayAlarmSoundBox.GetIsChecked();

            // Play announcement
            mSettings.PlayAnnouncement = PlayAnnouncementBox.GetIsChecked();

            // Announcement intervals
            try
            {
                var    intervals = new List <int>();
                string text      = AnnouncementIntervalsBox.Text.Trim();
                if (text.Length > 0)
                {
                    intervals = text.Split(',').Select(int.Parse).ToList();
                }
                mSettings.AnnouncementIntervals = intervals;
            }
            catch
            {
                PlayAnnouncementBox.IsChecked = true;
                AlarmCenterTab.Focus();
                MessageBox.Show("Die Sprachdurchsagezeiten wurden nicht korrekt eingegeben.", caption);
                AnnouncementIntervalsBox.FocusAndSelectAll();
                return(false);
            }

            // Route URL
            try
            {
                mSettings.RouteUrl = RouteUrlBox.Text;
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die URL zur Anzeige der Anfahrtsroute wurde nicht korrekt eingegeben.", caption);
                RouteUrlBox.FocusAndSelectAll();
                return(false);
            }

            // Water Map mode
            try
            {
                if (NoWaterMapBox.GetIsChecked())
                {
                    mSettings.WaterMapMode = 0;
                }
                else if (WasserkarteInfoBox.GetIsChecked())
                {
                    mSettings.WaterMapMode = 1;
                }
                else
                {
                    mSettings.WaterMapMode = 2;
                }
            }
            catch (Exception)
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die Wasserkarte wurde nicht korrekt konfiguriert.", caption);
                return(false);
            }

            // wasserkarte.info token
            try
            {
                mSettings.WasserkarteInfoToken = WaterMapTokenBox.Text;
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Der Token für wasserkarte.info wurde nicht korrekt eingegeben.", caption);
                WaterMapTokenBox.FocusAndSelectAll();
                return(false);
            }

            // Water Map URL
            try
            {
                mSettings.WaterMapApiUrl = WaterMapUrlBox.Text;
            }
            catch
            {
                AlarmCenterTab.Focus();
                MessageBox.Show("Die URL der Wasserkarte wurde nicht korrekt eingegeben.", caption);
                WaterMapUrlBox.FocusAndSelectAll();
                return(false);
            }

            #endregion

            #region Print Settings

            // Print server
            try
            {
                mSettings.PrintServer = PrintServerBox.Text;
            }
            catch
            {
                PrintTab.Focus();
                MessageBox.Show("Der Druckserver wurde nicht korrekt eingegeben.", caption);
                PrintServerBox.FocusAndSelectAll();
                return(false);
            }

            // Printer name
            try
            {
                mSettings.PrinterName = PrinterNameBox.Text;
            }
            catch
            {
                PrintTab.Focus();
                MessageBox.Show("Der Name des Druckers wurde nicht korrekt eingegeben.", caption);
                PrinterNameBox.FocusAndSelectAll();
                return(false);
            }

            // Print count
            try
            {
                mSettings.PrintCount = int.Parse(PrintCountBox.Text);
            }
            catch
            {
                PrintTab.Focus();
                MessageBox.Show("Der Anzahl der Ausdrucke wurde nicht korrekt eingegeben (0-100).", caption);
                PrintCountBox.FocusAndSelectAll();
                return(false);
            }

            // Route map type
            mSettings.RouteMapType = GetSelectedMapType(RouteMapTypeBox);

            // Detail map type
            mSettings.DetailMapType = GetSelectedMapType(DetailMapTypeBox);

            // Water map type
            mSettings.WaterMapType = GetSelectedMapType(WaterMapTypeBox);

            #endregion

            #region Info-Center Settings

            // Info Center enabled
            mSettings.InfoCenterEnabled = InfoCenterEnabledBox.GetIsChecked();

            // Info Center URL
            try
            {
                mSettings.InfoCenterDataUrl = InfoCenterDataUrlBox.Text;
            }
            catch
            {
                InfoCenterTab.Focus();
                MessageBox.Show("Die URL des Info-Center wurde nicht korrekt eingegeben.", caption);
                InfoCenterDataUrlBox.FocusAndSelectAll();
                return(false);
            }

            // Info Center page duration
            try
            {
                mSettings.InfoPageDisplayDuration = int.Parse(InfoPageDisplayDurationBox.Text);
            }
            catch
            {
                InfoCenterTab.Focus();
                MessageBox.Show("Die Anzeigedauer einer Seite des Info-Center wurde nicht korrekt eingegeben (1-3600).", caption);
                InfoPageDisplayDurationBox.FocusAndSelectAll();
                return(false);
            }

            // Weather project name
            try
            {
                mSettings.WeatherProjectName = WeatherProjectNameBox.Text;
            }
            catch
            {
                InfoCenterTab.Focus();
                MessageBox.Show("Der Projektname von wetter.com wurde nicht korrekt eingegeben.", caption);
                WeatherProjectNameBox.FocusAndSelectAll();
                return(false);
            }

            // Weather city code
            try
            {
                mSettings.WeatherCityCode = WeatherCityCodeBox.Text;
            }
            catch
            {
                InfoCenterTab.Focus();
                MessageBox.Show("Der City Code von wetter.com wurde nicht korrekt eingegeben.", caption);
                WeatherCityCodeBox.FocusAndSelectAll();
                return(false);
            }

            // Weather API Key
            try
            {
                mSettings.WeatherKey = WeatherKeyBox.Text;
            }
            catch
            {
                InfoCenterTab.Focus();
                MessageBox.Show("Der API Key von wetter.com wurde nicht korrekt eingegeben.", caption);
                WeatherKeyBox.FocusAndSelectAll();
                return(false);
            }

            #endregion

            #region Public Display Settings

            // IP
            try
            {
                string ip = PublicDisplayIpBox.Text.Trim();
                mSettings.PublicDisplayIp = ip.Length > 0 ? IPAddress.Parse(PublicDisplayIpBox.Text) : null;
            }
            catch
            {
                PublicDisplayTab.Focus();
                MessageBox.Show("Die IP-Adresse des Public Display wurde nicht korrekt eingegeben.", caption);
                PublicDisplayIpBox.FocusAndSelectAll();
                return(false);
            }

            // Port
            try
            {
                mSettings.PublicDisplayPort = int.Parse(PublicDisplayPortBox.Text);
            }
            catch
            {
                PublicDisplayTab.Focus();
                MessageBox.Show("Der Port des Public Display wurde nicht korrekt eingegeben (0-65535).", caption);
                PublicDisplayPortBox.FocusAndSelectAll();
                return(false);
            }

            // Turn on time
            try
            {
                mSettings.PublicDisplayTurnScreenOnTime = TimeSpan.Parse(PublicDisplayTurnOnTimeBox.Text);
            }
            catch
            {
                PublicDisplayTab.Focus();
                MessageBox.Show("Die Einschaltzeit des Public Display wurde nicht korrekt eingegeben (00:00-23:59).", caption);
                PublicDisplayTurnOnTimeBox.FocusAndSelectAll();
                return(false);
            }

            // Turn on time
            try
            {
                mSettings.PublicDisplayTurnScreenOffTime = TimeSpan.Parse(PublicDisplayTurnOffTimeBox.Text);
            }
            catch
            {
                PublicDisplayTab.Focus();
                MessageBox.Show("Die Ausschaltzeit des Public Display wurde nicht korrekt eingegeben (00:00-23:59).", caption);
                PublicDisplayTurnOffTimeBox.FocusAndSelectAll();
                return(false);
            }

            #endregion

            // Save settings to settings file
            try
            {
                mSettings.Save();
            }
            catch
            {
                MessageBox.Show("Die Einstellungen konnten nicht gespeichert werden.", caption);
                return(false);
            }

            return(true);
        }