예제 #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);
        }
예제 #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;
                }
            }
        }
예제 #3
0
 public WellBroker(WebConfiguration config)
 {
     dcInfo = config;
 }
예제 #4
0
 public WellAllocationBroker(WebConfiguration config, Frequency frequency)
 {
     this.dcInfo    = config;
     this.frequency = frequency;
 }
예제 #5
0
 public WellboreGroupBroker(WebConfiguration config)
 {
     dcInfo = config;
 }
예제 #6
0
 public WebImporterWrapper(WebConfiguration cfg)
 {
     this.WebServer  = cfg.WebServer;
     this.WebServerU = cfg.WebServerU;
     this.WebServerP = cfg.WebServerP;
 }
예제 #7
0
 public void Import(List <Well> wells, WebConfiguration dcInfo)
 {
     PetrelLogger.InfoOutputWindow("Start import process...");
     ImportWells(wells, dcInfo);
 }
예제 #8
0
 public WellTrajectoryBroker(WebConfiguration config)
 {
     dcInfo = config;
 }