/// <summary> /// Return an otherwise equivalent Tss client run that has the specified Contents. /// Subclasses should override to return the appropriate subclass and copy any additional information. /// </summary> internal virtual MlsClientRun CopyWithNewContents(IViewMultiString newContents) { var result = new MlsClientRun(newContents, Style); result.Hookup = Hookup; return(result); }
/// <summary> /// Return an otherwise equivalent Tss client run that has the specified Contents. /// Subclasses should override to return the appropriate subclass and copy any additional information. /// </summary> internal override MlsClientRun CopyWithNewContents(IViewMultiString newContents) { var result = new SubstituteMlsClientRun(newContents, Style, m_substitute, m_substituteStyle); result.Hookup = Hookup; return(result); }
public MlsHookup(object target, IViewMultiString accessor, int ws, MlsHookupAdapter propAdapter, IStringParaNotification para) : base(target, para) { MultiAccessor = accessor; m_ws = ws; MultiAccessor.StringChanged += MlsPropChanged; AddHook = propAdapter.AddHook; RemoveHook = propAdapter.RemoveHook; AddHook(this); }
public MlsHookup(object target, IViewMultiString accessor, int ws, Action<MlsHookup> hookAdder, Action<MlsHookup> hookRemover, IStringParaNotification para) : base(target, para) { MultiAccessor = accessor; m_ws = ws; MultiAccessor.StringChanged += MlsPropChanged; AddHook = hookAdder; RemoveHook = hookRemover; AddHook(this); }
public MlsHookup(object target, IViewMultiString accessor, int ws, Action <MlsHookup> hookAdder, Action <MlsHookup> hookRemover, IStringParaNotification para) : base(target, para) { MultiAccessor = accessor; m_ws = ws; MultiAccessor.StringChanged += MlsPropChanged; AddHook = hookAdder; RemoveHook = hookRemover; AddHook(this); }
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(); }
public void StringChanged(int clientRunIndex, IViewMultiString newValue) { var oldRun = (MlsClientRun)Source.ClientRuns[clientRunIndex]; Relayout(Source.ClientRunChanged(clientRunIndex, oldRun.CopyWithNewContents(newValue))); }
public SubstituteMlsClientRun(IViewMultiString mls, AssembledStyles style, string substitute, AssembledStyles substituteStyle) : base(mls, style) { m_substitute = substitute; m_substituteStyle = substituteStyle; }
public MlsClientRun(IViewMultiString mls, AssembledStyles style) : base(mls.get_String(style.Ws), style) { Style = style; }
/// <summary> /// Return an otherwise equivalent Tss client run that has the specified Contents. /// Subclasses should override to return the appropriate subclass and copy any additional information. /// </summary> internal virtual MlsClientRun CopyWithNewContents(IViewMultiString newContents) { var result = new MlsClientRun(newContents, Style); result.Hookup = Hookup; return result; }
public MlsClientRun(IViewMultiString mls, AssembledStyles style) :base(mls.get_String(style.Ws), style) { Style = style; }
public void StringChanged(int index, IViewMultiString newValue) { TheIndex = index; TheMlString = newValue; }
public MultiLingualStringOwner() { MyMultiString = new MultiAccessor(1, 2); // default WSs are not relevant for this demo }
/// <summary> /// Return an otherwise equivalent Tss client run that has the specified Contents. /// Subclasses should override to return the appropriate subclass and copy any additional information. /// </summary> internal override MlsClientRun CopyWithNewContents(IViewMultiString newContents) { var result = new SubstituteMlsClientRun(newContents, Style, m_substitute, m_substituteStyle); result.Hookup = Hookup; return result; }