Exemplo n.º 1
0
        private static WebConfiguration ReadFromRegistry()
        {
            var dcInfo = new WebConfiguration();
            var root   = Registry.CurrentUser.CreateSubKey(DBConfigurationKey);

            dcInfo.WebServer = (string)root.GetValue(WebServerKey, "");

            if (!string.IsNullOrEmpty(dcInfo.WebServer) && dcInfo.WebServer.Substring(dcInfo.WebServer.Length - 1) != "/")
            {
                dcInfo.WebServer += "/";
            }

            dcInfo.WebServerU = (string)root.GetValue(WebServerUKey, "");
            dcInfo.WebServerP = Base64Decode((string)root.GetValue(WebServerPKey, ""));
            return(dcInfo);
        }
Exemplo n.º 2
0
        private void ImportWells(List <Well> wells, WebConfiguration wc)
        {
            WellRoot wellRoot = WellRoot.Get(PetrelProject.PrimaryProject);

            EnsureBoreholeCollection(wellRoot);
            BoreholeCollection boreholeColl = wellRoot.BoreholeCollection;

            IProgress p = PetrelLogger.NewProgress(0, wells.Count, ProgressType.Cancelable, Cursors.WaitCursor);

            using (p)
            {
                foreach (Well well in wells)
                {
                    if (p.IsCanceled)
                    {
                        break;
                    }
                    p.SetProgressText("Importing well " + well.Name);
                    Application.DoEvents();
                    ImportWell(well, boreholeColl);
                    p.ProgressStatus = p.ProgressStatus + 1;
                }
            }
        }
Exemplo n.º 3
0
 public WellBroker(WebConfiguration config)
 {
     dcInfo = config;
 }
Exemplo n.º 4
0
 public WellAllocationBroker(WebConfiguration config, Frequency frequency)
 {
     this.dcInfo    = config;
     this.frequency = frequency;
 }
Exemplo n.º 5
0
 public WellboreGroupBroker(WebConfiguration config)
 {
     dcInfo = config;
 }
Exemplo n.º 6
0
 public WebImporterWrapper(WebConfiguration cfg)
 {
     this.WebServer  = cfg.WebServer;
     this.WebServerU = cfg.WebServerU;
     this.WebServerP = cfg.WebServerP;
 }
Exemplo n.º 7
0
 public void Import(List <Well> wells, WebConfiguration dcInfo)
 {
     PetrelLogger.InfoOutputWindow("Start import process...");
     ImportWells(wells, dcInfo);
 }
Exemplo n.º 8
0
 public WellTrajectoryBroker(WebConfiguration config)
 {
     dcInfo = config;
 }