Beispiel #1
0
        //WhiteboardMessage msgPencilMessage_onlyMove;// = new WhiteboardMessage();
        void sendPencilPacket()
        {
            try
            {
                this.eventStore.Add(msgPencilMessage);
                //Trace.WriteLine("Event Store of current drawing" + this.eventStore.Count.ToString());

                AnnotMsg amsg = new AnnotMsg(annotationType,thisSessionID ,NetworkManager.getInstance().profile);
                amsg.drawingMsg = msgPencilMessage;
                if(haveFrames)
                    amsg.sheetNo = currentSheet;
                else
                    amsg.sheetNo = -1;

                amsg.SenderID = NetworkManager.getInstance().profile.ClientId;

                sendingArray.Add(amsg); // by kamran
            }
            catch(Exception ex)
            {
                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: WebSharing  void sendPencilPacket()",ex,"",false);
            }
        }
Beispiel #2
0
        private void textBox1_Leave(object sender, System.EventArgs e)
        {
            try
            {
                string textboxvalue=this.textBox1.Text;
                WhiteboardMessage msg=new WhiteboardMessage();

                Point p = GetCurrentScrollPositionBrowser(browserControl);

                msg.start=this.textBox1.Location;//mouseDownPos;
                msg.start.X += p.X;
                msg.start.Y += p.Y;
                msg.end=this.textBox1.Location;
                msg.end.X += p.X;
                msg.end.Y += p.Y;

                msg.tool=(ushort)WhiteboardToolCode.Text;//tool;
                msg.c=this.color;
                //msg.font=textBox1.Font;
                msg.font=this.localCopyOfFont;

                msg.thickness=this.lineThickness;
                msg.ConferenceID = NetworkManager.thisInstance.profile.ConferenceID ;

                msg.text=textboxvalue;

            //				msg.txtSize = textBox1.Font.Size;
            //				msg.txtItalics = textBox1.Font.Italic;
            //				msg.txtBold = textBox1.Font.Bold;
            //				msg.txtUnderline = textBox1.Font.Underline;
            //				msg.FontFamily = textBox1.Font.Name;
            //

                msg.txtSize = this.localCopyOfFont.Size;
                msg.txtItalics = this.localCopyOfFont.Italic;
                msg.txtBold = this.localCopyOfFont.Bold;
                msg.txtUnderline = this.localCopyOfFont.Underline;
                msg.FontFamily = this.localCopyOfFont.Name;

                msg.SlideNo=currentSlideNo;
                //Trace.WriteLine("no of Eventstore before msg writtign text" + this.eventStore.Count);
                msg.SenderID=NetworkManager.getInstance().profile.ClientId;
                this.eventStore.Add(msg);
                //Trace.WriteLine("no of Eventstore after msg  writtign text" + this.eventStore.Count);
                //textboxvalue=this.textBox1.Text;
                this.textBox1.Visible=false;
                this.textBox1.Text="";

                //msg.start.X -= p.X;
                //msg.start.Y -= p.Y;
                //msg.end=this.textBox1.Location;
                //msg.end.X -= p.X;
                //msg.end.Y -= p.Y;
                //this.CreateMouseMoveEx(msg);

                msg = new WhiteboardMessage();
                msg.ConferenceID = NetworkManager.thisInstance.profile.ConferenceID ;
                msg.start=this.textBox1.Location;//mouseDownPos;
                msg.start.X += p.X;
                msg.start.Y += p.Y;
                msg.end=this.textBox1.Location;
                msg.end.X += p.X;
                msg.end.Y += p.Y;

                msg.tool=(ushort)WhiteboardToolCode.Text;//tool;
                msg.c=this.color;
                msg.font=textBox1.Font;
                msg.thickness=this.lineThickness;

                msg.text=textboxvalue;
                msg.txtSize = textBox1.Font.Size;
                msg.txtItalics = textBox1.Font.Italic;
                msg.txtBold = textBox1.Font.Bold;
                msg.txtUnderline = textBox1.Font.Underline;
                msg.FontFamily = textBox1.Font.Name;
                msg.SlideNo=this.currentSlideNo;

                msg.SenderID = NetworkManager.getInstance().profile.ClientId;

                WebMeeting.Client.NetworkManager network = WebMeeting.Client.NetworkManager.getInstance();

                AnnotMsg aMsg = new AnnotMsg(this.annotationType,this.thisSessionID,network.profile);
                aMsg.drawingMsg = msg;
                if(haveFrames)
                    aMsg.sheetNo = currentSheet;
                else
                    aMsg.sheetNo = -1;

                aMsg.SenderID = NetworkManager.getInstance().profile.ClientId;

                //network.SendLoadPacket(aMsg);
                sendingArray.Add(aMsg);

                //System.Diagnostics.Debug.Write("calling from textbox1_leave\n");
                this.DrawNow=true;
                this.RepaintObjects(-1);
            }
            catch(Exception ex)
            {
                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: WebSharing  private void textBox1_Leave(object sender, System.EventArgs e)",ex,"",false);
            }
        }
Beispiel #3
0
        void OnMouseUp(Point e)
        {
            try
            {

                color = NetworkManager.getInstance().profile.m_AssignedColor;
                //pointsDrawByPencil = 0;
                //this.bScrollDraw=true;
                mouseCurrentPos.X=e.X;
                mouseCurrentPos.Y=e.Y;

                //if(((ushort)tool & (ushort)(WhiteboardToolCode.PlaceHolderArrow|WhiteboardToolCode.Brush | WhiteboardToolCode.Pencil |  WhiteboardToolCode.Eraser | WhiteboardToolCode.Brush)) == (ushort)tool)
                if(((ushort)tool & (ushort)(WhiteboardToolCode.PlaceHolderArrow|WhiteboardToolCode.Brush | WhiteboardToolCode.Pencil |  WhiteboardToolCode.Eraser )) == (ushort)tool)
                {
                    //WhiteboardMessage msg=new WhiteboardMessage();
                    msgPencilMessage.start=mouseDownPos;

                    Point p = GetCurrentScrollPositionBrowser(browserControl);
                    msgPencilMessage.end=new Point(e.X + p.X ,e.Y + p.Y );
                    msgPencilMessage.tool=(ushort)tool;

                    msgPencilMessage.thickness=this.lineThickness;
                    msgPencilMessage.c=this.color;

                    //				if(tool.ToString().ToLower()=="pencil")
                    //					msgPencilMessage.thickness=this.lineThickness;
                    //				else if(tool.ToString().ToLower()=="brush")
                    //					msgPencilMessage.thickness=this.brushThickness;
                    //				msgPencilMessage.c=this.color;
                    msgPencilMessage.pencilLastPoint=new Point(this.pencilLastPoint.X,this.pencilLastPoint.Y);
                    msgPencilMessage.SenderID = NetworkManager.getInstance().profile.ClientId;
                    msgPencilMessage.text=WebMeeting.Client.NetworkManager.getInstance().profile.Name;
                    //////////////////////////////////
                    //++pointsDrawByPencil;
                    msgPencilMessage.pencilLastPoints.Add(this.pencilLastPoint) ;
                    msgPencilMessage.endPoints.Add(msgPencilMessage.end) ;
                    msgPencilMessage.SlideNo = currentSlideNo;
                    msgPencilMessage.ConferenceID = NetworkManager.thisInstance.profile.ConferenceID  ;
                    /////////////////////////////////////////////

                    this.eventStore.Add(msgPencilMessage);

                    AnnotMsg amsg = new AnnotMsg(annotationType,thisSessionID,NetworkManager.getInstance().profile);
                    amsg.drawingMsg = msgPencilMessage;
                    if(haveFrames)
                        amsg.sheetNo = currentSheet;
                    else
                        amsg.sheetNo = -1;

                    amsg.SenderID = NetworkManager.getInstance().profile.ClientId;
                    sendingArray.Add(amsg);
                }
                else
                {
                    if((ushort)tool!=(ushort)WhiteboardToolCode.Text)
                    {
                        //msg=new WhiteboardMessage();
                        Point p = GetCurrentScrollPositionBrowser(browserControl);
                        msg = new WhiteboardMessage();

                        msg.ConferenceID = NetworkManager.thisInstance.profile.ConferenceID ;
                        msg.start=mouseDownPos;
                        msg.end=new Point(e.X+p.X,e.Y + p.Y) ;
                        msg.tool=(ushort)tool;
                        msg.c=this.color;
                        msg.thickness=this.lineThickness;
                        msg.SenderID = NetworkManager.getInstance().profile.ClientId;
                        msg.SlideNo = currentSlideNo;
                        this.eventStore.Add(msg);

                        AnnotMsg amsg = new AnnotMsg(annotationType,thisSessionID,NetworkManager.getInstance().profile);
                        amsg.drawingMsg = msg;
                        if(haveFrames)
                            amsg.sheetNo = currentSheet;
                        else
                            amsg.sheetNo = -1;

                        amsg.SenderID = NetworkManager.getInstance().profile.ClientId;
                        sendingArray.Add(amsg);//NetworkManager.getInstance().SendLoadPacket(amsg);

                    }
                }
            }
            catch(Exception ex)
            {
                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: WebSharing  void OnMouseUp(Point e)",ex,"",false);
            }
        }