private List <String> imageFileErrorList = null;         // Will contain a list of Image File Names that could not be inserted.



        public ImportGroupAssignments()
        {
            runLogMsgQueue = new PicesMsgQueue("ImportGroupAssignemnts");
            runLog         = new PicesRunLog(runLogMsgQueue);
            mainWinConn    = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            InitializeComponent();

            SourceDirectory.Text = PicesSipperVariables.HomeDir();
        }
Beispiel #2
0
        public SipperDiskManager()
        {
            destDir = OSservices.AddSlash(PicesSipperVariables.HomeDir()) + "SipperFiles";
            OSservices.CreateDirectory(destDir);

            InitializeComponent();

            UpdateAvailableBytes();
            DownLoadDir.Text = destDir;

            selectedFiles = new SipperFileControlBlockList();
            UpdateAvailableBytes();

            oldHeight = this.Height;
            oldWidth  = this.Width;
        }
        public ImportValidatdClass()
        {
            runLog      = new PicesRunLog();
            mainWinConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog);

            runLogGoalie   = new PicesGoalKeeper("ImportValidatingClass");
            runLogMsgQueue = new Queue <String> ();

            sipperFile   = mainWinConn.SipperFileRecLoad(sipperFileName);
            unknownClass = GetClassFromName(mainWinConn, "UnKnown");

            InitializeComponent();

            SourceDirectory.Text = PicesSipperVariables.HomeDir();
            SourceDirectory.Text = "D:\\Users\\kkramer\\PlanktonCompetition\\trunk\\Data\\";
        }
Beispiel #4
0
        private void SourceDirectoryBrowseButton_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (!String.IsNullOrEmpty(lastDirectoryValidated))
            {
                fbd.SelectedPath = lastDirectoryValidated;
            }
            else
            {
                fbd.SelectedPath = PicesSipperVariables.HomeDir();
            }

            DialogResult dr = fbd.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                SourceDirectory.Text = fbd.SelectedPath;
                ValidateSourceDirectory();
            }
        }
Beispiel #5
0
        public SaveImagesToDisk(PicesDataBase _dbConn,
                                String _cruise,
                                String _station,
                                String _deployment,
                                String _sipperFileName,
                                PicesDataBaseImageList _images
                                )
        {
            dbConn         = _dbConn;
            images         = _images;
            cruise         = _cruise;
            station        = _station;
            deployment     = _deployment;
            sipperFileName = _sipperFileName;

            runLog = new PicesRunLog();
            InitializeComponent();
            DestinationDirectory.Text = OSservices.AddSlash(OSservices.AddSlash(PicesSipperVariables.HomeDir()) + "SavedImages");
            OSservices.CreateDirectoryPath(DestinationDirectory.Text);

            //  PicesTempDirectory ());
            if (!String.IsNullOrEmpty(cruise))
            {
                DestinationDirectory.Text += cruise;
                if (!String.IsNullOrEmpty(station))
                {
                    DestinationDirectory.Text += "-" + station;
                    if (!String.IsNullOrEmpty(deployment))
                    {
                        DestinationDirectory.Text += "-" + deployment;
                        if (!String.IsNullOrEmpty(sipperFileName))
                        {
                            DestinationDirectory.Text += "-" + sipperFileName;
                        }
                    }
                }
            }

            ImageCount.Text = images.Count.ToString("###,##0");
        }
        } /* CancelBackGroundProcess */

        private void BrowseSourceDir_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (String.IsNullOrEmpty(SourceDirectory.Text))
            {
                SourceDirectory.Text = PicesSipperVariables.HomeDir();
            }

            if (Directory.Exists(SourceDirectory.Text))
            {
                SourceDirectory.Text = PicesSipperVariables.HomeDir();
            }

            fbd.SelectedPath = SourceDirectory.Text;

            DialogResult dr = fbd.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                SourceDirectory.Text = fbd.SelectedPath;
                ValidateSourceDirectory();
            }
        }
Beispiel #7
0
        private void SaveImagesToDisk2_Load(object sender, EventArgs e)
        {
            CruiseName.Text    = cruise;
            StationName.Text   = station;
            DeploymentNum.Text = deployment;
            SipperFile.Text    = sipperFileName;
            if (group != null)
            {
                GroupName.Text = group.Name;
            }

            ProbMin.Text = (100.0f * probMin).ToString("##0.0") + "%";
            ProbMax.Text = (100.0f * probMax).ToString("##0.0") + "%";

            SizeMin.Text = sizeMin.ToString("#,###,##0");
            if (sizeMax <= 0)
            {
                SizeMax.Text = infinityStr;
            }
            else
            {
                SizeMax.Text = sizeMax.ToString("#,###,##0");
            }

            DepthMin.Text = depthMin.ToString("##,##0.00");
            if (depthMax <= 0.0)
            {
                DepthMax.Text = infinityStr;
            }
            else
            {
                DepthMax.Text = depthMax.ToString("##,##0.00");
            }

            DestinationDirectory.Text = OSservices.AddSlash(OSservices.AddSlash(PicesSipperVariables.HomeDir()) + "SavedImages");
            OSservices.CreateDirectoryPath(DestinationDirectory.Text);

            //  PicesTempDirectory ());
            if (group != null)
            {
                DestinationDirectory.Text += group.Name;
            }
            else
            {
                if (!String.IsNullOrEmpty(cruise))
                {
                    DestinationDirectory.Text += cruise;
                    if (!String.IsNullOrEmpty(station))
                    {
                        DestinationDirectory.Text += "-" + station;
                        if (!String.IsNullOrEmpty(deployment))
                        {
                            DestinationDirectory.Text += "-" + deployment;
                            if (!String.IsNullOrEmpty(sipperFileName))
                            {
                                DestinationDirectory.Text += "-" + sipperFileName;
                            }
                        }
                    }
                }
            }

            StartLoadingStatusOnTotalImageCount();
        } /* SaveImagesToDisk2_Load */