<commit_before>/*
	Alphora Dataphor
	 Copyright 2000-2008 Alphora
	This file is licensed under a modified BSD-license which can be found here: http://dataphor.org/dataphor_license.txt
*/

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Text;

#if TRACEHANDLECOLLECTOR 
using System.Reflection;
using System.Diagnostics;
#endif

using Alphora.Dataphor.BOP;
using Alphora.Dataphor.DAE;
using Alphora.Dataphor.DAE.Client;
using Alphora.Dataphor.Dataphoria.ObjectTree;
using Alphora.Dataphor.Dataphoria.Designers;
using Alphora.Dataphor.Dataphoria.Services;
using Alphora.Dataphor.Frontend.Client;
using Alphora.Dataphor.Frontend.Client.Windows;
using WeifenLuo.WinFormsUI.Docking;
using Alphora.Dataphor.Dataphoria.ObjectTree.Nodes;
using Alphora.Dataphor.DAE.Server;

namespace Alphora.Dataphor.Dataphoria
{
    public partial class Dataphoria : Form, IDataphoria
    {
        public const string CConfigurationFileName = "Dataphoria{0}.config";

        public Dataphoria()
		{
			InitializeComponent();

			ICSharpCode.TextEditor.Document.HighlightingManager.Manager.AddSyntaxModeFileProvider(new ICSharpCode.TextEditor.Document.FileSyntaxModeProvider(PathUtility.GetBinDirectory()));

			FServices.Add(typeof(DAE.Client.Controls.Design.IPropertyTextEditorService), new PropertyTextEditorService());

            FExplorer = new DataTree();
            FExplorer.AllowDrop = true;
            FExplorer.BorderStyle = BorderStyle.None;
            FExplorer.CausesValidation = false;
            FExplorer.HideSelection = false;
            FExplorer.ImageIndex = 0;
            FExplorer.ImageList = FTreeImageList;
            FExplorer.Name = "FExplorer";
            FExplorer.SelectedImageIndex = 0;
            FExplorer.ShowRootLines = false;            
            FExplorer.TabIndex = 1;
            FExplorer.HelpRequested += FExplorer_HelpRequested;
			FExplorer.Dataphoria = this;
			FExplorer.Select();
			
			FErrorListView = new ErrorListView();
            FErrorListView.OnErrorsAdded += ErrorsAdded;
            FErrorListView.OnWarningsAdded += WarningsAdded;

			FExplorer.Dock = DockStyle.Fill;
			FDockContentExplorer = new DockContent();
            FDockContentExplorer.Controls.Add(FExplorer);
            FDockContentExplorer.HideOnClose = true;
            FDockContentExplorer.TabText = "Dataphoria Explorer";
            FDockContentExplorer.Text = "DataTree Explorer - Dataphoria";
            FDockContentExplorer.ShowHint = DockState.DockLeft;

            FDockContentErrorListView = new DockContent();

            FErrorListView.Dock = DockStyle.Fill;
			FDockContentErrorListView.HideOnClose = true;
            FDockContentErrorListView.Controls.Add(FErrorListView);
            FDockContentErrorListView.TabText = "Dataphoria Error List";
            FDockContentErrorListView.Text = "Error List - Dataphoria";
            FDockContentErrorListView.ShowHint = DockState.DockBottomAutoHide;

            FDockContentExplorer.Show(this.FDockPanel);
            FDockContentErrorListView.Show(this.FDockPanel);

			LoadSettings();
		}

		protected override void OnClosing(CancelEventArgs AArgs)
		{
			// HACK: Something in the WinForms validation process is returning false.  We don't care so always make sure Cancel is false at the beginning of OnClosing
			AArgs.Cancel = false;
			base.OnClosing(AArgs);
		}

		private DataTree FExplorer;
		private ErrorListView FErrorListView;

		private DockContent FDockContentExplorer;
		private DockContent FDockContentErrorListView;

		#region Settings

		private Settings FSettings;
		public Settings Settings { get { return FSettings; } }

		// when the form state is saved when maximized, the restore size needs to be remembered
		private Rectangle FNormalBounds = Rectangle.Empty;<commit_msg>all DockXXXPortions now have a 240 pixel size<commit_after>/*
	Alphora Dataphor
	 Copyright 2000-2008 Alphora
	This file is licensed under a modified BSD-license which can be found here: http://dataphor.org/dataphor_license.txt
*/

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Text;

#if TRACEHANDLECOLLECTOR 
using System.Reflection;
using System.Diagnostics;
#endif

using Alphora.Dataphor.BOP;
using Alphora.Dataphor.DAE;
using Alphora.Dataphor.DAE.Client;
using Alphora.Dataphor.Dataphoria.ObjectTree;
using Alphora.Dataphor.Dataphoria.Designers;
using Alphora.Dataphor.Dataphoria.Services;
using Alphora.Dataphor.Frontend.Client;
using Alphora.Dataphor.Frontend.Client.Windows;
using WeifenLuo.WinFormsUI.Docking;
using Alphora.Dataphor.Dataphoria.ObjectTree.Nodes;
using Alphora.Dataphor.DAE.Server;

namespace Alphora.Dataphor.Dataphoria
{
    public partial class Dataphoria : Form, IDataphoria
    {
        public const string CConfigurationFileName = "Dataphoria{0}.config";

        public Dataphoria()
		{
			InitializeComponent();

			ICSharpCode.TextEditor.Document.HighlightingManager.Manager.AddSyntaxModeFileProvider(new ICSharpCode.TextEditor.Document.FileSyntaxModeProvider(PathUtility.GetBinDirectory()));

			FServices.Add(typeof(DAE.Client.Controls.Design.IPropertyTextEditorService), new PropertyTextEditorService());

            FExplorer = new DataTree();
            FExplorer.AllowDrop = true;
            FExplorer.BorderStyle = BorderStyle.None;
            FExplorer.CausesValidation = false;
            FExplorer.HideSelection = false;
            FExplorer.ImageIndex = 0;
            FExplorer.ImageList = FTreeImageList;
            FExplorer.Name = "FExplorer";
            FExplorer.SelectedImageIndex = 0;
            FExplorer.ShowRootLines = false;            
            FExplorer.TabIndex = 1;
            FExplorer.HelpRequested += FExplorer_HelpRequested;
			FExplorer.Dataphoria = this;
			FExplorer.Select();
			
			FErrorListView = new ErrorListView();
            FErrorListView.OnErrorsAdded += ErrorsAdded;
            FErrorListView.OnWarningsAdded += WarningsAdded;

			FExplorer.Dock = DockStyle.Fill;
			FDockContentExplorer = new DockContent();
            FDockContentExplorer.Controls.Add(FExplorer);
            FDockContentExplorer.HideOnClose = true;
            FDockContentExplorer.TabText = "Dataphoria Explorer";
            FDockContentExplorer.Text = "DataTree Explorer - Dataphoria";
            FDockContentExplorer.ShowHint = DockState.DockLeft;

            FDockContentErrorListView = new DockContent();

            FErrorListView.Dock = DockStyle.Fill;
			FDockContentErrorListView.HideOnClose = true;
            FDockContentErrorListView.Controls.Add(FErrorListView);
            FDockContentErrorListView.TabText = "Dataphoria Error List";
            FDockContentErrorListView.Text = "Error List - Dataphoria";
            FDockContentErrorListView.ShowHint = DockState.DockBottomAutoHide;

            FDockContentExplorer.Show(this.FDockPanel);
            FDockContentErrorListView.Show(this.FDockPanel);


			FDockPanel.DockLeftPortion = 240;
        	FDockPanel.DockRightPortion = 240;
        	FDockPanel.DockTopPortion = 240;
        	FDockPanel.DockBottomPortion = 240;


			LoadSettings();
		}

		protected override void OnClosing(CancelEventArgs AArgs)
		{
			// HACK: Something in the WinForms validation process is returning false.  We don't care so always make sure Cancel is false at the beginning of OnClosing
			AArgs.Cancel = false;
			base.OnClosing(AArgs);
		}

		private DataTree FExplorer;
		private ErrorListView FErrorListView;

		private DockContent FDockContentExplorer;
		private DockContent FDockContentErrorListView;

		#region Settings

		private Settings FSettings;
		public Settings Settings { get { return FSettings; } }

		// when the form state is saved when maximized, the restore size needs to be remembered
		private Rectangle FNormalBounds = Rectangle.Empty;
{'fraction_non_alphanumeric': 0.07590800552972225, 'fraction_numerical': 0.00490134472791253, 'mean_word_length': 3.5344729344729346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5980386', 'n_tokens_mistral': 2532, 'n_tokens_neox': 2298, 'n_words': 478}