public ReplaceWindow(eListCollection ListCollection) { database = MainWindow.database; eLC = ListCollection; InitializeComponent(); colorTheme(); comboBox_operation.SelectedIndex = 0; }
private void click_browse(object sender, EventArgs e) { OpenFileDialog eLoad = new OpenFileDialog(); eLoad.Filter = "Elements File (*.data)|*.data|All Files (*.*)|*.*"; if (eLoad.ShowDialog() == DialogResult.OK && File.Exists(eLoad.FileName)) { Cursor = Cursors.AppStarting; dataGridView_fields.Rows.Clear(); dataGridView_values.Rows.Clear(); this.Column1.HeaderText = "Base Fields"; this.Column2.HeaderText = "Recent Fields"; this.Column7.HeaderText = "Base Values"; this.Column8.HeaderText = "Recent Values"; comboBox_lists.Items.Clear(); //progressBar_progress.Style = System.Windows.Forms.ProgressBarStyle.Continuous; if (sender == (object)button_browseBase) { eLC_base = new eListCollection(eLoad.FileName, ref cpb2_prog); textBox_baseFile.Text = eLoad.FileName; textBox_baseVersion.Text = eLC_base.Version.ToString(); } if (sender == (object)button_browseRecent) { eLC_recent = new eListCollection(eLoad.FileName, ref cpb2_prog); textBox_recentFile.Text = eLoad.FileName; textBox_recentVersion.Text = eLC_recent.Version.ToString(); } if (eLC_base != null && eLC_recent != null && eLC_base.Lists.Length > 0 && eLC_recent.Lists.Length > 0) { // add list names from recent file eRules = new RuleConfig[eLC_recent.Lists.Length]; for (int l = 0; l < eLC_recent.Lists.Length; l++) { comboBox_lists.Items.Add("[" + l + "]: " + eLC_recent.Lists[l].listName + " (" + eLC_recent.Lists[l].elementValues.Length + ")"); eRules[l] = new RuleConfig(); eRules[l].RemoveList = false; eRules[l].ReplaceOffset = false; eRules[l].Offset = ""; eRules[l].RemoveValues = new bool[eLC_recent.Lists[l].elementFields.Length]; for (int f = 0; f < eRules[l].RemoveValues.Length; f++) { eRules[l].RemoveValues[f] = false; } } } cpb2_prog.Value = 0; //progressBar_progress.Style = System.Windows.Forms.ProgressBarStyle.Continuous; Cursor = Cursors.Default; } }
public FieldCompare(eListCollection ListCollection, eListConversation ListConversation, ref ColorProgressBar.ColorProgressBar progressBar_prog) { eLC = ListCollection; conversationList = ListConversation; cpb2_prog = progressBar_prog; InitializeComponent(); for (int l = 0; l < eLC.Lists.Length; l++) { comboBox_List.Items.Add("[" + l + "]: " + eLC.Lists[l].listName + " (" + eLC.Lists[l].elementValues.Length + ")"); } CheckCompareButton(null, null); database = MainWindow.database; colorTheme(); }
private void click_LoadElement(object sender, EventArgs e) { if (textBox_ElementPath.Text != "") { Cursor = Cursors.AppStarting; try { eLCOther = new eListCollection(textBox_ElementPath.Text, ref cpb2_prog); conversationListOther = new eListConversation((byte[])eLCOther.Lists[eLCOther.ConversationListIndex].elementValues[0][0]); textBox_ElementPath.BackColor = Color.LightGreen; } catch { textBox_ElementPath.BackColor = Color.Salmon; MessageBox.Show("LOADING ERROR!\nThis error mostly occurs of configuration and elements.data mismatch"); } Cursor = Cursors.Default; } CheckReplaceButton(null, null); }