Пример #1
0
        static void Main(string[] args)
        {
            VirtualRoot.StartTimer();
            try {
                // 将服务器地址设为localhost从而使用内网ip访问免于验证用户名密码
                MainAssemblyInfo.SetOfficialServerHost("localhost");
                NTMinerRegistry.SetAutoBoot("NTMiner.CalcConfigUpdater", true);
                VirtualRoot.BuildEventPath <Per10MinuteEvent>("每10分钟更新收益计算器", LogEnum.DevConsole,
                                                              action: message => {
                    UpdateAsync();
                });
                UpdateAsync();
                Write.UserInfo("输入exit并回车可以停止服务!");

                while (Console.ReadLine() != "exit")
                {
                }

                Write.UserOk($"服务停止成功: {DateTime.Now}.");
            }
            catch (Exception e) {
                Logger.ErrorDebugLine(e);
            }

            System.Threading.Thread.Sleep(1000);
        }
Пример #2
0
 public App()
 {
     VirtualRoot.SetOut(NotiCenterWindowViewModel.Instance);
     MainAssemblyInfo.SetHomeDirFullName(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NTMiner"));
     LogDir.SetDir(SpecialPath.LogsDirFullName);
     AppUtil.Init(this);
     InitializeComponent();
 }
Пример #3
0
 public App()
 {
     MainAssemblyInfo.SetHomeDirFullName(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "NTMiner"));
     VirtualRoot.SetOut(NotiCenterWindowViewModel.Instance);
     Logger.SetDir(SpecialPath.LogsDirFullName);
     Write.UIThreadId = Dispatcher.Thread.ManagedThreadId;
     AppUtil.Init(this);
     InitializeComponent();
 }