Example #1
0
        ///<summary>This bridge has not yet been added to the database.  CaptureLink reads the bridge parameters from the clipboard.</summary>
        //Command format: LName FName PatID
        public static void SendData(Program ProgramCur, Patient pat)
        {
            if (pat == null)
            {
                MessageBox.Show("No patient selected.");
                return;
            }
            string path = Programs.GetProgramPath(ProgramCur);
            string info = Tidy(pat.LName) + " ";

            info += Tidy(pat.FName) + " ";
            if (ProgramProperties.GetPropVal(ProgramCur.ProgramNum, "Enter 0 to use PatientNum, or 1 to use ChartNum") == "0")
            {
                info += pat.PatNum.ToString();
            }
            else
            {
                if (pat.ChartNumber == null || pat.ChartNumber == "")
                {
                    MsgBox.Show("CaptureLink", "This patient does not have a chart number.");
                    return;
                }
                info += Tidy(pat.ChartNumber);
            }
            Clipboard.Clear();
            ODClipboard.SetClipboard(info);
            try {
                ODFileUtils.ProcessStart(path);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        /*string InvalidCommandLine="999";
         * string GeneralError="998";
         * string NoConnect="997";
         * string PatientNotFound="989";
         * string ManyPatientFound="988";
         * string PatientLocked="987";
         * string ImageNotFound="979";
         * string FileError="969";
         * string OpenManyFoundOK="1";
         * string OpenManyFoundCancel="2";
         * string CreatePatientExist="11";
         * string ChangePatientExist="21";
         * string Successful="0";*/

        ///<summary>We will use the clipboard interface, although there is an ole automation interface available.</summary>
        //Command format: $$DFWIN$$ <Command> <Options>
        //Return value: $$DFWOUT$$<Return value>[\nReturn string] (we will ignore this value for now)
        //$$DFWIN$$ OPEN -n"LName, FName" -c"PatNum" -r -a
        //option -r creates patient if not found, -a changes focus to Digora
        public static void SendData(Program ProgramCur, Patient pat)
        {
            if (pat == null)
            {
                MsgBox.Show("Digora", "No patient selected.");
                return;
            }
            List <ProgramProperty> ForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum);
            string          info  = "$$DFWIN$$ OPEN -n\"" + Tidy(pat.LName) + ", " + Tidy(pat.FName) + "\" -c\"";
            ProgramProperty PPCur = ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum");;

            if (PPCur.PropertyValue == "0")
            {
                info += pat.PatNum.ToString();
            }
            else
            {
                info += pat.ChartNumber;
            }
            info += "\" -r -a";
            try {
                ODClipboard.SetClipboard(info);
            }
            catch (Exception) {
                //The clipboard will sometimes fail to SetText for many different reasons.  Often times another attempt will be successful.
                MsgBox.Show("Digora", "Error accessing the clipboard, please try again.");
                return;
            }
        }
 private void butCopy_Click(object sender, EventArgs e)
 {
     try {
         ODClipboard.SetClipboard(textSchedulingURL.Text);
     }
     catch (Exception ex) {
         FriendlyException.Show(Lan.g(this, "Unable to copy to clipboard."), ex);
     }
 }
 private void butCopyAll_Click(object sender, EventArgs e)
 {
     try {
         string content = this.Text + "\r\n" + textDetails.Text + GetQueryText();
         ODClipboard.SetClipboard(content);
     }
     catch (Exception ex) {
         MsgBox.Show(this, "Could not copy contents to the clipboard. Please try again.");
         ex.DoNothing();
     }
 }
Example #5
0
        private void butCopyToClipboard_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length < 1)
            {
                return;
            }
            WebForms_SheetDef webSheetDef = gridMain.SelectedTag <WebForms_SheetDef>();

            try {
                ODClipboard.SetClipboard(textURLs.Text);
            }
            catch (Exception ex) {
                MsgBox.Show(this, "Could not copy contents to the clipboard.  Please try again.");
                ex.DoNothing();
            }
        }
Example #6
0
 private void butCopyToClipboard_Click(object sender, EventArgs e)
 {
     ODClipboard.SetClipboard(textHostedUrlPortal.Text);
 }