private void MenuButtonDelegate(object sender, ClickedEventArgs e)
    {
        choosing = true;
        listView.SetActive(true);
        infoTextMesh.text = "Existing Scans";
        downloading       = false;
        updatedData       = false;
        viewing           = false;
        pointCloudHolder.transform.localPosition = Vector3.zero;
        foreach (Transform child in pointCloudHolder.transform)
        {
            if (child.gameObject.name.StartsWith("Cloud"))
            {
                GameObject.Destroy(child.gameObject);
            }
        }
        WebList webList = listView.GetComponent <WebList>();

        if (useFolder)
        {
            webList.SetupFolder(listLocation);
        }
        else
        {
            webList.Setup(listLocation);
        }
    }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            ProCount();
            _visibilable = (Visibilable)this.FindResource("visi");

            ShowInTaskbar   = false;
            this.Topmost    = true;
            this.ResizeMode = ResizeMode.NoResize;

            WinHide wh = new WinHide(this);

            wh.BindEvent();

            this.MouseLeftButtonDown += MainWindow_MouseLeftButtonDown;

            _fileList = new FileList();
            _webList  = new WebList();

            _fileNameList = _fileList.GetList();
            _webbufflist  = _webList.GetWeblist();

            listbox1.ItemsSource   = _fileNameList;
            listboxWeb.ItemsSource = _webbufflist;
        }
Exemplo n.º 3
0
        private void DeleteSelectedWeb()
        {
            var del = WebList.SingleOrDefault(p => p == this.SelectedWeb);

            WebList.Remove(del);
            ReLoadDataWebs();
        }
Exemplo n.º 4
0
 public ActionResult Edit(WebList webLists)
 {
     try
     {
         // TODO: Add update logic here
         Accountdb.Entry(webLists).State = System.Data.Entity.EntityState.Modified;
         Accountdb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(webLists));
     }
 }
Exemplo n.º 5
0
 public ActionResult Create(WebList webs)
 {
     try
     {
         // TODO: Add insert logic here
         Accountdb.weblist.Add(webs);
         Accountdb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 6
0
 public ActionResult DeleteWebsite(int id, FormCollection collection)
 {
     try
     {
         WebList webs = Accountdb.weblist.Find(id);
         Accountdb.weblist.Remove(webs);
         Accountdb.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 7
0
        //加载窗体事件
        private void Win_loaded(object sender, RoutedEventArgs e)
        {
            FileStream fs           = null;
            FileStream webfile      = null;
            FileStream positionfile = null;
            Position   position     = null;

            try
            {
                fs           = new FileStream("file.dat", FileMode.Open);
                webfile      = new FileStream("website.dat", FileMode.Open);
                positionfile = new FileStream("position.dat", FileMode.Open);
                BinaryFormatter bf  = new BinaryFormatter();
                BinaryFormatter wbf = new BinaryFormatter();
                BinaryFormatter pbf = new BinaryFormatter();
                _fileList = (FileList)bf.Deserialize(fs);
                _webList  = (WebList)wbf.Deserialize(webfile);
                position  = (Position)pbf.Deserialize(positionfile);
                fs.Close();
                webfile.Close();
                positionfile.Close();
            }
            catch
            {
            }
            finally
            {
                _fileNameList        = _fileList.GetList();
                listbox1.ItemsSource = _fileNameList;

                _webbufflist           = _webList.GetWeblist();
                listboxWeb.ItemsSource = _webbufflist;

                webframe.Content = new Addsite(webframe, _webList);
            }
            if (position == null)
            {
                return;
            }
            this.Left = position.Left;
            this.Top  = position.Top;
        }
Exemplo n.º 8
0
        private void EditWebData()
        {
            if (this.SelectedWeb == null)
            {
                return;
            }

            this.SelectedWeb.Name        = tGCBAWebsName.Text;
            this.SelectedWeb.RelativeUrl = tGCBAWebsUrl.Text;

            if (string.IsNullOrEmpty(SelectedWeb.Name) && WebList.Contains(SelectedWeb))
            {
                this.WebList.Remove(SelectedWeb);
                lbGCBAWebsList.Items.Remove(SelectedWeb);
            }
            else if (!string.IsNullOrEmpty(SelectedWeb.Name) && !WebList.Contains(SelectedWeb))
            {
                this.WebList.Add(SelectedWeb);
                lbGCBAWebsList.Items.Add(SelectedWeb);
            }
        }
Exemplo n.º 9
0
        private void SaveChanges()
        {
            this.SelectedItem.Name          = tGCBADataName.Text;
            this.SelectedItem.WebServerIP   = tGCBAWebIP.Text;
            this.SelectedItem.AllowExplorer = cbGCBAWebAllowExplorer.Checked;
            this.SelectedItem.AllowRemote   = cbGCBAWebAllowRemote.Checked;
            this.SelectedItem.UseCustomUser = cbGCBAUseCustomUser.Checked;
            this.SelectedItem.CustomUser    = tGCBACustomUser.Text;
            this.SelectedItem.CustomPass    = tGCBACustomPass.Text;

            // webs
            this.SelectedItem.Webs = WebList.Where(p => !string.IsNullOrEmpty(p.Name)).ToList();   // guardo el status con las modificaciones

            if (!Config.Global.Ambientes.Any(p => p == this.SelectedItem))
            {
                Config.Global.Ambientes.Add(this.SelectedItem);
            }
            Config.SaveGlobal();

            this.Form.Result.ReLoadAmbientesMenu = true;

            ReLoadData(this.SelectedItem);
        }
    // Use this for initialization
    void Start()
    {
        pointer                       = controllerRightObject.GetComponent <SteamVR_LaserPointer>();
        pointer.PointerIn            += PointerInDelegate;
        pointer.PointerOut           += PointerOutDelegate;
        controller                    = pointer.GetComponent <SteamVR_TrackedController>();
        controller.TriggerClicked    += TriggerDelegate;
        controller.MenuButtonClicked += MenuButtonDelegate;
        infoTextMesh                  = textView.GetComponent <TextMesh>();
        string     configJson = System.IO.File.ReadAllText("config.cfg");
        JSONObject json       = new JSONObject(configJson);

        json.GetField(out useFolder, "useFolder", false);
        print("got useFolder: " + useFolder);
        if (useFolder)
        {
            string path;
            json.GetField(out path, "folder", null);
            print("got folder: " + path);
            WebList webList = listView.GetComponent <WebList>();
            listLocation = path;
            webList.SetupFolder(path);
        }
        else
        {
            string dlLocation;
            json.GetField(out listLocation, "listLocation", "");
            json.GetField(out dlLocation, "dlLocation", "");
            print("got listLocation: " + listLocation);
            print("got dlLocation: " + dlLocation);

            WebList webList = listView.GetComponent <WebList>();
            webList.Setup(listLocation);
            WEB_DL_LOCATION = dlLocation;
        }
    }
 // Update is called once per frame
 void Update()
 {
     if (choosing)
     {
         if (triggerPressed || Input.GetKeyDown("space"))
         {
             if (selectedListObj != null)
             {
                 ListView.JSONItem selectedObjectJson = selectedListObj.GetComponent <ListView.JSONItem>();
                 string            fileToGet          = selectedObjectJson.data.text;
                 click(fileToGet);
             }
         }
         else if (Input.GetKeyDown("2"))
         {
             WebList webList = listView.GetComponent <WebList>();
             string  file    = webList.data[1].text;
             click(file);
         }
         else if (Input.GetKeyDown("3"))
         {
             WebList webList = listView.GetComponent <WebList>();
             string  file    = webList.data[2].text;
             click(file);
         }
         else if (Input.GetKeyDown("4"))
         {
             WebList webList = listView.GetComponent <WebList>();
             string  file    = webList.data[3].text;
             click(file);
         }
     }
     else if (downloading)
     {
         infoTextMesh.text = "DOWNLOADING..." + 100.0f * progress + "%";
     }
     else if (updatedData)
     {
         textView.SetActive(false);
         StartCoroutine(ChangeDisplay());
         //ChangeDisplay();
         updatedData = false;
         viewing     = true;
     }
     else if (viewing)
     {
         //controls while viewing:
         //trigger: move in direction controller is pointing, flying
         //pad click: move in direction controller is pointing, relative to clicked direction (left side strafes left).  do not adjust Y
         //grip: reset to default.
         if (controller.triggerPressed)
         {
             Vector3 moveVector = controller.transform.forward;
             moveVector = moveVector * -0.03f;
             pointCloudHolder.transform.Translate(moveVector);
         }
         else if (controller.padPressed)
         {
             Vector3 moveVector = controller.transform.forward;
             moveVector.y = 0;
             moveVector.Normalize();
             moveVector = moveVector * -0.03f;
             pointCloudHolder.transform.Translate(moveVector);
         }
         else if (controller.gripped)
         {
             pointCloudHolder.transform.localPosition = Vector3.zero;
         }
     }
     triggerPressed = false;
 }
Exemplo n.º 12
0
        // GET: AccountManager/Edit/5
        public ActionResult Edit(int id)
        {
            WebList webList = Accountdb.weblist.Find(id);

            return(this.View(webList));
        }
Exemplo n.º 13
0
        public ActionResult DeleteWebsite(int id)
        {
            WebList webs = Accountdb.weblist.Find(id);

            return(View(webs));
        }
Exemplo n.º 14
0
 public Addsite(Frame frame, WebList webList)
 {
     this.webList     = webList;
     this.fatherFrame = frame;
     InitializeComponent();
 }