示例#1
0
文件: Program.cs 项目: SunYe1999/Sync
        static void Main(string[] args)
        {
            if (Updater.ApplyUpdate(args))
            {
                return;
            }

            I18n.Instance.ApplyLanguage(new DefaultI18n());

            while (true)
            {
                SyncHost.Instance = new SyncHost();
                SyncHost.Instance.Load();

                CurrentIO.WriteWelcome();

                SyncHost.Instance.Plugins.ReadySync();

                string cmd = CurrentIO.ReadCommand();
                while (true)
                {
                    SyncHost.Instance.Commands.invokeCmdString(cmd);
                    cmd = CurrentIO.ReadCommand();
                }
            }
        }
示例#2
0
        internal void Start()
        {
            PerLuanchChecker(ForceStart);

            InitSync();
            CurrentIO.WriteWelcome();

            while (true)
            {
                var cmd = CurrentIO.ReadCommand();
                SyncHost.Instance.Commands.invokeCmdString(cmd);
            }
        }
示例#3
0
        internal void Start()
        {
            //Check sync.exe is run
            using (var syncMappedFile = MemoryMappedFile.CreateOrOpen(SYNC_GUID, 4))
            {
                PreInitSync();
                SyncInstanceLocker(syncMappedFile, ForceStart);

                InitSync();
                CurrentIO.WriteWelcome();

                while (true)
                {
                    var cmd = CurrentIO.ReadCommand();
                    SyncHost.Instance.Commands.invokeCmdString(cmd);
                }
            }
        }
示例#4
0
 public bool clear(Arguments arg)
 {
     CurrentIO.Clear();
     CurrentIO.WriteWelcome();
     return(true);
 }