Exemple #1
0
        /// <summary>
        /// 'Add image' child window is closed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void w_Closed(object sender, EventArgs e)
        {
            Debug.WriteLine("in Closed.");
            AddImageChildWindow w = this.acw;

            if (!string.IsNullOrEmpty(w.ResultingImageUrl))
            {
                // Set targeting text box
                (w.Param as TextBox).Text = w.ResultingImageUrl;
            }
        }
Exemple #2
0
        /// <summary>
        /// 'Choose a image' button is clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void chooseImageButton_Click(object sender, RoutedEventArgs e)
        {
            // Input targeting textBox as param
            Button b     = sender as Button;
            object param = null;

            if (b.Tag as string == "thumbNailButton")
            {
                param = this.itemDataForm.FindNameInContent("thumbNailTextBox");
            }
            else
            {
                param = this.itemDataForm.FindNameInContent("imageTextBox");
            }
            this.acw         = new AddImageChildWindow(param);
            this.acw.Closed += new EventHandler(w_Closed);
            this.acw.Show();
        }