public ClientUI() { InitializeComponent(); MM_Controller=new WebMeeting.Client.Minuts_Meeting.Minuts_Controller(); db=new WebMeeting.Client.ClientDataBase.DatabaseAccess("WebMeeting_Client.dll"); fcu=new FtpClient(ConfigurationSettings.AppSettings["FtpServer"].ToString(),ConfigurationSettings.AppSettings["FtpServer_Username"].ToString(),ConfigurationSettings.AppSettings["FtpServer_Password"].ToString(),2000,21); pb=new WebMeeting.Client.Minuts_Meeting.Progressbar(); try { //ff = new SaveFileDialog (); //this.Text = ; notesControl=new NotesControl(); #region set backcolor of tab controls this.BackColor=Info.getInstance().backColor; tabBody.BackColor=Info.getInstance().backColor; panelBody.BackColor=Info.getInstance().backColor; tabControl1.BackColor=Info.getInstance().ParticipantBackColor; tabControlWebContent.BackColor = Info.getInstance().backColor; pollingTabControl.BackColor = Info.getInstance().backColor; rightPanel.BackColor=Info.getInstance().backColor; chatTabControl.BackColor=Info.getInstance().backColor; panelQuickLaunch.BackColor = System.Drawing.Color.FromArgb(209,194,197); #endregion #region set height tabPageChat.Height=200; chatTabControl.Height=308; tabPageNotes.ImageIndex = 1; tabPageNotes.Height=200; tabBody.Height = splitter1.Height ; tabPageChat.ImageIndex = 0; #endregion #region set status bar _statusBar = new DotNetStatusBar(); _statusBar.BringToFront(); _statusBar.Parent = this; this._statusBar.Name = "statusBar1"; #endregion #region Set Menu. myNiceMenu = new NiceMenu(); //myNiceMenu.AddMenuImage = false; myNiceMenu.MenuImages = mainMenuImageList; myNiceMenu.UpdateMenu(this.mainMenu1, new NiceMenuClickEvent(mnuGestioneEventoClick)); #endregion #region get info and network instances info = Info.getInstance(); info.ConferenceID="1"; thisInstance = this; network= NetworkManager.getInstance(); network.ChildWindowCreationEvent +=new MakeChildWindow(network_ChildWindowCreationEvent); #endregion #region add Participants tabs tabPage1.Title = "Participants"; tabPage1.Control = listParticipents; tabControl1.TabPages.Add(tabPage1); tabControl1.TabPages.Add(tabPageFind); tabPageFind.Control=objFindParticipetsControl; #endregion #region set instances of netword and this(clientUI) network.pClient = this; #endregion #region set chat controls tabs tabPageChat.Title = "Chat"; tabPageNotes.Title="Notes"; chatControl1 = chatControl.getInstance(); tabPageChat.Control = chatControl1; chatControl1.thisWindowTabPage = tabPageChat; tabPageNotes.Control=this.notesControl; chatTabControl.TabPages.Add(tabPageChat); chatTabControl.TabPages.Add(tabPageNotes); chatTabControl.ClosePressed+=new System.EventHandler(this.Close_ChatPanel); #endregion #region white board settind tabPageInfo.Title = "WhiteBoard"; tabPageInfo.ImageList=this.imageList1; tabPageInfo.ImageIndex=4; whiteBoard = new WhiteboardControl(); //per2 tabPageInfo.Control = whiteBoard; //per2 tabPageInfo.Visible=false; //per2 this.whiteBoard.DrawingTool = WebMeetingDrawingBoard.WhiteboardToolCode.None; //per2 #endregion #region set visibility tabPageDesktopSharing.Visible = false; listParticipents.Visible = true; #endregion #region screen capturing tabPageScreenCapture.Control = screencaptureControl; screencaptureControl.ChangeState(true); #endregion #region listParticipents settings listParticipents.SmallImageList = listViewImageList; listParticipents.GridLines = false; #endregion #region set controls to tabpages // //TabPageQAAttendee.Control = qaAttendee; //TabPageQAPresenter.Control = qaPresenter; frmQAA.Controls.Add(qaAttendee); frmQAP.Controls.Add(qaPresenter); //tabPageWebContentPolls.Control = manageContentWebPolls; //tabPageWebContentBookmarks.Control = manageContentBookmarks; //tabPageWebFiles.Control = manageContentWebFiles; //tabPageWebEvaluation.Control = manageContentEvaluations; //tabPageWebPresentations.Control = manageContentPresentations; //tabPageWebInfo.Control = manageContentInformtaion; #endregion #region add tab pages in tabControlWebContent (Manage Content) and setting //tabControlWebContent.TabPages.Add(tabPageWebInfo); //tabControlWebContent.TabPages.Add(tabPageWebPresentations); //tabControlWebContent.TabPages.Add(tabPageWebContentPolls); //tabControlWebContent.TabPages.Add(tabPageWebContentBookmarks); //tabControlWebContent.TabPages.Add(tabPageWebFiles); //tabControlWebContent.TabPages.Add(tabPageWebEvaluation); tabPageWebContent.Title = "Manage Content"; tabBody.OnSelectionChangingEx +=new WebMeeting.Client.TabControlEx.DelegateSelectionChanged(tabBody_OnSelectionChangingEx); splitter1.SplitterThumbBackColoor = Color.DarkBlue; tabPageWebContent.Control = manageContentPresentations; whiteBoard.pictureBox1.SizeMode = PictureBoxSizeMode.Normal; //per2 SynchWindowProc = new FnSynchWindow(SynchWindow); #endregion #region set tooltips for drawing tools ToolTip drawingToolTip = new ToolTip(); // Set up the delays for the ToolTip. drawingToolTip.AutoPopDelay = 1000; drawingToolTip.InitialDelay = 1000; drawingToolTip.ReshowDelay = 500; // Force the ToolTip text to be displayed whether or not the form is active. drawingToolTip.ShowAlways = true; drawingToolTip.SetToolTip(this.btnCircle, "Elipse"); drawingToolTip.SetToolTip(this.btnArrow, "UnSelect"); drawingToolTip.SetToolTip(this.btnBrush, "Brush"); drawingToolTip.SetToolTip(this.btnClearWhiteBoard, "Clear All"); drawingToolTip.SetToolTip(this.btnEraser, "Eraser"); drawingToolTip.SetToolTip(this.btnFont, "Font"); drawingToolTip.SetToolTip(this.btnLine, "Line"); drawingToolTip.SetToolTip(this.btnNone, "Pointing Tool"); drawingToolTip.SetToolTip(this.btnPencil, "Pencil"); drawingToolTip.SetToolTip(this.btnPlaceHolderArrow, "Place Holder Arrow"); drawingToolTip.SetToolTip(this.btnRectangle, "Rectangle"); drawingToolTip.SetToolTip(this.btnText, "Text"); drawingToolTip.SetToolTip(this.btnColor,"Color Chooser"); drawingToolTip.SetToolTip(this.button4,"Line Thickness"); drawingToolTip.SetToolTip(this.splitter1,"Hide/Show Right Panels"); #endregion #region set listParticipents(Participents) coloumns width this.listParticipents.Columns[1].Width=42; //Color this.listParticipents.Columns[2].Width=17; //Speed this.listParticipents.Columns[3].Width=0; //Mood this.listParticipents.Columns[4].Width=45; this.listParticipents.Columns[5].Width=20; #endregion /* * get the configuration setting relevant to exception handling * * */ ReadConfigFiles(); ChangeResolution(true); } catch(Exception exp) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("ClientUI.cs line==> 750",exp,null,false); //ShowExceptionMessage("Constructor of Application GUI has encountered an exception. " + ee.Message); } }
public void InitializeServer2(NetworkManager networkMngr) { try { if(appServer != null) appServer.Terminate(); } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeServer2(NetworkManager networkMngr)",ex,"",false); } //objMouse = new cMouseHook(); try { bIsServer=true; appServer = new AppSharing(true); appServer.OnDataAvilable +=new OnDataAvilableDelegate(appServer_OnDataAvilable); appServer.OnDataAvilableEx+=new OnDataAvilableDelegateEx(appServer_OnDataAvilableEx); network = networkMngr; SelectWindow(); isDesktopSharing = false; // btnShare.Visible = false; appServer.bIsDesktopSharing = true; //listView1.Visible = false; pictureBox1.Visible = false; appServer.SetCaptureWindowAndStartCapturing(Win32.USER32.GetDesktopWindow()); sendingThread = new Thread(new ThreadStart(SendingFunction)); sendingThread.Name = "Desktop Sharing Sending Thread"; sendingThread.Start(); // hook to mouse startMouseHook(); // // to show cursor on host side // // _mouseThread = new Thread(new ThreadStart(this.MouseThreadFunction)); // _mouseThread.Name = "Application Sharing Mouse Movement Thread"; // _mouseThread.Start(); } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeServer2(NetworkManager networkMngr)",ex,"",false); } }
public void InitializeServer(NetworkManager networkMngr,bool DesktopSharing) { try { if(appServer != null) appServer.Terminate(); } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeServer(NetworkManager networkMngr,bool DesktopSharing)",ex,"",false); } try { this.appShareClose+=new CloseAppShare(ApplicationSharing_appShareClose); bIsServer=true; appServer = new AppSharing(true); appServer.OnDataAvilable +=new OnDataAvilableDelegate(appServer_OnDataAvilable); appServer.OnDataAvilableEx+=new OnDataAvilableDelegateEx(appServer_OnDataAvilableEx); appServer.OnWindowClosed+=new OnWindowClosedDelegate(appServer_OnWindowClosed); network = networkMngr; isDesktopSharing = DesktopSharing; if(!DesktopSharing) // !DesktopSharing is rigth { // application sharing this.AutoRefresh.Enabled = true; this.AutoRefresh.Interval = 10000; this.AutoRefresh.SynchronizingObject = this; CurrentProcessID=Process.GetCurrentProcess().MainWindowHandle.ToInt32(); SelectWindow(); this.AutoRefresh.Elapsed += new System.Timers.ElapsedEventHandler(this.AutoRefresh_Elapsed); pictureBox1.Visible = false; btnShare.Visible = false; btnLog.Visible = true; whiteBoard = new WebMeetingDrawingBoard.WhiteboardControl(); whiteBoard.OnScrolling +=new WebMeetingDrawingBoard.WhiteboardControl.ScrollingDelegate(whiteBoard_OnScrolling); //appServer._whiteboard = whiteBoard; whiteBoard.IsAppSharingWindow = true; whiteBoard.Visible = false; whiteBoard.btn_whtLogg.Visible=false; //whiteBoard.InitializeToSize(400,400); whiteBoard.Dock = DockStyle.Fill; whiteBoard.BringToFront(); this.Controls.Add(whiteBoard); whiteBoard.nSessionId = this.nSessionID; btnShare.BringToFront(); btnLog.BringToFront(); btnLog.Visible=true; //startMouseHook(); // try to mouse hook } else { this.AutoRefresh.Enabled = false; // Desktop sharing btnShare.Visible = false; btnLog.Visible = false; appServer.bIsDesktopSharing = true; //listView1.Visible = false; pictureBox1.Visible = false; appServer.SetCaptureWindowAndStartCapturing(Win32.USER32.GetDesktopWindow()); sendingThread = new Thread(new ThreadStart(SendingFunction)); sendingThread.Name = "Application Sharing Sending Thread"; sendingThread.Start(); } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeServer(NetworkManager networkMngr,bool DesktopSharing)",ex,"",false); } }
public void InitializeClient(NetworkManager networkMngr,bool DesktopSharing) { try { if(appServer!=null) { appServer.Terminate(); } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeClient(NetworkManager networkMngr,bool DesktopSharing) if(appServer!=null) {appServer.Terminate();}",ex,"",false); } try { if(sendingThread!=null) { if(sendingThread.IsAlive) { sendingThread.Abort(); } } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeClient(NetworkManager networkMngr,bool DesktopSharing) if(sendingThread.IsAlive){sendingThread.Abort();}",ex,"",false); } try { lblINfo.Visible = false; btnShare.Visible = false; bIsServer = false; appServer = new AppSharing(false); appServer.OnDataAvilable +=new OnDataAvilableDelegate(appServer_OnDataAvilable); appServer.OnDataAvilableEx +=new OnDataAvilableDelegateEx(appServer_OnDataAvilableEx); network = networkMngr; isDesktopSharing = DesktopSharing; //appServer.isWaitingPic = true; if(!DesktopSharing) { whiteBoard = new WebMeetingDrawingBoard.WhiteboardControl(); whiteBoard.IsAppSharingWindow = true; whiteBoard.InitializeToSize(400,400); whiteBoard.Dock = DockStyle.Fill; whiteBoard.BringToFront(); this.Controls.Add(whiteBoard); pictureBox1.Visible = false; whiteBoard.Visible = true; whiteBoard.nSessionId = this.nSessionID; _mouseThread = new Thread(new ThreadStart(this.MouseThreadFunction)); _mouseThread.Start(); _mouseThread.Name = "Application Sharing Mouse Movement Thread"; } if(isDesktopSharing) { appServer.bIsDesktopSharing = true; //listView1.Visible = false; //pictureBox1.Visible = true; this.bSendActivity = true; pictureBox1.OnKeyDownEvent += new DelegateKeyActivity(pictureBox1_OnKeyDownEvent); pictureBox1.OnKeyUpEvent += new DelegateKeyActivity(pictureBox1_OnKeyUpEvent); //pictureBox1.OnKeyPressEvent +=new DelegateKeyPress(pictureBox1_OnKeyPressEvent); //if(networkMngr.profile.clientType == ClientType.ClientHost) // attendee or presenter can not remote control to host(can not changes of host desktop) { sendingThread = new Thread(new ThreadStart(SendingFunction)); sendingThread.Start(); sendingThread.Name = "Desktop Sharing Sending Thread"; // check for remote contorl KeyboardSendingThread = new Thread(new ThreadStart(this.KeyboardThreadFunction)); KeyboardSendingThread.Start(); KeyboardSendingThread.Name = "Keyboard sending thread"; } } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void InitializeClient(NetworkManager networkMngr,bool DesktopSharing)",ex,"",false); } }
public static NetworkManager getInstance_() { if(thisInstance == null) { thisInstance = new NetworkManager(); } return thisInstance; }
public static NetworkManager getInstance() { if(thisInstance == null) { thisInstance = new NetworkManager(); thisInstance.profile = new ClientProfile(); } return thisInstance; }