Inheritance: System.ComponentModel.Component, ISupportInitialize, IFWDisposable
Example #1
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// -----------------------------------------------------------------------------------
        protected override void Dispose(bool fDisposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!fDisposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
            base.Dispose(fDisposing);

            if (fDisposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
                if (m_draftView != null)
                {
                    m_draftView.Dispose();
                }
                if (m_isNewCache && (m_cache != null))
                {
                    m_cache.Dispose();                     // Only if we made it.
                }
                if (m_Persistence != null)
                {
                    m_Persistence.Dispose();
                }
            }
            m_cache       = null;
            m_draftView   = null;
            m_styleSheet  = null;
            m_rootb       = null;
            m_Persistence = null;
        }
Example #2
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 /// -----------------------------------------------------------------------------------
 private void InitializeComponent()
 {
     this.components        = new FwContainer();
     this.m_Persistence     = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
     this.m_mainMenu        = new System.Windows.Forms.MainMenu(this.components);
     this.menuItem1         = new System.Windows.Forms.MenuItem();
     this.m_mnuInsertBook   = new System.Windows.Forms.MenuItem();
     this.m_mnuInsertBookOT = new System.Windows.Forms.MenuItem();
     this.m_mnuInsertBookNT = new System.Windows.Forms.MenuItem();
     ((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).BeginInit();
     this.SuspendLayout();
     //
     // m_Persistence
     //
     this.m_Persistence.Parent = this;
     //
     // m_mainMenu
     //
     this.m_mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.menuItem1
     });
     //
     // menuItem1
     //
     this.menuItem1.Index = 0;
     this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.m_mnuInsertBook
     });
     this.menuItem1.Text = "Insert";
     //
     // m_mnuInsertBook
     //
     this.m_mnuInsertBook.Index = 0;
     this.m_mnuInsertBook.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
         this.m_mnuInsertBookOT,
         this.m_mnuInsertBookNT
     });
     this.m_mnuInsertBook.Text = "Book";
     //
     // m_mnuInsertBookOT
     //
     this.m_mnuInsertBookOT.Index = 0;
     this.m_mnuInsertBookOT.Text  = "Old Testament";
     //
     // m_mnuInsertBookNT
     //
     this.m_mnuInsertBookNT.Index = 1;
     this.m_mnuInsertBookNT.Text  = "New Testament";
     //
     // DummyDraftViewForm
     //
     this.AutoScaleMode = AutoScaleMode.Font;
     this.ClientSize    = new System.Drawing.Size(292, 273);
     this.Menu          = this.m_mainMenu;
     this.Name          = "DummyDraftViewForm";
     this.Text          = "DummyDraftViewForm";
     ((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).EndInit();
     this.ResumeLayout(false);
 }
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 /// -----------------------------------------------------------------------------------
 private void InitializeComponent()
 {
     this.components    = new System.ComponentModel.Container();
     this.m_Persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).BeginInit();
     //
     // m_Persistence
     //
     this.m_Persistence.Parent = this;
     //
     // DummyFootnoteViewForm
     //
     this.AutoScaleMode = AutoScaleMode.Font;
     this.ClientSize    = new System.Drawing.Size(292, 273);
     this.Name          = "DummyFootnoteViewForm";
     this.Text          = "DummyFootnoteViewForm";
     ((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).EndInit();
 }
Example #4
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 /// -----------------------------------------------------------------------------------
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DummyPersistedFormWinDef));
     this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
     //
     // m_persistence
     //
     this.m_persistence.DefaultKeyPath = "Software\\SIL\\FwTest";
     this.m_persistence.Parent         = this;
     //
     // DummyPersistedFormWinDef
     //
     this.AccessibleDescription = ((string)(resources.GetObject("$this.AccessibleDescription")));
     this.AccessibleName        = ((string)(resources.GetObject("$this.AccessibleName")));
     this.Anchor            = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("$this.Anchor")));
     this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
     this.AutoScroll        = ((bool)(resources.GetObject("$this.AutoScroll")));
     this.AutoScrollMargin  = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
     this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
     this.BackgroundImage   = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
     this.ClientSize        = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
     this.Dock          = ((System.Windows.Forms.DockStyle)(resources.GetObject("$this.Dock")));
     this.Enabled       = ((bool)(resources.GetObject("$this.Enabled")));
     this.Font          = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
     this.Icon          = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.ImeMode       = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
     this.Location      = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
     this.MaximumSize   = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
     this.MinimumSize   = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
     this.Name          = "DummyPersistedFormWinDef";
     this.RightToLeft   = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
     this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
     this.Text          = resources.GetString("$this.Text");
     this.Visible       = ((bool)(resources.GetObject("$this.Visible")));
     ((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();
 }
Example #5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose( bool disposing )
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			base.Dispose(disposing);

			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
				if (m_FootnoteVc != null)
					m_FootnoteVc.Dispose();
			}
			m_FootnoteVc = null;
			m_Scripture = null;
			m_persistence = null;
			m_draftView = null;
			m_bookFilter = null;
		}
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(DummyPersistedFormWinDef));
			this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
			//
			// m_persistence
			//
			this.m_persistence.Parent = this;
			//
			// DummyPersistedFormWinDef
			//
			this.AutoScaleMode = AutoScaleMode.Font;
			this.AccessibleDescription = ((string)(resources.GetObject("$this.AccessibleDescription")));
			this.AccessibleName = ((string)(resources.GetObject("$this.AccessibleName")));
			this.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("$this.Anchor")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("$this.Dock")));
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "DummyPersistedFormWinDef";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.Visible = ((bool)(resources.GetObject("$this.Visible")));
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();

		}
Example #7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes the persistence thingy
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void InitializePersistence()
		{
			components = new Container();
			m_persistence = new Persistence(components);
			((ISupportInitialize)m_persistence).BeginInit();
			m_persistence.EnableSaveWindowSettings = false;
			m_persistence.Parent = this;
			m_persistence.SaveSettings += OnSaveSettings;
			m_persistence.LoadSettings += OnLoadSettings;
			((ISupportInitialize)m_persistence).EndInit();
		}
Example #8
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new FwContainer();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FwMainWnd));
			this.splitContainer = new SIL.FieldWorks.Common.Controls.FwSplitContainer();
			this.m_sideBarContainer = new System.Windows.Forms.Panel();
			this.m_infoBarContainer = new System.Windows.Forms.Panel();
			this.statusStrip = new System.Windows.Forms.StatusStrip();
			this.statusBarFwPanel1 = new System.Windows.Forms.ToolStripStatusLabel();
			this.ProgressPanel = new System.Windows.Forms.ToolStripProgressBar();
			this.statusBarFilterPanel = new System.Windows.Forms.ToolStripStatusLabel();
			this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			this.splitContainer.Panel1.SuspendLayout();
			this.splitContainer.Panel2.SuspendLayout();
			this.splitContainer.SuspendLayout();
			this.statusStrip.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
			this.SuspendLayout();
			//
			// splitContainer
			//
			this.splitContainer.DesiredFirstPanePercentage = 0F;
			resources.ApplyResources(this.splitContainer, "splitContainer");
			this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
			this.splitContainer.MaxFirstPanePercentage = 0F;
			this.splitContainer.Name = "splitContainer";
			//
			// splitContainer.Panel1
			//
			this.splitContainer.Panel1.Controls.Add(this.m_sideBarContainer);
			//
			// splitContainer.Panel2
			//
			this.splitContainer.Panel2.Controls.Add(this.m_infoBarContainer);
			this.splitContainer.PanelToActivate = this.splitContainer.Panel2;
			this.splitContainer.SettingsKey = null;
			//
			// m_sideBarContainer
			//
			resources.ApplyResources(this.m_sideBarContainer, "m_sideBarContainer");
			this.m_sideBarContainer.Name = "m_sideBarContainer";
			//
			// m_infoBarContainer
			//
			resources.ApplyResources(this.m_infoBarContainer, "m_infoBarContainer");
			this.m_infoBarContainer.Name = "m_infoBarContainer";
			//
			// statusStrip
			//
			this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
			this.statusBarFwPanel1,
			this.ProgressPanel,
			this.statusBarFilterPanel});
			resources.ApplyResources(this.statusStrip, "statusStrip");
			this.statusStrip.Name = "statusStrip";
			//
			// statusBarFwPanel1
			//
			this.statusBarFwPanel1.Name = "statusBarFwPanel1";
			resources.ApplyResources(this.statusBarFwPanel1, "statusBarFwPanel1");
			this.statusBarFwPanel1.Spring = true;
			//
			// ProgressPanel
			//
			this.ProgressPanel.Maximum = 5000;
			this.ProgressPanel.Name = "ProgressPanel";
			resources.ApplyResources(this.ProgressPanel, "ProgressPanel");
			this.ProgressPanel.Step = 500;
			//
			// statusBarFilterPanel
			//
			resources.ApplyResources(this.statusBarFilterPanel, "statusBarFilterPanel");
			this.statusBarFilterPanel.Name = "statusBarFilterPanel";
			//
			// m_persistence
			//
			this.m_persistence.Parent = this;
			this.m_persistence.SaveSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.SaveSettings);
			//
			// FwMainWnd
			//
			resources.ApplyResources(this, "$this");
			this.Controls.Add(this.splitContainer);
			this.Controls.Add(this.statusStrip);
			this.Name = "FwMainWnd";
			this.splitContainer.Panel1.ResumeLayout(false);
			this.splitContainer.Panel2.ResumeLayout(false);
			this.splitContainer.ResumeLayout(false);
			this.statusStrip.ResumeLayout(false);
			this.statusStrip.PerformLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();
			this.ResumeLayout(false);
			this.PerformLayout();

		}
Example #9
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FwChooserDlg));
			this.tvPossibilities = new SIL.FieldWorks.Common.Controls.ChooserTreeView();
			this.btnOk = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnHelp = new System.Windows.Forms.Button();
			this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			this.lblInfo = new System.Windows.Forms.Label();
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
			this.SuspendLayout();
			//
			// tvPossibilities
			//
			resources.ApplyResources(this.tvPossibilities, "tvPossibilities");
			this.tvPossibilities.ItemHeight = 16;
			this.tvPossibilities.Name = "tvPossibilities";
			//
			// btnOk
			//
			resources.ApplyResources(this.btnOk, "btnOk");
			this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.btnOk.Name = "btnOk";
			//
			// btnCancel
			//
			resources.ApplyResources(this.btnCancel, "btnCancel");
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCancel.Name = "btnCancel";
			//
			// btnHelp
			//
			resources.ApplyResources(this.btnHelp, "btnHelp");
			this.btnHelp.Name = "btnHelp";
			this.btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
			//
			// m_persistence
			//
			this.m_persistence.Parent = this;
			this.m_persistence.SaveSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.m_persistence_SaveSettings);
			this.m_persistence.LoadSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.m_persistence_LoadSettings);
			//
			// lblInfo
			//
			resources.ApplyResources(this.lblInfo, "lblInfo");
			this.lblInfo.AutoEllipsis = true;
			this.lblInfo.BackColor = System.Drawing.Color.Transparent;
			this.lblInfo.Name = "lblInfo";
			//
			// FwChooserDlg
			//
			this.AcceptButton = this.btnOk;
			resources.ApplyResources(this, "$this");
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.CancelButton = this.btnCancel;
			this.Controls.Add(this.lblInfo);
			this.Controls.Add(this.btnHelp);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOk);
			this.Controls.Add(this.tvPossibilities);
			this.DoubleBuffered = true;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FwChooserDlg";
			this.ShowIcon = false;
			this.ShowInTaskbar = false;
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();
			this.ResumeLayout(false);

		}
Example #10
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// attach this class to any dockable type of container control to make it dockable.
		/// Attach a container control and use it as a grip hande. The handle must support mouse
		/// move events.
		/// </summary>
		/// <param name="container">control to be dockable</param>
		/// <param name="handle">handle to be used to track the mouse movement (e.g. caption
		/// of the container)</param>
		/// <param name="fSplit"><c>true</c> to display a splitter, otherwise <c>false</c>.</param>
		/// <param name="persistence">The persistence object to pass on to the floaty.</param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public IFloaty Attach(ScrollableControl container, Control handle, bool fSplit,
			Persistence persistence)
		{
			m_persistence = persistence;
			return Attach(container, handle, fSplit);
		}
Example #11
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new FwContainer();
			this.m_Persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			this.m_mainMenu = new System.Windows.Forms.MainMenu(this.components);
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.m_mnuInsertBook = new System.Windows.Forms.MenuItem();
			this.m_mnuInsertBookOT = new System.Windows.Forms.MenuItem();
			this.m_mnuInsertBookNT = new System.Windows.Forms.MenuItem();
			((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).BeginInit();
			this.SuspendLayout();
			//
			// m_Persistence
			//
			this.m_Persistence.Parent = this;
			//
			// m_mainMenu
			//
			this.m_mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
			this.menuItem1});
			//
			// menuItem1
			//
			this.menuItem1.Index = 0;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
			this.m_mnuInsertBook});
			this.menuItem1.Text = "Insert";
			//
			// m_mnuInsertBook
			//
			this.m_mnuInsertBook.Index = 0;
			this.m_mnuInsertBook.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
			this.m_mnuInsertBookOT,
			this.m_mnuInsertBookNT});
			this.m_mnuInsertBook.Text = "Book";
			//
			// m_mnuInsertBookOT
			//
			this.m_mnuInsertBookOT.Index = 0;
			this.m_mnuInsertBookOT.Text = "Old Testament";
			//
			// m_mnuInsertBookNT
			//
			this.m_mnuInsertBookNT.Index = 1;
			this.m_mnuInsertBookNT.Text = "New Testament";
			//
			// DummyDraftViewForm
			//
			this.AutoScaleMode = AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(292, 273);
			this.Menu = this.m_mainMenu;
			this.Name = "DummyDraftViewForm";
			this.Text = "DummyDraftViewForm";
			((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).EndInit();
			this.ResumeLayout(false);

		}
Example #12
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DraftViewWrapper"/> class.
		/// </summary>
		/// <param name="name">The name of the split grid</param>
		/// <param name="parent">The parent of the split wrapper (can be null). Will be replaced
		/// with real parent later.</param>
		/// <param name="cache">The cache.</param>
		/// <param name="styleSheet">The style sheet.</param>
		/// <param name="settingsRegKey">The settings reg key.</param>
		/// <param name="draftView">The draft view.</param>
		/// <param name="stylebar">The stylebar.</param>
		/// <param name="btDraftView">The bt draft view.</param>
		/// <param name="footnoteDraftView">The footnote draft view.</param>
		/// <param name="footnoteStylebar">The footnote stylebar</param>
		/// <param name="footnoteBtDraftView">The footnote bt draft view.</param>
		/// ------------------------------------------------------------------------------------
		public BtDraftSplitWrapper(string name, Control parent, FdoCache cache,
			IVwStylesheet styleSheet, RegistryKey settingsRegKey, object draftView,
			object stylebar, object btDraftView, object footnoteDraftView,
			object footnoteStylebar, object footnoteBtDraftView)
			: base(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
			footnoteDraftView, footnoteStylebar, 2, 3)
		{
			IRootSiteGroup group = GetGroup(kDraftRow, kDraftViewColumn);
			AddControl(group, kDraftRow, kBackTransColumn, btDraftView, true,
				!ChangeSides);

			group = GetGroup(kFootnoteRow, kDraftViewColumn);
			AddControl(group, kFootnoteRow, kBackTransColumn, footnoteBtDraftView, false,
				!ChangeSides);

			DataGridViewControlColumn frontTransColumn = GetColumn(kDraftViewColumn);
			frontTransColumn.FillWeight = 100;
			frontTransColumn.MaxPercentage = 0.9f;
			frontTransColumn.MinimumWidth = 60;
			frontTransColumn.IsCollapsible = false;
			frontTransColumn.Visible = true;

			DataGridViewControlColumn backTransColumn = GetColumn(kBackTransColumn);
			backTransColumn.FillWeight = 100;
			backTransColumn.MaxPercentage = 0.9f;
			backTransColumn.MinimumWidth = 60;
			backTransColumn.IsCollapsible = false;
			backTransColumn.Visible = true;

			// Now set up a persistence object for loading. This will be disposed automatically
			// when we dispose m_Container.
			m_Container = new FwContainer();
			Persistence persistence = new Persistence(m_Container, this);
			persistence.LoadSettings += new Persistence.Settings(OnLoadSettings);
			// we don't want to implement ISettings, so we set the default key path instead,
			// but we have to strip the HKCU\ of the name.
			persistence.DefaultKeyPath =
				settingsRegKey.Name.Substring(Registry.CurrentUser.Name.Length + 1);

			// Retrieve the parent's Persistence service. We use that for saving rather then
			// our own because otherwise some things like the FDO cache might already be disposed
			// when we try to save the settings.
			if (parent.Site != null)
			{
				persistence = (Persistence)parent.Site.GetService(typeof(Persistence));
				if (persistence != null)
					persistence.SaveSettings += new Persistence.Settings(OnSaveSettings);
			}
		}
Example #13
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose( bool fDisposing )
		{
			base.Dispose(fDisposing);

			if (fDisposing)
			{
				if(components != null)
					components.Dispose();
				if (m_draftView != null)
					m_draftView.Dispose();
				if (m_isNewCache && (m_cache != null))
					m_cache.Dispose(); // Only if we made it.
				if (m_Persistence != null)
					m_Persistence.Dispose();
			}
			m_cache = null;
			m_draftView = null;
			m_styleSheet = null;
			m_rootb = null;
			m_Persistence = null;
		}
Example #14
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
			//
			// m_persistence
			//
			this.m_persistence.EnableSaveWindowSettings = false;
			this.m_persistence.Parent = this;
			this.m_persistence.SaveSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnSaveSettings);
			this.m_persistence.LoadSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnLoadSettings);
			//
			// FootnoteView
			//
			this.Name = "FootnoteView";
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();
		}
Example #15
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose(bool fDisposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!fDisposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			base.Dispose(fDisposing);

			if (fDisposing)
			{
				if(components != null)
					components.Dispose();
				if (m_draftView != null)
					m_draftView.Dispose();
				if (m_isNewCache && (m_cache != null))
					m_cache.Dispose(); // Only if we made it.
				if (m_Persistence != null)
					m_Persistence.Dispose();
			}
			m_cache = null;
			m_draftView = null;
			m_styleSheet = null;
			m_rootb = null;
			m_Persistence = null;
		}
		internal BtDraftSplitWrapper(string name, Control parent, FdoCache cache,
			IVwStylesheet styleSheet, RegistryKey settingsRegKey, TeScrDraftViewProxy draftView,
			DraftStylebarProxy stylebar, TeScrDraftViewProxy btDraftView,
			TeFootnoteDraftViewProxy footnoteDraftView, DraftStylebarProxy footnoteStylebar,
			TeFootnoteDraftViewProxy footnoteBtDraftView)
			: base(name, parent, cache, styleSheet, settingsRegKey, draftView, stylebar,
			footnoteDraftView, footnoteStylebar, 2, 3)
		{
			m_settingsRegKey = settingsRegKey;

			IRootSiteGroup group = GetGroup(kDraftRow, kDraftViewColumn);
			AddControl(group, kDraftRow, kBackTransColumn, btDraftView, true,
				!ChangeSides);

			group = GetGroup(kFootnoteRow, kDraftViewColumn);
			AddControl(group, kFootnoteRow, kBackTransColumn, footnoteBtDraftView, false,
				!ChangeSides);

			DataGridViewControlColumn frontTransColumn = GetColumn(kDraftViewColumn);
			frontTransColumn.FillWeight = 100;
			frontTransColumn.MaxPercentage = 0.9f;
			frontTransColumn.MinimumWidth = 60;
			frontTransColumn.IsCollapsible = false;
			frontTransColumn.Visible = true;

			DataGridViewControlColumn backTransColumn = GetColumn(kBackTransColumn);
			backTransColumn.FillWeight = 100;
			backTransColumn.MaxPercentage = 0.9f;
			backTransColumn.MinimumWidth = 60;
			backTransColumn.IsCollapsible = false;
			backTransColumn.Visible = true;

			// Now set up a persistence object for loading. This will be disposed automatically
			// when we dispose m_Container.
			m_Container = new FwContainer();
			Persistence persistence = new Persistence(m_Container, this);
			persistence.LoadSettings += new Persistence.Settings(OnLoadSettings);

			// Retrieve the parent's Persistence service. We use that for saving rather then
			// our own because otherwise some things like the FDO cache might already be disposed
			// when we try to save the settings.
			if (parent.Site != null)
			{
				persistence = (Persistence)parent.Site.GetService(typeof(Persistence));
				if (persistence != null)
					persistence.SaveSettings += new Persistence.Settings(OnSaveSettings);
			}

			m_leftPaneWeight = new RegistryFloatSetting(settingsRegKey, Name + "LeftPaneWeight", -1.0f);
			m_rightPaneWeight = new RegistryFloatSetting(settingsRegKey, Name + "RightPaneWeight", -1.0f);
		}
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.m_Persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).BeginInit();
			//
			// m_Persistence
			//
			this.m_Persistence.DefaultKeyPath = "Software\\SIL\\FieldWorks\\FootnoteViewTest";
			this.m_Persistence.Parent = this;
			//
			// DummyFootnoteViewForm
			//
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(292, 273);
			this.Name = "DummyFootnoteViewForm";
			this.Text = "DummyFootnoteViewForm";
			((System.ComponentModel.ISupportInitialize)(this.m_Persistence)).EndInit();

		}
Example #18
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing"><c>true</c> to release both managed and unmanaged
		/// resources; <c>false</c> to release only unmanaged resources.
		/// </param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			if (disposing)
			{
				if (components != null)
					components.Dispose();

				if (m_persistence != null)
					m_persistence.Dispose();
			}

			m_persistence = null;
			base.Dispose(disposing);
		}
Example #19
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing"><c>true</c> to release both managed and unmanaged
		/// resources; <c>false</c> to release only unmanaged resources.
		/// </param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (components != null)
					components.Dispose();

				if (m_persistence != null)
					m_persistence.Dispose();
			}

			m_persistence = null;
			base.Dispose(disposing);
		}
Example #20
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Windows.Forms.Button btnClose;
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DiffDialog));
			System.Windows.Forms.ImageList imageList1;
			System.Windows.Forms.Button btnHelp;
			System.Windows.Forms.Panel pnlCloseHelp;
			System.Windows.Forms.TableLayoutPanel tableLayoutRevision;
			System.Windows.Forms.TableLayoutPanel tableLayoutCurrent;
			this.btnRevertToOld = new System.Windows.Forms.Button();
			this.btnKeepCurrent = new System.Windows.Forms.Button();
			this.btnNext = new System.Windows.Forms.Button();
			this.btnEdit = new System.Windows.Forms.Button();
			this.btnPrev = new System.Windows.Forms.Button();
			this.lblDiffCount = new System.Windows.Forms.Label();
			this.lblRevDiffType = new System.Windows.Forms.Label();
			this.lblCurrentDiffType = new System.Windows.Forms.Label();
			this.lblReference = new System.Windows.Forms.Label();
			this.lblSavedVersion = new System.Windows.Forms.Label();
			this.lblCurrent = new System.Windows.Forms.Label();
			this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			btnClose = new System.Windows.Forms.Button();
			imageList1 = new System.Windows.Forms.ImageList(this.components);
			btnHelp = new System.Windows.Forms.Button();
			pnlCloseHelp = new System.Windows.Forms.Panel();
			tableLayoutRevision = new System.Windows.Forms.TableLayoutPanel();
			tableLayoutCurrent = new System.Windows.Forms.TableLayoutPanel();
			pnlCloseHelp.SuspendLayout();
			tableLayoutRevision.SuspendLayout();
			tableLayoutCurrent.SuspendLayout();
			this.tableLayoutPanel.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.persistence)).BeginInit();
			this.SuspendLayout();
			//
			// btnClose
			//
			resources.ApplyResources(btnClose, "btnClose");
			btnClose.BackColor = System.Drawing.SystemColors.Control;
			btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			btnClose.ImageList = imageList1;
			btnClose.Name = "btnClose";
			btnClose.UseVisualStyleBackColor = true;
			btnClose.Click += new System.EventHandler(this.btnClose_Click);
			//
			// imageList1
			//
			imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			imageList1.TransparentColor = System.Drawing.Color.Magenta;
			imageList1.Images.SetKeyName(0, "");
			imageList1.Images.SetKeyName(1, "");
			imageList1.Images.SetKeyName(2, "");
			imageList1.Images.SetKeyName(3, "");
			imageList1.Images.SetKeyName(4, "");
			//
			// btnHelp
			//
			resources.ApplyResources(btnHelp, "btnHelp");
			btnHelp.BackColor = System.Drawing.SystemColors.Control;
			btnHelp.ImageList = imageList1;
			btnHelp.Name = "btnHelp";
			btnHelp.UseVisualStyleBackColor = true;
			btnHelp.Click += new System.EventHandler(this.btnHelp_Click);
			//
			// btnRevertToOld
			//
			resources.ApplyResources(this.btnRevertToOld, "btnRevertToOld");
			this.btnRevertToOld.ImageList = imageList1;
			this.btnRevertToOld.Name = "btnRevertToOld";
			this.btnRevertToOld.Click += new System.EventHandler(this.btnRevertToOld_Click);
			//
			// btnKeepCurrent
			//
			resources.ApplyResources(this.btnKeepCurrent, "btnKeepCurrent");
			this.btnKeepCurrent.ImageList = imageList1;
			this.btnKeepCurrent.Name = "btnKeepCurrent";
			this.btnKeepCurrent.Click += new System.EventHandler(this.btnKeepCurrent_Click);
			//
			// btnNext
			//
			resources.ApplyResources(this.btnNext, "btnNext");
			this.btnNext.ImageList = imageList1;
			this.btnNext.Name = "btnNext";
			this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
			//
			// btnEdit
			//
			resources.ApplyResources(this.btnEdit, "btnEdit");
			this.btnEdit.BackColor = System.Drawing.SystemColors.Control;
			this.btnEdit.ImageList = imageList1;
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.UseVisualStyleBackColor = true;
			this.btnEdit.Click += new System.EventHandler(this.btnEdit_click);
			//
			// btnPrev
			//
			resources.ApplyResources(this.btnPrev, "btnPrev");
			this.btnPrev.ImageList = imageList1;
			this.btnPrev.Name = "btnPrev";
			this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click);
			//
			// pnlCloseHelp
			//
			tableLayoutCurrent.SetColumnSpan(pnlCloseHelp, 2);
			pnlCloseHelp.Controls.Add(btnClose);
			pnlCloseHelp.Controls.Add(btnHelp);
			resources.ApplyResources(pnlCloseHelp, "pnlCloseHelp");
			pnlCloseHelp.Name = "pnlCloseHelp";
			//
			// tableLayoutRevision
			//
			resources.ApplyResources(tableLayoutRevision, "tableLayoutRevision");
			tableLayoutRevision.Controls.Add(this.lblDiffCount, 0, 2);
			tableLayoutRevision.Controls.Add(this.lblRevDiffType, 0, 0);
			tableLayoutRevision.Controls.Add(this.btnRevertToOld, 2, 1);
			tableLayoutRevision.Controls.Add(this.btnPrev, 0, 1);
			tableLayoutRevision.Name = "tableLayoutRevision";
			//
			// lblDiffCount
			//
			resources.ApplyResources(this.lblDiffCount, "lblDiffCount");
			this.lblDiffCount.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			tableLayoutRevision.SetColumnSpan(this.lblDiffCount, 3);
			this.lblDiffCount.Name = "lblDiffCount";
			//
			// lblRevDiffType
			//
			resources.ApplyResources(this.lblRevDiffType, "lblRevDiffType");
			this.lblRevDiffType.BackColor = System.Drawing.Color.Honeydew;
			this.lblRevDiffType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			tableLayoutRevision.SetColumnSpan(this.lblRevDiffType, 3);
			this.lblRevDiffType.ForeColor = System.Drawing.SystemColors.InfoText;
			this.lblRevDiffType.MinimumSize = new System.Drawing.Size(0, 27);
			this.lblRevDiffType.Name = "lblRevDiffType";
			this.lblRevDiffType.Paint += new System.Windows.Forms.PaintEventHandler(this.lblRevDiffType_Paint);
			//
			// tableLayoutCurrent
			//
			resources.ApplyResources(tableLayoutCurrent, "tableLayoutCurrent");
			tableLayoutCurrent.Controls.Add(this.lblCurrentDiffType, 0, 0);
			tableLayoutCurrent.Controls.Add(this.btnKeepCurrent, 0, 1);
			tableLayoutCurrent.Controls.Add(this.btnEdit, 1, 1);
			tableLayoutCurrent.Controls.Add(this.btnNext, 2, 1);
			tableLayoutCurrent.Controls.Add(pnlCloseHelp, 1, 2);
			tableLayoutCurrent.Controls.Add(this.lblReference, 0, 2);
			tableLayoutCurrent.Name = "tableLayoutCurrent";
			//
			// lblCurrentDiffType
			//
			resources.ApplyResources(this.lblCurrentDiffType, "lblCurrentDiffType");
			this.lblCurrentDiffType.BackColor = System.Drawing.Color.Honeydew;
			this.lblCurrentDiffType.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			tableLayoutCurrent.SetColumnSpan(this.lblCurrentDiffType, 3);
			this.lblCurrentDiffType.ForeColor = System.Drawing.SystemColors.InfoText;
			this.lblCurrentDiffType.MinimumSize = new System.Drawing.Size(0, 27);
			this.lblCurrentDiffType.Name = "lblCurrentDiffType";
			this.lblCurrentDiffType.Paint += new System.Windows.Forms.PaintEventHandler(this.lblCurrentDiffType_Paint);
			//
			// lblReference
			//
			this.lblReference.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			resources.ApplyResources(this.lblReference, "lblReference");
			this.lblReference.Name = "lblReference";
			//
			// lblSavedVersion
			//
			this.lblSavedVersion.AutoEllipsis = true;
			resources.ApplyResources(this.lblSavedVersion, "lblSavedVersion");
			this.lblSavedVersion.Name = "lblSavedVersion";
			//
			// lblCurrent
			//
			this.lblCurrent.BackColor = System.Drawing.SystemColors.Control;
			resources.ApplyResources(this.lblCurrent, "lblCurrent");
			this.lblCurrent.Name = "lblCurrent";
			//
			// tableLayoutPanel
			//
			resources.ApplyResources(this.tableLayoutPanel, "tableLayoutPanel");
			this.tableLayoutPanel.Controls.Add(this.lblCurrent, 1, 0);
			this.tableLayoutPanel.Controls.Add(this.lblSavedVersion, 0, 0);
			this.tableLayoutPanel.Controls.Add(tableLayoutCurrent, 1, 3);
			this.tableLayoutPanel.Controls.Add(tableLayoutRevision, 0, 3);
			this.tableLayoutPanel.Name = "tableLayoutPanel";
			//
			// persistence
			//
			this.persistence.Parent = this;
			this.persistence.LoadSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnLoadSettings);
			this.persistence.SaveSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnSaveSettings);
			//
			// DiffDialog
			//
			this.AcceptButton = btnClose;
			resources.ApplyResources(this, "$this");
			this.AccessibleRole = System.Windows.Forms.AccessibleRole.Dialog;
			this.CancelButton = btnClose;
			this.Controls.Add(this.tableLayoutPanel);
			this.MinimizeBox = false;
			this.Name = "DiffDialog";
			this.ShowIcon = false;
			this.ShowInTaskbar = false;
			pnlCloseHelp.ResumeLayout(false);
			tableLayoutRevision.ResumeLayout(false);
			tableLayoutRevision.PerformLayout();
			tableLayoutCurrent.ResumeLayout(false);
			tableLayoutCurrent.PerformLayout();
			this.tableLayoutPanel.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.persistence)).EndInit();
			this.ResumeLayout(false);

		}
Example #21
0
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DraftView));
			this.m_persistence = new SIL.FieldWorks.Common.Controls.Persistence(this.components);
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).BeginInit();
			this.SuspendLayout();
			//
			// m_persistence
			//
			this.m_persistence.Parent = this;
			this.m_persistence.SaveSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnSaveSettings);
			this.m_persistence.LoadSettings += new SIL.FieldWorks.Common.Controls.Persistence.Settings(this.OnLoadSettings);
			//
			// DraftView
			//
			resources.ApplyResources(this, "$this");
			this.Name = "DraftView";
			((System.ComponentModel.ISupportInitialize)(this.m_persistence)).EndInit();
			this.ResumeLayout(false);

		}