コード例 #1
0
 //public WorkbenchEvent(EType type, Workbench workbench, Manifold manifold, int index, ManifoldEvent manifoldEvent = null){
 public WorkbenchEvent(EType type, Workbench workbench, Sensor sensor, int index, ManifoldEvent manifoldEvent = null)
 {
     this.type      = type;
     this.workbench = workbench;
     //this.manifold = manifold;
     this.sensor        = sensor;
     this.index         = index;
     this.manifoldEvent = manifoldEvent;
 }
コード例 #2
0
 //public WorkbenchEvent(EType type, Workbench workbench, Manifold manifold, int index, int otherIndex){
 public WorkbenchEvent(EType type, Workbench workbench, Sensor sensor, int index, int otherIndex)
 {
     this.type      = type;
     this.workbench = workbench;
     //this.manifold = manifold;
     this.sensor     = sensor;
     this.index      = index;
     this.otherIndex = otherIndex;
 }
コード例 #3
0
        // Overridden from UIViewController
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            View.BringSubviewToFront(tableContent);
            View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromBundle("CarbonBackground"));
            InitNavigationBar("ic_nav_workbench", false);
            backAction = () => {
                root.navigation.ToggleMenu();
            };
            AutomaticallyAdjustsScrollViewInsets = false;

            Title = Strings.Workbench.SELF.FromResources();

            ion = AppState.context;



            if (remoteMode)
            {
                workbench = new Workbench(ion);
                //workbench.storedWorkbench = ion.currentWorkbench;
                //ion.currentWorkbench = workbench;
            }
            else
            {
                var button = new UIButton(new CGRect(0, 0, 31, 30));
                button.TouchUpInside += (obj, args) => {
                    TakeScreenshot();
                };
                button.SetImage(UIImage.FromBundle("ic_camera"), UIControlState.Normal);

                recordButton = new UIButton(new CGRect(0, 0, 35, 35));
                recordButton.TouchUpInside += (sender, e) => {
                    RecordDevices();
                };
                recordButton.SetImage(UIImage.FromBundle("ic_record"), UIControlState.Normal);

                var barButton  = new UIBarButtonItem(button);
                var barButton2 = new UIBarButtonItem(recordButton);

                NavigationItem.RightBarButtonItems = new UIBarButtonItem[] { barButton, barButton2 };
                workbench = ion.currentWorkbench;
            }

            tableContent.AllowsSelection = true;
            tableContent.ContentInset    = new UIEdgeInsets(0, 0, 0, 0);

            //source = new RemoteWorkbenchTableSource(this, ion, tableContent);
            //source.SetWorkbench(workbench);
            //source.onAddClicked = OnRequestViewer;

            //tableContent.Source = source;

            //AppState.context.onWorkbenchChanged += this.OnWorkbenchChanged;
            //if(ion.currentWorkbench == null){
            //	Console.WriteLine("workbench for ion isn't created for some reason");
            //}
            //ion.currentWorkbench.onWorkbenchEvent += OnWorkbenchEvent;
            AppState.context.onWorkbenchChanged += this.OnWorkbenchChanged;
            if (workbench == null)
            {
                Console.WriteLine("workbench for ion isn't created for some reason");
            }
            workbench.onWorkbenchEvent += OnWorkbenchEvent;
        }