Example #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (tb_psave.Text + tb_pname.Text != "")
            {
                if (!File.Exists(tb_psave.Text))
                {
                    goto Create;
                }
                else
                {
                    if (MessageBox.Show($"The file {tb_psave.Text} already exists.\nWould you like to replace it and continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    {
                        goto Create;
                    }
                    goto Exit;
                }
            }
            else
            {
                MessageBox.Show("Please fill out all of the fields", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); goto Exit;
            }

Create:
            project      = new GifProj();
            project.irps = irps;
            project.ValidateIrps();
            project.SavePath = tb_psave.Text;
            project.SaveName = tb_pname.Text;
            project.SaveMe(project.SavePath);
            DialogResult = DialogResult.OK;
            this.Close();
            Exit :;
        }
Example #2
0
 private void openProjectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog ofd = new OpenFileDialog())
     {
         ofd.Filter = "Gif Maker Projects | *gproj";
         if (ofd.ShowDialog() == DialogResult.OK)
         {
             btn_delete.Enabled = true;
             btn_add.Enabled    = true;
             GifProj proj = GifProj.FromFile(new System.IO.FileInfo(ofd.FileName));
             ActiveProject = proj;
             UpdateMenuState(true,
                             tsmbtn_changePath,
                             tsmbtn_save,
                             tsmbtn_saveas,
                             tsmbtn_options,
                             tsmbtn_editprojectpath,
                             tsmbtn_next,
                             tsmbtn_previous,
                             tsmbtn_delimg,
                             tsmbtn_rename);
             Text        = $"{ActiveProject.SaveName} - Gif Maker";
             UpdateSlave = new ImagePropertySlave(ActiveProject, pictureBox1);
             UpdateImage();
         }
     }
 }
Example #3
0
 public ImagePropertySlave(GifProj proj, PictureBox pb)
 {
     Display = pb;
     this.ProjectRefrence = proj;
     if (proj.DataValues.SelectedImage == 0)
     {
         proj.DataValues.SelectedImage++;
     }
 }
Example #4
0
        public Export(GifProj project)
        {
            InitializeComponent();
            proj = project;

            backgroundWorker1.WorkerReportsProgress = true;

            clb_include.Items.Clear();
            foreach (irp thisIrp in project.irps)
            {
                clb_include.Items.Add(thisIrp.ToString());
                clb_include.SetItemChecked(clb_include.Items.Count - 1, true); // Check all values by default
            }
            textBox1.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\export.gif";
        }