示例#1
0
		public static void Main (string[] args)
		{
			var generator = new global::Eto.Platform.Wpf.Generator ();
			generator.Add<IDialog> (() => new Controls.CustomDialog ());
			generator.Add<IForm> (() => new Controls.CustomForm ());
            //generator.Add<IWebView>(() => new Controls.CefSharpWebViewHandler());
            generator.Add<IWebView>(() => new Controls.CefGlueWebViewHandler());
            generator.Add<IJabbRApplication>(() => new Controls.JabbRApplicationHandler());
            Generator.Initialize(generator);

			Style.Add<Controls.CustomForm> (null, handler => {
				AddResources (handler.Control);
			});
			Style.Add<Controls.CustomDialog> (null, handler => {
				AddResources (handler.Control);
			});
			Style.Add<TreeViewHandler> ("channelList", handler => {
				handler.Control.BorderThickness = new sw.Thickness (0);
			});
			Style.Add<TreeViewHandler> ("userList", handler => {
				handler.Control.BorderThickness = new sw.Thickness (0);
			});

			var app = new JabbRApplication();
			app.Initialized += CheckForNewVersion;
			app.Run (args);
		}
示例#2
0
 public static void Main(string[] args)
 {
     ServicePointManager.ServerCertificateValidationCallback = Validator;
     var generator = new Eto.Platform.GtkSharp.Generator();
     generator.Add <IJabbRApplication>(() => new JabbRApplicationHandler());
     
     var app = new JabbRApplication(generator);
     app.Run(args);
 }
示例#3
0
 public static void Main(string[] args)
 {
     ServicePointManager.ServerCertificateValidationCallback = Validator;
     var generator = Generator.Detect;
     generator.Add <IJabbRApplication>(() => new JabbRApplicationHandler());
     
     var app = new JabbRApplication();
     app.Run(args);
 }
示例#4
0
        static void Main(string[] args)
        {
#if DEBUG
            Debug.Listeners.Add (new ConsoleTraceListener());
#endif
            // so we don't link out mono.runtime for detection

            var generator = Generator.Detect;
            generator.Add <IJabbRApplication>(() => new JabbRApplicationHandler());

            NSApplication.CheckForIllegalCrossThreadCalls = false;

            Style.Add<TreeViewHandler>("channelList", h => {
                h.Control.Delegate = new CustomTreeViewDelegate { Handler = h, AllowGroupSelection = true };
                h.Control.SelectionHighlightStyle = NSTableViewSelectionHighlightStyle.SourceList;
                h.Scroll.BorderType = NSBorderType.NoBorder;
            });
            
            Style.Add<FormHandler>("mainForm", h => {
                h.Control.CollectionBehavior |= NSWindowCollectionBehavior.FullScreenPrimary;
            });
            
            Style.Add<ApplicationHandler>("application", h => {
                h.EnableFullScreen();
            });
            
            Style.Add<TreeViewHandler>("userList", h => {
                h.Control.Delegate = new CustomTreeViewDelegate { Handler = h };
                h.Control.SelectionHighlightStyle = NSTableViewSelectionHighlightStyle.SourceList;
                h.Scroll.BorderType = NSBorderType.NoBorder;
                
            });
            
            Style.Add<WebViewHandler>(null, h => {
                h.Control.Preferences.UsesPageCache = false;
            });
            
            var app = new JabbRApplication();
            app.Initialized += delegate
            {
#if DEBUG
                NSUserDefaults.StandardUserDefaults.SetBool (true, "WebKitDeveloperExtras");
                NSUserDefaults.StandardUserDefaults.Synchronize();
#endif
            };
            app.Run(args);
        }