/// <summary>
        /// Constructs a new MingleOffice
        /// </summary>
        /// <param name="mingleProject"></param>
        /// <param name="excel"></param>
        /// <param name="ribbon"></param>
        public MingleOffice(ITalkToMingle mingleProject, IAmExcel excel, IAmARibbon ribbon)
        {
            Debug.Assert(mingleProject != null, "mingleProject = null");
            Debug.Assert(excel != null, "excel = null");
            Debug.Assert(ribbon != null, "ribbon = null");
            TraceLog.Initialize("ExcelAddIn2010");
            _mingleProject = mingleProject;
            _excel         = excel;
            _ribbon        = ribbon;
            _ribbon.SetModel(_ribbonModel);

            _ribbonModel.OpenFetchCards     += new Action(OpenQueryDialog);
            _ribbonModel.Run                += new Action(RunQueries);
            _ribbonModel.Save               += new Action(SaveQueriesToExcel);
            _ribbonModel.EnableFetchButton  += new Action(() => _ribbon.EnableFetchQueryButton());
            _ribbonModel.DisableFetchButton += new Action(() => _ribbon.DisableFetchQueryButton());

            if (_mingleProject.HasLoginDetails)
            {
                _ribbonModel.EnableFetchButton();
            }
            else
            {
                _ribbonModel.DisableFetchButton();
            }
        }
 /// <summary>
 /// Constructs a new MingleOffice
 /// </summary>
 /// <param name="ribbon"></param>
 public MingleOffice(IAmARibbon ribbon)
     : this(new Mingle(), new Excel(), ribbon)
 {
     TraceLog.WriteLine(new StackFrame().GetMethod().Name, "MingleOffice constructed.");
 }
        /// <summary>
        /// Constructs a new MingleOffice
        /// </summary>
        /// <param name="mingleProject"></param>
        /// <param name="excel"></param>
        /// <param name="ribbon"></param>
        public MingleOffice(ITalkToMingle mingleProject, IAmExcel excel, IAmARibbon ribbon)
        {
            Debug.Assert(mingleProject != null, "mingleProject = null");
            Debug.Assert(excel != null, "excel = null");
            Debug.Assert(ribbon != null, "ribbon = null");
            TraceLog.Initialize("ExcelAddIn2010");
            _mingleProject = mingleProject;
            _excel = excel;
            _ribbon = ribbon;
            _ribbon.SetModel(_ribbonModel);

            _ribbonModel.OpenFetchCards += new Action(OpenQueryDialog);
            _ribbonModel.Run += new Action(RunQueries);
            _ribbonModel.Save += new Action(SaveQueriesToExcel);
            _ribbonModel.EnableFetchButton += new Action(() => _ribbon.EnableFetchQueryButton());
            _ribbonModel.DisableFetchButton += new Action(() => _ribbon.DisableFetchQueryButton());

            if(_mingleProject.HasLoginDetails)
            {
                _ribbonModel.EnableFetchButton();
            }
            else
            {
                _ribbonModel.DisableFetchButton();
            }
        }
 /// <summary>
 /// Constructs a new MingleOffice
 /// </summary>
 /// <param name="ribbon"></param>
 public MingleOffice(IAmARibbon ribbon) : this(new Mingle(), new Excel(), ribbon)
 {
     TraceLog.WriteLine(new StackFrame().GetMethod().Name, "MingleOffice constructed.");
 }