Пример #1
0
        private void buttonGenCustom_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dlg             = new OpenFileDialog();
            var            imageExtensions = string.Join(";", System.Drawing.Imaging.ImageCodecInfo.GetImageDecoders().Select(ici => ici.FilenameExtension));

            dlg.Filter = $"图片文件|{imageExtensions}|所有文件|*.*";
            if (dlg.ShowDialog() == true)
            {
                System.Drawing.Image bgimg = System.Drawing.Image.FromFile(dlg.FileName);
                Fubang.GenWithTemplate(SharedData.Infos, bgimg, textBoxTemplate.Text, int.Parse(textBoxRepeat.Text), float.Parse(textBoxOffset.Text));
            }
        }
Пример #2
0
        private void buttonGenCustom_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dlg             = new OpenFileDialog();
            var            imageExtensions = string.Join(";", System.Drawing.Imaging.ImageCodecInfo.GetImageDecoders().Select(ici => ici.FilenameExtension));

            dlg.Filter = $"图片文件|{imageExtensions}|所有文件|*.*";
            if (dlg.ShowDialog() == true)
            {
                System.Drawing.Image bgimg = System.Drawing.Image.FromFile(dlg.FileName);
                string ext = System.IO.Path.GetExtension(dlg.FileName);

                List <BiliInterfaceInfo> linfo = new List <BiliInterfaceInfo>();
                int start = int.Parse(textBoxFrom.Text);
                foreach (BiliInterfaceInfo i in (List <BiliInterfaceInfo>)SharedData.Infos)
                {
                    if (i.Fpaiming >= start)
                    {
                        linfo.Add(i);
                    }
                }

                Fubang.GenWithTemplate(linfo, bgimg, textBoxTemplate.Text, int.Parse(textBoxRepeat.Text), float.Parse(textBoxOffset.Text), ext);
            }
        }