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;
        }
Example #3
0
        void ReleaseDesignerOutlets()
        {
            if (EditAnnotationButton != null)
            {
                EditAnnotationButton.Dispose();
                EditAnnotationButton = null;
            }

            if (HistoryButton != null)
            {
                HistoryButton.Dispose();
                HistoryButton = null;
            }

            if (InfoButton != null)
            {
                InfoButton.Dispose();
                InfoButton = null;
            }

            if (MainView != null)
            {
                MainView.Dispose();
                MainView = null;
            }

            if (MainWindow != null)
            {
                MainWindow.Dispose();
                MainWindow = null;
            }

            if (SearchField != null)
            {
                SearchField.Dispose();
                SearchField = null;
            }

            if (SegmentContol != null)
            {
                SegmentContol.Dispose();
                SegmentContol = null;
            }

            if (ShareButton != null)
            {
                ShareButton.Dispose();
                ShareButton = null;
            }

            if (SplitSwithButton != null)
            {
                SplitSwithButton.Dispose();
                SplitSwithButton = null;
            }

            if (TitleTField != null)
            {
                TitleTField.Dispose();
                TitleTField = null;
            }

            if (ShareCustomMenu != null)
            {
                ShareCustomMenu.Dispose();
                ShareCustomMenu = null;
            }
        }
Example #4
0
        void ReleaseDesignerOutlets()
        {
            if (AnnotationButton != null)
            {
                AnnotationButton.Dispose();
                AnnotationButton = null;
            }

            if (AnnotationView != null)
            {
                AnnotationView.Dispose();
                AnnotationView = null;
            }

            if (BackgroudView != null)
            {
                BackgroudView.Dispose();
                BackgroudView = null;
            }

            if (BookContentView != null)
            {
                BookContentView.Dispose();
                BookContentView = null;
            }

            if (ContentButton != null)
            {
                ContentButton.Dispose();
                ContentButton = null;
            }

            if (FunctionButtonView != null)
            {
                FunctionButtonView.Dispose();
                FunctionButtonView = null;
            }

            if (HistoryButton != null)
            {
                HistoryButton.Dispose();
                HistoryButton = null;
            }

            if (IndexButton != null)
            {
                IndexButton.Dispose();
                IndexButton = null;
            }

            if (IndexCustomView != null)
            {
                IndexCustomView.Dispose();
                IndexCustomView = null;
            }

            if (IndexViewController != null)
            {
                IndexViewController.Dispose();
                IndexViewController = null;
            }

            if (InfoButton != null)
            {
                InfoButton.Dispose();
                InfoButton = null;
            }

            if (LeftButton != null)
            {
                LeftButton.Dispose();
                LeftButton = null;
            }

            if (PageNumber != null)
            {
                PageNumber.Dispose();
                PageNumber = null;
            }

            if (PageViewController != null)
            {
                PageViewController.Dispose();
                PageViewController = null;
            }

            if (RightButton != null)
            {
                RightButton.Dispose();
                RightButton = null;
            }

            if (SearchField != null)
            {
                SearchField.Dispose();
                SearchField = null;
            }

            if (SegmentContol != null)
            {
                SegmentContol.Dispose();
                SegmentContol = null;
            }

            if (ShareButton != null)
            {
                ShareButton.Dispose();
                ShareButton = null;
            }

            if (SplitSwithButton != null)
            {
                SplitSwithButton.Dispose();
                SplitSwithButton = null;
            }

            if (TitleTField != null)
            {
                TitleTField.Dispose();
                TitleTField = null;
            }

            if (TocCustomView != null)
            {
                TocCustomView.Dispose();
                TocCustomView = null;
            }

            if (TOCViewController != null)
            {
                TOCViewController.Dispose();
                TOCViewController = null;
            }

            if (GotoButton != null)
            {
                GotoButton.Dispose();
                GotoButton = null;
            }
        }