示例#1
0
        public MDITabbed()
        {
            
            InitializeComponent();

            DockPanel dockPanel = new DockPanel();
            dockPanel.Dock = DockStyle.Fill;
            dockPanel.BackColor = Color.Beige;
            Controls.Add(dockPanel);
            //dockPanel.AllowEndUserNestedDocking = false;
            dockPanel.AllowEndUserDocking = false;
            dockPanel.BringToFront();

            Form1 form = new Form1();
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            form.MinimizeBox = false;
            form.Show(dockPanel);

            form3 = new Form1();
            form3.Text = "Form 3";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            form3.MinimizeBox = false;
            form3.Show(dockPanel);
            form3.Select();


            frmMed = new frmMedicine();
            frmMed.Text = "Medicine";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            frmMed.MinimizeBox = false;
            frmMed.Show(dockPanel);
            frmMed.Select();

            frmFig = new frmFigure();
            frmFig.Text = "Figure";
            //form.AllowEndUserDocking = false;
            //form.WindowState = FormWindowState.Maximized;
            frmFig.MinimizeBox = false;
            frmFig.Show(dockPanel);
            frmFig.Select();

            
            Form1 form2 = new Form1(); ;
            form2.ShowHint = DockState.DockLeft;
            form2.AllowEndUserDocking = false;
            form2.CloseButton = false;
            form2.IsFloat = false;
            form2.CloseButtonVisible = false;
            form2.Show(dockPanel);
            dockPanel.Select();
            //form2.Select();
            //MessageBox.Show(dockPanel.Panes.Count.ToString());
        }
示例#2
0
 public MainForm()
 {
     InitializeComponent();
     m_dockPanel = new DockPanel();
     m_dockPanel.ActiveAutoHideContent = null;
     m_dockPanel.Dock = DockStyle.Fill;
     m_dockPanel.Name = "dockPanel";
     Controls.Add(m_dockPanel);
     m_dockPanel.BringToFront();
 }
        public ScriptEditor( )
        {
            InitializeComponent( );

            _dockPanel = new DockPanel( );
            _dockPanel.Dock = DockStyle.Fill;
            _dockPanel.BackColor = System.Drawing.Color.DarkGray;
            _dockPanel.DocumentStyle = DocumentStyle.DockingWindow;
            Controls.Add( _dockPanel );
            _dockPanel.BringToFront( );

            _scripts = new Dictionary<string,ScriptDocument>( );
            _errors = new ScriptErrorsDock( );
            _errors.Show( _dockPanel );

            _btnCompile.Click += new EventHandler( Global.MainWindow.CompileScripts_Click );
        }
示例#4
0
        public LeagueManager()
        {
            dbEngine = new DBEngine();
            Form frm = new SplashForm();

            Cursor = Cursors.WaitCursor;

            frm.Show();
            frm.Update();

            System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch() ;

            watch.Start();
            league = dbEngine.LoadLeague3(1);
            watch.Stop();

            MessageBox.Show(watch.Elapsed.ToString());

            InitializeComponent();

            frm.Hide();
            Cursor = Cursors.Default;

            //InitializeComponent();

            DockPanel dockPanel = new DockPanel();
            dockPanel.Dock = DockStyle.Fill;
            dockPanel.BackColor = Color.Beige;
            Controls.Add(dockPanel);
            dockPanel.BringToFront();

            leagueForm = new LeagueListForm();
            leagueForm.ShowHint = DockState.Document;
            leagueForm.Show(dockPanel);

            playerForm = new PlayerListForm();
            playerForm.ShowHint = DockState.Document;
            playerForm.Show(dockPanel);

            teamForm = new TeamListForm();
            teamForm.ShowHint = DockState.Document;
            teamForm.Show(dockPanel);
        }
示例#5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Constructor.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public ObjectBrowser()
		{
			InitializeComponent();

			m_statuslabel.Text = string.Empty;
			m_sblblLoadTime.Text = string.Empty;
			m_appCaption = Text;

			m_dockPanel = new DockPanel();
			m_dockPanel.Dock = DockStyle.Fill;
			m_dockPanel.DefaultFloatWindowSize = new Size(600, 600);
			m_dockPanel.ActiveDocumentChanged += m_dockPanel_ActiveDocumentChanged;
			m_dockPanel.ContentRemoved += DockPanelContentRemoved;
			m_dockPanel.ContentAdded += DockPanelContentAdded;
			Controls.Add(m_dockPanel);
			m_dockPanel.BringToFront();

			m_ruFiles = new List<string>();
			for (int i = 1; i <= 9; i++)
				m_ruFiles.Add(Properties.Settings.Default["RUFile" + i] as string);

			BuildRecentlyUsedFilesMenus();
		}
示例#6
0
		public MainForm()
		{
			instance = this;

			//NeoAxis initialization
			EngineApp.ConfigName = "user:Configs/WinFormsMultiViewAppExample.config";
			if( !WinFormsAppWorld.InitWithoutCreation( 
				new MultiViewAppEngineApp( EngineApp.ApplicationTypes.Simulation ),
				"user:Logs/WinFormsMultiViewAppExample.log", true, null, null, null, null ) )
			{
				Close();
				return;
			}

			EngineApp.Instance.Config.RegisterClassParameters( typeof( MainForm ) );

			//print information logs to the Output panel.
			Log.Handlers.InfoHandler += delegate( string text, ref bool dumpToLogFile )
			{
				if( outputForm != null )
					outputForm.Print( text );
			};

			//show splash screen
			if( showSplashScreenAtStartup && !Debugger.IsAttached )
			{
				Image image = WinFormsMultiViewAppExample.Properties.Resources.ApplicationSplash;
				SplashForm splashForm = new SplashForm( image );
				splashForm.Show();
			}

			InitializeComponent();

			//restore window state
			if( showMaximized )
			{
				Screen screen = Screen.FromControl( this );
				if( screen.Primary )
					WindowState = FormWindowState.Maximized;
			}
			else
			{
				Size = new Size( startWindowSize.X, startWindowSize.Y );
			}

			SuspendLayout();

			dockPanel = new DockPanel();
			dockPanel.Visible = false;
			dockPanel.Parent = this;
			dockPanel.Dock = DockStyle.Fill;
			dockPanel.Name = "dockPanel";
			dockPanel.BringToFront();

			//create dock forms
			entityTypesForm = new EntityTypesForm();
			dockForms.Add( entityTypesForm );
			propertiesForm = new PropertiesForm();
			dockForms.Add( propertiesForm );
			outputForm = new OutputForm();
			dockForms.Add( outputForm );
			example3DViewForm = new Example3DViewForm();
			dockForms.Add( example3DViewForm );

			menuStrip.Visible = false;
			toolStripGeneral.Visible = false;

			ResumeLayout();
		}
示例#7
0
        /// <summary>
        /// setup the parent form. This 
        /// occurs when the main form becomes available
        /// </summary>
        public void OnImportsSatisfied()
        {
            MainDockPanel = new DockPanel();
            MainDockPanel.Parent = Shell; //using the static variable
            MainDockPanel.Dock = DockStyle.Fill;
            MainDockPanel.BringToFront();
            MainDockPanel.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi;

            //setup the events
            MainDockPanel.ActiveDocumentChanged += new EventHandler(MainDockPanel_ActiveDocumentChanged);
        }
        private void InitializeDocking()
        {
            Controls.Remove(MainSplitter);

            WindowHolder.Dock = DockStyle.Fill;
            StyleDrawer.Dock = DockStyle.Fill;
            _styleContent = new DockContent { Text = @"WindowStyle Preview" };
            _styleContent.Controls.Add(WindowHolder);
            _styleContent.Controls.Add(StyleStatusStrip);
            _styleContent.Controls.Add(StyleToolStrip);
            StyleStatusStrip.SendToBack();
            StyleToolStrip.BringToFront();

            _imageContent = new DockContent { Text = @"WindowStyle Image Editor" };
            _imageContent.Controls.Add(StyleDrawer);
            _styleContent.CloseButtonVisible = _imageContent.CloseButtonVisible = false;

            _styleDockPanel = new DockPanel { Dock = DockStyle.Fill, DocumentStyle = DocumentStyle.DockingWindow };
            if (File.Exists("WindowEditor.xml"))
            {
                DeserializeDockContent dc = GetContent;
                _styleDockPanel.LoadFromXml("WindowEditor.xml", dc);
            }
            else
            {
                _styleContent.Show(_styleDockPanel, DockState.Document);
                _imageContent.Show(_styleContent.Pane, DockAlignment.Bottom, 0.40);
            }

            Controls.Add(_styleDockPanel);
            _styleDockPanel.BringToFront();
        }
        private void InitDockLayout( )
        {
            _dockPanel = new DockPanel( );
            _dockPanel.Dock = DockStyle.Fill;
            _dockPanel.BackColor = System.Drawing.Color.DarkGray;
            _dockPanel.ActiveDocumentChanged += new EventHandler( _dockPanel_ActiveDocumentChanged );
            Controls.Add( _dockPanel );
            _dockPanel.BringToFront( );

            _assets = new AssetsBrowserWindow( this );
            _properties = new PropertiesDock( );
            _layers = new LayersDock( );
            _tools = new ToolsDock( );
            _scriptEditor = new ScriptEditor( );
        }