コード例 #1
0
        public async Task OpenCurrentModelAsync()
        {
            if (existingInstanceService.TryActivateExistingInstance(null))
            {
                // Another instance for this working folder is already running and it received the
                // command line from this instance, lets exit this instance, while other instance continuous
                Application.Current.Shutdown(0);
                return;
            }

            apiManagerService.Register();

            await loadModelService.Value.LoadAsync();
        }
コード例 #2
0
 private bool TryActivateExistingInstance()
 {
     return(existingInstanceService.TryActivateExistingInstance(Environment.GetCommandLineArgs()));
 }