internal void TryInitialise(DrawingLabData data, DrawingsLabMain drawingLab)
        {
            if (_data != null) return;

            _data = data;
            _dataSource.AssignData(data);
            _drawingLab = drawingLab;

            InitialiseButtonsAndHotkeys();
        }
Exemplo n.º 2
0
        internal void TryInitialise(DrawingLabData data, DrawingsLabMain drawingLab)
        {
            if (_data != null)
            {
                return;
            }

            _data = data;
            _dataSource.AssignData(data);
            _drawingLab = drawingLab;

            InitialiseButtonsAndHotkeys();
        }
Exemplo n.º 3
0
        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;
            }
        }
Exemplo n.º 4
0
 public DrawingsLabMain(DrawingLabData data)
 {
     _dataSource = new DrawingsLabDataSource();
     _dataSource.AssignData(data);
 }
Exemplo n.º 5
0
 public DrawingsLabMain(DrawingLabData data)
 {
     _dataSource = new DrawingsLabDataSource();
     _dataSource.AssignData(data);
 }