Пример #1
0
 /// <summary>
 /// Starts the core services.
 /// This initializes the PropertyService and ResourceService.
 /// </summary>
 public void StartCoreServices()
 {
     if (configDirectory == null)
     {
         configDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
                                        applicationName);
     }
     PropertyService.InitializeService(configDirectory,
                                       dataDirectory ?? Path.Combine(FileUtility.ApplicationRootPath, "data"),
                                       propertiesName);
     PropertyService.Load();
     ResourceService.InitializeService(FileUtility.Combine(PropertyService.DataDirectory, "resources"));
     StringParser.Properties["AppName"] = applicationName;
 }
Пример #2
0
 //public void RunAutostartCommand()
 //{
 //    int a_ = 6;
 //    using (System.Collections.Generic.List<ICommand>.Enumerator enumerator = AddInTree.BuildItems<ICommand>(ExtensionAddInTreeNode.b("쇭꟯鷱蛳鷵髷鿹鋻鷽棿ⴁ䔃猅簇攉缋稍焏怑怓", a_), null, false).GetEnumerator())
 //    {
 //        int num = 0;
 //        while (true)
 //        {
 //            switch (num)
 //            {
 //                case 1:
 //                    goto IL_96;
 //                case 2:
 //                    goto IL_8E;
 //                case 3:
 //                    {
 //                        if (true)
 //                        {
 //                        }
 //                        if (!enumerator.MoveNext())
 //                        {
 //                            num = 2;
 //                            continue;
 //                        }
 //                        ICommand current = enumerator.Current;
 //                        num = 4;
 //                        continue;
 //                    }
 //                case 4:
 //                    try
 //                    {
 //                        ICommand current;
 //                        current.Run(null, null);
 //                        break;
 //                    }
 //                    catch (System.Exception)
 //                    {
 //                        break;
 //                    }
 //                    goto IL_8E;
 //            }
 //        IL_5E:
 //            num = 3;
 //            continue;
 //            goto IL_5E;
 //        IL_8E:
 //            num = 1;
 //        }
 //    IL_96: ;
 //    }
 //}
 public void StartCoreServices()
 {
     if (this.configDirectory == null)
     {
         this.configDirectory = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), this.applicationName);
     }
     PropertyService.InitializeService(this.configDirectory, this.dataDirectory ?? System.IO.Path.Combine(FileUtility.ApplicationRootPath, "..\\"), this.propertiesName);
     PropertyService.Load();
     ResourceService.InitializeService(FileUtility.Combine(new string[]
     {
         PropertyService.DataDirectory,
         "Resource"
     }));
     StringParser.Properties["AppName"] = this.applicationName;
 }