コード例 #1
0
ファイル: Main.cs プロジェクト: PierreGe/VR-Picture-Browser
    // Use this for initialization
    void Start()
    {
        // Rescaling text to increase readability
        GameObject go   = GameObject.Find("TagText");
        TextMesh   text = go.GetComponent <TextMesh>();

        text.fontSize              = 300;
        text.transform.localScale /= 25;

        //Load pictures
        const string jsonPath = "Assets/classification/resultimgobj.json";

        this.pM        = PicturesLoader.parseJson(jsonPath);
        scriptInstance = this;

        //Add the introduction text
        shownTags = "Say a tag to start. \n Look down for Suggestions!\n Say HELP to display the help";
        showTag();

        //Show the default suggestions
        List <KeyValuePair <String, HashSet <Picture> > > dic = PicturesManager.pictureDictionary.ToList();

        dic.Sort((pair1, pair2) => - (pair1.Value.Count.CompareTo(pair2.Value.Count)));
        showSuggestions(dic.Take(5).Select(s => s.Key).ToArray());
    }
コード例 #2
0
        public PicturesViewModel()
        {
            _picturesManager = new PicturesManager();



            #region ICommand init

            selectLoadFolder = new Command(SelectLoadFolder);

            #endregion

            #region Events //пусто

            //SelectedGridItemChanged += OnGridSelectedItemChanged;

            #endregion

            #region ТЕСТЫ!!!!!! //пусто

            #endregion


            UpdatePictures();
        }
コード例 #3
0
 private void initializeAll()
 {
     m_PicutresManager = new PicturesManager()
     {
         MyAlbums = r_UserAnalysis.UserIn.Albums
     };
     m_InitSortGroupBoxHeight = groupBoxSortOpt.Height;
     m_LoadedUserAnalysis     = r_UserAnalysis;
     pictureBoxLaodedUser.LoadAsync(m_LoadedUserAnalysis.UserIn.PictureSqaureURL);
     initSettings();
     initListView();
 }
コード例 #4
0
ファイル: WordToHtmlConverter.cs プロジェクト: zzy092/npoi
        /**
         * This method shall store image bytes in external file and convert it if
         * necessary. Images shall be stored using PNG format. Other formats may be
         * not supported by user browser.
         * <p>
         * Please note the {@link #processImage(XmlElement, boolean, Picture, String)}.
         *
         * @param currentBlock
         *            currently processed HTML element, like <tt>p</tt>. Shall be
         *            used as parent of newly created <tt>img</tt>
         * @param inlined
         *            if image is inlined
         * @param picture
         *            HWPF object, contained picture data and properties
         */
        protected override void ProcessImage(XmlElement currentBlock, bool inlined, Picture picture)
        {
            PicturesManager fileManager = GetPicturesManager();

            if (fileManager != null)
            {
                String url = fileManager
                             .SavePicture(picture.GetContent(),
                                          picture.SuggestPictureType(),
                                          picture.SuggestFullFileName());

                if (!string.IsNullOrEmpty(url))
                {
                    ProcessImage(currentBlock, inlined, picture, url);
                    return;
                }
            }

            // no default implementation -- skip
            currentBlock.AppendChild(htmlDocumentFacade.Document
                                     .CreateComment("Image link to '"
                                                    + picture.SuggestFullFileName() + "' can be here"));
        }
コード例 #5
0
 public void SetPicturesManager(PicturesManager fileManager)
 {
     this.picturesManager = fileManager;
 }
コード例 #6
0
 public PicturesServices(string pDatabase)
 {
     _manager = new PicturesManager(pDatabase);
 }
コード例 #7
0
 public PicturesServices(User pUser)
 {
     _manager = new PicturesManager(pUser);
 }