using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.Tools.Ribbon;
using Excel = Microsoft.Office.Interop.Excel;

namespace Kalendarz
{
    public partial class Ribbon1
    {        
        Kalendarz kalendarz = new Kalendarz();

        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {

        }

        private void toggleButton1_Click(object sender, RibbonControlEventArgs e)
        {
            if (Globals.ThisAddIn.CustomTaskPanes.Count == 0)            
                Globals.ThisAddIn.CustomTaskPanes.Add(kalendarz, "Kalendarz");

            Globals.ThisAddIn.CustomTaskPanes[0].Visible = toggleButton1.Checked;
        }
    }
}
