Пример #1
0
        /* ***********************************************************
        *	BuildMenuTree (IList myMenu, MainMenu parentMenu)
        *  BuildMenuTree (IList myMenu, ContextMenu parentMenu, NiceMenuClickEvent yourClickFunction)
        * -----------------------------------------------------------
        *  build the new main menus and delete the old ones
        * ***********************************************************/
        private void BuildMenuTree(IList myMenu, MainMenu parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            int numOldMenu = myMenu.Count;

            foreach (MenuItem myMenuItem in myMenu)
            {
                NiceMenu newMainMenu = new NiceMenu(myMenuItem.Text);
                parentMenu.MenuItems.Add(newMainMenu);

                if (myModifyNiceMenu[contModify] == null)
                {
                    myModifyNiceMenu[contModify] = newMainMenu;
                    contModify++;
                }

                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newMainMenu, yourClickFunction);
                }
            }
            // Now I have to delete the old menus
            for (int i = 0; i < numOldMenu; i++)
            {
                parentMenu.MenuItems.RemoveAt(0);
            }
        }
Пример #2
0
        /* ****************************************************
        *	With the context menu I need the yourClickFunction
        *	because also the main menu shall be clickable !
        * ****************************************************/
        private void BuildMenuTree(IList myMenu, ContextMenu parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            int numOldMenu = myMenu.Count;

            foreach (MenuItem myMenuItem in myMenu)
            {
                // Declaration
                NiceMenu newMainMenu;

                string IndexImage   = "";
                bool   AddMenuImage = false;

                /* If in the first two characters of the menu item text
                 * there is a number I set AddMenuImage = true and the
                 * IndexImage to get the icon in the image list control. */
                if (myMenuItem.Text.Length > 2)
                {
                    IndexImage = myMenuItem.Text.Substring(0, 2);
                    if (Char.IsNumber(IndexImage, 1) == true)
                    {
                        AddMenuImage = true;
                        // I have to delete first two characters
                        myMenuItem.Text = myMenuItem.Text.Substring(2);
                    }
                }
                if (AddMenuImage == true)
                {
                    newMainMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut, MenuImages.Images[Convert.ToInt32(IndexImage)]);
                }
                else
                {
                    newMainMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut);
                }

                parentMenu.MenuItems.Add(newMainMenu);

                if (myModifyContextNiceMenu[contModifyContext] == null)
                {
                    myModifyContextNiceMenu[contModifyContext] = newMainMenu;
                    contModifyContext++;
                }

                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newMainMenu, yourClickFunction);
                }
            }
            // Now I have to delete the old menus
            for (int i = 0; i < numOldMenu; i++)
            {
                parentMenu.MenuItems.RemoveAt(0);
            }
        }
Пример #3
0
		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);
			}			
		}
Пример #4
0
        public void AddSaveMenus()
        {
            try
            {
                Utility.NiceMenu.NiceMenu parentMenu = Client.ClientUI.getInstance().myNiceMenu.SearchNiceMenuItem("Document");
                if(parentMenu != null)
                {
                    myMenu = new Utility.NiceMenu.NiceMenu();
                    myMenu.Click += new EventHandler(mNewMenuDocuments_Click);
                    myMenu.Text = documentTitle;
                    parentMenu.MenuItems.Add(myMenu);
                }

                //add menu to save as
                parentMenu = Client.ClientUI.getInstance().myNiceMenu.SearchNiceMenuItem("Document",2);
                if(parentMenu != null)
                {
                    myMenu = new Utility.NiceMenu.NiceMenu();
                    myMenu.Click += new EventHandler(mNewMenuDocumentsSaveAs_Click);
                    myMenu.Text = documentTitle ;

                    parentMenu.MenuItems.Add(myMenu);
                }

                try
                {
                    //add menu to Print
                    parentMenu = Client.ClientUI.getInstance().myNiceMenu.SearchNiceMenuItem("Document",3);
                    if(parentMenu != null)
                    {
                        myMenu = new Utility.NiceMenu.NiceMenu();
                        myMenu.Click += new EventHandler(this.printMenu_Click);
                        myMenu.Text = documentTitle ;

                        parentMenu.MenuItems.Add(myMenu);
                    }
                }
                catch(Exception exp)
                {
                    WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("documentSharingControl.cs ==>AddSaveMenus() line==> 437",exp,null,false);
                    //MeetingAlerts alert=new MeetingAlerts();
                    //alert.ShowMessage(Alerts.MeetingAlerts.AlertType.NonFatal,this.Name + " Class : AddSaveMenus() function ," + ee.Source + " Source ," + ee.Message ,true,false);
                    //MessageBox.Show(this.Name + " Class : AddSaveMenus() function ," + ee.Source + " Source ," + ee.Message  );
                }

            }
            catch(Exception exp)
            {
                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("documentSharingControl.cs ==>AddSaveMenus() line==> 446",exp,null,false);
                //MeetingAlerts alert=new MeetingAlerts();
                //alert.ShowMessage(Alerts.MeetingAlerts.AlertType.NonFatal,this.Name + " Class : AddSaveMenus() function ," + ee.Source + " Source ," + ee.Message ,true,false);
                ////MessageBox.Show(this.Name + " Class : AddSaveMenus() function ," + ee.Source + " Source ," + ee.Message  );
            }
        }
Пример #5
0
        /* ***********************************************************
        *		BuildMenuTree (IList myMenu, MenuItem parentMenu)
        * -----------------------------------------------------------
        *		build the new submenu item
        * ***********************************************************/
        private void BuildMenuTree(IList myMenu, MenuItem parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            foreach (MenuItem myMenuItem in myMenu)
            {
                // Declaration
                NiceMenu newSubMenu;

                string IndexImage   = "";
                bool   AddMenuImage = false;

                /* If in the first two characters of the menu item text
                 * there is a number I set AddMenuImage = true and the
                 * IndexImage to get the icon in the image list control. */
                if (myMenuItem.Text.Length > 2)
                {
                    IndexImage = myMenuItem.Text.Substring(0, 2);
                    if (Char.IsNumber(IndexImage, 1) == true)
                    {
                        AddMenuImage = true;
                        // I have to delete first two characters
                        myMenuItem.Text = myMenuItem.Text.Substring(2);
                    }
                }
                if (AddMenuImage == true)
                {
                    newSubMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut, MenuImages.Images[Convert.ToInt32(IndexImage)]);
                }
                else
                {
                    newSubMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut);
                }
                // I add the new menu item to its parent
                parentMenu.MenuItems.Add(newSubMenu);
                // Checked
                if (myMenuItem.Checked == true)
                {
                    newSubMenu.Checked = true;
                }
                // RadioCheck
                if (myMenuItem.RadioCheck == true)
                {
                    if (myMenuItem.Checked == true)
                    {
                        newSubMenu.RadioCheck = true;
                    }
                }
                // DefaultItem
                if (myMenuItem.DefaultItem == true)
                {
                    newSubMenu.DefaultItem = true;
                }
                // Enabled
                if (myMenuItem.Enabled == false)
                {
                    newSubMenu.Enabled = false;
                }
                // If this menu item contains child menu items
                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newSubMenu, yourClickFunction);
                }
            }
        }
Пример #6
0
        /* ****************************************************
         *	With the context menu I need the yourClickFunction
         *	because also the main menu shall be clickable !
         * ****************************************************/
        private void BuildMenuTree(IList myMenu, ContextMenu parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            int numOldMenu = myMenu.Count;

            foreach (MenuItem myMenuItem in myMenu)
            {
                // Declaration
                NiceMenu newMainMenu;

                string IndexImage = "";
                bool AddMenuImage = false;

                /* If in the first two characters of the menu item text
                 * there is a number I set AddMenuImage = true and the
                 * IndexImage to get the icon in the image list control. */
                if (myMenuItem.Text.Length > 2)
                {
                    IndexImage = myMenuItem.Text.Substring(0,2);
                    if (Char.IsNumber(IndexImage,1) == true)
                    {
                        AddMenuImage = true;
                        // I have to delete first two characters
                        myMenuItem.Text = myMenuItem.Text.Substring(2);
                    }
                }
                if (AddMenuImage == true)
                    newMainMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut, MenuImages.Images[Convert.ToInt32(IndexImage)]);
                else
                    newMainMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut);

                parentMenu.MenuItems.Add(newMainMenu);

                if (myModifyContextNiceMenu[contModifyContext] == null)
                {
                    myModifyContextNiceMenu[contModifyContext] = newMainMenu;
                    contModifyContext ++;
                }

                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newMainMenu, yourClickFunction);
                }
            }
            // Now I have to delete the old menus
            for (int i=0;i<numOldMenu;i++)
            {   parentMenu.MenuItems.RemoveAt(0);   }
        }
Пример #7
0
        /* ***********************************************************
         *	BuildMenuTree (IList myMenu, MainMenu parentMenu)
         *  BuildMenuTree (IList myMenu, ContextMenu parentMenu, NiceMenuClickEvent yourClickFunction)
         * -----------------------------------------------------------
         *  build the new main menus and delete the old ones
         * ***********************************************************/
        private void BuildMenuTree(IList myMenu, MainMenu parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            int numOldMenu = myMenu.Count;

            foreach (MenuItem myMenuItem in myMenu)
            {
                NiceMenu newMainMenu = new NiceMenu(myMenuItem.Text);
                parentMenu.MenuItems.Add(newMainMenu);

                if (myModifyNiceMenu[contModify] == null)
                {
                    myModifyNiceMenu[contModify] = newMainMenu;
                    contModify ++;
                }

                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newMainMenu, yourClickFunction);
                }
            }
            // Now I have to delete the old menus
            for (int i=0;i<numOldMenu;i++)
            {   parentMenu.MenuItems.RemoveAt(0);   }
        }
Пример #8
0
        /* ***********************************************************
         *		BuildMenuTree (IList myMenu, MenuItem parentMenu)
         * -----------------------------------------------------------
         *		build the new submenu item
         * ***********************************************************/
        private void BuildMenuTree(IList myMenu, MenuItem parentMenu, NiceMenuClickEvent yourClickFunction)
        {
            foreach (MenuItem myMenuItem in myMenu)
            {
                // Declaration
                NiceMenu newSubMenu;

                string IndexImage = "";
                bool AddMenuImage = false;

                /* If in the first two characters of the menu item text
                 * there is a number I set AddMenuImage = true and the
                 * IndexImage to get the icon in the image list control. */
                if (myMenuItem.Text.Length > 2)
                {
                    IndexImage = myMenuItem.Text.Substring(0,2);
                    if (Char.IsNumber(IndexImage,1) == true)
                    {
                        AddMenuImage = true;
                        // I have to delete first two characters
                        myMenuItem.Text = myMenuItem.Text.Substring(2);
                    }
                }
                if (AddMenuImage == true)
                    newSubMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut, MenuImages.Images[Convert.ToInt32(IndexImage)]);
                else
                    newSubMenu = new NiceMenu(myMenuItem.Text, new EventHandler(yourClickFunction), myMenuItem.Shortcut);
                // I add the new menu item to its parent
                parentMenu.MenuItems.Add(newSubMenu);
                // Checked
                if (myMenuItem.Checked == true) newSubMenu.Checked = true;
                // RadioCheck
                if (myMenuItem.RadioCheck == true)
                    if (myMenuItem.Checked == true) newSubMenu.RadioCheck = true;
                // DefaultItem
                if (myMenuItem.DefaultItem == true) newSubMenu.DefaultItem = true;
                // Enabled
                if (myMenuItem.Enabled == false) newSubMenu.Enabled = false;
                // If this menu item contains child menu items
                if (myMenuItem.IsParent == true)
                {
                    IList mySubMenu = new Menu.MenuItemCollection(myMenuItem);
                    BuildMenuTree(mySubMenu, newSubMenu, yourClickFunction);
                }
            }
        }
Пример #9
0
 private NiceMenu(MenuMerge mergeType, int mergeOrder, Shortcut shortcut, string name, EventHandler onClick, EventHandler onPopup, EventHandler onSelect, NiceMenu[] items)
     : base(mergeType, mergeOrder, shortcut, name, onClick, onPopup, onSelect, items)
 {
     OwnerDraw = true; UpdateColors();
 }
Пример #10
0
 private NiceMenu(string name, NiceMenu[] items)
     : base(name, items)
 {
     OwnerDraw = true; UpdateColors();
 }