本文整理汇总了C#中IModule.Start方法的典型用法代码示例。如果您正苦于以下问题:C# IModule.Start方法的具体用法?C# IModule.Start怎么用?C# IModule.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IModule
的用法示例。
在下文中一共展示了IModule.Start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public void Start(IModule startingModule, int width, int height)
{
Init(width, height);
_StartingModule = startingModule;
_StartingModule.Start();
while (_Running && _StartingModule.Running)
{
_ElapsedTime = _Timer.GetElapsedTime();
_FrameElapsedTime += _ElapsedTime;
if (_FrameElapsedTime > _MaxElapsedTime)
{
InputState.GetInstance.Poll();
if (_FrameElapsedTime > _MinElapsedTime)
_FrameElapsedTime = _MinElapsedTime;
_StartingModule.UpdateAll(_FrameElapsedTime);
if (Graphics.GetInstance != null)
{
Graphics.GetInstance.Clear();
Graphics.GetInstance.BeginScene();
_StartingModule.RenderAll(Graphics.GetInstance);
Graphics.GetInstance.EndScene();
}
_FrameElapsedTime = 0;
}
Application.DoEvents();
}
Dispose();
}
示例2: StartModule
public void StartModule(IModule module)
{
if (module.Started) return;
var settings = module as ISettingsProvider;
if (settings != null)
{
settings.SetSettingsHandle(Settings);
SettingsList.Add(settings);
}
var requester = module as ISaveRequester;
if (requester != null)
{
requester.SetSaveHandle(_saver);
}
var mapDataFinder = module as IMapDataFinder;
if (mapDataFinder != null)
{
_mapDataFinders.Add(mapDataFinder);
}
var mapDataParser = module as IMapDataParser;
if (mapDataParser != null)
{
_mapDataParsers.Add(mapDataParser);
}
var mapDataGetter = module as IMapDataGetter;
if (mapDataGetter != null)
{
_mapDataGetters.Add(mapDataGetter);
}
var mainWindowUpdater = module as IMainWindowUpdater;
if (mainWindowUpdater != null)
{
mainWindowUpdater.GetMainWindowHandle(MainWindowUpdater);
}
var SqliteUser = module as ISqliteUser;
if (SqliteUser != null)
{
SqliteUser.SetSqliteControlerHandle(_sqliteControler);
}
var SettingsProvider = module as ISettingsGetter;
if (SettingsProvider != null)
{
SettingsProvider.SetSettingsListHandle(SettingsList);
}
var mapDataReplacements = module as IMapDataReplacements;
if (mapDataReplacements != null)
{
_mapDataReplacementSetters.Add(mapDataReplacements);
}
var SettingsGetter = module as ISettings;
if (SettingsGetter != null)
SettingsGetter.SetSettingsHandle(Settings);
var modParser = module as IModParser;
if (modParser != null)
this._modParser.Add(modParser);
var modParserGetter = module as IModParserGetter;
if (modParserGetter != null)
modParserGetter.SetModParserHandle(this._modParser);
var msnGetter = module as IMsnGetter;
if ((msnGetter) != null)
{
MsnGetters.Add(msnGetter);
}
module.Start(_logger);
}