@ -1,4 +1,5 @@
 
			
		
	
		
		
			
				
					
					 using  System ;  using  System ;  
			
		
	
		
		
			
				
					
					using  System.Collections.Generic ;  
			
		
	
		
		
			
				
					
					using  System.ComponentModel ; using  System.ComponentModel ;  
			
		
	
		
		
			
				
					
					using  System.Diagnostics ; using  System.Diagnostics ;  
			
		
	
		
		
			
				
					
					using  System.Drawing ; using  System.Drawing ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -15,6 +16,8 @@ using DotNetCTFDumper.MMFParser.EXE.Loaders.Objects;
 
			
		
	
		
		
			
				
					
					using  DotNetCTFDumper.MMFParser.MFA.Loaders.mfachunks ; using  DotNetCTFDumper.MMFParser.MFA.Loaders.mfachunks ;  
			
		
	
		
		
			
				
					
					using  DotNetCTFDumper.MMFParser.Translation ; using  DotNetCTFDumper.MMFParser.Translation ;  
			
		
	
		
		
			
				
					
					using  DotNetCTFDumper.Utils ; using  DotNetCTFDumper.Utils ;  
			
		
	
		
		
			
				
					
					using  Animation  =  DotNetCTFDumper . MMFParser . EXE . Loaders . Objects . Animation ;  
			
		
	
		
		
			
				
					
					using  AnimationDirection  =  DotNetCTFDumper . MMFParser . EXE . Loaders . Objects . AnimationDirection ;  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					namespace  DotNetCTFDumper.GUI namespace  DotNetCTFDumper.GUI  
			
		
	
		
		
			
				
					
					{ {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -28,7 +31,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					        public  static  bool  BreakMusics ; 
        public  static  bool  BreakMusics ; 
 
			
		
	
		
		
			
				
					
					        public  static  bool  Loaded ; 
        public  static  bool  Loaded ; 
 
			
		
	
		
		
			
				
					
					        public  Thread  LoaderThread ; 
        public  Thread  LoaderThread ; 
 
			
		
	
		
		
			
				
					
					        public  Color  ColorTheme  =  Color . FromArgb ( 223 , 114 , 38 ) ; 
        public  Color  ColorTheme  =  Color . FromArgb ( 223 ,   114 ,   38 ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        public  delegate  void  SaveHandler ( int  index ,  int  all ) ; 
        public  delegate  void  SaveHandler ( int  index ,  int  all ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -43,13 +46,13 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            foreach  ( Control  item  in  Controls ) 
            foreach  ( Control  item  in  Controls ) 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                item . ForeColor  =  ColorTheme ; 
                item . ForeColor  =  ColorTheme ; 
 
			
		
	
		
		
			
				
					
					                if ( ! ( item  is  PictureBox ) & & ! ( item  is  TabPage ) ) item . BackColor = Color . Black ; 
                if   ( ! ( item  is  PictureBox )   & &   ! ( item  is  TabPage ) )   item . BackColor   =   Color . Black ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                if ( item  is  Button )  item . BackColor = Color . FromArgb ( 30 , 30 , 30 ) ; 
                if   ( item  is  Button )  item . BackColor   =   Color . FromArgb ( 30 ,   30 ,   30 ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                if  ( item  is  Label ) 
                if  ( item  is  Label ) 
 
			
		
	
		
		
			
				
					
					                { 
                { 
 
			
		
	
		
		
			
				
					
					                    item . BackColor  =  Color . Transparent 
                    //item.BackColor = Color.Transparent 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                    item . Refresh ( ) ; 
                    item . Refresh ( ) ; 
 
			
		
	
		
		
			
				
					
					                } 
                } 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -59,12 +62,12 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                foreach  ( Control  item  in  tabPage . Controls ) 
                foreach  ( Control  item  in  tabPage . Controls ) 
 
			
		
	
		
		
			
				
					
					                { 
                { 
 
			
		
	
		
		
			
				
					
					                    item . ForeColor  =  ColorTheme ; 
                    item . ForeColor  =  ColorTheme ; 
 
			
		
	
		
		
			
				
					
					                    if ( ! ( item  is  PictureBox ) & & ! ( item  is  TabPage ) item . BackColor = Color . Black ; 
                    if   ( ! ( item  is  PictureBox )   & &   ! ( item  is  TabPage ) && ! ( item  is  Label  ))  item . BackColor   =   Color . Black ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                    if ( item  is  Button )  item . BackColor = Color . FromArgb ( 30 , 30 , 30 ) ; 
                    if   ( item  is  Button )  item . BackColor   =   Color . FromArgb ( 30 ,   30 ,   30 ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                    if  ( item  is  Label ) 
                    if  ( item  is  Label ) 
 
			
		
	
		
		
			
				
					
					                    { 
                    { 
 
			
		
	
		
		
			
				
					
					                        item . BackColor  =  Color . Transparent 
                        //item.BackColor = Color.Transparent 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                        item . Refresh ( ) ; 
                        item . Refresh ( ) ; 
 
			
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -73,20 +76,21 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            foreach  ( var  item  in  ChunkCombo . Items ) 
            foreach  ( var  item  in  ChunkCombo . Items ) 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                ( ( ToolStripItem ) item ) . ForeColor  =  ColorTheme ; 
                ( ( ToolStripItem )   item ) . ForeColor  =  ColorTheme ; 
 
			
				
				
			
		
	
		
		
			
				
					
					                ( ( ToolStripItem ) item ) . BackColor = Color . Black ; 
                ( ( ToolStripItem )   item ) . BackColor   =   Color . Black ; 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            hexBox1 . ForeColor  =  ColorTheme ; 
            hexBox1 . ForeColor  =  ColorTheme ; 
 
			
		
	
		
		
			
				
					
					              hexBox1 . InfoForeColor  =  Color . FromArgb ( ColorTheme . R / 2 ,  ColorTheme . G / 2 ,  ColorTheme . B / 2 ) ; 
            hexBox1 . InfoForeColor  =  Color . FromArgb ( ColorTheme . R   /   2 ,  ColorTheme . G   /   2 ,  ColorTheme . B   /   2 ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					              hexBox1 . SelectionForeColor = Color . FromArgb ( ColorTheme . R ,  ColorTheme . G ,  ColorTheme . B ) ; 
            hexBox1 . SelectionForeColor   =   Color . FromArgb ( ColorTheme . R ,  ColorTheme . G ,  ColorTheme . B ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					              hexBox1 . SelectionBackColor = Color . FromArgb ( ColorTheme . R / 4 ,  ColorTheme . G / 4 ,  ColorTheme . B / 4 ) ; 
            hexBox1 . SelectionBackColor   =   Color . FromArgb ( ColorTheme . R   /   4 ,  ColorTheme . G   /   4 ,  ColorTheme . B   /   4 ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					              hexBox1 . ShadowSelectionColor = Color . FromArgb ( 150 , ColorTheme . R / 4 ,  ColorTheme . G / 4 ,  ColorTheme . B / 4 ) ; 
            hexBox1 . ShadowSelectionColor   =   Color . FromArgb ( 150 ,   ColorTheme . R   /   4 ,  ColorTheme . G   /   4 ,  ColorTheme . B   /   4 ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					            label1 . Text  =  Settings . DumperVersion ; 
            label1 . Text  =  Settings . DumperVersion ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            Pame2Mfa . OnMessage  + =  ( obj ) = > 
            Pame2Mfa . OnMessage  + =  ( obj )   = > 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                var  date  =  DateTime . Now ; 
                var  date  =  DateTime . Now ; 
 
			
		
	
		
		
			
				
					
					                string  msg  =  ( string ) obj ; 
                string  msg  =  ( string )   obj ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                mfaLogBox . AppendText ( msg . Length  >  0 
                mfaLogBox . AppendText ( msg . Length  >  0 
 
			
		
	
		
		
			
				
					
					                    ?  $"[{date.Hour,2}:{date.Minute,2}:{date.Second,2}:{date.Millisecond,3}] {msg}\r\n" 
                    ?  $"[{date.Hour,2}:{date.Minute,2}:{date.Second,2}:{date.Millisecond,3}] {msg}\r\n" 
 
			
		
	
		
		
			
				
					
					                    :  "\r\n" ) ; 
                    :  "\r\n" ) ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -109,8 +113,8 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					        private  void  openFileDialog1_FileOk ( object  sender ,  CancelEventArgs  e ) 
        private  void  openFileDialog1_FileOk ( object  sender ,  CancelEventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  worker  =  new  BackgroundWorker ( ) ; 
            var  worker  =  new  BackgroundWorker ( ) ; 
 
			
		
	
		
		
			
				
					
					            worker . DoWork  + = ( workSender , workE ) = >    StartReading ( ) ; 
            worker . DoWork  + =   ( workSender ,   workE )   = >  StartReading ( ) ; 
 
			
				
				
			
		
	
		
		
			
				
					
					            worker . RunWorkerCompleted  + =  ( workSender , workE ) = >    AfterLoad ( ) ; 
            worker . RunWorkerCompleted  + =  ( workSender ,   workE )   = >  AfterLoad ( ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					            worker . RunWorkerAsync ( ) ; 
            worker . RunWorkerAsync ( ) ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -153,6 +157,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            ChunkCombo . Show ( Cursor . Position ) ; 
            ChunkCombo . Show ( Cursor . Position ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  treeView1_RightClick ( object  sender ,  MouseEventArgs  e ) 
        private  void  treeView1_RightClick ( object  sender ,  MouseEventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            if  ( ( e . Button  &  MouseButtons . Right )  ! =  0 ) 
            if  ( ( e . Button  &  MouseButtons . Right )  ! =  0 ) 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -161,16 +166,18 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  ChunkCombo_ItemSelected ( object  sender ,  ToolStripItemClickedEventArgs  e ) 
        private  void  ChunkCombo_ItemSelected ( object  sender ,  ToolStripItemClickedEventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            switch  ( e . ClickedItem . Name ) 
            switch  ( e . ClickedItem . Name ) 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                case  "saveChunkBtn" : 
                case  "saveChunkBtn" : 
 
			
		
	
		
		
			
				
					
					                    var  chunk  =  ( ( ChunkNode )  treeView1 . SelectedNode ) . chunk ; 
                    var  chunk  =  ( ( ChunkNode )  treeView1 . SelectedNode ) . chunk ; 
 
			
		
	
		
		
			
				
					
					                    if  (   chunk ! =  null ) 
                    if  ( chunk   ! =  null ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                    { 
                    { 
 
			
		
	
		
		
			
				
					
					                        chunk . Save ( ) ; 
                        chunk . Save ( ) ; 
 
			
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                    break ; 
                    break ; 
 
			
		
	
		
		
			
				
					
					                case  "viewHexBtn" : 
                case  "viewHexBtn" : 
 
			
		
	
		
		
			
				
					
					                    ShowHex ( ) ; 
                    ShowHex ( ) ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -179,7 +186,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                    var  selected  =  ( ( ChunkNode )  treeView1 . SelectedNode ) . loader ; 
                    var  selected  =  ( ( ChunkNode )  treeView1 . SelectedNode ) . loader ; 
 
			
		
	
		
		
			
				
					
					                    if  ( selected  is  Frame  frm ) 
                    if  ( selected  is  Frame  frm ) 
 
			
		
	
		
		
			
				
					
					                    { 
                    { 
 
			
		
	
		
		
			
				
					
					                        var  viewer  =  new  FrameViewer ( frm , Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ) ; 
                        var  viewer  =  new  FrameViewer ( frm ,   Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                        viewer . Show ( ) ; 
                        viewer . Show ( ) ; 
 
			
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -200,7 +207,8 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                listBox1 . Items . Add ( $"Id: {nodeChunk.Id}" ) ; 
                listBox1 . Items . Add ( $"Id: {nodeChunk.Id}" ) ; 
 
			
		
	
		
		
			
				
					
					                listBox1 . Items . Add ( $"Flag: {nodeChunk.Flag}" ) ; 
                listBox1 . Items . Add ( $"Flag: {nodeChunk.Flag}" ) ; 
 
			
		
	
		
		
			
				
					
					                listBox1 . Items . Add ( $"Size: {nodeChunk.Size.ToPrettySize()}" ) ; 
                listBox1 . Items . Add ( $"Size: {nodeChunk.Size.ToPrettySize()}" ) ; 
 
			
		
	
		
		
			
				
					
					                if  ( nodeChunk . DecompressedSize > - 1 ) listBox1 . Items . Add ( $"Decompressed Size: {nodeChunk.DecompressedSize.ToPrettySize()}" ) ; 
                if  ( nodeChunk . DecompressedSize  >  - 1 ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                    listBox1 . Items . Add ( $"Decompressed Size: {nodeChunk.DecompressedSize.ToPrettySize()}" ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            if  ( nodeLoader  ! =  null ) 
            if  ( nodeLoader  ! =  null ) 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -218,7 +226,8 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
		
		
			
				
					
					                } 
                } 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					            GameInfo . BackColor = Color . Transparent ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            GameInfo . BackColor  =  Color . Transparent ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            GameInfo . Refresh ( ) ; 
            GameInfo . Refresh ( ) ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -263,7 +272,8 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                    foreach  ( var  key  in  items . ItemDict . Keys ) 
                    foreach  ( var  key  in  items . ItemDict . Keys ) 
 
			
		
	
		
		
			
				
					
					                    { 
                    { 
 
			
		
	
		
		
			
				
					
					                        var  frameItem  =  items . ItemDict [ key ] ; 
                        var  frameItem  =  items . ItemDict [ key ] ; 
 
			
		
	
		
		
			
				
					
					                        var  objNode  =  new  ChunkNode ( $"{(Constants.ObjectType)frameItem.ObjectType} - {frameItem.Name}" ,  frameItem ) ; 
                        var  objNode  =  new  ChunkNode ( $"{(Constants.ObjectType) frameItem.ObjectType} - {frameItem.Name}" , 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                            frameItem ) ; 
 
			
		
	
		
		
			
				
					
					                        newNode . Nodes . Add ( objNode ) ; 
                        newNode . Nodes . Add ( objNode ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -323,6 +333,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            soundBar . Value  =  ( int )  ( index  /  ( float )  all  *  100 ) ; 
            soundBar . Value  =  ( int )  ( index  /  ( float )  all  *  100 ) ; 
 
			
		
	
		
		
			
				
					
					            soundLabel . Text  =  $"{index}/{all}" ; 
            soundLabel . Text  =  $"{index}/{all}" ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        public  void  UpdateMusicBar ( int  index ,  int  all ) 
        public  void  UpdateMusicBar ( int  index ,  int  all ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            all  - =  1 ; 
            all  - =  1 ; 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -356,7 +367,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                SetSoundElements ( true ) ; 
                SetSoundElements ( true ) ; 
 
			
		
	
		
		
			
				
					
					                IsDumpingSounds  =  true ; 
                IsDumpingSounds  =  true ; 
 
			
		
	
		
		
			
				
					
					                Backend . DumpSounds ( this , true , true ) ; 
                Backend . DumpSounds ( this ,   true ,   true ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					            else 
            else 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -366,6 +377,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                SetSoundElements ( false ) ; 
                SetSoundElements ( false ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  imagesButton_Click ( object  sender ,  EventArgs  e ) 
        private  void  imagesButton_Click ( object  sender ,  EventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            if  ( Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( )  = =  null )  return ; 
            if  ( Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( )  = =  null )  return ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -373,7 +385,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                SetImageElements ( true ) ; 
                SetImageElements ( true ) ; 
 
			
		
	
		
		
			
				
					
					                IsDumpingImages  =  true ; 
                IsDumpingImages  =  true ; 
 
			
		
	
		
		
			
				
					
					                Backend . DumpImages ( this , true , true ) ; 
                Backend . DumpImages ( this ,   true ,   true ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -384,6 +396,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                SetImageElements ( false ) ; 
                SetImageElements ( false ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  musicsButton_Click ( object  sender ,  EventArgs  e ) 
        private  void  musicsButton_Click ( object  sender ,  EventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            if  ( Exe . Instance . GameData . GameChunks . GetChunk < MusicBank > ( )  = =  null )  return ; 
            if  ( Exe . Instance . GameData . GameChunks . GetChunk < MusicBank > ( )  = =  null )  return ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -391,7 +404,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                SetMusicElements ( true ) ; 
                SetMusicElements ( true ) ; 
 
			
		
	
		
		
			
				
					
					                IsDumpingMusics  =  true ; 
                IsDumpingMusics  =  true ; 
 
			
		
	
		
		
			
				
					
					                Backend . DumpMusics ( this , true , true ) ; 
                Backend . DumpMusics ( this ,   true ,   true ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					            else 
            else 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -407,21 +420,23 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            soundBar . Visible  =  state ; 
            soundBar . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            soundLabel . Visible  =  state ; 
            soundLabel . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            soundsButton . Text  =  state  ?  "Cancel" : "Dump Sounds" ; 
            soundsButton . Text  =  state  ?  "Cancel"   :   "Dump Sounds" ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            soundBar . Value  =  0 ; 
            soundBar . Value  =  0 ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        public  void  SetImageElements ( bool  state ) 
        public  void  SetImageElements ( bool  state ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            imageBar . Visible  =  state ; 
            imageBar . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            imageLabel . Visible  =  state ; 
            imageLabel . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            imagesButton . Text  =  state  ?  "Cancel" : "Dump Images" ; 
            imagesButton . Text  =  state  ?  "Cancel"   :   "Dump Images" ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            imageBar . Value  =  0 ; 
            imageBar . Value  =  0 ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        public  void  SetMusicElements ( bool  state ) 
        public  void  SetMusicElements ( bool  state ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            musicBar . Visible  =  state ; 
            musicBar . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            musicLabel . Visible  =  state ; 
            musicLabel . Visible  =  state ; 
 
			
		
	
		
		
			
				
					
					            musicsButton . Text  =  state  ?  "Cancel" : "Dump Musics" ; 
            musicsButton . Text  =  state  ?  "Cancel"   :   "Dump Musics" ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            musicBar . Value  =  0 ; 
            musicBar . Value  =  0 ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -451,7 +466,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                Settings . DumpImages  =  true ; 
                Settings . DumpImages  =  true ; 
 
			
		
	
		
		
			
				
					
					                var  bank  =  Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ; 
                var  bank  =  Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ; 
 
			
		
	
		
		
			
				
					
					                bank . SaveImages = false ; 
                bank . SaveImages   =   false ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                bank . Read ( ) ; 
                bank . Read ( ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } ; 
            } ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -473,20 +488,21 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					        private  void  dumpMFAButton_Click ( object  sender ,  EventArgs  e ) 
        private  void  dumpMFAButton_Click ( object  sender ,  EventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  worker  =  new  BackgroundWorker ( ) ; 
            var  worker  =  new  BackgroundWorker ( ) ; 
 
			
		
	
		
		
			
				
					
					                         worker . DoWork  + = ( workSender , workE ) = >    MFAGenerator . BuildMFA ( ) ;             worker . DoWork  + =   ( workSender ,   workE )   = >  MFAGenerator . BuildMFA ( ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            worker . RunWorkerCompleted  + =  ( workSender ,  workE )  = > 
            worker . RunWorkerCompleted  + =  ( workSender ,  workE )  = > 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                Logger . Log ( "MFA Done" ,  true ,  ConsoleColor . Yellow ) ; 
                Logger . Log ( "MFA Done" ,  true ,  ConsoleColor . Yellow ) ; 
 
			
		
	
		
		
			
				
					
					                             var  res  =  MessageBox . Show ( "Dump Extensions?" , "Finished" , MessageBoxButtons . YesNo ) ; 
                var  res  =  MessageBox . Show ( "Dump Extensions?" ,   "Finished" ,   MessageBoxButtons . YesNo ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                if  ( res  = =  DialogResult . Yes ) 
                if  ( res  = =  DialogResult . Yes ) 
 
			
		
	
		
		
			
				
					
					                { 
                { 
 
			
		
	
		
		
			
				
					
					                    foreach  ( var  item  in  Exe . Instance . PackData . Items ) 
                    foreach  ( var  item  in  Exe . Instance . PackData . Items ) 
 
			
		
	
		
		
			
				
					
					                    { 
                    { 
 
			
		
	
		
		
			
				
					
					                        item . Dump ( ) ; 
                        item . Dump ( ) ; 
 
			
		
	
		
		
			
				
					
					                                     Pame2Mfa . Message ( "Dumping " + item . PackFilename ) ; 
                        Pame2Mfa . Message ( "Dumping "   +   item . PackFilename ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                    } 
                    } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                } 
                } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                Process . Start ( $"{Settings.DumpPath}" ) ; 
                Process . Start ( $"{Settings.DumpPath}" ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } ; 
            } ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -510,10 +526,11 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                rawData  + =  Settings . AppName ; 
                rawData  + =  Settings . AppName ; 
 
			
		
	
		
		
			
				
					
					                rawData  + =  Settings . Copyright ; 
                rawData  + =  Settings . Copyright ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            try 
            try 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                var  previewKey  =  Decryption . MakeKeyFromBytes ( rawData ,  ( byte )  int . Parse ( ( charBox . Text ) ) ) ; 
                var  previewKey  =  Decryption . MakeKeyFromBytes ( rawData ,  ( byte )  int . Parse ( ( charBox . Text ) ) ) ; 
 
			
		
	
		
		
			
				
					
					                hexBox1 . ByteProvider = new  DynamicByteProvider ( previewKey ) ; 
                hexBox1 . ByteProvider   =   new  DynamicByteProvider ( previewKey ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					            catch 
            catch 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -529,6 +546,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                packDataListBox . Items . Add ( item . PackFilename ) ; 
                packDataListBox . Items . Add ( item . PackFilename ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            UpdatePackInfo ( 0 ) ; 
            UpdatePackInfo ( 0 ) ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -537,6 +555,7 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            var  item  =  Exe . Instance . PackData . Items [ index ] ; 
            var  item  =  Exe . Instance . PackData . Items [ index ] ; 
 
			
		
	
		
		
			
				
					
					            infoLabel . Text  =  $"Name: {item.PackFilename}\nSize: {item.Data.Length.ToPrettySize()}" ; 
            infoLabel . Text  =  $"Name: {item.PackFilename}\nSize: {item.Data.Length.ToPrettySize()}" ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  dumpPackButton_Click ( object  sender ,  EventArgs  e ) 
        private  void  dumpPackButton_Click ( object  sender ,  EventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  item  =  Exe . Instance . PackData . Items [ packDataListBox . SelectedIndex ] ; 
            var  item  =  Exe . Instance . PackData . Items [ packDataListBox . SelectedIndex ] ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -557,20 +576,30 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                item . Dump ( ) ; 
                item . Dump ( ) ; 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  packDataDialog_FileOk ( object  sender ,  CancelEventArgs  e ) 
        private  void  packDataDialog_FileOk ( object  sender ,  CancelEventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  item  =  Exe . Instance . PackData . Items [ packDataListBox . SelectedIndex ] ; 
            var  item  =  Exe . Instance . PackData . Items [ packDataListBox . SelectedIndex ] ; 
 
			
		
	
		
		
			
				
					
					            item . Dump ( packDataDialog . FileName ) ; 
            item . Dump ( packDataDialog . FileName ) ; 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  packDataListBox_SelectedIndexChanged ( object  sender ,  EventArgs  e ) = > UpdatePackInfo ( packDataListBox . SelectedIndex ) ; 
        private  void  packDataListBox_SelectedIndexChanged ( object  sender ,  EventArgs  e )  = > 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            UpdatePackInfo ( packDataListBox . SelectedIndex ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  plusCharBtn_Click ( object  sender ,  EventArgs  e ) {  charBox . Text  =  ( byte . Parse ( charBox . Text )  +  1 ) . ToString ( ) ;  InitKeyTab ( ) ; } 
        private  void  plusCharBtn_Click ( object  sender ,  EventArgs  e ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        { 
 
			
		
	
		
		
			
				
					
					            charBox . Text  =  ( byte . Parse ( charBox . Text )  +  1 ) . ToString ( ) ; 
 
			
		
	
		
		
			
				
					
					            InitKeyTab ( ) ; 
 
			
		
	
		
		
			
				
					
					        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  minusCharButton_Click ( object  sender ,  EventArgs  e ) {  charBox . Text  =  ( byte . Parse ( charBox . Text )  -  1 ) . ToString ( ) ;  InitKeyTab ( ) ; } 
        private  void  minusCharButton_Click ( object  sender ,  EventArgs  e ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        { 
 
			
		
	
		
		
			
				
					
					            charBox . Text  =  ( byte . Parse ( charBox . Text )  -  1 ) . ToString ( ) ; 
 
			
		
	
		
		
			
				
					
					            InitKeyTab ( ) ; 
 
			
		
	
		
		
			
				
					
					        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  charBox_TextChanged ( object  sender ,  EventArgs  e ) = > InitKeyTab ( ) ; 
        private  void  charBox_TextChanged ( object  sender ,  EventArgs  e )   = >   InitKeyTab ( ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -579,10 +608,10 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  bank  =  Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ; 
            var  bank  =  Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) ; 
 
			
		
	
		
		
			
				
					
					            var  items  =  bank . Images . ToList ( ) ; 
            var  items  =  bank . Images . ToList ( ) ; 
 
			
		
	
		
		
			
				
					
					            var  filtered  =  items . OrderBy ( x = > x . Value . Handle ) ; 
            var  filtered  =  items . OrderBy ( x   = >   x . Value . Handle ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            foreach  ( Frame  frame  in  Exe . Instance . GameData . Frames ) 
            foreach  ( Frame  frame  in  Exe . Instance . GameData . Frames ) 
 
			
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                var  frameNode  =  new  ChunkNode ( frame . Name , frame ) ; 
                var  frameNode  =  new  ChunkNode ( frame . Name ,   frame ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                advancedTreeView . Nodes . Add ( frameNode ) ; 
                advancedTreeView . Nodes . Add ( frameNode ) ; 
 
			
		
	
		
		
			
				
					
					                if  ( frame . Objects  ! =  null ) 
                if  ( frame . Objects  ! =  null ) 
 
			
		
	
		
		
			
				
					
					                { 
                { 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -621,27 +650,44 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					                } 
                } 
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
        private  void  advancedPlayAnimation_Click ( object  sender ,  EventArgs  e ) 
 
			
				
				
			
		
	
		
		
			
				
					
					        public  void  InitPlugins ( ) 
 
			
		
	
		
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            PluginAPI . PluginAPI . InitializePlugins ( ) ; 
            if  ( ( ( ChunkNode )  advancedTreeView . SelectedNode ) . loader  is  Animation  anim ) 
 
			
				
				
			
		
	
		
		
			
				
					
					            foreach  ( var  plugin  in  PluginAPI . PluginAPI . Plugins ) 
 
			
		
	
		
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                pluginsList . Items . Add ( plugin . Name ) ; 
                var  animThread  =  new  Thread ( PlayAnimation ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                List < Bitmap >  frames  =  new  List < Bitmap > ( ) ; 
 
			
		
	
		
		
			
				
					
					                foreach  ( var  dir  in  anim . DirectionDict ) 
 
			
		
	
		
		
			
				
					
					                { 
 
			
		
	
		
		
			
				
					
					                    foreach  ( var  frame  in  dir . Value . Frames ) 
 
			
		
	
		
		
			
				
					
					                    { 
 
			
		
	
		
		
			
				
					
					                        frames . Add ( Exe . Instance . GameData . GameChunks . GetChunk < ImageBank > ( ) . Images [ frame ] . Bitmap ) ; 
 
			
		
	
		
		
			
				
					
					                    } 
 
			
		
	
		
		
			
				
					
					                    animThread . Start ( new  Tuple < List < Bitmap > , AnimationDirection > ( frames , dir . Value ) ) ; 
 
			
		
	
		
		
			
				
					
					                } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					                
                
 
			
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					        public  void  PlayAnimation ( object  o ) 
 
			
		
	
		
		
			
				
					
					        { 
 
			
		
	
		
		
			
				
					
					            var  ( frames , anim )  =  ( Tuple < List < Bitmap > , AnimationDirection > )  o ; 
 
			
		
	
		
		
			
				
					
					            var  fps  =  ( float ) anim . MaxSpeed ; 
 
			
		
	
		
		
			
				
					
					            float  delay  =  1f / fps ; 
 
			
		
	
		
		
			
				
					
					            Console . WriteLine ( ( int )  ( delay * 1200 ) ) ; 
 
			
		
	
		
		
			
				
					
					            foreach  ( Bitmap  frame  in  frames ) 
 
			
		
	
		
		
			
				
					
					            { 
 
			
		
	
		
		
			
				
					
					                advancedPictureBox . Image  =  frame ; 
 
			
		
	
		
		
			
				
					
					                advancedInfoLabel . Text  =  $"Current frame: {frames.IndexOf(frame)}\nAnimation Speed: {fps}" ; 
 
			
		
	
		
		
			
				
					
					                Thread . Sleep ( ( int )  ( delay * 1500 ) ) ; 
 
			
		
	
		
		
			
				
					
					            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  advancedTreeView_AfterSelect ( object  sender ,  TreeViewEventArgs  e ) 
        private  void  advancedTreeView_AfterSelect ( object  sender ,  TreeViewEventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            var  node  =  e . Node ; 
            var  node  =  e . Node ; 
 
			
		
	
		
		
			
				
					
					            if  ( ! ( ( ( ChunkNode )  node ) . loader  is  ImageItem ) ) 
            if  ( ( ( ChunkNode )  node ) . loader  is  ImageItem ) 
 
			
				
				
			
		
	
		
		
			
				
					
					            { 
 
			
		
	
		
		
			
				
					
					                advancedPictureBox . Image  =  advancedPictureBox . ErrorImage ;      
 
			
		
	
		
		
			
				
					
					            } 
 
			
		
	
		
		
			
				
					
					            else 
 
			
		
	
		
		
	
		
		
			
				
					
					            { 
            { 
 
			
		
	
		
		
			
				
					
					                var  img  =  ( ( ImageItem )  ( ( ChunkNode )  node ) . loader ) ; 
                var  img  =  ( ( ImageItem )  ( ( ChunkNode )  node ) . loader ) ; 
 
			
		
	
		
		
			
				
					
					                advancedPictureBox . Image  =  img . Bitmap ; 
                advancedPictureBox . Image  =  img . Bitmap ; 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -649,9 +695,29 @@ namespace DotNetCTFDumper.GUI
 
			
		
	
		
		
			
				
					
					            
            
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        public  void  InitPlugins ( ) 
 
			
		
	
		
		
			
				
					
					        { 
 
			
		
	
		
		
			
				
					
					            PluginAPI . PluginAPI . InitializePlugins ( ) ; 
 
			
		
	
		
		
			
				
					
					            foreach  ( var  plugin  in  PluginAPI . PluginAPI . Plugins ) 
 
			
		
	
		
		
			
				
					
					            { 
 
			
		
	
		
		
			
				
					
					                pluginsList . Items . Add ( plugin . Name ) ; 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					            } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        private  void  activatePluginBtn_Click ( object  sender ,  EventArgs  e ) 
        private  void  activatePluginBtn_Click ( object  sender ,  EventArgs  e ) 
 
			
		
	
		
		
			
				
					
					        { 
        { 
 
			
		
	
		
		
			
				
					
					            PluginAPI . PluginAPI . Plugins [ pluginsList . SelectedIndex ] . pluginClass . Activate ( null ) ; 
            PluginAPI . PluginAPI . ActivatePlugin( PluginAPI . PluginAPI . Plugins [ pluginsList . SelectedIndex ]  ) ; 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        
 
			
		
	
		
		
			
				
					
					    } 
    } 
 
			
		
	
		
		
			
				
					
					} }