private void InitMultiLingualStrings() { m_mlsOwner = new MultiLingualStringOwner(); multiLingString = m_mlsOwner.MyMultiString; m_Ws2 = 2; // don't call StartupMultiLingualStrings m_Ws1 = 1; ITsString ts1 = TsStrFactoryClass.Create().MakeString("This is the day that the Lord has made. We will rejoice and be glad in it", 1); var bldr1 = ts1.GetBldr(); bldr1.SetStrPropValue(0, ts1.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts1 = bldr1.GetString(); ITsString ts2 = TsStrFactoryClass.Create().MakeString("This is the day that the Lord has made.", 2); var bldr2 = ts2.GetBldr(); bldr2.SetStrPropValue(0, ts2.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts2 = bldr2.GetString(); ITsString ts3 = TsStrFactoryClass.Create().MakeString("This is the day", 3); var bldr3 = ts3.GetBldr(); bldr3.SetStrPropValue(0, ts3.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts3 = bldr3.GetString(); ITsString ts4 = TsStrFactoryClass.Create().MakeString("This", 4); var bldr4 = ts4.GetBldr(); bldr4.SetStrPropValue(0, ts4.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts4 = bldr4.GetString(); multiLingString.set_String(1, ts1); multiLingString.set_String(2, ts2); multiLingString.set_String(3, ts3); multiLingString.set_String(4, ts4); wsSelector1.Visible = true; wsSelector2.Visible = true; styleChooser.Visible = true; wsSelector1.SelectedIndexChanged += wsSelector1_SelectedIndexChanged; wsSelector2.SelectedIndexChanged += wsSelector2_SelectedIndexChanged; StartupMultiLingualStrings(); }
private void InitMultiLingualStrings() { m_mlsOwner = new MultiLingualStringOwner(); multiLingString = m_mlsOwner.MyMultiString; m_Ws2 = 2; // don't call StartupMultiLingualStrings m_Ws1 = 1; ITsString ts1 = TsStrFactoryClass.Create().MakeString("This is the day that the Lord has made. We will rejoice and be glad in it", 1); var bldr1 = ts1.GetBldr(); bldr1.SetStrPropValue(0, ts1.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts1 = bldr1.GetString(); ITsString ts2 = TsStrFactoryClass.Create().MakeString("This is the day that the Lord has made.", 2); var bldr2 = ts2.GetBldr(); bldr2.SetStrPropValue(0, ts2.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts2 = bldr2.GetString(); ITsString ts3 = TsStrFactoryClass.Create().MakeString("This is the day", 3); var bldr3 = ts3.GetBldr(); bldr3.SetStrPropValue(0, ts3.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts3 = bldr3.GetString(); ITsString ts4 = TsStrFactoryClass.Create().MakeString("This", 4); var bldr4 = ts4.GetBldr(); bldr4.SetStrPropValue(0, ts4.Text.Length, (int)FwTextPropType.ktptNamedStyle, "Normal"); ts4 = bldr4.GetString(); multiLingString.set_String(1, ts1); multiLingString.set_String(2, ts2); multiLingString.set_String(3, ts3); multiLingString.set_String(4, ts4); wsSelector1.Visible = true; wsSelector2.Visible = true; styleChooser.Visible = true; wsSelector1.SelectedIndexChanged += wsSelector1_SelectedIndexChanged; wsSelector2.SelectedIndexChanged += wsSelector2_SelectedIndexChanged; StartupMultiLingualStrings(); }