예제 #1
0
        protected override bool OpenFormData(string sFileName)
        {
            Cursor = Cursors.WaitCursor;
            try
            {
                ProjectManager.Instance.OpenProject(sFileName);
            }
            catch (Exception ex)
            {
                FormUtils.ShowErrorMessage("Failed to load: " + sFileName + "::" + ex);
            }
            Cursor = Cursors.Default;
            if (null != ProjectManager.Instance.LoadedProject)
            {
                UpdateProjectsList(sFileName);

                bool bHasExternalReference = ProjectManager.Instance.LoadedProject.HasExternalReference();

                if (bHasExternalReference)
                {
                    GoogleAuthManager.UpdateGoogleAuth(this, null, () =>
                    {
                        MessageBox.Show(this, "You will be unable to view the layouts for any references that are Google Spreadsheets.", "Reference Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    });
                }

                return(true);
            }
            return(false);
        }
예제 #2
0
 private void GoogleAuthUpdate_Requested(object sender, GoogleAuthEventArgs args)
 {
     GoogleAuthManager.UpdateGoogleAuth(this, args.SuccessAction, args.CancelAction);
 }
예제 #3
0
 private void updateGoogleCredentialsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GoogleAuthManager.UpdateGoogleAuth(this);
 }