Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Construct a new StyleListBoxHelper for the given CaseSensistiveListBox.
		/// </summary>
		/// <param name="listBox">the given CaseSensistiveListBox</param>
		/// ------------------------------------------------------------------------------------
		public StyleListBoxHelper(CaseSensitiveListBox listBox) : base(listBox)
		{
			listBox.DrawMode = DrawMode.OwnerDrawFixed;
			listBox.DrawItem += new DrawItemEventHandler(CtrlDrawItem);
			listBox.SelectedIndexChanged += new EventHandler(CtrlSelectedIndexChanged);
			listBox.Sorted = false;
		}
Ejemplo n.º 2
0
		public void FindStringExact()
		{
			CaseSensitiveListBox lb = new CaseSensitiveListBox();
			lb.Items.Add("B\u00e1".Normalize(NormalizationForm.FormC));
			lb.Items.Add("blah");
			lb.Items.Add("bLAh");
			lb.Items.Add("Blah");
			lb.Items.Add("Blah");
			Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("b"));
			Assert.AreEqual(1, lb.FindStringExact("blah"));
			Assert.AreEqual(2, lb.FindStringExact("bLAh"));
			Assert.AreEqual(3, lb.FindStringExact("Blah"));
			Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("blAH"));
			Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("cabbage"));
			Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormC)));
			Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormD)));
			Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormKC)));
			Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormKD)));
		}
Ejemplo n.º 3
0
        public void FindStringExact()
        {
            CaseSensitiveListBox lb = new CaseSensitiveListBox();

            lb.Items.Add("B\u00e1".Normalize(NormalizationForm.FormC));
            lb.Items.Add("blah");
            lb.Items.Add("bLAh");
            lb.Items.Add("Blah");
            lb.Items.Add("Blah");
            Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("b"));
            Assert.AreEqual(1, lb.FindStringExact("blah"));
            Assert.AreEqual(2, lb.FindStringExact("bLAh"));
            Assert.AreEqual(3, lb.FindStringExact("Blah"));
            Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("blAH"));
            Assert.AreEqual(ListBox.NoMatches, lb.FindStringExact("cabbage"));
            Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormC)));
            Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormD)));
            Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormKC)));
            Assert.AreEqual(0, lb.FindStringExact("B\u00e1".Normalize(NormalizationForm.FormKD)));
        }
Ejemplo n.º 4
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MappingDetailsCtrl));
			System.Windows.Forms.Label label3;
			System.Windows.Forms.Label label5;
			System.Windows.Forms.Label label2;
			this.cboList = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
			this.lbStyles = new CaseSensitiveListBox();
			this.chkExclude = new System.Windows.Forms.CheckBox();
			this.cboWritingSys = new SIL.FieldWorks.Common.Controls.FwOverrideComboBox();
			this.domainBox = new System.Windows.Forms.GroupBox();
			this.rbtnFootnotes = new System.Windows.Forms.RadioButton();
			this.rbtnScripture = new System.Windows.Forms.RadioButton();
			this.rbtnNotes = new System.Windows.Forms.RadioButton();
			this.chkBackTranslation = new System.Windows.Forms.CheckBox();
			label3 = new System.Windows.Forms.Label();
			label5 = new System.Windows.Forms.Label();
			label2 = new System.Windows.Forms.Label();
			this.domainBox.SuspendLayout();
			this.SuspendLayout();
			//
			// cboList
			//
			resources.ApplyResources(this.cboList, "cboList");
			this.cboList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.cboList.Name = "cboList";
			this.cboList.SelectedIndexChanged += new System.EventHandler(this.cboList_SelectedIndexChanged);
			//
			// label3
			//
			resources.ApplyResources(label3, "label3");
			label3.Name = "label3";
			//
			// label5
			//
			resources.ApplyResources(label5, "label5");
			label5.Name = "label5";
			//
			// label2
			//
			resources.ApplyResources(label2, "label2");
			label2.Name = "label2";
			//
			// lbStyles
			//
			resources.ApplyResources(this.lbStyles, "lbStyles");
			this.lbStyles.Name = "lbStyles";
			//
			// chkExclude
			//
			resources.ApplyResources(this.chkExclude, "chkExclude");
			this.chkExclude.Name = "chkExclude";
			this.chkExclude.CheckedChanged += new System.EventHandler(this.SetControlStatesBasedOnExcludeCheckBox);
			//
			// cboWritingSys
			//
			this.cboWritingSys.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			resources.ApplyResources(this.cboWritingSys, "cboWritingSys");
			this.cboWritingSys.Name = "cboWritingSys";
			this.cboWritingSys.Sorted = true;
			//
			// domainBox
			//
			this.domainBox.Controls.Add(this.rbtnFootnotes);
			this.domainBox.Controls.Add(this.rbtnScripture);
			this.domainBox.Controls.Add(this.rbtnNotes);
			this.domainBox.Controls.Add(this.chkBackTranslation);
			resources.ApplyResources(this.domainBox, "domainBox");
			this.domainBox.Name = "domainBox";
			this.domainBox.TabStop = false;
			//
			// rbtnFootnotes
			//
			resources.ApplyResources(this.rbtnFootnotes, "rbtnFootnotes");
			this.rbtnFootnotes.Name = "rbtnFootnotes";
			this.rbtnFootnotes.CheckedChanged += new System.EventHandler(this.DomainChanged);
			//
			// rbtnScripture
			//
			resources.ApplyResources(this.rbtnScripture, "rbtnScripture");
			this.rbtnScripture.Name = "rbtnScripture";
			this.rbtnScripture.CheckedChanged += new System.EventHandler(this.DomainChanged);
			//
			// rbtnNotes
			//
			resources.ApplyResources(this.rbtnNotes, "rbtnNotes");
			this.rbtnNotes.Name = "rbtnNotes";
			this.rbtnNotes.CheckedChanged += new System.EventHandler(this.DomainChanged);
			//
			// chkBackTranslation
			//
			resources.ApplyResources(this.chkBackTranslation, "chkBackTranslation");
			this.chkBackTranslation.Name = "chkBackTranslation";
			this.chkBackTranslation.CheckedChanged += new System.EventHandler(this.DomainChanged);
			//
			// MappingDetailsCtrl
			//
			this.Controls.Add(this.cboList);
			this.Controls.Add(label2);
			this.Controls.Add(this.lbStyles);
			this.Controls.Add(this.cboWritingSys);
			this.Controls.Add(this.domainBox);
			this.Controls.Add(this.chkExclude);
			this.Controls.Add(label3);
			this.Controls.Add(label5);
			this.Name = "MappingDetailsCtrl";
			resources.ApplyResources(this, "$this");
			this.domainBox.ResumeLayout(false);
			this.ResumeLayout(false);
			this.PerformLayout();

		}