static Settings() { LocalDomain = DefaultLocalDomain; CommonsDomain = DefaultCommonsDomain; LocalUserName = LocalPassword = CommonsPassword = CommonsUserName = LocalWikiData = LocalWikiDataHosted = CurrentSourceOption = SourceCategory = SourceTextFile = ""; LocalSysop = LogTransfers = OpenBrowserAutomatically = OpenBrowserLocal = false; SaveCreds = AutoUpdate = true; UseHttps = !PlatformSpecific.IsMono(); // default to false on Mono, as HTTPS doesn't work there }
private void CoolCat_Load(object sender, EventArgs e) { if (!DesignMode) { toolTips.SetToolTip(btnAdd, Localization.GetString("AddCategory_Tooltip")); } if (PlatformSpecific.IsMono()) { AutoSize = false; } }
private void btnAdd_Click(object sender, EventArgs e) { CoolCatItem item = new CoolCatItem(this); Items.Add(item); flowLayout.Controls.Add(item); flowLayout.Controls.SetChildIndex(item, flowLayout.Controls.Count - 2); item.TabIndex = Items.Count; item.RemoveClicked += new EventHandler(item_RemoveClicked); item.LeftEditingMode += new EventHandler(item_LeftEditingMode); item.Focus(); if (PlatformSpecific.IsMono()) { item.Resize += new EventHandler(item_Resize_Mono); item_Resize_Mono(null, null); } }
private void FinishCategoryAutoComplete(string[] results, string extraResult) { // This code causes hangs under Mono. Need to fix if (PlatformSpecific.IsMono()) { return; } string text = cboCatName.Text; cboCatName.Items.Clear(); if (results.Length > 0) { //Array.Sort(results); int numResultsToUse = Math.Min(results.Length, MaxAutoCompleteItems - (extraResult == null ? 1 : 0)); for (int i = 0; i < numResultsToUse; i++) { cboCatName.Items.Add(results[i].Substring("Category:".Length)); } } if (extraResult != null) { cboCatName.Items.Add(CoolCat.NormalizeCatName(extraResult)); } if (cboCatName.Items.Count == 0) { cboCatName.Items.Add(""); } if (!cboCatName.DroppedDown && cboCatName.Visible) { cboCatName.DroppedDown = true; cboCatName.Text = text; } cboCatName.SelectionStart = text.Length; }