Ejemplo n.º 1
0
        public override void Initialize(GraphicsDeviceManager graphics)
        {
            if (_isInitialized)
            {
                return;
            }

            Console.WriteLine("gameRunning is not initialized!");

            base.Initialize();

            World.World.GetInstance().Player.ConnectedComp = World.World.GetInstance().Player.PlayerComp;

            Terminal terminal = new Terminal(Game, new Point(2, 2),
                                             new Point(Globals.Settings.GameWidth / 3 - 4, Globals.Settings.GameHeight - 4), "Terminal v0.1");

            NetworkMap networkMap = new NetworkMap(Game, new Point(Globals.Settings.GameWidth / 3 + 1, Globals.Settings.GameHeight - Globals.Settings.GameHeight / 3 + 2),
                                                   new Point(Globals.Settings.GameWidth - terminal.Rectangle.Width - 7, Globals.Settings.GameHeight / 3 - 4), "NetworkMap v0.1", 24);

            StatusBar statusBar = new StatusBar(Game, new Point(Globals.Settings.GameWidth / 3, 1),
                                                new Point(Globals.Settings.GameWidth - terminal.Rectangle.Width - 5, 52), "status", false, false);

            RemoteView remoteView = new RemoteView(Game, new Point(terminal.Rectangle.Width + 5, statusBar.Rectangle.Height + 3),
                                                   new Point((int)(Globals.Settings.GameWidth * 0.75) - terminal.Rectangle.Width - 7, Globals.Settings.GameHeight - statusBar.Rectangle.Height - networkMap.Rectangle.Height - 8), "RemoteView v0.1");

            Module notePad = new Module(Game, new Point(remoteView.Rectangle.X + remoteView.Rectangle.Width + 3, statusBar.Rectangle.Height + 3),
                                        new Point(Globals.Settings.GameWidth - remoteView.Rectangle.X - remoteView.Rectangle.Width - 5, Globals.Settings.GameHeight - statusBar.Rectangle.Height - networkMap.Rectangle.Height - 8 - 53), "Friendly Neighbourhood Notepad");

            TraceTracker traceTracker = new TraceTracker(Game, new Point(notePad.Rectangle.X, notePad.Rectangle.Bottom + 3), new Point(notePad.Rectangle.Width, 50), "TraceTracker v0.1");

            _elements.Add(terminal);
            _elements.Add(networkMap);
            _elements.Add(statusBar);
            _elements.Add(remoteView);
            _elements.Add(notePad);
            _elements.Add(traceTracker);

            foreach (var m in _elements)
            {
                m.Initialize();
            }

            Game.CurrentGameSpeed = GameSpeed.Single;
            Game.Terminal         = terminal;
        }
        public bool SetRemote(out string remoteurl)
        {
            RemoteViewModel viewModel = new RemoteViewModel();

            RemoteView remote = new RemoteView();

            remote.DataContext = viewModel;

            bool?dialogResult = remote.ShowDialog();

            remoteurl = viewModel.RemoteUrl;

            if (dialogResult.HasValue)
            {
                return(dialogResult.Value);
            }

            return(false);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            RequestWindowFeature(Android.Views.WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.activity_scan);

            DisplayMetrics dm      = Resources.DisplayMetrics;
            float          density = dm.Density;

            mScreenWidth  = dm.WidthPixels;
            mScreenHeight = dm.HeightPixels;

            int scanFrameSize = (int)(SCAN_FRAME_SIZE * density);

            Rect rect = new Rect();

            rect.Left   = mScreenWidth / 2 - scanFrameSize / 2;
            rect.Right  = mScreenWidth / 2 + scanFrameSize / 2;
            rect.Top    = mScreenHeight / 2 - scanFrameSize / 2;
            rect.Bottom = mScreenHeight / 2 + scanFrameSize / 2;

            remoteView = new RemoteView.Builder()
                         .SetContext(this)
                         .SetBoundingBox(rect)
                         .SetFormat(HmsScan.AllScanType)
                         .Build();

            remoteView.OnCreate(savedInstanceState);
            remoteView.SetOnResultCallback(this);

            FrameLayout.LayoutParams @params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MatchParent, FrameLayout.LayoutParams.MatchParent);
            FrameLayout frameLayout          = FindViewById <FrameLayout>(Resource.Id.rim);

            frameLayout.AddView(remoteView, @params);

            //set back button listener
            ImageView backBtn = FindViewById <ImageView>(Resource.Id.back_img);

            backBtn.Click += (s, a) => Finish();
        }
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        System       = GameObject.Find("System");
        Applications = GameObject.Find("Applications");
        Hacking      = GameObject.Find("Hacking");
        Other        = GameObject.Find("Other");
        Computer     = GameObject.Find("Computer");
        Prompts      = GameObject.Find("Prompts");
        WindowHandel = GameObject.Find("WindowHandel");
        QA           = GameObject.Find("QA");

        winman = WindowHandel.GetComponent <WindowManager>();

        history      = Computer.GetComponent <SiteList>();
        websecviewer = Computer.GetComponent <WebSecViewer>();

        qa = QA.GetComponent <BugReport>();

        //DESKTOP ENVIROMENT
        customtheme = Computer.GetComponent <CustomTheme>();
        startmenu   = System.GetComponent <AppMenu>();
        rezprompt   = Prompts.GetComponent <RezPrompt>();
        desktop     = System.GetComponent <Desktop>();
        vc          = System.GetComponent <VolumeController>();

        //HACKING SOFTWARE
        pro             = Hacking.GetComponent <Progtive>();
        trace           = Hacking.GetComponent <Tracer>();
        dirsearch       = Hacking.GetComponent <DirSearch>();
        dicCrk          = Hacking.GetComponent <DicCrk>();
        passwordcracker = Hacking.GetComponent <PasswordCracker>();
        dirsearch       = Hacking.GetComponent <DirSearch>();

        //STOCK SYSTEMS
//		port = Applications.GetComponent<Portfolio>();
//		shareprompt = Prompts.GetComponent<SharePrompt>();

        //OTHER PROMPTS
        purchaseprompt = Prompts.GetComponent <PurchasePrompt>();

        //SYSTEM PROMPTS
        errorprompt    = Prompts.GetComponent <ErrorProm>();
        shutdownprompt = Prompts.GetComponent <ShutdownProm>();
        installprompt  = Prompts.GetComponent <InstallPrompt>();

        //SYSTEM SOFTWARE
        sysclock      = System.GetComponent <Clock>();
        cli           = System.GetComponent <CLI>();
        cliv2         = System.GetComponent <CLIV2>();
        os            = System.GetComponent <OS>();
        systempanel   = System.GetComponent <SystemPanel>();
        tasks         = System.GetComponent <TaskViewer>();
        com           = System.GetComponent <Computer>();
        diskman       = System.GetComponent <DiskMan>();
        vv            = System.GetComponent <VersionViewer>();
        fp            = System.GetComponent <FileExplorer>();
        SRM           = System.GetComponent <SystemResourceManager>();
        boot          = System.GetComponent <Boot>();
        deviceman     = System.GetComponent <DeviceManager>();
        executor      = System.GetComponent <Executor>();
        gatewayviewer = System.GetComponent <GatewayViewer>();

        //LEGAL APPLICATIONS
        email          = Applications.GetComponent <EmailClient>();
        caluclator     = Applications.GetComponent <Calculator>();
        notepad        = Applications.GetComponent <Notepad>();
        notepadv2      = Applications.GetComponent <Notepadv2>();
        accountlogs    = Applications.GetComponent <AccLog>();
        mp             = Applications.GetComponent <MusicPlayer>();
        treeview       = Applications.GetComponent <TreeView>();
        nv             = Applications.GetComponent <NotificationViewer>();
        pv             = Applications.GetComponent <PlanViewer>();
        calendar       = Applications.GetComponent <Calendar>();
        calendarv2     = Applications.GetComponent <CalendarV2>();
        eventview      = Applications.GetComponent <EventViewer>();
        exchangeviewer = Applications.GetComponent <ExchangeViewer>();

        //INTERNET BROWSERS
        internetbrowser = Applications.GetComponent <InternetBrowser>();
        edgebrowser     = Applications.GetComponent <NetViewer>();
        firefoxbrowser  = Applications.GetComponent <Firefox>();

        //APPLICATIONS
        systemMap  = Applications.GetComponent <SystemMap>();
        textreader = Applications.GetComponent <TextReader>();

        //BROWSER STUFF
        history = Computer.GetComponent <SiteList>();

        //OTHER CONNECTION DEVICE
        rv  = Applications.GetComponent <RemoteView>();
        vmd = Other.GetComponent <VMDesigner>();
    }
Ejemplo n.º 5
0
 internal void SetRemoveView(RemoteView remoteView)
 {
     // This method should be called once only.
     Debug.Assert(RemoteRuntimeView == null);
     RemoteRuntimeView = remoteView;
 }
Ejemplo n.º 6
0
    void ProgramSetup()
    {
        AppSoftware     = GameObject.Find("Applications");
        QA              = GameObject.Find("QA");
        HackingSoftware = GameObject.Find("Hacking");
        SysSoftware     = GameObject.Find("System");
        Computer        = GameObject.Find("Computer");
        Other           = GameObject.Find("Other");
        Missions        = GameObject.Find("Missions");

        qa = QA.GetComponent <BugReport>();

        //mb = GetComponent<MissionBrow>();
        sl  = Computer.GetComponent <SiteList>();
        wsv = Computer.GetComponent <WebSecViewer>();

        //Hacking Software
        pro     = HackingSoftware.GetComponent <Progtive>();
        trace   = HackingSoftware.GetComponent <Tracer>();
        ds      = HackingSoftware.GetComponent <DirSearch>();
        dc      = HackingSoftware.GetComponent <DicCrk>();
        passcrk = HackingSoftware.GetComponent <PasswordCracker>();

        //System Sofware
        dsk   = SysSoftware.GetComponent <Desktop>();
        com   = SysSoftware.GetComponent <Computer>();
        ss    = SysSoftware.GetComponent <ScreenSaver>();
        sp    = SysSoftware.GetComponent <SystemPanel>();
        am    = SysSoftware.GetComponent <AppMenu>();
        tasks = SysSoftware.GetComponent <TaskViewer>();
        clk   = SysSoftware.GetComponent <Clock>();
        cmd   = SysSoftware.GetComponent <CLI>();
        cmd2  = SysSoftware.GetComponent <CLIV2>();
        os    = SysSoftware.GetComponent <OS>();
        dm    = SysSoftware.GetComponent <DiskMan>();
        mouse = SysSoftware.GetComponent <Mouse>();
        fp    = SysSoftware.GetComponent <FileExplorer>();
        dem   = SysSoftware.GetComponent <DeviceManager>();
        vc    = SysSoftware.GetComponent <VolumeController>();

        //Application Softwate
        //        port = AppSoftware.GetComponent<Portfolio>();
        tr     = AppSoftware.GetComponent <TextReader>();
        sm     = AppSoftware.GetComponent <SystemMap>();
        al     = AppSoftware.GetComponent <AccLog>();
        note   = AppSoftware.GetComponent <Notepad>();
        notev2 = AppSoftware.GetComponent <Notepadv2>();
        cc     = AppSoftware.GetComponent <EmailClient>();
        tv     = AppSoftware.GetComponent <TreeView>();
        nv     = AppSoftware.GetComponent <NotificationViewer>();
        pv     = AppSoftware.GetComponent <PlanViewer>();
        //calendar = AppSoftware.GetComponent<Calendar>();
        calendarv2   = AppSoftware.GetComponent <CalendarV2>();
        eventview    = AppSoftware.GetComponent <EventViewer>();
        exchangeview = AppSoftware.GetComponent <ExchangeViewer>();

        // Application Browsers
        ib  = AppSoftware.GetComponent <InternetBrowser>();
        eib = AppSoftware.GetComponent <NetViewer>();
        fib = AppSoftware.GetComponent <Firefox>();
        rv  = AppSoftware.GetComponent <RemoteView>();
        cal = AppSoftware.GetComponent <Calculator>();
        mp  = AppSoftware.GetComponent <MusicPlayer>();



        // Prompts
        ip  = Prompts.GetComponent <InstallPrompt>();
        pp  = Prompts.GetComponent <PurchasePrompt>();
        ep  = Prompts.GetComponent <ErrorProm>();
        sdp = Prompts.GetComponent <ShutdownProm>();
        rp  = Prompts.GetComponent <RezPrompt>();
//		shareprompt = Prompts.GetComponent<SharePrompt>();
        notiprompt = Prompts.GetComponent <NotfiPrompt>();

        //OTHER
        vmd = Other.GetComponent <VMDesigner>();

        // Computer
        ct = Computer.GetComponent <CustomTheme>();

        //Missions
        misgen = Missions.GetComponent <MissionGen>();
    }
Ejemplo n.º 7
0
        void ReleaseDesignerOutlets()
        {
            if (JoinContainerView != null)
            {
                JoinContainerView.Dispose();
                JoinContainerView = null;
            }

            if (ChatView != null)
            {
                ChatView.Dispose();
                ChatView = null;
            }

            if (OverlayView != null)
            {
                OverlayView.Dispose();
                OverlayView = null;
            }

            if (JoinButton != null)
            {
                JoinButton.Dispose();
                JoinButton = null;
            }

            if (RoomTextField != null)
            {
                RoomTextField.Dispose();
                RoomTextField = null;
            }

            if (AudioButton != null)
            {
                AudioButton.Dispose();
                AudioButton = null;
            }

            if (ButtonContainerView != null)
            {
                ButtonContainerView.Dispose();
                ButtonContainerView = null;
            }

            if (ButtonContainerViewLeftConstraint != null)
            {
                ButtonContainerViewLeftConstraint.Dispose();
                ButtonContainerViewLeftConstraint = null;
            }

            if (FooterView != null)
            {
                FooterView.Dispose();
                FooterView = null;
            }

            if (FooterViewBottomConstraint != null)
            {
                FooterViewBottomConstraint.Dispose();
                FooterViewBottomConstraint = null;
            }

            if (HangupButton != null)
            {
                HangupButton.Dispose();
                HangupButton = null;
            }

            if (LocalView != null)
            {
                LocalView.Dispose();
                LocalView = null;
            }

            if (LocalViewBottomConstraint != null)
            {
                LocalViewBottomConstraint.Dispose();
                LocalViewBottomConstraint = null;
            }

            if (LocalViewHeightConstraint != null)
            {
                LocalViewHeightConstraint.Dispose();
                LocalViewHeightConstraint = null;
            }

            if (LocalViewRightConstraint != null)
            {
                LocalViewRightConstraint.Dispose();
                LocalViewRightConstraint = null;
            }

            if (LocalViewWidthConstraint != null)
            {
                LocalViewWidthConstraint.Dispose();
                LocalViewWidthConstraint = null;
            }

            if (RemoteView != null)
            {
                RemoteView.Dispose();
                RemoteView = null;
            }

            if (RemoteViewBottomConstraint != null)
            {
                RemoteViewBottomConstraint.Dispose();
                RemoteViewBottomConstraint = null;
            }

            if (RemoteViewLeftConstraint != null)
            {
                RemoteViewLeftConstraint.Dispose();
                RemoteViewLeftConstraint = null;
            }

            if (RemoteViewRightConstraint != null)
            {
                RemoteViewRightConstraint.Dispose();
                RemoteViewRightConstraint = null;
            }

            if (RemoteViewTopConstraint != null)
            {
                RemoteViewTopConstraint.Dispose();
                RemoteViewTopConstraint = null;
            }

            if (UrlLabel != null)
            {
                UrlLabel.Dispose();
                UrlLabel = null;
            }

            if (VideoButton != null)
            {
                VideoButton.Dispose();
                VideoButton = null;
            }
        }