Beispiel #1
0
        private void otherWBRoomsLB_ItemCheck(object sender, ItemCheckEventArgs e)
        {
            string room_name = otherWBRoomsLB.Items[e.Index].ToString();

            if ((room_name == null) || (room_name.Length == 0) ||
                (WBRoom == null))
            {
                return;
            }

            if (e.NewValue == CheckState.Checked)
            {
                WhiteboardRoom otherWBRoom = null;
                lock (otherWBRoomLock)
                {
                    if (otherWBRooms.ContainsKey(room_name))
                    {
                        otherWBRoom = otherWBRooms[room_name];
                        WBRoom.AddOtherRoom(room_name, otherWBRoom);
                    }
                }
            }
            else if (e.NewValue == CheckState.Unchecked)
            {
                WBRoom.RemoveOtherRoom(room_name);
            }
        }
Beispiel #2
0
        public void AddOtherRoom(string room_name, WhiteboardRoom wbRoom)
        {
            // Add the room to the checkbox list
            otherWBRoomsLB.Items.Add(room_name);

            // Add a link to this whiteboard room
            lock (otherWBRoomLock)
            {
                if (!otherWBRooms.ContainsKey(room_name))
                {
                    otherWBRooms.Add(room_name, wbRoom);
                }
            }
        }
Beispiel #3
0
        public WhiteboardDialog(Form mainForm, GUIController controller, WhiteboardRoom wbRoom)
        {
            InitializeComponent();
            if (controller == null)
            {
                throw new ArgumentNullException("Cannot pass a null GUIController");
            }
            _MainForm   = mainForm;
            _Controller = controller;
            WBRoom      = wbRoom;
            this.Dock   = DockStyle.Fill;

            if (WBRoom != null)
            {
                wbColorB.BackColor   = Color.FromArgb(WBRoom.DrawColor);
                wbRoom.DrawPointSize = wbPointSize.Value;
            }

            // Turn off the gradient in toolstrip
            ProfessionalColorTable professionalColorTable = new ProfessionalColorTable();

            professionalColorTable.UseSystemColors = true;
            toolStrip1.Renderer = new ToolStripProfessionalRenderer(professionalColorTable);

            // Set the default image for tool button drop down
            if (WBRoom != null)
            {
                SetWhiteboardToolImage(WBRoom.DrawMode);
            }

            // Setup tooltips
            wbTooltip.SetToolTip(textDD, "Enter text for use in text or line drawing control");
            wbTooltip.SetToolTip(wbColorB, "Click to choose drawing color");
            wbTooltip.SetToolTip(wbPointSize, "Use to set size for drawing objects or text");
            wbTooltip.SetToolTip(undoB, "Click to undo your last drawing operation");
            wbTooltip.SetToolTip(clearB, "Click to clear all of your drawing in this Whiteboard room");
            wbTooltip.SetToolTip(clearAllB, "Click to clear entire Whiteboard room");
            wbTooltip.SetToolTip(playerListDD, "Select a player to synchronize your map view with");
            wbTooltip.SetToolTip(viewUndoB, "Revert to your previous view");
            wbTooltip.SetToolTip(otherWBRoomsLB, "Select additional Whiteboard rooms to overlay with this room");
        }