예제 #1
0
        static void Main(string[] args)
        {
            FigmaApplication.Init(Environment.GetEnvironmentVariable("TOKEN"));

            NSApplication.Init();
            NSApplication.SharedApplication.ActivationPolicy = NSApplicationActivationPolicy.Regular;

            var stackView = new StackView()
            {
                Orientation = LayoutOrientation.Vertical
            };

            var frame      = new Rectangle(0, 0, 800, 600);
            var mainWindow = new Window(frame)
            {
                Title   = "Cocoa Figma Local File Sample",
                Content = stackView
            };

            scrollView = new ScrollView();
            stackView.AddChild(scrollView);

            var converters = FigmaSharp.AppContext.Current.GetFigmaConverters();
            var storyboard = new FigmaStoryboard(converters);

            documentExample = new DocumentExample(scrollView, storyboard);

            mainWindow.Show();

            NSApplication.SharedApplication.ActivateIgnoringOtherApps(true);
            NSApplication.SharedApplication.Run();
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            var converters = FigmaSharp.AppContext.Current.GetFigmaConverters();
            var storyboard = new FigmaStoryboard(converters);

            var scrollViewWrapper = new ScrollViewWrapper(ContainerPanel);

            documentExample = new DocumentExample(scrollViewWrapper, storyboard);
        }
예제 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.


            var converters = FigmaSharp.AppContext.Current.GetFigmaConverters();
            var storyboard = new FigmaStoryboard(converters);

            var scrollViewWrapper = new ScrollViewWrapper(ScrollView);

            documentExample = new DocumentExample(scrollViewWrapper, storyboard);
        }
예제 #4
0
        public static void Main(string[] args)
        {
            FigmaApplication.Init(Environment.GetEnvironmentVariable("TOKEN"));
            Application.Init();

            var window = new Window(WindowType.Toplevel);

            window.HeightRequest = window.WidthRequest = 700;

            var scrollWindow = new ScrolledWindow();

            window.Add(scrollWindow);

            var converters = FigmaSharp.AppContext.Current.GetFigmaConverters();
            var storyboard = new FigmaStoryboard(converters);

            var scrollViewWrapper = new ScrollViewWrapper(scrollWindow);

            documentExample = new DocumentExample(scrollViewWrapper, storyboard);

            window.ShowAll();

            Application.Run();
        }