本文整理汇总了C#中PurplePen.EventDB.ChangeEvent方法的典型用法代码示例。如果您正苦于以下问题:C# EventDB.ChangeEvent方法的具体用法?C# EventDB.ChangeEvent怎么用?C# EventDB.ChangeEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PurplePen.EventDB
的用法示例。
在下文中一共展示了EventDB.ChangeEvent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangePrintArea
// Change the course print area. If "removeParts" is true, and the course is an all parts,
// then remove print descriptions for each part.
public static void ChangePrintArea(EventDB eventDB, CourseDesignator courseDesignator, bool removeParts, PrintArea printArea)
{
printArea = (PrintArea) printArea.Clone();
if (courseDesignator.IsAllControls) {
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.printArea = printArea;
eventDB.ChangeEvent(e);
}
else {
Course course = eventDB.GetCourse(courseDesignator.CourseId);
course = (Course) course.Clone();
if (courseDesignator.AllParts) {
course.printArea = printArea;
if (removeParts)
course.partPrintAreas = new Dictionary<int, PrintArea>();
}
else {
course.partPrintAreas[courseDesignator.Part] = printArea;
}
eventDB.ReplaceCourse(courseDesignator.CourseId, course);
}
}
示例2: ChangePunchcardFormat
// Set the punch card format for the event.
public static void ChangePunchcardFormat(EventDB eventDB, PunchcardFormat punchcardFormat)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.punchcardFormat = (PunchcardFormat) punchcardFormat.Clone();
eventDB.ChangeEvent(e);
}
示例3: ChangeEventTitle
// Change the event title. Seperate lines with "|".
public static void ChangeEventTitle(EventDB eventDB, string newTitle)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.title = newTitle;
eventDB.ChangeEvent(e);
}
示例4: ChangeMapScale
// Change the map scale.
public static void ChangeMapScale(EventDB eventDB, float newScale)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.mapScale = newScale;
eventDB.ChangeEvent(e);
}
示例5: ChangeDescriptionLanguage
// Change the description language
public static void ChangeDescriptionLanguage(EventDB eventDB, string newLangId)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.descriptionLangId = newLangId;
eventDB.ChangeEvent(e);
}
示例6: ChangeCustomSymbolText
// Change the custom system text for the event.
public static void ChangeCustomSymbolText(EventDB eventDB, Dictionary<string, List<SymbolText>> customSymbolText, Dictionary<string, bool> customSymbolKey)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.customSymbolText = Util.CopyDictionary(customSymbolText);
e.customSymbolKey = Util.CopyDictionary(customSymbolKey);
eventDB.ChangeEvent(e);
}
示例7: ChangeCourseAppearance
// Set the course appearance for this event.
public static void ChangeCourseAppearance(EventDB eventDB, CourseAppearance courseAppearance)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.courseAppearance = (CourseAppearance) courseAppearance.Clone();
eventDB.ChangeEvent(e);
}
示例8: ChangeAutoNumbering
// Change the auto numbering options.
public static void ChangeAutoNumbering(EventDB eventDB, int startCode, bool disallowInvertibleCodes)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.firstControlCode = startCode;
e.disallowInvertibleCodes = disallowInvertibleCodes;
eventDB.ChangeEvent(e);
}
示例9: ChangeAllControlsProperties
// Change the attributes of a all controls display.
public static void ChangeAllControlsProperties(EventDB eventDB, float printScale, DescriptionKind descriptionKind)
{
Event e = eventDB.GetEvent();
e = (Event) e.Clone();
e.allControlsPrintScale = printScale;
e.allControlsDescKind = descriptionKind;
eventDB.ChangeEvent(e);
}