当前位置: 首页>>代码示例>>C#>>正文


C# Windows.UpdateProgress方法代码示例

本文整理汇总了C#中Windows.UpdateProgress方法的典型用法代码示例。如果您正苦于以下问题:C# Windows.UpdateProgress方法的具体用法?C# Windows.UpdateProgress怎么用?C# Windows.UpdateProgress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Windows的用法示例。


在下文中一共展示了Windows.UpdateProgress方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: installSet

 public void installSet(Windows.ChangeSetsProgressDialog wnd, int max, Octgn.Data.Game game)
 {
     wnd.UpdateProgress(0, max, "Retrieving xml...", false);
     XmlSetParser xmls = xml_set;
     wnd.UpdateProgress(1, max, "Parsing retrieved xml...", false);
     xmls.check();
     bool is_spoiler_installed = true;
     Data.Set set = null;
     string path = Path.Combine(Prefs.DataDirectory, "Games", game.Id.ToString(), "Sets");
     string downloadto = Path.Combine(path) + xmls.name() + ".o8s";
     var cli = new WebClient();
     wnd.UpdateProgress(2, max, "Downloading new definition...", false);
     cli.Credentials = new System.Net.NetworkCredential(xmls.user(), xmls.password());
     cli.DownloadFile(xmls.link(), downloadto);
     wnd.UpdateProgress(3, max, "Checking for existence of old definition...", false);
     try
     {
         set = game.Sets.First<Data.Set>(_set => _set.Id.ToString() == xmls.uuid());
     }
     catch
     {
         is_spoiler_installed = false;
     }
     if (is_spoiler_installed)
     {
         wnd.UpdateProgress(4, max, "Removing old definition...", false);
         game.DeleteSet(set);
     }
     wnd.UpdateProgress(5, max, "Installing new definition...", false);
     game.InstallSet(downloadto);
     wnd.UpdateProgress(6, max, "Set installed correctly", false);
 }
开发者ID:Entropy42,项目名称:OCTGN,代码行数:32,代码来源:XmlInstaller.cs

示例2: CheckXml

 public void CheckXml(Windows.ChangeSetsProgressDialog wnd, int max, DataNew.Entities.Game game)
 {
     XmlSetParser xmls = xml_set;
     if (game.Id.ToString() != xmls.game())
     {
         wnd.UpdateProgress(max, max, string.Format("Error! Wrong game specified in xml"), false);
         return;
     }
     xmls.check();
 }
开发者ID:Cosworth32,项目名称:OCTGN,代码行数:10,代码来源:XmlSimpleValidate.cs

示例3: CheckVerboseXml

 public void CheckVerboseXml(Windows.ChangeSetsProgressDialog wnd, int max, DataNew.Entities.Game game)
 {
     XmlSetParser xmls = xml_set;
     wnd.UpdateProgress(1, max, "Parsing retrieved xml...", false);
     xmls.check();
     if (game.Id.ToString() != xmls.game())
     {
         wnd.UpdateProgress(10, 10, string.Format("Error! Wrong game specified in xml"), false);
         return;
     }
     wnd.UpdateProgress(2, max, "Name: " + xmls.name(), false);
     wnd.UpdateProgress(3, max, "Game: " + xmls.game(), false);
     wnd.UpdateProgress(4, max, "UUID: " + xmls.uuid(), false);
     wnd.UpdateProgress(5, max, "Version: " + xmls.version(), false);
     wnd.UpdateProgress(6, max, "Date: " + xmls.date(), false);
     wnd.UpdateProgress(7, max, "Link: " + xmls.link(), false);
     wnd.UpdateProgress(8, max, "Login: " + xmls.user(), false);
     wnd.UpdateProgress(9, max, "Password: " + xmls.password(), false);
     wnd.UpdateProgress(10, 10, string.Format("Xml seems ok"), false);
 }
开发者ID:Cosworth32,项目名称:OCTGN,代码行数:20,代码来源:XmlSimpleValidate.cs


注:本文中的Windows.UpdateProgress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。