internal void TryInitialise(DrawingLabData data, DrawingsLabMain drawingLab) { if (_data != null) return; _data = data; _dataSource.AssignData(data); _drawingLab = drawingLab; InitialiseButtonsAndHotkeys(); }
internal void TryInitialise(DrawingLabData data, DrawingsLabMain drawingLab) { if (_data != null) { return; } _data = data; _dataSource.AssignData(data); _drawingLab = drawingLab; InitialiseButtonsAndHotkeys(); }
public void DrawingsLabButtonClick(Office.IRibbonControl control) { try { if (DrawingLabData == null) { DrawingLabData = new DrawingLabData(); DrawingLab = new DrawingsLabMain(DrawingLabData); } Globals.ThisAddIn.RegisterDrawingsPane(PowerPointPresentation.Current.Presentation); var drawingsPane = Globals.ThisAddIn.GetActivePane(typeof(DrawingsPane)); ((DrawingsPane)drawingsPane.Control).drawingsPaneWPF.TryInitialise(DrawingLabData, DrawingLab); // if currently the pane is hidden, show the pane if (!drawingsPane.Visible) { // fire the pane visble change event drawingsPane.Visible = true; } else { drawingsPane.Visible = false; } } catch (Exception e) { ErrorDialogWrapper.ShowDialog("Error in drawing lab", e.Message, e); Logger.LogException(e, "DrawingsLabButtonClicked"); throw; } }
public DrawingsLabMain(DrawingLabData data) { _dataSource = new DrawingsLabDataSource(); _dataSource.AssignData(data); }