コード例 #1
0
        private void saveImage(string obsname, string imagename, string path)
        {
            string testing = string.Empty;

            if (orderPos > -1)
            {
                testing = path + targetName + imagename + "-" + filter + "-" + orderPos + "-U42.fit";
            }
            else
            {
                testing = path + targetName + imagename + "-U42.fit";
            }
            ccd.SaveImage(testing);
            //ccd.SaveImage(path + targetName + imagename + "-U42.fit");
            Console.WriteLine(testing);
            AppendToTextBox("Server Camera Exposure Saved!");
            AppendToTextBox("Server:" + savepath + targetName);
        }
コード例 #2
0
        private void exposeFor(bool dark, double exp)
        {
            ccd.Expose((double)exp, Convert.ToInt16(!dark));

            while (!ccd.ImageReady)
            {
                //wait
            }
            sendToServer("Client Camera Exposure Is Done!");

            string dt = string.Empty;

            dt = ccd.Document.GetFITSKey("DATE-OBS");
            checkForDirectory(savepath);
            string testing = string.Empty;

            if (saveImages)
            {
                if (orderPos > -1)
                {
                    testing = savepath + dt.Replace(":", "-") + "-" + filter + "-" + orderPos + "-U47.fit";
                }
                else
                {
                    testing = savepath + dt.Replace(":", "-") + "-U47.fit";
                }
                ccd.SaveImage(testing);
                sendToServer("Client Camera Exposure Saved!");
                sendToServer("Client:" + savepath);
                AppendToTextBox("Client Camera Exposure Saved!");
                AppendToTextBox("Client:" + savepath);
            }
            else
            {
                sendToServer("Client Camera Exposure *not* saved!");
                AppendToTextBox("Client Camera Exposure *not* saved!");
            }
        }