Ejemplo n.º 1
0
        private void Image_Click()
        {
            //Store the images in their own a-z folder and retrieve them from there.
            string emailFolder = "";

            try {
                emailFolder = ImageStore.GetEmailImagePath();              //will create the folder if it doesn't exist already.
            }
            catch (Exception ex) {
                FriendlyException.Show(Lans.g(this, "Unable to find Email Images folder"), ex);
                return;
            }
            FormImagePicker FormIP = new FormImagePicker(emailFolder);

            FormIP.ShowDialog();
            if (FormIP.DialogResult != DialogResult.OK)
            {
                return;
            }
            textContentEmail.SelectionLength = 0;
            textContentEmail.SelectedText    = "[[img:" + FormIP.SelectedImageName + "]]";
        }
Ejemplo n.º 2
0
        private void Image_Click()
        {
            //if storing images in database, GetWikiPath will throw an exception, cannot be storing in database to use images in the wiki
            string wikiPath = "";

            try {
                wikiPath = WikiPages.GetWikiPath();
            }
            catch (Exception ex) {
                MessageBox.Show(this, ex.Message);
                return;
            }
            FormImagePicker FormWI = new FormImagePicker(wikiPath);

            FormWI.ShowDialog();
            if (FormWI.DialogResult != DialogResult.OK)
            {
                return;
            }
            textContent.SelectionLength = 0;
            textContent.SelectedText    = "[[img:" + FormWI.SelectedImageName + "]]";
            //webBrowserWiki.AllowNavigation=true;
            //RefreshHtml();
        }