本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.MakeDbSyncRecords方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.MakeDbSyncRecords方法的具体用法?C# FdoCache.MakeDbSyncRecords怎么用?C# FdoCache.MakeDbSyncRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SIL.FieldWorks.FDO.FdoCache
的用法示例。
在下文中一共展示了FdoCache.MakeDbSyncRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewMainAppWnd
/// ------------------------------------------------------------------------------------
/// <summary>
/// Creates a new instance of the main X window
/// </summary>
///
/// <param name="cache">Instance of the FW Data Objects cache that the new main window
/// will use for accessing the database.</param>
/// <param name="isNewCache">Flag indicating whether one-time, application-specific
/// initialization should be done for this cache.</param>
/// <param name="wndCopyFrom"> Must be null for creating the original app window.
/// Otherwise, a reference to the main window whose settings we are copying.</param>
/// <param name="fOpeningNewProject"><c>true</c> if opening a brand spankin' new
/// project</param>
/// <returns></returns>
/// ------------------------------------------------------------------------------------
protected override Form NewMainAppWnd(FdoCache cache, bool isNewCache, Form wndCopyFrom,
bool fOpeningNewProject)
{
// Review: I put in this exception catching block because
// the exception handler is not been invoked...until we figure out why
// not, this is better than just having the raw exception in the users face.
try
{
if (isNewCache)
{
// TODO: Do any needed initialization here.
}
Stream iconStream = ApplicationIconStream;
Debug.Assert(iconStream != null, "Couldn't find the specified application icon as a resource.");
string configFile;
if (m_commandLineArgs.ContainsKey("x"))
{
configFile = m_commandLineArgs["x"][0];
}
else
{
configFile = DirectoryFinder.GetFWCodeFile(DefaultConfigurationPathname);
// configFile = (string)SettingsKey.GetValue("LatestConfigurationFile",
// Path.Combine(DirectoryFinder.FWCodeDirectory,
// DefaultConfigurationPathname));
if (!File.Exists(configFile))
configFile = null;
}
FwXWindow result;
if (configFile != null)
result = new FwXWindow(cache, wndCopyFrom, iconStream, configFile, false);
else
{
// try to load from stream
return new FwXWindow(cache, wndCopyFrom, iconStream, ConfigurationStream);
}
if (isNewCache)
{
// Must be done after reading properties from init table.
if (result.PropertyTable.GetBoolProperty("SendSync", false) && SyncGuid != Guid.Empty)
cache.MakeDbSyncRecords(SyncGuid);
}
if (m_commandLineArgs.ContainsKey("link"))
result.StartupAtURL(m_commandLineArgs["link"][0]);
return result;
}
catch (Exception error)
{
HandleTopLevelError(this, new System.Threading.ThreadExceptionEventArgs(error));
return null;
}
}