本文整理汇总了C#中Hearthstone_Deck_Tracker.Hearthstone.GameV2.Reset方法的典型用法代码示例。如果您正苦于以下问题:C# GameV2.Reset方法的具体用法?C# GameV2.Reset怎么用?C# GameV2.Reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hearthstone_Deck_Tracker.Hearthstone.GameV2
的用法示例。
在下文中一共展示了GameV2.Reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
public MainWindow(GameV2 game)
{
_game = game;
InitializeComponent();
Trace.Listeners.Add(new TextBoxTraceListener(Options.OptionsTrackerLogging.TextBoxLog));
Helper.MainWindow = this;
//Config.Load();
EnableMenuItems(false);
try
{
if(File.Exists("HDTUpdate_new.exe"))
{
if(File.Exists("HDTUpdate.exe"))
File.Delete("HDTUpdate.exe");
File.Move("HDTUpdate_new.exe", "HDTUpdate.exe");
}
}
catch(Exception e)
{
Logger.WriteLine("Error updating updater\n" + e);
}
try
{
//updater used pre v0.9.6
if(File.Exists("Updater.exe"))
File.Delete("Updater.exe");
}
catch(Exception e)
{
Logger.WriteLine("Error deleting Updater.exe\n" + e);
}
HsLogReaderV2.Create();
var configVersion = string.IsNullOrEmpty(Config.Instance.CreatedByVersion) ? null : new Version(Config.Instance.CreatedByVersion);
var currentVersion = Helper.GetCurrentVersion();
var versionString = string.Empty;
if(currentVersion != null)
{
versionString = string.Format("{0}.{1}.{2}", currentVersion.Major, currentVersion.Minor, currentVersion.Build);
Help.TxtblockVersion.Text = "Version: " + versionString;
// Assign current version to the config instance so that it will be saved when the config
// is rewritten to disk, thereby telling us what version of the application created it
Config.Instance.CreatedByVersion = currentVersion.ToString();
}
ConvertLegacyConfig(currentVersion, configVersion);
if(Config.Instance.SelectedTags.Count == 0)
Config.Instance.SelectedTags.Add("All");
_foundHsDirectory = FindHearthstoneDir();
if(_foundHsDirectory)
_updatedLogConfig = UpdateLogConfigFile();
//hearthstone, loads db etc - needs to be loaded before playerdecks, since cards are only saved as ids now
_game.Reset();
if(!Directory.Exists(Config.Instance.DataDir))
Config.Instance.Reset("DataDirPath");
SetupDeckListFile();
DeckList.Load();
// Don't load active deck if it's archived
if(DeckList.Instance.ActiveDeck != null && DeckList.Instance.ActiveDeck.Archived)
DeckList.Instance.ActiveDeck = null;
UpdateDeckList(DeckList.Instance.ActiveDeck);
SetupDefaultDeckStatsFile();
DefaultDeckStats.Load();
SetupDeckStatsFile();
DeckStatsList.Load();
_notifyIcon = new NotifyIcon
{
Icon = new Icon(@"Images/HearthstoneDeckTracker16.ico"),
Visible = true,
ContextMenu = new ContextMenu(),
Text = "Hearthstone Deck Tracker v" + versionString
};
MenuItem startHearthstonMenuItem = new MenuItem("Start Launcher/Hearthstone", (sender, args) => StartHearthstoneAsync());
startHearthstonMenuItem.Name = "startHearthstone";
_notifyIcon.ContextMenu.MenuItems.Add(startHearthstonMenuItem);
MenuItem useNoDeckMenuItem = new MenuItem("Use no deck", (sender, args) => UseNoDeckContextMenu());
useNoDeckMenuItem.Name = "useNoDeck";
//.........这里部分代码省略.........