Esempio n. 1
0
        private void countBlanksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenLibraryDialog.Multiselect = true;

            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                OpenLibraryDialog.Multiselect = false;
                return;
            }

            OpenLibraryDialog.Multiselect = false;

            MLibraryV2.Load = false;

            int count = 0;

            for (int i = 0; i < OpenLibraryDialog.FileNames.Length; i++)
            {
                MLibraryV2 library = new MLibraryV2(OpenLibraryDialog.FileNames[i]);

                for (int x = 0; x < library.Count; x++)
                {
                    if (library.Images[x].Length <= 8)
                    {
                        count++;
                    }
                }

                library.Close();
            }

            MLibraryV2.Load = true;
            MessageBox.Show(count.ToString());
        }
Esempio n. 2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            MessageBox.Show(OpenLibraryDialog.FileName);
            ClearInterface();
            ImageList.Images.Clear();
            PreviewListView.Items.Clear();
            _indexList.Clear();

            if (_library != null)
            {
                _library.Close();
            }
            _library = new Mir3Library(OpenLibraryDialog.FileName);
            PreviewListView.VirtualListSize = _library.Images.Count;

            // Show .Lib path in application title.
            this.Text = OpenLibraryDialog.FileName.ToString();

            PreviewListView.SelectedIndices.Clear();

            if (PreviewListView.Items.Count > 0)
            {
                PreviewListView.Items[0].Selected = true;
            }

            radioButtonImage.Enabled   = true;
            radioButtonShadow.Enabled  = true;
            radioButtonOverlay.Enabled = true;
        }
Esempio n. 3
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenLibraryDialog.Filter = "(*.wzl;*.wzx)|*.wzl;*.wzx|所有文件(*.*)|*.*";  //(*.txt)|*.txt|所有文件(*.*)|*.*”

            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            ClearInterface();
            ImageList.Images.Clear();
            PreviewListView.Items.Clear();
            _indexList.Clear();

            if (_library != null)
            {
                _library.Close();
            }
            _library = new MLibrary(OpenLibraryDialog.FileName);
            PreviewListView.VirtualListSize = _library.Images.Count;

            // Show .Lib path in application title.
            this.Text = OpenLibraryDialog.FileName.ToString();

            PreviewListView.SelectedIndices.Clear();

            if (PreviewListView.Items.Count > 0)
            {
                PreviewListView.Items[0].Selected = true;
            }
        }
Esempio n. 4
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            OpenLibrary(OpenLibraryDialog.FileName);
        }
Esempio n. 5
0
        private void convertlibsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure you want to convert every .lib file in the folder to version 1?\nThis will break any .lib file that is not version 0!", "Convert lib folder", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }
            MessageBox.Show("Select any .lib file you want.\nThe code will convert all .lib files in this folder + subfolders.\nThis will take a while.\nYou will get a message when its finished!\nRemember to backup first!");
            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            string MainFolder = Path.GetDirectoryName(OpenLibraryDialog.FileName);
            string NewFolder  = MainFolder + "\\Converted\\";

            ProcessDir(MainFolder, 0, NewFolder);
            MessageBox.Show("Folder processing finally finished.\n location: " + NewFolder);
        }
Esempio n. 6
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (OpenLibraryDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            ClearInterface();
            ImageList.Images.Clear();
            PreviewListView.Items.Clear();
            _indexList.Clear();

            if (_library != null)
            {
                _library.Close();
            }
            _library = new MLibrary(OpenLibraryDialog.FileName);
            PreviewListView.VirtualListSize = _library.Images.Count;
        }