public void IntializeControlState(CGRect newFrame)
        {
            if (IsFTC)
            {
                int location = BookTitle.IndexOf("+ Cases");
                if (location < 0)
                {
                    location = BookTitle.IndexOf("+Case");
                    if (location < 0)
                    {
                        BookTitle += " + Cases";
                    }
                }
            }

            if (BookTitle != null)
            {
                Window.Title            = BookTitle;
                TitleTField.StringValue = BookTitle;
                TitleTField.ToolTip     = BookTitle;
            }

            SegmentContol.SetSelected(false, 0);

            AddInfoUpdateState();

            Window.SetFrame(newFrame, false);
        }
        public override void WindowDidLoad()
        {
            if (BookTitle != null)
            {
                Window.Title            = BookTitle;
                TitleTField.StringValue = BookTitle;
                TitleTField.ToolTip     = BookTitle;
            }

            TOCController  = TOCViewController;
            PageController = PageViewController;

            //
            LeftButton.Image  = NSImage.ImageNamed("NSGoLeftTemplate");
            RightButton.Image = NSImage.ImageNamed("NSGoRightTemplate");

            SplitSwithButton.Cell.ImageScale = NSImageScale.None;
            SplitSwithButton.Image           = Utility.ImageWithFilePath("/Images/Content/@1x/Sidebar-Icon.png");

            InfoButton.Cell.ImageScale = NSImageScale.None;
            InfoButton.Image           = Utility.ImageWithFilePath("/Images/Content/@1x/Info-Icon.png");

            ShareButton.Cell.ImageScale = NSImageScale.None;
            //ShareButton.Image = Utility.ImageWithFilePath ("/Images/Content/@1x/Share-Icon.png");
            ShareButton.Image = NSImage.ImageNamed("NSShareTemplate");

            HistoryButton.Cell.ImageScale = NSImageScale.None;
            HistoryButton.Image           = Utility.ImageWithFilePath("/Images/Content/@1x/History-Icon.png");

            //
            ContentButton.Cell.Bordered = false;
            ContentButton.Cell.SetButtonType(NSButtonType.MomentaryChange);

            IndexButton.Cell.Bordered = false;
            IndexButton.Cell.SetButtonType(NSButtonType.MomentaryChange);

            AnnotationButton.Cell.Bordered = false;
            AnnotationButton.Cell.SetButtonType(NSButtonType.MomentaryChange);

            sidebarViewWidth = TocCustomView.Frame.Width;

            if (IsFTC)
            {
                int location = BookTitle.IndexOf(" + Cases");
                if (location < 0)
                {
                    BookTitle += " + Cases";
                }
            }

            SegmentContol.SetSelected(false, 0);

            AddInfoUpdateState();

            Window.DidResize += HandleWindowDidResize;
        }