コード例 #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;
 }