示例#1
0
 void CustomMessageBox_KeyUp(object sender, KeyEventArgs e)
 {
     {
         // if(arg.ContainsKey("keyArg")
         arg["keyArg"]  = e;
         arg["isKeyUp"] = true;
         _eventHandler.Notify(_eventHandler.IsShiftAndControl, arg);
     }
 }
示例#2
0
        private void viewFullInfo_btn_Click_1(object sender, EventArgs e)
        {
            if (!IVLVariables.ivl_Camera.IsCapturing)
            {
                #region To fix defect 0001777 This part is added  in order to go to live screen when patient info view button is clicked the camera will be taken to view screen
                if (IVLVariables.ivl_Camera.CameraIsLive)
                {
                    IVLEventHandler eventHandler = IVLEventHandler.getInstance();
                    eventHandler.Notify(eventHandler.GoToViewScreen, new Args());
                }
                #endregion
                PatientDetails_UC pat = new PatientDetails_UC();
                pat.setPatValues();
                pat.Dock = DockStyle.Fill;
                INTUSOFT.Custom.Controls.BaseGradientForm f = new INTUSOFT.Custom.Controls.BaseGradientForm();

                f.Color1          = IVLVariables.GradientColorValues.Color1;
                f.Color2          = IVLVariables.GradientColorValues.Color2;
                f.ColorAngle      = IVLVariables.GradientColorValues.ColorAngle;
                f.FontColor       = IVLVariables.GradientColorValues.FontForeColor;
                f.FormBorderStyle = FormBorderStyle.FixedSingle;
                f.Controls.Add(pat);
                f.Size          = new System.Drawing.Size(750, 650);
                f.StartPosition = FormStartPosition.CenterParent;
                string appLogoFilePath = @"ImageResources\LogoImageResources\IntuSoft.ico";
                if (File.Exists(appLogoFilePath))
                {
                    f.Icon = new System.Drawing.Icon(appLogoFilePath, 256, 256);
                }
                f.StartPosition = FormStartPosition.CenterParent;
                string infoIconLogoFilePath = @"ImageResources\PatientDetailsImageResources\i-info.png";
                if (File.Exists(infoIconLogoFilePath))
                {
                    viewFullInfo_btn.Image = new Bitmap(infoIconLogoFilePath);//, 256, 256);
                }
                //This below line has been added by Darshan on 28-10-2015 Defect no 0000724: NR:View Full Info screen Label is required.
                f.Text        = IVLVariables.LangResourceManager.GetString("View_Full_Info_Text", IVLVariables.LangResourceCultureInfo);
                f.MaximizeBox = false;
                f.MinimizeBox = false;

                //#if DEBUG
                //            f.TopMost = false;
                //#else
                //            f.TopMost = true;
                //#endif
                //This below bool variable is added by Darshan on 21-08-2015 to solve Defect no:0000585: annotation window,report window,view full info,user settings window, when trigger press capture is happening.

                IVLVariables.IsAnotherWindowOpen = true;

                if (f.ShowDialog() == DialogResult.Cancel)
                {
                    IVLVariables.IsAnotherWindowOpen = false;
                    //This below bool variable is added by Darshan on 21-08-2015 to solve Defect no:0000585: annotation window,report window,view full info,user settings window, when trigger press capture is happening.
                }
            }
        }
示例#3
0
 private void closeSplash(string s, Args arg)
 {
     //splashThread.Join();
     //splashThread.Abort();
     // imag.Dispose();
     if (arg.ContainsKey("isCaptureFailed"))
     {
         if ((bool)arg["isCaptureFailed"])
         {
             if (!arg.ContainsKey("FailureCategory"))
             {
                 arg["FailureCategory"] = "001";
             }
             Common.CustomMessageBox.Show(IVLVariables.LangResourceManager.GetString("CapturedFail_Warning_Text", IVLVariables.LangResourceCultureInfo) + arg["FailureCategory"] as string + " ," + IVLVariables.LangResourceManager.GetString("PleaeRetry_Text", IVLVariables.LangResourceCultureInfo), IVLVariables.LangResourceManager.GetString("CapturFailed_Text", IVLVariables.LangResourceCultureInfo), Common.CustomMessageBoxIcon.Error);
             arg["isDefault"] = true;
             eventHandler.Notify(eventHandler.UpdateMainWindowCursor, arg);
         }
     }
 }
示例#4
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            AddNewObject(drawArea, new DrawRectangle(e.X, e.Y, 1, 1));
            Args arg = new Args();

            arg["Print"]  = true;
            arg["Save"]   = true;
            arg["Export"] = true;
            _eventHandler.Notify(_eventHandler.AnnotationButtonsRefresh, arg);
        }
示例#5
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            AddNewObject(drawArea, new DrawLine(e.X, e.Y, e.X + 1, e.Y + 1));
            Args arg = new Args();//Added by darshan on 25-07-2016 as per NR:0001211 Note no:(0002558)

            arg["Print"]  = true;
            arg["Save"]   = true;
            arg["Export"] = true;
            _eventHandler.Notify(_eventHandler.AnnotationButtonsRefresh, arg);
        }
示例#6
0
        public void DeleteAll()
        {
            int n = graphicsList.Count;

            for (int i = n - 1; i >= 0; i--)
            {
                if (AnnotationVariables.isGlaucomaTool)
                {
                    if (graphicsList[i] is DrawPolygon)
                    {
                        DrawPolygon d = graphicsList[i] as DrawPolygon;
                        if (d.isCup)
                        {
                            ToolPolygon.DrawCupPolygon = null;
                            graphicsList.RemoveAt(i);
                        }
                        else
                        {
                            ToolPolygon.DrawDiscPolygon = null;
                            graphicsList.RemoveAt(i);
                        }
                    }
                }
                else
                {
                    graphicsList.RemoveAt(i);
                }
            }
            if (AnnotationVariables.isGlaucomaTool)
            {
                Args arg = new Args();
                arg["ModifyDiscPoints"] = false;
                arg["DrawCup"]          = false;
                arg["ModifyCupPoints"]  = false;
                arg["MeasureCDR"]       = false;
                arg["Print"]            = false;
                arg["Save"]             = false;
                arg["Export"]           = false;//set to false when all points are deleted.By Ashutosh 21-7-2017

                _eventHandler.Notify(_eventHandler.UpdateGlaucomaToolControls, arg);
            }
        }
示例#7
0
        /// <summary>
        /// Left nouse button is pressed
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point point1 = new Point(e.X, e.Y);

            if (AnnotationVariables.isGlaucomaTool)
            {
                ValidatePointsForGlaucomaTool(point1, drawArea);
            }
            else
            {
                newPolygon = new DrawPolygon(e.X, e.Y, e.X + 1, e.Y + 1);
                AddNewObject(drawArea, newPolygon);
                lastX = e.X;
                lastY = e.Y;
                Args arg = new Args();//Added by darshan on 25-07-2016 as per NR:0001211 Note no:(0002558)
                arg["Print"]  = true;
                arg["Save"]   = true;
                arg["Export"] = true;//set to true when points drawn . By Ashutosh 21-7-2017

                _eventHandler.Notify(_eventHandler.AnnotationButtonsRefresh, arg);
            }
            drawArea.Refresh();
        }
示例#8
0
        /// <summary>
        /// Left mouse button is pressed
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            selectMode = SelectionMode.None;
            Point point = new Point(e.X, e.Y);

            // Test for resizing (only if control is selected, cursor is on the handle)
            int n = drawArea.ListGraphics.SelectionCount;

            for (int i = 0; i < n; i++)
            {
                DrawObject o            = drawArea.ListGraphics.GetSelectedObject(i);
                int        handleNumber = o.HitTest(point);

                if (handleNumber > 0)
                {
                    selectMode = SelectionMode.Size;

                    // keep resized object in class members
                    resizedObject       = o;
                    resizedObjectHandle = handleNumber;

                    // Since we want to resize only one object, unselect all other objects
                    drawArea.ListGraphics.UnselectAll();
                    o.Selected = true;

                    break;
                }
            }

            // Test for move (cursor is on the object)
            if (selectMode == SelectionMode.None)
            {
                List <AnnotationComments> annocmt = null;
                int        n1 = drawArea.ListGraphics.Count;
                DrawObject o  = null;

                if (drawArea.comments.Count != 0)
                {
                    annocmt = drawArea.comments;
                    annocmt.Reverse();
                }
                string[] str = drawArea.ListGraphics.graphicType;
                for (int i = 0; i < n1; i++)
                {
                    int a = drawArea.ListGraphics[i].HitTest(point);
                    if (drawArea.ListGraphics[i].PointContainer(point) == 0)
                    {
                        o = drawArea.ListGraphics[i];
                        break;
                    }
                    //if (drawArea.ListGraphics[i].HitTest(point) == 0)
                    //{
                    //    o = drawArea.ListGraphics[i];
                    //    //if(annocmt!=null)
                    //    //    //o.ID = annocmt[i].ID;
                    //    break;
                    //}
                }

                if (o != null)
                {
                    isZoom     = false;
                    selectMode = SelectionMode.Move;

                    // Unselect all if Ctrl is not pressed and clicked object is not selected yet
                    if ((Control.ModifierKeys & Keys.Control) == 0 && !o.Selected)
                    {
                        drawArea.ListGraphics.UnselectAll();
                    }

                    // Select clicked object

                    o.Selected = true;
                    if (o is DrawPolygon)
                    {
                        DrawPolygon polyGon = o as DrawPolygon;

                        if (AnnotationVariables.isGlaucomaTool)
                        {
                            _eventHandler.Notify(_eventHandler.EnableMovePointInCDRTool, new Args());//public void Notify(String n, Args args) defined in IVLEventHandler.By ashutosh 25-07-2017
                        }
                    }

                    drawArea.Cursor = Cursors.SizeAll;
                }
            }
            // Net selection
            if (selectMode == SelectionMode.None)
            {
                // click on background
                if ((Control.ModifierKeys & Keys.Control) == 0)
                {
                    drawArea.ListGraphics.UnselectAll();
                    drawArea.unselectalltext();
                }
                selectMode = SelectionMode.NetSelection;
                isZoom     = true;
                drawArea.DrawNetRectangle = true;
            }
            lastPoint.X           = e.X;
            lastPoint.Y           = e.Y;
            startPoint.X          = e.X;
            startPoint.Y          = e.Y;
            drawArea.Capture      = true;
            drawArea.NetRectangle = DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint);
            drawArea.Refresh();
        }