本文整理汇总了C#中IVwEnv.AddIntPropPic方法的典型用法代码示例。如果您正苦于以下问题:C# IVwEnv.AddIntPropPic方法的具体用法?C# IVwEnv.AddIntPropPic怎么用?C# IVwEnv.AddIntPropPic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwEnv
的用法示例。
在下文中一共展示了IVwEnv.AddIntPropPic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayAnnotation
/// ------------------------------------------------------------------------------------
/// <summary>
/// Displays an annotation expanded or contracted
/// </summary>
/// <param name="vwenv"></param>
/// <param name="ann"></param>
/// <param name="expanded"></param>
/// ------------------------------------------------------------------------------------
private void DisplayAnnotation(IVwEnv vwenv, IScrScriptureNote ann, bool expanded)
{
#region First row has status, ref, category, & quote
SetBackgroundColorForNote(ann, vwenv);
OpenTableRow(vwenv, ann);
// Display expand box (+/-) in the first cell
//InsertNoteSeparator(vwenv);
vwenv.OpenTableCell(1, 1);
vwenv.AddObj(ann.Hvo, this, (int)NotesFrags.kfrExpansion);
vwenv.CloseTableCell();
// Display status in the second cell
vwenv.OpenTableCell(1, 1);
vwenv.set_IntProperty((int)FwTextPropType.ktptPadTop,
(int)FwTextPropVar.ktpvMilliPoint, 1000);
if (ann.AnnotationType == NoteType.CheckingError)
{
// When the annotation is a checking error, we don't want clicking on the status
// to change the status. Therefore, make the min and max the same.
vwenv.AddIntPropPic((int)ScrScriptureNoteTags.kflidResolutionStatus,
this, (int)NotesFrags.kfrStatus, 0, 0);
}
else
{
vwenv.AddIntPropPic((int)ScrScriptureNoteTags.kflidResolutionStatus,
this, (int)NotesFrags.kfrStatus, (int)NoteStatus.Open, (int)NoteStatus.Closed);
}
vwenv.CloseTableCell();
// Display reference in the third cell and make it readonly.
vwenv.OpenTableCell(1, 1);
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable, (int)FwTextPropVar.ktpvDefault, 0);
vwenv.OpenParagraph();
vwenv.AddProp((int)CmBaseAnnotationTags.kflidBeginRef, this, (int)NotesFrags.kfrScrRef);
vwenv.CloseParagraph();
vwenv.CloseTableCell();
// Display CONNOT category in the fourth (and possibly fifth and sixth) cell(s)
vwenv.OpenTableCell(1, expanded ? 3 : 1);
IStTxtPara quotePara = ann.QuoteOA[0];
bool fQuoteParaRtoL = IsParaRightToLeft(quotePara);
// Conc paragraphs don't work well for R-to-L: If the text doesn't fit, it will
// show the trailing text rather than the leading text.
if (fQuoteParaRtoL || expanded)
vwenv.OpenParagraph();
else
vwenv.OpenConcPara(0, 0, 0, 0);
vwenv.AddObjVec((int)ScrScriptureNoteTags.kflidCategories, this,
(int)NotesFrags.kfrConnotCategory);
vwenv.CloseParagraph();
vwenv.CloseTableCell();
// Display CONNOT category chooser button in the penultimate or last cell
vwenv.OpenTableCell(1, 1);
vwenv.set_IntProperty((int)FwTextPropType.ktptPadTop,
(int)FwTextPropVar.ktpvMilliPoint, 1000);
vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading,
(int)FwTextPropVar.ktpvMilliPoint, 2000);
vwenv.AddPicture(m_picChooser, -(int)NotesFrags.kfrConnotCategory, 0, 0);
vwenv.CloseTableCell();
// If not expanded, display the quote in the last cell
if (!expanded)
{
vwenv.OpenTableCell(1, 1);
SetupWsAndDirectionForPara(vwenv, quotePara.Hvo);
if (fQuoteParaRtoL)
vwenv.OpenParagraph(); // Conc paragraphs don't work well for R-to-L
else
vwenv.OpenConcPara(0, 0, 0, 0);
vwenv.AddString(quotePara.Contents);
vwenv.CloseParagraph();
vwenv.CloseTableCell();
}
CloseTableRow(vwenv, ann);
#endregion
if (!expanded)
return;
#region Second through fifth rows
bool fRegularAnnotation = ann.AnnotationType != NoteType.CheckingError;
//Second row has quote
DisplayExpandableAnnotation(vwenv, ann,
(int)ScrScriptureNoteTags.kflidQuote,
ann.QuoteOA.Hvo, ann.QuoteOA,
//.........这里部分代码省略.........
示例2: AddSelectionCell
private void AddSelectionCell(IVwEnv vwenv, int hvo)
{
vwenv.OpenTableCell(1, 1);
// Put a pixel of light grey pad around the check box itself.
vwenv.set_IntProperty((int)FwTextPropType.ktptBackColor,
(int)FwTextPropVar.ktpvDefault,
(int)RGB(System.Drawing.Color.LightGray));
vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading,
(int)FwTextPropVar.ktpvMilliPoint,
(m_dxmpCheckBorderWidth));
vwenv.set_IntProperty((int)FwTextPropType.ktptPadTrailing,
(int)FwTextPropVar.ktpvMilliPoint,
(m_dxmpCheckBorderWidth));
vwenv.set_IntProperty((int)FwTextPropType.ktptPadTop,
(int)FwTextPropVar.ktpvMilliPoint,
(m_dxmpCheckBorderWidth));
vwenv.set_IntProperty((int)FwTextPropType.ktptPadBottom,
(int)FwTextPropVar.ktpvMilliPoint,
(m_dxmpCheckBorderWidth));
if (ShowEnabled)
{
int enabled = vwenv.DataAccess.get_IntProp(hvo, ktagItemEnabled);
vwenv.NoteDependency(new int[] { hvo }, new int[] { ktagItemEnabled }, 1);
if (enabled != 0)
{
// Even if the view as a whole does not allow editing, presumably a check box
// does!
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum,
(int)TptEditable.ktptIsEditable);
vwenv.AddIntPropPic(ktagItemSelected, this, kfragCheck, 0, 1);
}
else
{
vwenv.AddPicture(m_DisabledCheckPic, 0, 0, 0);
}
}
else
{
// Unconditionally show the selected property.
vwenv.set_IntProperty((int)FwTextPropType.ktptEditable,
(int)FwTextPropVar.ktpvEnum,
(int)TptEditable.ktptIsEditable);
vwenv.AddIntPropPic(ktagItemSelected, this, kfragCheck, 0, 1);
}
vwenv.CloseTableCell();
}