Example #1
0
 public LoginPage(RoboBrowser browser) : base(browser)
 {
     Name     = "LoginPage";
     Username = ControlFactory.Create <ITextBox>("Login1_UserName");
     Password = ControlFactory.Create <ITextBox>("Login1_Password");
     Submit   = ControlFactory.Create <IButton>("Login1_Login");
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="cm"></param>
        /// <param name="infos"></param>
        protected void Initialize(IControlManager cm, IList <GridColumnInfo> infos)
        {
            m_cm = cm;
            if (infos != null)
            {
                foreach (GridColumnInfo info in infos)
                {
                    if (string.IsNullOrEmpty(info.DataControlType))
                    {
                        continue;
                    }

                    IDataControl dc = ControlFactory.GetDataControl(info, cm.DisplayManager.Name);
                    if (dc != null)
                    {
                        //m_dcc.Add(dc);
                        m_cm.DisplayManager.DataControls.Add(dc);

                        Control c = dc as Control;

                        this.flowLayoutPanel1.Controls.Add(c);
                    }
                }

                ArchiveDetailForm.SetDataControlDefaultValues(m_cm);
            }

            m_closeOk = false;
        }
Example #3
0
 public OsTagTemplate(string tag, string markup, ControlFactory controlFactory)
     : this(tag)
 {
     this.MyControlFactory = controlFactory;
     this.MyRootMaster.ReconfirmControlFactorySet(MyControlFactory);
     LoadTag(markup);
 }
Example #4
0
        protected void InitializeMonitor()
        {
            Monitor.DrawLine        += MonitorDrawLine;
            Monitor.FeatureModified += MonitorFeatureModified;
            Monitor.EnableTimer      = false;
            if (IsPostBack)
            {
                return;
            }

            Monitor.DrawLineMethod   = EventMethods.PostBack;
            Monitor.ModFeatureMethod = EventMethods.PostBack;

            Monitor.ImgPath          = Config.Monitor.GetMonitorImagesFolder(Page);
            Monitor.GoogleMapsScript = Config.Map.GoogleMapsKey;

            Monitor.AddLayers(LayerFactory.GetGoogleStreet(CultureManager.GetLabel("LAYER_GSTREET"), MinZoomLevel),
                              //LayerFactory.GetCompumap(CultureManager.GetLabel("LAYER_COMPUMAP"), Config.Map.CompumapTiles, MIN_ZOOM_LEVEL),
                              LayerFactory.GetOpenStreetMap(CultureManager.GetLabel("LAYER_OSM")),
                              LayerFactory.GetGoogleSatellite(CultureManager.GetLabel("LAYER_GSAT"), MinZoomLevel),
                              LayerFactory.GetGoogleHybrid(CultureManager.GetLabel("LAYER_GHIBRIDO"), MinZoomLevel),
                              LayerFactory.GetGooglePhysical(CultureManager.GetLabel("LAYER_GFISICO"), MinZoomLevel),
                              LayerFactory.GetVector(LayerRecorrido, true, StyleFactory.GetHandlePoint()),
                              LayerFactory.GetMarkers(LayerMarkers, true),
                              LayerFactory.GetVector(LayerViajeProgramado, true));

            Monitor.AddControls(ControlFactory.GetLayerSwitcher(),
                                ControlFactory.GetNavigation(),
                                ControlFactory.GetPanZoomBar(),
                                ControlFactory.GetToolbar(false, false, false, true, false, true, false, false, LayerRecorrido));
            if (MapLoad != null)
            {
                MapLoad(Monitor, EventArgs.Empty);
            }
        }
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _lHeader = new LabelEx("Header:");
            _tHeader = new TextBoxEx {
                ForeColor = Color.DimGray, AutoSize = false
            };
            _tHeader.TextChanged += (s, e) => { flexChart1.Header.Content = _tHeader.Text; };

            _lFooter = new LabelEx("Footer:");
            _tFooter = new TextBoxEx {
                AutoSize = false, ForeColor = Color.DimGray
            };
            _tFooter.TextChanged += (s, e) => { flexChart1.Footer.Content = _tFooter.Text; };

            _cbAlignment = ControlFactory.EnumBasedCombo(typeof(HorizontalAlignment), "Alignment");
            _cbAlignment.SelectedIndexChanged += (s, e) =>
            {
                flexChart1.Header.HorizontalAlignment = flexChart1.Footer.HorizontalAlignment = (HorizontalAlignment)Enum.Parse(typeof(HorizontalAlignment), _cbAlignment.SelectedItem.ToString());
            };

            _chbBorder = new CheckBoxEx("Border");
            _chbBorder.CheckedChanged += (s, e) => { flexChart1.Header.Border = flexChart1.Footer.Border = _chbBorder.Checked; };

            this.pnlControls.Controls.Add(_lHeader);
            this.pnlControls.Controls.Add(_tHeader);
            this.pnlControls.Controls.Add(_lFooter);
            this.pnlControls.Controls.Add(_tFooter);
            this.pnlControls.Controls.Add(_cbAlignment);
            this.pnlControls.Controls.Add(_chbBorder);
        }
        protected override void InitializeControls()
        {
            flexChart1 = new FlexChart();
            this.Chart = flexChart1;

            _cbChartType = ChartControlFactory.BasicChartTypesCombo();
            _cbChartType.SelectedIndexChanged += (s, e) => this.flexChart1.ChartType = (ChartType)Enum.Parse(typeof(ChartType), _cbChartType.SelectedItem.ToString());

            _cbErrorAmount      = ControlFactory.EnumBasedCombo(typeof(ErrorAmount), "Error amount");
            _cbErrorAmount.Size = new Size(180, 21);
            _cbErrorAmount.SelectedIndexChanged += _cbErrorAmount_SelectedIndexChanged;

            _cbDirection = ControlFactory.EnumBasedCombo(typeof(ErrorBarDirection), "Direction");
            _cbDirection.SelectedIndexChanged += (s, e) => _bar.Direction = (ErrorBarDirection)Enum.Parse(typeof(ErrorBarDirection), _cbDirection.SelectedItem.ToString());

            _cbEndStyle = ControlFactory.EnumBasedCombo(typeof(ErrorBarEndStyle), "End style");
            _cbEndStyle.SelectedIndexChanged += (s, e) => _bar.EndStyle = (ErrorBarEndStyle)Enum.Parse(typeof(ErrorBarEndStyle), _cbEndStyle.SelectedItem.ToString());

            _chbRotate = new CheckBoxEx("Rotate");
            _chbRotate.CheckedChanged += (s, e) => this.flexChart1.Rotated = _chbRotate.Checked;

            this.pnlControls.Controls.Add(_cbChartType);
            this.pnlControls.Controls.Add(_cbErrorAmount);
            this.pnlControls.Controls.Add(_cbDirection);
            this.pnlControls.Controls.Add(_cbEndStyle);
            this.pnlControls.Controls.Add(_chbRotate);
        }
Example #7
0
        private void AddLanguage(Language language, Set <string> addedLanguages)
        {
            if (language == null || addedLanguages.Contains(language.Name))
            {
                return;
            }

            addedLanguages.Add(language.Name);
            var control = ControlFactory.GetControl("LanguageGallery.Option") as XmlControl;

            Assert.IsNotNull(control, "Xml Control \"LanguageGallery.Option\" not found");
            Context.ClientPage.AddControl(Languages, control);

            var icon = language.GetIcon();
            //var icon = CurrentVersion.IsAtLeast(SitecoreVersion.V80) ? "Office/32x32/flag_generic.png" : "Flags/32x32/flag_generic.png";

            var builder = new ImageBuilder
            {
                Src   = Images.GetThemedImageSource(icon, ImageDimension.id16x16),
                Class = "scRibbonToolbarSmallGalleryButtonIcon",
                Alt   = language.Name
            };

            control["Class"]        = (language.Name == CurrentLanguage) ? "selected" : string.Empty;
            control["LanguageIcon"] = $"<div class=\"versionNum\">{builder}</div>";
            control["LanguageCode"] = Translate.Text("<b>{0}</b>", language.Name);
            control["Name"]         = Translate.Text("<b>{0}</b>.", language.GetDisplayName());
            control["Click"]        = $"ise:setlanguage(language={language.Name})";
        }
        public override void Activate(Renderer renderer)
        {
            base.Activate(renderer);

            buttonStart            = ControlFactory.CreateButton(ContentManager, "ButtonSplash", "ButtonSplashHover");
            buttonStart.ButtonType = ButtonType.TextOnly;
            buttonStart.Label      = ControlFactory.CreateLabel(ContentManager, Styles.Fonts.Anton, 44, new Color(178, 219, 255), "Start");
            buttonStart.Position   = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - buttonStart.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 + 25);

            buttonOptions            = ControlFactory.CreateButton(ContentManager, "ButtonSplash", "ButtonSplashHover");
            buttonOptions.ButtonType = ButtonType.TextOnly;
            buttonOptions.Label      = ControlFactory.CreateLabel(ContentManager, Styles.Fonts.Anton, 44, new Color(178, 219, 255), "Options");
            buttonOptions.Position   = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - buttonOptions.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 + 105);

            buttonQuit            = ControlFactory.CreateButton(ContentManager, "ButtonSplash", "ButtonSplashHover");
            buttonQuit.ButtonType = ButtonType.TextOnly;
            buttonQuit.Label      = ControlFactory.CreateLabel(ContentManager, Styles.Fonts.Anton, 44, new Color(178, 219, 255), "Quit");
            buttonQuit.Position   = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - buttonQuit.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 + 185);

            iconLogo          = ControlFactory.CreateIcon(ContentManager, "IconLogo");
            iconLogo.Position = new Vector(MainGame.SCREEN_WIDTH_LOGICAL / 2 - iconLogo.Width / 2, MainGame.SCREEN_HEIGHT_LOGICAL / 2 - iconLogo.Height);

            textureBackgroundTile = ContentManager.GetTexture("SplashBackgroundTile");

            AddControl(iconLogo);
            AddControl(buttonStart);
            AddControl(buttonOptions);
            AddControl(buttonQuit);

            buttonStart.Clicked   += buttonStart_Clicked;
            buttonOptions.Clicked += buttonOptions_Clicked;
            buttonQuit.Clicked    += buttonQuit_Clicked;
        }
Example #9
0
        public FromMyProfileTo ClickUpdateProfile()
        {
            string xpath = "//button[@class='k-button telerik-blazor k-primary' and text()='Update profile']";

            ControlFactory.GetControl <ButtonElement>(Locator.XPath, xpath, "Update Profile").Click();
            return(new FromMyProfileTo());
        }
Example #10
0
        private void InitializeMap()
        {
            Monitor.EnableTimer    = false;
            Monitor.MultiplePopUps = true;

            var googleMapsEnabled = true;
            var usuario           = DAOFactory.UsuarioDAO.FindById(WebSecurity.AuthenticatedUser.Id);

            if (usuario != null && usuario.PorEmpresa && usuario.Empresas.Count == 1)
            {
                var empresa = usuario.Empresas.First() as Empresa;
                if (empresa != null)
                {
                    googleMapsEnabled = empresa.GoogleMapsEnabled;
                }
            }

            Monitor.Initialize(googleMapsEnabled);
            Monitor.AddLayers(LayerFactory.GetVector(Layers.Recorrido, true),
                              LayerFactory.GetVector(Layers.MensajesDuracion, true),
                              LayerFactory.GetVector(Layers.Geocercas, true),
                              LayerFactory.GetMarkers(Layers.PuntosDeInteres, true),
                              LayerFactory.GetMarkers(Layers.Mensajes, true),
                              LayerFactory.GetMarkers(Layers.Eventos, true));

            Monitor.AddControls(ControlFactory.GetToolbar(false, false, false, false, false, true, true));

            Monitor.ZoomTo(8);
            Monitor.Hide();

            //this.RegisterStartupJScript("map", string.Format("var map = $M('{0}');", (object) Monitor.MapDivId));
            this.RegisterStartupJScript("map", string.Format("var map = null;", (object)Monitor.MapDivId));
        }
Example #11
0
        public static void Main(string[] args)
        {
            int nElement;
            int sum;

            Console.WriteLine("Enter the size of input elements");
            nElement = Convert.ToInt32(Console.ReadLine());
            int[] Input = new int[nElement];
            for (int i = 0; i < nElement; i++)
            {
                Input[i] = Convert.ToInt32(Console.ReadLine());
            }
            Console.WriteLine("Enter the sum element");
            sum = Convert.ToInt32(Console.ReadLine());


            Console.WriteLine("Enter the type:Logic1/Logic2");
            string logic = Console.ReadLine();

            ILogicSelector Logic = new ControlFactory();

            Logic.LogicSelector(logic);

            //IFindpair SumPair = new Logic2();
            //Logic.SumPair.FindPair(Input, sum);
        }
Example #12
0
        public void SelectDate(DateTime datetime)
        {
            var formatedDate = datetime.ToString("yyyy-MM-dd");
            var today        = DateTime.Now;

            var dateControl = ControlFactory
                              .GetControl <Button>(this, Locator.CssSelector, $".bui-calendar__date[data-date='{formatedDate}']", $"Date [{formatedDate}]");

            var changeMonthButton = datetime > today ? NextMonth : PreviousMonth;
            var monthsDifference  = Math.Abs(((today.Year - datetime.Year) * 12) + today.Month - datetime.Month);

            while (!dateControl.IsPresent() && monthsDifference > 0)
            {
                changeMonthButton.Click();
                monthsDifference--;
            }

            if (dateControl.IsPresent())
            {
                dateControl.Click();
                ExtentReportsHelper.Instance.SetStepStatusPass($"{ControlName} has Select Date [{formatedDate}]");
            }
            else
            {
                throw new Exception($"{ControlName} couldn't find [{formatedDate}] date to select.");
            }
        }
 protected IButton CreateNextButton(Size buttonSize)
 {
     NextButton          = ControlFactory.CreateButton("Next");
     NextButton.Click   += this.NextButton_Click;
     NextButton.Size     = buttonSize;
     NextButton.TabIndex = 1;
     return(NextButton);
 }
 protected IButton CreatePreviousButton(Size buttonSize)
 {
     PreviousButton          = ControlFactory.CreateButton("Previous");
     PreviousButton.Click   += this.PreviousButton_Click;
     PreviousButton.Size     = buttonSize;
     PreviousButton.TabIndex = 0;
     return(PreviousButton);
 }
Example #15
0
        public void AddCssClass_WhenAddingMultipleCssClasses_WebControlShouldContainAllCssClasses()
        {
            var txt = ControlFactory.Create <TextBox>("txtName")
                      .AddCssClass("text")
                      .AddCssClass("error");

            Assert.AreEqual("text error", txt.CssClass);
        }
Example #16
0
 public CurrenciesPage()
 {
     Content = ControlFactory.PageTemplate(new PageContentVM()
     {
         Content = GetCurrencyList(), TitleText = "Currencies"
     });
     BackgroundImage = "plainbg.png";
 }
Example #17
0
        public void ExternalBundleLoadRobustness(string source)
        {
            GadgetMaster master = new GadgetMaster(ControlFactory.GetControlFactory(TEST_FACTORY_KEY));
            Locale       locale = new Locale(null, master);

            locale.LoadMessageBundle(source);
            Assert.IsNotNull(locale.MyMessageBundle.Messages);
        }
Example #18
0
 private void CreatePopupForm()
 {
     PopupForm               = ControlFactory.CreateForm();
     PopupForm.Height        = 600;
     PopupForm.Width         = 800;
     PopupForm.MinimumSize   = new Size(400, 300);
     PopupForm.StartPosition = FormStartPosition.CenterScreen;
 }
Example #19
0
        public void SetupCustomTag()
        {
            factory = new CustomTagFactory(ControlFactory.GetControlFactory(TEST_FACTORY_KEY));

            Assert.IsTrue(0 == factory.CustomTags.Count);
            template = factory.RegisterCustomTag(CustomTagFactoryTests.CUSTOM_TAG, CustomTagFactoryTests.CUSTOM_TAG_TEMPLATE);
            Assert.IsTrue(1 == factory.CustomTags.Count);
        }
 protected IButton CreateFinishButton(Size buttonSize)
 {
     FinishButton          = ControlFactory.CreateButton("Finish");
     FinishButton.Click   += this.FinishButton_Click;
     FinishButton.Size     = buttonSize;
     FinishButton.TabIndex = 2;
     return(FinishButton);
 }
Example #21
0
        public void InnerMarkupText()
        {
            GadgetMaster master = new GadgetMaster(ControlFactory.GetControlFactory(TEST_FACTORY_KEY));

            OsmlNav control = new OsmlNav(rawMarkup, master);

            Assert.AreEqual(content, control.InnerMarkup);
        }
Example #22
0
        public MyProfilePage IsPleaseProvideValidEmailAddressMessageDisplayed()
        {
            string xpath = "validation-message";

            ControlFactory.GetControl <SpanElement>(Locator.ClassName, xpath, "Please provide a valid email address")
            .ValidateSpanContains("Please provide a valid email address.");
            return(this);
        }
Example #23
0
        public FromMyProfileTo ClickDeleteAccount()
        {
            string xpath = "//button[@class='dangerButton k-button telerik-blazor' and text()='Delete Account']";

            ControlFactory.GetControl <ButtonElement>(Locator.XPath, xpath, "Delete Account").Click();

            return(new FromMyProfileTo());
        }
 protected IButton CreateCancelButton(Size buttonSize)
 {
     CancelButton          = ControlFactory.CreateButton("Cancel");
     CancelButton.Click   += this.CancelButton_Click;
     CancelButton.Size     = buttonSize;
     CancelButton.TabIndex = 3;
     return(CancelButton);
 }
Example #25
0
 public MainPage()
 {
     BackgroundImage = "mainbackground.jpg";
     Content         = ControlFactory.PageTemplate(new PageContentVM()
     {
         Content = LoginBox(), TitleText = "Login"
     });
 }
Example #26
0
        public void UnregisteredControlFactory()
        {
            CleanupTest();

            string key = "fooUnregistered";

            Assert.IsFalse(ControlFactory.IsFactoryDefined(key));
        }
Example #27
0
        public FromloginPage ClickLoginButton()
        {
            ControlFactory.GetControl <ButtonElement>
                (Locator.XPath, "//button[@class='k-primary form-control k-button telerik-blazor k-button-icontext']",
                "Login").Click();

            return(new FromloginPage());
        }
Example #28
0
 public OsTagTemplate(string tag, string markup, OffsetItem thisOffset, string controlFactoryKey)
     : this(tag)
 {
     this.MyControlFactory = ControlFactory.GetControlFactory(controlFactoryKey);
     this.MyRootMaster.ReconfirmControlFactorySet(MyControlFactory);
     MyOffset = thisOffset;
     LoadTag(markup);
 }
Example #29
0
 private void btnDecelerate_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(this.txtAmount.Text))
     {
         this.txtAmount.Text = "0";
     }
     ControlFactory.GetSingleton().VehicleControl.RequestDecelerate(int.Parse(this.txtAmount.Text));
 }
Example #30
0
        private void btnDefaultSportsCar_Click(object sender, EventArgs e)
        {
            ControlFactory factory = ControlFactory.GetSingleton();

            factory.CreateVehicleControl(typeof(VehicleControl), new SportsCar("Sporty"));
            factory.VehicleControl.AddObserver(this);
            factory.VehicleControl.InitializeObservers();
            factory.VehicleControl.RequestAccelerate(0); // To display that car is parked
        }
Example #31
0
        public Main(string[] cmdlineArgs, GUIUser user, bool showConsole)
        {
            log.Info("Starting the GUI");
            commandLineArgs = cmdlineArgs;
            currentUser = user;

            user.displayMessage = AddStatusMessage;
            user.displayError = ErrorDialog;

            controlFactory = new ControlFactory();
            Instance = this;
            mainModList = new MainModList(source => UpdateFilters(this), TooManyModsProvide, user);

            navHistory = new NavigationHistory<GUIMod>();
            navHistory.IsReadOnly = true; // read-only until the UI is started.
                                            // we switch out of it at the end of OnLoad()
                                            // when we call NavInit()

            InitializeComponent();

            // We need to initialize error dialog first to display errors
            errorDialog = controlFactory.CreateControl<ErrorDialog>();

            // We want to check our current instance is null first, as it may
            // have already been set by a command-line option.
            Manager = new KSPManager(user);
            if (CurrentInstance == null && manager.GetPreferredInstance() == null)
            {
                Hide();

                var result = new ChooseKSPInstance().ShowDialog();
                if (result == DialogResult.Cancel || result == DialogResult.Abort)
                {
                    Application.Exit();
                    return;
                }
            }

            configuration = Configuration.LoadOrCreateConfiguration
                (
                    Path.Combine(CurrentInstance.GameDir(), "CKAN/GUIConfig.xml"),
                    Repo.default_ckan_repo.ToString()
                );

            // Check if there is any other instances already running.
            // This is not entirely necessary, but we can show a nicer error message this way.
            try
            {
                #pragma warning disable 219
                var lockedReg = RegistryManager.Instance(CurrentInstance).registry;
                #pragma warning restore 219
            }
            catch (RegistryInUseKraken kraken)
            {
                errorDialog.ShowErrorDialog(kraken.ToString());

                return;
            }

            FilterToolButton.MouseHover += (sender, args) => FilterToolButton.ShowDropDown();
            launchKSPToolStripMenuItem.MouseHover += (sender, args) => launchKSPToolStripMenuItem.ShowDropDown();
            ApplyToolButton.MouseHover += (sender, args) => ApplyToolButton.ShowDropDown();

            ModList.CurrentCellDirtyStateChanged += ModList_CurrentCellDirtyStateChanged;
            ModList.CellValueChanged += ModList_CellValueChanged;

            tabController = new TabController(MainTabControl);
            tabController.ShowTab("ManageModsTabPage");

            RecreateDialogs();

            if (!showConsole)
            {
                Util.HideConsoleWindow();
            }

            // Disable the modinfo controls until a mod has been choosen.
            ModInfoTabControl.SelectedModule = null;

            // WinForms on Mac OS X has a nasty bug where the UI thread hogs the CPU,
            // making our download speeds really slow unless you move the mouse while
            // downloading. Yielding periodically addresses that.
            // https://bugzilla.novell.com/show_bug.cgi?id=663433
            if (Platform.IsMac)
            {
                var timer = new Timer { Interval = 2 };
                timer.Tick += (sender, e) => {
                    Thread.Yield();
                };
                timer.Start();
            }

            Application.Run(this);

            var registry = RegistryManager.Instance(Manager.CurrentInstance);
            if (registry != null)
            {
                registry.Dispose();
            }
        }
Example #32
0
        public Main(string[] cmdlineArgs, GUIUser User, bool showConsole)
        {
            log.Info("Starting the GUI");
            m_CommandLineArgs = cmdlineArgs;
            m_User = User;

            User.displayMessage = AddStatusMessage;
            User.displayError = ErrorDialog;

            controlFactory = new ControlFactory();
            Instance = this;
            mainModList = new MainModList(source => UpdateFilters(this), TooManyModsProvide, User);
            InitializeComponent();

            // We need to initialize error dialog first to display errors
            m_ErrorDialog = controlFactory.CreateControl<ErrorDialog>();

            // We want to check our current instance is null first, as it may
            // have already been set by a command-line option.
            Manager = new KSPManager(User);
            if (CurrentInstance == null && manager.GetPreferredInstance() == null)
            {
                Hide();

                var result = new ChooseKSPInstance().ShowDialog();
                if (result == DialogResult.Cancel || result == DialogResult.Abort)
                {
                    Application.Exit();
                    return;
                }
            }

            m_Configuration = Configuration.LoadOrCreateConfiguration
                (
                    Path.Combine(CurrentInstance.GameDir(), "CKAN/GUIConfig.xml"),
                    Repo.default_ckan_repo.ToString()
                );

            FilterToolButton.MouseHover += (sender, args) => FilterToolButton.ShowDropDown();
            launchKSPToolStripMenuItem.MouseHover += (sender, args) => launchKSPToolStripMenuItem.ShowDropDown();
            ApplyToolButton.MouseHover += (sender, args) => ApplyToolButton.ShowDropDown();

            ModList.CurrentCellDirtyStateChanged += ModList_CurrentCellDirtyStateChanged;
            ModList.CellValueChanged += ModList_CellValueChanged;

            m_TabController = new TabController(MainTabControl);
            m_TabController.ShowTab("ManageModsTabPage");

            RecreateDialogs();

            if (!showConsole)
            {
                Util.HideConsoleWindow();
            }

            // Disable the modinfo controls until a mod has been choosen.
            ModInfoTabControl.Enabled = false;

            // WinForms on Mac OS X has a nasty bug where the UI thread hogs the CPU,
            // making our download speeds really slow unless you move the mouse while
            // downloading. Yielding periodically addresses that.
            // https://bugzilla.novell.com/show_bug.cgi?id=663433
            if (Platform.IsMac)
            {
                var yield_timer = new Timer {Interval = 2};
                yield_timer.Tick += (sender, e) => {
                    Thread.Yield();
                };
                yield_timer.Start();
            }

            Application.Run(this);
        }