private void ReadCMF_btn_Click(object sender, RoutedEventArgs e) { ReadCMF_btn.IsEnabled = false; UnpackCMF_btn.IsEnabled = true; UnpackCMFRecord_btn.IsEnabled = true; OpenFileDialog ReadCMF = new OpenFileDialog(); ReadCMF.Title = "Select a file to open"; ReadCMF.RestoreDirectory = true; ReadCMF.DefaultExt = "cmf"; ReadCMF.CheckPathExists = true; ReadCMF.CheckFileExists = true; ReadCMF.Filter = "Closers CMF|*.cmf"; ReadCMF.Multiselect = true; if (ReadCMF.ShowDialog() == true) { ShowOutputWin OutputWindows = new ShowOutputWin(motion, CMF_files, ReadCMF.FileNames.Count()); OutputWindows.Show(); foreach (string strFilename in ReadCMF.FileNames) { CMF_files.Add(strFilename); Unpacking_file = strFilename; OpenArchive(strFilename); System.Threading.Thread.Sleep(10); OutputWindows.processbar_processing(); } OutputWindows.Close(); } }
private void UnpackCMF_btn_Click(object sender, RoutedEventArgs e) { archive = null; if (CMFListView.SelectedItems.Count > 0) { motion = "UnpackingSelect"; for (int i = 0; i < CMFListView.SelectedItems.Count; i++) { UnpackList SelectCMF = (UnpackList)CMFListView.SelectedItems[i]; SelectCMF_file.Add(SelectCMF.File + "," + SelectCMF.Name); } ShowOutputWin OutputWindows = new ShowOutputWin(motion, SelectCMF_file, SelectCMF_file.Count); OutputWindows.Show(); } else { motion = "Unpacking"; ShowOutputWin OutputWindows = new ShowOutputWin(motion, CMF_files, items.Count); OutputWindows.Show(); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.OutputWindows = ((CLOSERS_CMFReader.ShowOutputWin)(target)); return; case 2: this.TermLable = ((System.Windows.Controls.Label)(target)); return; case 3: this.PathTextbox = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.Browse_btn = ((System.Windows.Controls.Button)(target)); #line 34 "..\..\..\ShowOutputWin.xaml" this.Browse_btn.Click += new System.Windows.RoutedEventHandler(this.Browse_btn_Click); #line default #line hidden return; case 5: this.BrowseLable = ((System.Windows.Controls.Label)(target)); return; case 6: this.Cancle_btn = ((System.Windows.Controls.Button)(target)); #line 36 "..\..\..\ShowOutputWin.xaml" this.Cancle_btn.Click += new System.Windows.RoutedEventHandler(this.Cancle_btn_Click); #line default #line hidden return; case 7: this.OK_btn = ((System.Windows.Controls.Button)(target)); #line 37 "..\..\..\ShowOutputWin.xaml" this.OK_btn.Click += new System.Windows.RoutedEventHandler(this.OK_btn_Click); #line default #line hidden return; case 8: this.Processed_Lable = ((System.Windows.Controls.Label)(target)); return; case 9: this.Close_btn = ((System.Windows.Controls.Button)(target)); #line 39 "..\..\..\ShowOutputWin.xaml" this.Close_btn.Click += new System.Windows.RoutedEventHandler(this.Close_btn_Click); #line default #line hidden return; case 10: this.progressbar_motion = ((System.Windows.Controls.ProgressBar)(target)); return; case 11: this.ShowProcessingText = ((System.Windows.Controls.RichTextBox)(target)); return; } this._contentLoaded = true; }