Esempio n. 1
0
 public TagsSelectionSheetController(
     NSWindow parentWindow, IDialogViewModel viewModel)
 {
     this.parentWindow = parentWindow;
     this.viewModel    = viewModel;
     NSBundle.LoadNib("TagsSelectionSheet", this);
 }
Esempio n. 2
0
        public void ShowAboutPanel(Foundation.NSObject sender)
        {
            // The strict chap 12 challenge solution. non-modal, no window controller for the about panel
            // so multiple about panels can be displayed
//			NSBundle.LoadNib("About", this);
//			aboutPanel.MakeKeyAndOrderFront(null);

            // Make about panel modal and position it in the center of the active window
            NSBundle.LoadNib("About", this);
            // Change BG color and posiiton
            aboutPanel.BackgroundColor = NSColor.White;
            if (NSApplication.SharedApplication.MainWindow != null)
            {
                var    mainWindowFrame = NSApplication.SharedApplication.MainWindow.Frame;
                nfloat x = mainWindowFrame.X + mainWindowFrame.Width / 2 - aboutPanel.Frame.Width / 2;
                nfloat y = mainWindowFrame.Y + mainWindowFrame.Height / 2 - aboutPanel.Frame.Height / 2;
                aboutPanel.SetFrame(new CGRect(x, y, aboutPanel.Frame.Width, aboutPanel.Frame.Height), true);
            }
            else
            {
                NSScreen screen = NSScreen.MainScreen;
                aboutPanel.SetFrame(new CGRect(screen.Frame.Width / 2 - aboutPanel.Frame.Width / 2, screen.Frame.Height - aboutPanel.Frame.Height - 100, aboutPanel.Frame.Width, aboutPanel.Frame.Height), true);
            }
            // Stop modal when about panel closed.
            aboutPanel.WillClose += (object s, EventArgs e) => {
                Console.WriteLine("Window will close");
                NSApplication.SharedApplication.StopModal();
            };
            // Show modal about panel
            NSApplication.SharedApplication.RunModalForWindow(aboutPanel);
        }
        public SourcesListControlAdapter()
        {
            NSBundle.LoadNib("SourcesListControl", this);

            outlineView.DataSource = dataSource;
            currentSourceImage     = new LJD.Image(NSImage.ImageNamed("FocusedMsgSlave.png"));
            View.owner             = this;
        }
Esempio n. 4
0
        public void LoadNibWithOptions()
        {
#if MONOMAC
            NSArray objects;
            Assert.NotNull(main.LoadNibNamed("EmptyNib", main, out objects));
#else
            Assert.NotNull(main.LoadNib("EmptyNib", main, null));
#endif
        }
        public PersonEditorSheetController(PersonModel person, bool isNew)
        {
            // Load the .xib file for the sheet
            NSBundle.LoadNib("PersonEditSheet", this);

            CancelButton.Hidden = !isNew;

            // Save person
            Person = person;
        }
Esempio n. 6
0
        public SourcesListControlAdapter()
        {
            NSBundle.LoadNib("SourcesListControl", this);

            currentSourceImage = new LJD.Image(NSImage.ImageNamed("FocusedMsgSlave.png"));
            View.owner         = this;
            outlineView.Menu   = new NSMenu {
                Delegate = new MenuDelegate {
                    owner = this
                }
            };
        }
Esempio n. 7
0
        public SearchPanelControlAdapter()
        {
            NSBundle.LoadNib("SearchPanelControl", this);

            checkableControls[ViewCheckableControl.MatchCase] = matchCaseCheckbox;
            checkableControls[ViewCheckableControl.WholeWord] = wholeWordCheckbox;
            checkableControls[ViewCheckableControl.RegExp]    = regexCheckbox;
            checkableControls[ViewCheckableControl.SearchWithinThisThread] = searchInCurrentThreadCheckbox;
            checkableControls[ViewCheckableControl.SearchWithinCurrentLog] = searchInCurrentLogCheckbox;
            checkableControls[ViewCheckableControl.QuickSearch]            = quickSearchRadioButton;
            checkableControls[ViewCheckableControl.SearchUp]                  = searchUpCheckbox;
            checkableControls[ViewCheckableControl.SearchInSearchResult]      = searchInSearchResultsCheckbox;
            checkableControls[ViewCheckableControl.SearchAllOccurences]       = searchAllRadioButton;
            checkableControls[ViewCheckableControl.SearchFromCurrentPosition] = fromCurrentPositionCheckbox;

            quickSearchTextBox = new QuickSearchTextBoxAdapter();
            quickSearchTextBox.View.MoveToPlaceholder(quickSearchPlaceholder);
        }
Esempio n. 8
0
        public ConfigWindowController()
        {
            NSBundle.LoadNib("ConfigWindow", this);
            clsIOPrefs ioPrefs = new clsIOPrefs();

            this.txt_RAR.StringValue   = ioPrefs.GetStringValue("CaminhoRAR");
            this.txt_UNRAR.StringValue = ioPrefs.GetStringValue("CaminhoUNRAR");
            string retConv = ioPrefs.GetStringValue("Compressao");

            if (retConv.Length > 0)
            {
                this.sld_Compressao.IntValue = Convert.ToInt32(ioPrefs.GetStringValue("Compressao"));
            }
            else
            {
                this.sld_Compressao.IntValue = 5;
            }
            ioPrefs = null;
            this.sld_Compressao.AllowsTickMarkValuesOnly = true;
        }
 public LogViewerControlAdapter()
 {
     NSBundle.LoadNib("LogViewerControl", this);
     InnerView.Init(this);
     InitScrollView();
     InitDrawingContext();
     InitCursorTimer();
     InnerView.Menu = new NSMenu()
     {
         Delegate = new ContextMenuDelegate()
         {
             owner = this
         }
     };
     DragDropIconView.OnPaint = (dirtyRect) =>
     {
         using (var g = new LJD.Graphics())
         {
             float penW = 2;
             var   p    = new Pen(Color.Gray, penW, new [] { 5f, 2.5f });
             var   r    = new RectangleF(new PointF(), DragDropIconView.Frame.Size.ToSizeF());
             r.Inflate(-penW, -penW);
             g.DrawRoundRectangle(p, r, 25);
             r.Inflate(-5, -5);
             using (var f = new Font(
                        NSFont.SystemFontOfSize(NSFont.SystemFontSize).FontName,
                        (float)(NSFont.SystemFontSize * 1.2f), FontStyle.Regular))
             {
                 g.DrawString(
                     "Drop logs here\n(files, URLs, archives)",
                     f, Brushes.Black, r,
                     new StringFormat(StringAlignment.Center, StringAlignment.Center)
                     );
             }
         }
     };
 }
Esempio n. 10
0
 public override void DidFinishLaunching(NSNotification aNotification)
 {
     iMainWindow = new MainWindow();
     NSBundle.LoadNib("MainWindow", iMainWindow);
 }
Esempio n. 11
0
 public LoginSheetController()
 {
     // Load the .xib file for the sheet
     NSBundle.LoadNib("LoginSheet", this);
 }
Esempio n. 12
0
 NetworkCredentialsDialogController(string title, bool noUserName)
 {
     this.title      = title;
     this.noUserName = noUserName;
     NSBundle.LoadNib("NetworkCredentialsSheet", this);
 }
Esempio n. 13
0
 public static T LoadNib <T> (this NSBundle bundle, NSObject owner) where T : UIView
 {
     return(bundle.LoadNib(typeof(T).Name, owner, null).GetItem <T>(0));
 }
Esempio n. 14
0
 public void LoadNibWithOptions()
 {
     Assert.NotNull(main.LoadNib("EmptyNib", main, null));
 }
Esempio n. 15
0
 public ProgressWindowController()
 {
     NSBundle.LoadNib("ProgressWindow", this);
 }
 public SourcesManagementControlAdapter()
 {
     NSBundle.LoadNib("SourcesManagementControl", this);
     sourcesListControlAdapter = new SourcesListControlAdapter();
     sourcesListControlAdapter.View.MoveToPlaceholder(sourcesListPlaceholder);
 }
Esempio n. 17
0
 public void LoadNib()
 {
     Assert.Throws <MonoTouchException> (() => NSBundle.LoadNib(String.Empty, main));
 }
Esempio n. 18
0
 NetworkCredentialsDialogController(string site)
 {
     this.site = site;
     NSBundle.LoadNib("NetworkCredentialsSheet", this);
 }
Esempio n. 19
0
 public void LoadNib()
 {
     NSBundle.LoadNib(String.Empty, main);
 }
 public QuickSearchTextBoxAdapter()
 {
     NSBundle.LoadNib("QuickSearchTextBox", this);
 }
Esempio n. 21
0
 public TagsSelectionSheetController()
 {
     NSBundle.LoadNib("TagsSelectionSheet", this);
 }