Inheritance: System.Windows.Forms.UserControl
Exemple #1
0
 /// <summary>
 /// Create a new one.
 /// </summary>
 /// <param name="cache"></param>
 /// <param name="ss"></param>
 /// <param name="choices"></param>
 /// <param name="mediator"></param>
 public Sandbox(FdoCache cache, Mediator mediator, IVwStylesheet ss,
                InterlinLineChoices choices, AnalysisOccurrence selected, FocusBoxController focusBox)
     : base(cache, mediator, ss, choices)
 {
     FocusBox             = focusBox;
     m_interlinDoc        = focusBox.InterlinDoc;
     m_occurrenceSelected = selected;
     // Finish initialization with occurrence context.
     LoadForWordBundleAnalysis(m_occurrenceSelected.Analysis.Hvo);
 }
Exemple #2
0
		/// <summary>
		/// Create a new one.
		/// </summary>
		/// <param name="cache"></param>
		/// <param name="ss"></param>
		/// <param name="choices"></param>
		/// <param name="mediator"></param>
		public Sandbox(FdoCache cache, Mediator mediator, IVwStylesheet ss,
			InterlinLineChoices choices, AnalysisOccurrence selected, FocusBoxController focusBox)
			: this(cache, mediator, ss, choices)
		{
			FocusBox = focusBox;
			m_interlinDoc = focusBox.InterlinDoc;
			m_occurrenceSelected = selected;
			// Finish initialization with occurrence context.
			LoadForWordBundleAnalysis(m_occurrenceSelected.Analysis.Hvo);
		}
            internal UndoRedoApproveAndMoveHelper(FocusBoxController focusBox,
                                                  AnalysisOccurrence occBeforeApproveAndMove, AnalysisOccurrence occAfterApproveAndMove)
            {
                Cache    = focusBox.Cache;
                FocusBox = focusBox;
                OccurrenceBeforeApproveAndMove = occBeforeApproveAndMove;
                OccurrenceAfterApproveAndMove  = occAfterApproveAndMove;

                // add the undo action
                AddUndoRedoAction(OccurrenceBeforeApproveAndMove, null);
            }
Exemple #4
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;

			// Do this, before calling base.
			// m_sda COM object block removed due to crash in Finializer thread LT-6124

			if (disposing)
			{
				// Do this, before calling base.
				if (m_sda != null)
					m_sda.RemoveNotification(this);

				RightMouseClickedEvent -= new FwRightMouseClickEventHandler(InterlinDocChild_RightMouseClickedEvent);

				// make sure we're not visible, so we don't end up processing OnVisibleChanged
				// during base.Dispose();
				this.Visible = false;
				DisposeFtMonitor();
			}

			base.Dispose(disposing);

			if (disposing)
			{
				// This is actually harmful to do, because the InterlinDocChild does not yet know it is
				// Disposing, and tries to Layout when the Sandbox is removed from its child list,
				// and tries to recreate its handle and root box, and eventually crashes.
				// RandyR: I don't think it will be harmful in this new context.
				if (m_focusBoxController != null)
				{
					m_focusBoxController.Resize -= new EventHandler(m_focusBox_Resize);

					if (!Controls.Contains(FocusBox))
						FocusBox.Dispose();
				}

				if (m_vc != null)
					m_vc.Dispose();
			}
			m_sda = null;
			m_focusBoxController = null;
			m_vc = null;
		}
			internal UndoRedoApproveAndMoveHelper(FocusBoxController focusBox,
				AnalysisOccurrence occBeforeApproveAndMove, AnalysisOccurrence occAfterApproveAndMove)
			{
				Cache = focusBox.Cache;
				FocusBox = focusBox;
				OccurrenceBeforeApproveAndMove = occBeforeApproveAndMove;
				OccurrenceAfterApproveAndMove = occAfterApproveAndMove;

				// add the undo action
				AddUndoRedoAction(OccurrenceBeforeApproveAndMove, null);
			}