Exemple #1
0
 public void ForceRefresh()
 {
     using (var taskId = new NSString(BackgroundTaskID)) {
         var method = new ObjCRuntime.Selector("_simulateLaunchForTaskWithIdentifier:");
         void_objc_msgSend_IntPtr(BGTaskScheduler.Shared.Handle, method.Handle, taskId.Handle);
     }
 }
            public virtual void DoCommand(ObjCRuntime.Selector selector)
            {
                //_control.ClearCompositionUnderlines();
                NSApplication app = NSApplication.SharedApplication;

                base.KeyDown(app.CurrentEvent);
            }
Exemple #3
0
        private void RefreshData()
        {
            try
            {
                Api.ShowComments = true;
                Api.SaveXls      = true;
                //Api.SaveCsv = cbSaveCsv.Checked;
                //Api.SavePxl = cbSavePxl.Checked;
                //Api.SavePdf = cbSavePdf.Checked;
                //Api.SaveHtml = cbSaveHtml.Checked;
                //Api.SaveBmp = cbSaveBmp.Checked;
                //Api.AspNetCode = cbSaveAspNet.Checked;
                Api.R1C1Mode = FmlaButton.SelectedSegment == 1;

                if (Api.AspNetCode)
                {
                    int Checked = 0;
                    if (Api.SaveXls)
                    {
                        Checked++;
                    }
                    if (Api.SaveCsv)
                    {
                        Checked++;
                    }
                    if (Api.SavePxl)
                    {
                        Checked++;
                    }
                    if (Api.SavePdf)
                    {
                        Checked++;
                    }
                    if (Api.SaveHtml)
                    {
                        Checked++;
                    }
                    if (Api.SaveBmp)
                    {
                        Checked++;
                    }

                    if (Checked > 1)
                    {
                        edData.Value = "It is not possible to send a file to a browser in more than one file format.\r\nPlease uncheck \"Generate ASP.NET code\" or select only one format for saving.";
                        return;
                    }
                }

                var desc = new ObjCRuntime.Selector("noteClientStringWillChange");
                IntPtr_objc_msgSend(TextFinder.Handle, desc.Handle);

                edData.Value = Api.Process((Language)(int)LangButton.SelectedSegment, "xls", true);
            }
            catch (Exception ex)
            {
                AppDelegate.LogError(ex);
            }
        }
Exemple #4
0
        public override void WillFinishLaunching(NSNotification notification)
        {
            var selector = new ObjCRuntime.Selector("handleGetURLEvent:withReplyEvent:");

            NSAppleEventManager.SharedAppleEventManager.SetEventHandler(this,
                                                                        selector,
                                                                        AEEventClass.Internet,
                                                                        AEEventID.GetUrl);
        }
Exemple #5
0
            public override bool DoCommandBySelector(NSTextView textView, ObjCRuntime.Selector commandSelector)
            {
                var k = KeyCode.None;

                if (commandSelector.Name == "moveUp:")
                {
                    k = KeyCode.Up;
                }
                else if (commandSelector.Name == "moveDown:")
                {
                    k = KeyCode.Down;
                }
                else if (commandSelector.Name == "insertNewline:")
                {
                    k = KeyCode.Enter;
                }
                return(viewModel.OnFormulaKeyPressed(k));
            }
Exemple #6
0
 public override bool CanPerform(ObjCRuntime.Selector action, NSObject withSender)
 {
     return(action.Name == "messageCopyTextAction:");
 }
Exemple #7
0
        protected override void TerminateWithSuccess()
        {
            var s = new ObjCRuntime.Selector("terminateWithSuccess");

            UIApplication.SharedApplication.PerformSelector(s, UIApplication.SharedApplication, 0);
        }
Exemple #8
0
 internal static IntPtr GetClassForObject(IntPtr obj)
 {
     return(Messaging.IntPtr_objc_msgSend(obj, Selector.GetHandle(Selector.Class)));
 }