void OnImageOnlyClick() { try { ///find out what image was clicked /// int r = (int)(clickPosition.Y / (iHeightImage + iSpaceBetweenImages)); int c = (int)(clickPosition.X / (iWidthImage + iSpaceBetweenImages)); int iImg = r * 3 + c; //MessageBox.Show("X: " +clickPosition.X + // " Y: " + clickPosition.Y + // " image was clicked: " + iImg); RemoveStateImageOnly(); iLoadImageWihSummary = iImg; LoadStateImageWithSummary(); for (int i = 1; i < parent2.slbook1.Items.Count;) { parent2.slbook1.Items.RemoveAt(i); } for (int i = 0; i < 3; i++) { Liquid.HtmlRichTextArea asd = new Liquid.HtmlRichTextArea(); asd.Width = 300; asd.Height = 300; asd.SetDefaultStyles(); asd.Load("<p>asd</p>"); parent2.slbook1.Items.Add(asd); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
void OnImageOnlyClick() { ///find out what image was clicked /// int r = (int)(clickPosition.Y / (iHeightImage + iSpaceBetweenImages)); int c = (int)(clickPosition.X / (iWidthImage + iSpaceBetweenImages)); int iImg = r * 3 + c; //MessageBox.Show("X: " +clickPosition.X + // " Y: " + clickPosition.Y + // " image was clicked: " + iImg); RemoveStateImageOnly(); iLoadImageWihSummary = iImg; LoadStateImageWithSummary(); if (iImg == 0) { for (int i = 0; i < 3; i++) { Liquid.HtmlRichTextArea asd = new Liquid.HtmlRichTextArea(); asd.Name = "rta0" + i.ToString(); asd.Width = 600; asd.Height = 550; asd.SetDefaultStyles(); asd.Load("<p>" + "<h1>" + lst_Arts[i].Title + "</h1>" + "<img height=\"42\" width=\"42\" src=\"Images/" + lst_Arts[i].Image + "\"/>" + lst_Arts[i].Content + "</p>"); parent2.slbook1.Items.Add(asd); } } else if (iImg == 1) { ((Liquid.HtmlRichTextArea)parent2.slbook1.Items[1]).Load("<p>" + "<h1>" + lst_Arts[3].Title + "</h1>" + "<img height=\"42\" width=\"42\" src=\"Images/" + lst_Arts[3].Image + "\"/>" + lst_Arts[3].Content + "</p>"); ((Liquid.HtmlRichTextArea)parent2.slbook1.Items[2]).Load("<p>" + "<h1>" + lst_Arts[2].Title + "</h1>" + "<img height=\"42\" width=\"42\" src=\"Images/" + lst_Arts[2].Image + "\"/>" + lst_Arts[2].Content + "</p>"); } }