示例#1
0
        private void ClipBtn_Click(object sender, EventArgs e)
        {
            ImageLister dlg = new ImageLister(Root);

            dlg.FromClpBtn.Visible   = false;
            dlg.LoadImageBtn.Visible = false;
            dlg.DelBtn.Visible       = false;
            dlg.FillingCombo.Visible = false;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                ((Button)sender).BackgroundImage = FormCollection.getImgFromDiskOrRes(dlg.ImageStamp);
                if ((string)(((Control)sender).Tag) == "1")
                {
                    Root.ImageStamp1 = dlg.ImageStamp;
                }
                else if ((string)(((Control)sender).Tag) == "2")
                {
                    Root.ImageStamp2 = dlg.ImageStamp;
                }
                else if ((string)(((Control)sender).Tag) == "3")
                {
                    Root.ImageStamp3 = dlg.ImageStamp;
                }
            }
        }
示例#2
0
        private void ClipartsSelBtn_Click(object sender, EventArgs e)
        {
            ImageLister dlg = new ImageLister(Root);

            dlg.FromClpBtn.Visible  = false;
            dlg.InsertBtn.Text      = Root.Local.ButtonOkText;
            dlg.AutoCloseCb.Visible = false;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                Root.ImageStampFilling = dlg.ImageStampFilling;
                Root.StampFileNames.Clear();
//                for(int i=0;i<dlg.Images.Images.Count;i++)
                foreach (ListViewItem it in dlg.ImageListViewer.Items)
                {
                    Root.StampFileNames.Add(it.ImageKey);// dlg.Images.Images.Keys[i]);
                }
            }
        }