public GUIForm(TLArtifactsCollection orgSourceArt, TLArtifactsCollection orgTargetArt, SimilarityMatrixUserFeedback in_extendedSimilarityMatrix, Config config_in) { InitializeComponent(); originalSourceArtifacts = orgSourceArt; originalTargetAfacts = orgTargetArt; extendedSimilarityMatrix = in_extendedSimilarityMatrix; config = config_in; if (config.OutSavePath != null) // do we have the path set { cbx_saveWork.Checked = true; cbx_saveWork.Enabled = true; cbx_saveWork.Text = "Save my work to file (" + config.OutSavePath + ")"; } else { cbx_saveWork.Checked = false; cbx_saveWork.Enabled = false; cbx_saveWork.Text = "Save my work to file (Incorrect configuration property)"; } // load the source artifacts to gui: lsv_originalSourceArtifacts.BeginUpdate(); ListViewItem[] linksList = new ListViewItem[originalSourceArtifacts.Count]; int i = 0; foreach (KeyValuePair<string, TLArtifact> kvp in originalSourceArtifacts) { linksList[i++] = new ListViewItem(kvp.Key); } lsv_originalSourceArtifacts.Items.AddRange(linksList); lsv_originalSourceArtifacts.EndUpdate(); if (lsv_originalSourceArtifacts.Items.Count > 0) lsv_originalSourceArtifacts.Items[0].Selected = true; //set the sorter for the target artifacts: lsv_originalTargetArtifacts.ListViewItemSorter = new WeightsSorter(); }
public UserFeedbackGUI(ComponentLogger log) : base(log) { config = new Config(); Configuration = config; }