Ejemplo n.º 1
0
        private void ViewMiniMap_Click(object sender, System.EventArgs e)
        {
            if (miniMap == null)
            {
                miniMap = new ChildWindows.MiniMap();
            }
            else
            {
                Log.Error("Only one minimap allowed.");
                return;
            }
            //miniMap.Show();
            Content mapWindow = DockingManager.Contents.Add(miniMap, "Mini Map");

            DockingManager.AddContentWithState(mapWindow, State.Floating);
            //Game.CurrentWorld.MiniMapTarget = miniMap.RenderTarget;
        }
Ejemplo n.º 2
0
		private void ViewMiniMap_Click(object sender, System.EventArgs e) {
			if ( miniMap == null ) {
				miniMap = new ChildWindows.MiniMap();
			} else {
				Log.Error( "Only one minimap allowed." );
				return;
			}
			//miniMap.Show();
			Content mapWindow = DockingManager.Contents.Add(miniMap, "Mini Map");
			DockingManager.AddContentWithState(mapWindow, State.Floating);
			//Game.CurrentWorld.MiniMapTarget = miniMap.RenderTarget;
		}
Ejemplo n.º 3
0
		private void Load_Form(object sender, System.EventArgs e)
		{
			#region Magic Controls workarounds

			// Setting this using designer causes a Code Generation Error
			MainTabs.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument;
			// Setting this using designer appears to have no affect
			MainTabs.IDEPixelBorder = true;

			// Order is important for docking to work.  This isn't really a Magic Controls
			// issue, but related to how Winforms processes docking events.
			// Since InitializeComponent is GENERATED code, the form control collection gets cleared
			// and then the controls are added in the correct order;
			this.Controls.Clear();

			this.Controls.Add(MainTabs);
			this.Controls.Add(MainStatus);
			this.Controls.Add(MainMenu);
			
			#endregion

			#region Magic Controls Initialisation

			DockingManager = new DockingManager(this, VisualStyle.IDE);
			
			DockingManager.InnerControl = MainTabs;
			DockingManager.OuterControl = MainStatus;

			#endregion

			#region Our Initialisation
			CurrentChannelManager = new Channels.ChannelManager(DockingManager);
			
			#region RenderContainer

			RenderTarget.Left = GameTab.Left;
			RenderTarget.Top = GameTab.Top;
			RenderTarget.Height = GameTab.Height;
			RenderTarget.Width = GameTab.Width;

			#endregion

			#region Add our windows


			// Connection
//			Content connectionWindow = DockingManager.Contents.Add(new ChildWindows.Connection(), "Connection", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Connection);
//			connectionWindow.DisplaySize = new Size(200, GameTab.Height);
//			connectionWindow.CaptionBar = true;
//			connectionWindow.CloseButton = false;
//			DockingManager.AddContentWithState(connectionWindow, State.DockLeft);
			// Log
			Content logWindow = DockingManager.Contents.Add(new ChildWindows.Log(), "Log", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Log);
			DockingManager.AddContentWithState(logWindow, State.DockBottom);
			// Who
			Content whoWindow = DockingManager.Contents.Add(new ChildWindows.WhoList(), "Who's online", Icons.IconManager.GlobalImageList,-1);
			DockingManager.AddContentWithState(whoWindow, State.DockRight);
			// Command
			Content commandWindow = DockingManager.Contents.Add(new ChildWindows.Command(), "Command", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Command);
			DockingManager.AddContentWithState(commandWindow, State.DockBottom);
			// Chat
			Content chatWindow = DockingManager.Contents.Add(new ChildWindows.Chat(), "Chat", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Chat);
			DockingManager.AddContentWithState(chatWindow, State.DockBottom);
			// MiniMap
			miniMap = new ChildWindows.MiniMap();
			Content mapWindow = DockingManager.Contents.Add(miniMap, "Mini Map", Icons.IconManager.GlobalImageList,-1);
			DockingManager.AddContentWithState(mapWindow, State.DockBottom);

			
			
			this.Navigate("http://www.strive3d.net");


			#endregion

			loadSettings();

			#region Events
			RenderTarget.LostFocus += new EventHandler( RenderTarget_LostFocus );
			RenderTarget.Click += new EventHandler( RenderTarget_Click );
			#endregion


			#endregion		
		}
Ejemplo n.º 4
0
        private void Load_Form(object sender, System.EventArgs e)
        {
            #region Magic Controls workarounds

            // Setting this using designer causes a Code Generation Error
            MainTabs.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument;
            // Setting this using designer appears to have no affect
            MainTabs.IDEPixelBorder = true;

            // Order is important for docking to work.  This isn't really a Magic Controls
            // issue, but related to how Winforms processes docking events.
            // Since InitializeComponent is GENERATED code, the form control collection gets cleared
            // and then the controls are added in the correct order;
            this.Controls.Clear();

            this.Controls.Add(MainTabs);
            this.Controls.Add(MainStatus);
            this.Controls.Add(MainMenu);

            #endregion

            #region Magic Controls Initialisation

            DockingManager = new DockingManager(this, VisualStyle.IDE);

            DockingManager.InnerControl = MainTabs;
            DockingManager.OuterControl = MainStatus;

            #endregion

            #region Our Initialisation
            CurrentChannelManager = new Channels.ChannelManager(DockingManager);

            #region RenderContainer

            RenderTarget.Left   = GameTab.Left;
            RenderTarget.Top    = GameTab.Top;
            RenderTarget.Height = GameTab.Height;
            RenderTarget.Width  = GameTab.Width;

            #endregion

            #region Add our windows


            // Connection
//			Content connectionWindow = DockingManager.Contents.Add(new ChildWindows.Connection(), "Connection", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Connection);
//			connectionWindow.DisplaySize = new Size(200, GameTab.Height);
//			connectionWindow.CaptionBar = true;
//			connectionWindow.CloseButton = false;
//			DockingManager.AddContentWithState(connectionWindow, State.DockLeft);
            // Log
            Content logWindow = DockingManager.Contents.Add(new ChildWindows.Log(), "Log", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Log);
            DockingManager.AddContentWithState(logWindow, State.DockBottom);
            // Who
            Content whoWindow = DockingManager.Contents.Add(new ChildWindows.WhoList(), "Who's online", Icons.IconManager.GlobalImageList, -1);
            DockingManager.AddContentWithState(whoWindow, State.DockRight);
            // Command
            Content commandWindow = DockingManager.Contents.Add(new ChildWindows.Command(), "Command", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Command);
            DockingManager.AddContentWithState(commandWindow, State.DockBottom);
            // Chat
            Content chatWindow = DockingManager.Contents.Add(new ChildWindows.Chat(), "Chat", Icons.IconManager.GlobalImageList, (int)Icons.AvailableIcons.Chat);
            DockingManager.AddContentWithState(chatWindow, State.DockBottom);
            // MiniMap
            miniMap = new ChildWindows.MiniMap();
            Content mapWindow = DockingManager.Contents.Add(miniMap, "Mini Map", Icons.IconManager.GlobalImageList, -1);
            DockingManager.AddContentWithState(mapWindow, State.DockBottom);



            this.Navigate("http://www.strive3d.net");


            #endregion

            loadSettings();

            #region Events
            RenderTarget.LostFocus += new EventHandler(RenderTarget_LostFocus);
            RenderTarget.Click     += new EventHandler(RenderTarget_Click);
            #endregion


            #endregion
        }