Ejemplo n.º 1
0
        public void UpdateSource(DataSource si)
        {
            GlobalDataSource = si;
            SourceIndex++;
            DestoryProxy();
            if (si.SourceType == SourceType.Remote)
            {
                InfoManager = new RemoteInfoProxy(si.RemoteSourceIp);
            }
            else
            {
                InfoManager = new LocalInfoProxy(si.LocalSourcePath);
            }

            InfoManager.LocalSourceInfoReceived += InfoManager_NodeUpdated;
            onDataSourceChanged();
        }
Ejemplo n.º 2
0
 public void UpdateSource(IUrl ui)
 {
     GlobalDataSource = null;
     SourceIndex++;
     DestoryProxy();
     if (ui is ILocalUrl)
     {
         InfoManager = new LocalInfoProxy(ui.LocalPath);
     }
     else if (ui is IRemoteUrl)
     {
         InfoManager = new ImportInfoProxy(ui as IRemoteUrl);
     }
     else
     {
         Common.Log.Logger.Default.Trace("未找到正确的URL配置");
         DialogUtil.ShowError("未找到正确的URL配置");
         return;
     }
     InfoManager.LocalSourceInfoReceived += InfoManager_NodeUpdated;
     onDataSourceChanged();
 }