コード例 #1
0
        /// <summary>
        /// Handles the get note for group em preview. (Is how we grab the required text or whatever from the preview
        /// </summary>
        /// <param name='sender'>
        /// Sender.
        /// </param>
        string HandleGetNoteForGroupEmPreview(object sender)
        {
            string sResult = "";
            string sGUID   = sender.ToString();

            if (sGUID != null && sGUID != "")
            {
                LayoutPanelBase SuperParent = null;
                if (Layout.GetIsChild == true)
                {
                    SuperParent = Layout.GetAbsoluteParent();
                }
                else
                {
                    SuperParent = Layout;
                }

                NoteDataInterface note = SuperParent.GetNoteOnSameLayout(sGUID, false);
                //NoteDataInterface note = SuperParent.FindNoteByGuid(sGUID);

                if (note != null)
                {
                    if (note is NoteDataXML_LinkNote)
                    {
                        // because the text is stored this should just work
                        sResult = note.GetStoryboardPreview;
//						if (File.Exists(panel.appearance.File) == true)
//						{
//
//							Worgan2006.classPageMiddle importPage =
//								(Worgan2006.classPageMiddle)CoreUtilities.General.DeSerialize(panel.appearance.File, typeof(Worgan2006.classPageMiddle));
//
//
//
//
//							if (importPage != null)
//							{
//								if (importPage.PageType == _Header.pagetype.VISUAL)
//								{
//									System.Type t = _Header.GetClassTypeByPageType(importPage.PageType);
//									importPage =
//										(Worgan2006.classPageMiddle)CoreUtilities.General.DeSerialize(panel.appearance.File, t);
//
//								}
//
//								sResult = importPage.GetBrainstormText;
//								if (sResult.IndexOf("rtf") == -1) sResult = "";
//								importPage = null;
//							}
//						}
                    }
                    else
                    {
                        sResult = note.GetStoryboardPreview;
                    }
                }
            }

            //  Message Box.Show(myAppearance.Caption);
            return(sResult);
        }