public static int FindFormatIndex(tagFormat id) { if (subdir_format1 == null) { return(-1); } if (subdir_format1.Count == 0) { return(-1); } for (int i = 0; i < subdir_format1.Count; i++) { if (subdir_format1[i].id == id) { return(i); } } return(-1); }
public Format(tagFormat Id) { switch (Id) { case tagFormat.tF_CNCFileName: this.display_name = LanguageSupport.Translate(Properties.Resources.str_post_name); this.eng_name = Properties.Resources.str_post_name; this.ini_file_keyword = Settings.str_ini_format_cnc_file_name; this.id = Id; break; case tagFormat.tF_FileName: this.display_name = LanguageSupport.Translate(Properties.Resources.str_file_name); this.eng_name = Properties.Resources.str_file_name; this.ini_file_keyword = Settings.str_ini_format_file_name; this.id = Id; break; case tagFormat.tF_MachineName: this.display_name = LanguageSupport.Translate(Properties.Resources.str_machine_name); this.eng_name = Properties.Resources.str_machine_name; this.ini_file_keyword = Settings.str_ini_format_machine_name; this.id = Id; break; case tagFormat.tF_SetupName: this.display_name = LanguageSupport.Translate(Properties.Resources.str_setup_name); this.eng_name = Properties.Resources.str_setup_name; this.ini_file_keyword = Settings.str_ini_format_setup_name; this.id = Id; break; case tagFormat.tF_Title: this.display_name = LanguageSupport.Translate(Properties.Resources.str_title); this.eng_name = Properties.Resources.str_title; this.ini_file_keyword = Settings.str_ini_format_title; this.id = Id; break; } }