public RefreshValuesUponActivation ( ) : void | ||
return | void |
private void Activate() { Logger.WriteEvent("Entered Publish Tab"); if (_makePdfBackgroundWorker.IsBusy) { return; } _activated = true; // _model.BookletPortion = PublishModel.BookletPortions.BookletPages; _model.RefreshValuesUponActivation(); UpdateDisplay(); MakeBooklet(); }
private void Activate() { _activated = false; PublishHelper.InPublishTab = true; Logger.WriteEvent("Entered Publish Tab"); if (IsMakingPdf) { return; } // _model.BookletPortion = PublishModel.BookletPortions.BookletPages; _model.RefreshValuesUponActivation(); //reload items from extension(s), as they may differ by book (e.g. if the extension comes from the template of the book) var toolStripItemCollection = new List <ToolStripItem>(from ToolStripItem x in _contextMenuStrip.Items select x); foreach (ToolStripItem item in toolStripItemCollection) { if (item.Tag == "extension") { _contextMenuStrip.Items.Remove(item); } } foreach (var item in _model.GetExtensionMenuItems()) { item.Tag = "extension"; _contextMenuStrip.Items.Add(item); } // We choose not to remember the last state this tab might have been in. // Also since we don't know if the pdf is out of date, we assume it is, and don't show the prior pdf. // SetModelFromButtons takes care of both of these things for the model ClearRadioButtons(); SetModelFromButtons(); _model.DisplayMode = PublishModel.DisplayModes.WaitForUserToChooseSomething; UpdateDisplay(); _activated = true; }