コード例 #1
0
ファイル: Main.cs プロジェクト: SageSBR/ChameleonProject
        private void l_files_SelectedValueChanged(object sender, EventArgs e)
        {
            if (l_files.SelectedItem == null)
            {
                return;
            }

            if (Decoding != null && Decoding.Decoded == false)
            {
                return;
            }

            l_files.Enabled = false;
            ClearData();
            Decoding = ExtractorMgr.DecodePak((l_files.SelectedItem as FileInfo));
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: SageSBR/ChameleonProject
        public void Update(object sender, EventArgs a)
        {
            tool_progress.Value = ProgressValue;
            tip_status.Text     = ToolText;

            if (datagrid.Rows.Count <= 0 && Decoding != null && Decoding.Decoded)
            {
                Decoding.PrintHeaders();
                l_files.Enabled = true;
            }

            if (AllId >= 0 && (Decoding == null || Decoding.Decoded) && ExtractorMgr._ToExtract.Count <= 0)
            {
                if (Decoding != null)
                {
                    foreach (PakElement Element in Decoding._Elements)
                    {
                        if (Extractor.Instance.IsChecked(Element.Header.Ext))
                        {
                            ExtractorMgr.AddToExtract(Element);
                        }
                    }
                }

                if (AllId < l_files.Items.Count)
                {
                    FileInfo Info = l_files.Items[AllId] as FileInfo;

                    if (Info != null)
                    {
                        l_files.SelectedIndex = AllId;
                        Decoding        = ExtractorMgr.DecodePak(Info);
                        l_files.Enabled = false;
                    }

                    ++AllId;
                }
                else
                {
                    AllId = -1;
                }
            }
        }