Nettoyage de printemps

master
Crom (Thibaut CHARLES) 8 years ago
parent 739d098072
commit 9009ee4ae6
  1. 3
      .gitignore
  2. 26
      Akadoc.sublime-project
  3. 6
      Assets/scripts/CameraController.cs
  4. 32
      Assets/scripts/ChatWindow.cs
  5. 14
      Assets/scripts/Clock.cs
  6. 46
      Assets/scripts/CreateScrollList.cs
  7. 64
      Assets/scripts/DayController.cs
  8. 10
      Assets/scripts/ManaItem.cs
  9. 54
      Assets/scripts/ManaStack.cs
  10. 15
      Assets/scripts/NewBehaviourScript.cs
  11. 8
      Assets/scripts/NewBehaviourScript.cs.meta
  12. 14
      Assets/scripts/OnClickedMoveCamera.cs
  13. 106
      Assets/scripts/TchatAnim.cs
  14. 22
      Assets/scripts/chat_scrollbar.cs
  15. 20
      Assets/src/RulesDatabase.cs
  16. 58
      Assets/src/TwoDA.cs

3
.gitignore vendored

@ -17,3 +17,6 @@ ExportedObj/
*.user
*.unityproj
*.booproj
#Sublime
*.sublime-workspace

@ -1,3 +1,6 @@
//Required Sublime Text plugins:
// - SublimeAStyleFormatter: https://github.com/timonwong/SublimeAStyleFormatter
//
{
"folders":
[
@ -7,8 +10,27 @@
"file_exclude_patterns":
[
"*.dll",
"*.meta"
"*.meta",
"*.csproj",
"*.sln"
],
"folder_exclude_patterns":
[
"Temp",
"Library"
]
}
]
],
"settings": {
"AStyleFormatter": {
"options_default": {
"autoformat_on_save": true,
"attach-namespaces": true,
"attach-classes": true,
"pad-oper": false,
"pad-header": false,
"unpad-paren": true
}
}
}
}

@ -7,13 +7,13 @@ public class CameraController : MonoBehaviour {
public Quaternion targetRot;
// Use this for initialization
void Awake () {
void Awake() {
targetPos = transform.position;
targetRot = transform.rotation;
}
// Update is called once per frame
void Update () {
void Update() {
transform.position = Vector3.Lerp(transform.position, targetPos, Time.deltaTime*10);
transform.rotation = Quaternion.Lerp(transform.rotation, targetRot, Time.deltaTime*10);
}

@ -3,48 +3,48 @@ using System.Collections;
using UnityEngine.UI;
public class ChatWindow : MonoBehaviour {
public Text text_chat;
public ScrollRect scrollrect;
string message_old;
// Use this for initialization
void Start () {
void Start() {
text_chat.text = "";
}
// Update is called once per frame
void Update () {
void Update() {
}
//permet d'écrire du texte en brut dans la fenetre de chat. Sans style. A priori, ne doit pas etre utilisé...
public void writeText(string text){
public void writeText(string text) {
text_chat.text += text;
}
}
//prend en arguement le nombre de jour écoulé pour l'afficher dans la fenetre de chat.
public void writeDay(int nbDay) {
//prend en arguement le nombre de jour écoulé pour l'afficher dans la fenetre de chat.
public void writeDay(int nbDay){
text_chat.text += "\n\n\n <b><color=#000080ff>Day " + nbDay.ToString() + "\n</color></b>" ;
scrollrect.verticalNormalizedPosition = 0;
}
//prend en argument le pseudo et le message reçu par TchatAnim.cs et l'inscrit dans la fenetre.
public void writeMessage(string nom, string message){
//prend en argument le pseudo et le message reçu par TchatAnim.cs et l'inscrit dans la fenetre.
public void writeMessage(string nom, string message) {
text_chat.text += "<color=#0000ffff>" + nom + ": </color>"+ message + "\n";
scrollrect.verticalNormalizedPosition = 0;
}
// TODO: rédiger des fonctions pour afficher les morts, les deconnections et certains évènement importants.
// TODO: rédiger des fonctions pour afficher les morts, les deconnections et certains évènement importants.
}

@ -9,28 +9,28 @@ public class Clock : MonoBehaviour {
DayController daycontroller;
int maxDay;
int maxNight;
// Use this for initialization
void Start () {
day_controller = GameObject.Find ("day_controller");
void Start() {
day_controller = GameObject.Find("day_controller");
daycontroller = day_controller.GetComponent<DayController> ();
maxDay = daycontroller.maxDay;
maxNight = daycontroller.maxNight;
}
// Update is called once per frame
void Update () {
void Update() {
//TODO: Sync clock with the server
//TODO: Set var as for day % or hour
float fRot = clock.transform.rotation.z;
if(fRot>=0 && fRot>-180){
if(fRot>=0 && fRot>-180) {
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * (-180.0)/maxNight));//2.5min
}
else{
else {
clock.transform.Rotate(0, 0, (float)(Time.deltaTime * (-180.0)/maxDay));//1min
}
}

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Collections;
[System.Serializable]
public class Item{
public class Item {
public string name;
public Sprite icon;
public string message;
@ -13,7 +13,7 @@ public class Item{
}
[System.Serializable]
public class Notification{
public class Notification {
public string message;
Button.ButtonClickedEvent clickEvent;
}
@ -29,59 +29,59 @@ public class CreateScrollList : MonoBehaviour {
GameObject chat_input;
TchatAnim tchatAnim;
string message_old;
//tentative d'ajout des notifications:
public GameObject logNotification;
public List<Notification> notificationList;
// Use this for initialization
void Start () {
// Use this for initialization
void Start() {
//PopulateList ();
chat_input = GameObject.Find ("tchat_complet");
chat_input = GameObject.Find("tchat_complet");
tchatAnim = chat_input.GetComponent<TchatAnim> ();
}
void PopulateList(){
foreach (var item in itemList) {
GameObject newButton = Instantiate (sampleButton) as GameObject;
void PopulateList() {
foreach(var item in itemList) {
GameObject newButton = Instantiate(sampleButton) as GameObject;
SampleButton button = newButton.GetComponent <SampleButton> ();
button.nameLabel.text = item.name;
button.icon.sprite = item.icon;
button.message.text = item.message;
newButton.transform.SetParent (contentPanel);
newButton.transform.SetParent(contentPanel);
button.gameObject.SetActive(true);
}
}
}
// Update is called once per frame
void Update () {
void Update() {
}
public void writeMessage(string name, string message){
public void writeMessage(string name, string message) {
scrollrect.verticalNormalizedPosition = 0;
GameObject myNewButton = Instantiate (sampleButton) as GameObject;
GameObject myNewButton = Instantiate(sampleButton) as GameObject;
SampleButton button = myNewButton.GetComponent<SampleButton> ();
button.nameLabel.text= name;
button.nameLabel.text = name;
button.message.text = tchatAnim.message;
button.icon.sprite= portrait.sprite;
button.icon.sprite = portrait.sprite;
button.gameObject.SetActive(true);
myNewButton.transform.SetParent(contentPanel);
}
public void writeNotification(string message){
public void writeNotification(string message) {
scrollrect.verticalNormalizedPosition = 0;
GameObject myNewButton = Instantiate (logNotification) as GameObject;
GameObject myNewButton = Instantiate(logNotification) as GameObject;
LogNotification notif = myNewButton.GetComponent<LogNotification> ();
notif.message.text = message;
myNewButton.transform.SetParent (contentPanel);
}
myNewButton.transform.SetParent(contentPanel);
}
}

@ -27,91 +27,91 @@ public class DayController : MonoBehaviour {
// Use this for initialization
void Start () {
void Start() {
//calcul des différent timing.
machine.SetInteger ("day_status", 0);
machine.SetInteger("day_status", 0);
maxDiscussion = (int) maxDay / 2;
maxAccusation = maxDay - maxDiscussion;
//appel de Window Chat
chatWindowScroll = GameObject.Find ("ChatWindowScroll");
chatWindowScroll = GameObject.Find("ChatWindowScroll");
chatWindow = chatWindowScroll.GetComponent<ChatWindow> ();
//appel de CreateScrollList
createScrollListObject = GameObject.Find ("log_controller");
createScrollListObject = GameObject.Find("log_controller");
createScrollList = createScrollListObject.GetComponent<CreateScrollList> ();
//appel de ManaStack
manaStackObject = GameObject.Find ("mana_controller");
manaStackObject = GameObject.Find("mana_controller");
manaStack = manaStackObject.GetComponent<ManaStack> ();
dayNb = 1;
chatWindow.writeDay (dayNb);
manaStack.addDaily (dayNb);
chatWindow.writeDay(dayNb);
manaStack.addDaily(dayNb);
}
// Update is called once per frame
void Update () {
void Update() {
//DISUCSSION
if (machine.GetInteger("day_status")==0){
if(machine.GetInteger("day_status") == 0) {
if (timer >= (float)maxDiscussion){
machine.SetInteger("day_status",1);
if(timer >= (float)maxDiscussion) {
machine.SetInteger("day_status", 1);
print("Accusation!");
createScrollList.writeNotification("Denoncez-vous, pauvres fous!!!");
}
else{
else {
timer += Time.deltaTime;
}
}
//ACCUSATION
if (machine.GetInteger("day_status")==1){
if(machine.GetInteger("day_status") == 1) {
if (timer >= (float)maxDay){
machine.SetInteger("day_status",3);
if(timer >= (float)maxDay) {
machine.SetInteger("day_status", 3);
print("il fait nuit!");
timer = 0;
}
else{
else {
timer += Time.deltaTime;
}
}
//NUIT
if (machine.GetInteger("day_status")==3){
if (timer >= (float)maxNight){
machine.SetInteger("day_status",0);
if(machine.GetInteger("day_status") == 3) {
if(timer >= (float)maxNight) {
machine.SetInteger("day_status", 0);
timer = 0;
dayNb ++;
chatWindow.writeDay(dayNb);
manaStack.addDaily (dayNb);
manaStack.addDaily(dayNb);
print("le jour se lève, discutez!");
}
else{
else {
timer += Time.deltaTime;
}
}
}
public int getDay(){return dayNb;}
public int getDay() {return dayNb;}
}

@ -6,21 +6,21 @@ public class ManaItem : MonoBehaviour {
public Image manaImage;
void Start () {
void Start() {
//manaImage = GetComponent<Image> ();
}
public void setDisabled(){
public void setDisabled() {
manaImage.color = Color.red;
}
public void setEnabled(){
public void setEnabled() {
manaImage.color = Color.blue;
}
public void setSelected(){
public void setSelected() {
manaImage.color = Color.white;
}

@ -12,57 +12,57 @@ public class ManaStack : MonoBehaviour {
int manaLeft;
// Use this for initialization
void Start () {
//création de la barre de mana.
for(int i=0; i<manaMax; i++){
createMana ();
GameObject.Find("ManaItem(Clone)").name="ManaItem"+i;
//GameObject.Find("ManaItem"+i).GetComponent("ManaItem").setDisabled();
void Start() {
//création de la barre de mana.
for(int i = 0; i < manaMax; i++) {
createMana();
GameObject.Find("ManaItem(Clone)").name = "ManaItem" + i;
//GameObject.Find("ManaItem"+i).GetComponent("ManaItem").setDisabled();
}
}
public int getMana(){return manaLeft;}
public int getMana() {return manaLeft;}
//crée un cristaux de mana. (appelée dix fois lors de la fonction Start).
void createMana(){
GameObject myNewButton = Instantiate (manaItem) as GameObject;
void createMana() {
GameObject myNewButton = Instantiate(manaItem) as GameObject;
ManaItem mana = myNewButton.GetComponent<ManaItem> ();
mana.setDisabled ();
myNewButton.transform.SetParent (contentPanel);
}
mana.setDisabled();
myNewButton.transform.SetParent(contentPanel);
}
//ajoute le bon nombre de cristaux de mana chaque jour
public void addDaily(int nbDay){
public void addDaily(int nbDay) {
nbDay--;
GameObject manaItemObject;
ManaItem manaButton;
if (nbDay > manaMax-1) {
nbDay = manaMax-1;
}
if(nbDay > manaMax - 1) {
nbDay = manaMax - 1;
}
manaLeft = nbDay + 1;
for (int i=0; i<=nbDay; i++) {
manaItemObject = GameObject.Find("ManaItem"+i);
for(int i = 0; i <= nbDay; i++) {
manaItemObject = GameObject.Find("ManaItem" + i);
manaButton = manaItemObject.GetComponent<ManaItem> ();
manaButton.setEnabled();
//GameObject.Find("ManaItem"+i).GetComponent("Button").int
}
}
}
//ajoute la quantité de mana indiqué.
public void addMana(int manaPlus){
//ajoute la quantité de mana indiqué.
public void addMana(int manaPlus) {
}
//soustrait la quantité de mana indiqué.
public void subMana(int manaLess){
//soustrait la quantité de mana indiqué.
public void subMana(int manaLess) {
}
//selectionne la quantité de mana indiqué
//(quand on passe la souris sur un sort par exemple)
public void selMana (int sel){
//selectionne la quantité de mana indiqué
//(quand on passe la souris sur un sort par exemple)
public void selMana(int sel) {
}
}

@ -1,15 +0,0 @@
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
CanvasGroup grp;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: da0f09705b89fa346b50f7e244179a80
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

@ -13,7 +13,7 @@ public class OnClickedMoveCamera : MonoBehaviour {
private Renderer[] children;
public Canvas canva;
void Awake(){
void Awake() {
clrBase = GetComponent<Renderer>().material.color;
clrTarget = clrBase;
children = GetComponentsInChildren<Renderer>();
@ -21,7 +21,7 @@ public class OnClickedMoveCamera : MonoBehaviour {
}
void OnMouseDown(){
void OnMouseDown() {
//Move to position
@ -30,22 +30,22 @@ public class OnClickedMoveCamera : MonoBehaviour {
camCtrl.targetRot = destination.rotation;
}
void OnMouseEnter(){
void OnMouseEnter() {
//Lerp to hilight color
clrTarget = new Color(1.0F, 0.87F, 0.75F);
}
void OnMouseExit(){
void OnMouseExit() {
//Lerp to base color
clrTarget = clrBase;
}
void Update(){
void Update() {
//Lerp to clrTarget
Color clr = Color.Lerp(GetComponent<Renderer>().material.color, clrTarget, Time.deltaTime * 10);
//Fixme? Any newly created chilren wont be lerped
foreach (Renderer child in children) {
foreach(Renderer child in children) {
child.material.color = clr;
}
}

@ -22,115 +22,115 @@ public class TchatAnim : MonoBehaviour {
CreateScrollList createScrollList;
// Use this for initialization
void Start () {
void Start() {
timer_sec = 0;
max_timer = 15;
//appel de WindowChat
chatWindowScroll = GameObject.Find ("ChatWindowScroll");
chatWindowScroll = GameObject.Find("ChatWindowScroll");
chatWindow = chatWindowScroll.GetComponent<ChatWindow> ();
//appel de CreateScrollList
createScrollListObject = GameObject.Find ("log_controller");
createScrollListObject = GameObject.Find("log_controller");
createScrollList = createScrollListObject.GetComponent<CreateScrollList> ();
}
void Awake(){
void Awake() {
}
// Update is called once per frame
void Update () {
void Update() {
//print (machine.GetInteger("etat_chat"));
if (myfield.isFocused) {
img_bg.color = Color.green;
} else
img_bg.color = Color.white;
if(myfield.isFocused) {
img_bg.color = Color.green;
} else
img_bg.color = Color.white;
if(machine.GetInteger("etat_chat")==0){
if(machine.GetInteger("etat_chat") == 0) {
myfield.gameObject.SetActive(true);
message=myfield.text;
message = myfield.text;
}
//transition vers chat_up
if (myfield.textComponent.cachedTextGenerator.lineCount > 1 && machine.GetInteger("etat_chat")==0) {
print ("trop long");
machine.SetInteger ("etat_chat", 1);
charac_nb.text = " ";
message=myfield.text;
if(myfield.textComponent.cachedTextGenerator.lineCount > 1 && machine.GetInteger("etat_chat") == 0) {
print("trop long");
machine.SetInteger("etat_chat", 1);
charac_nb.text = " ";
message = myfield.text;
}
//transition vers chat_long
if (myfield.text.Length > 110 && machine.GetInteger("etat_chat")==1) {
print ("trop trop long");
machine.SetInteger ("etat_chat", 2);
message=myfield.text;
if(myfield.text.Length > 110 && machine.GetInteger("etat_chat") == 1) {
print("trop trop long");
machine.SetInteger("etat_chat", 2);
message = myfield.text;
}
//affichage nombre de caractère restant.
if(Input.anyKey && machine.GetInteger("etat_chat")==2 ){
//affichage nombre de caractère restant.
if(Input.anyKey && machine.GetInteger("etat_chat") == 2) {
charac_nb.text = (myfield.characterLimit - myfield.text.Length).ToString();
}
//les derniers caractères sont écris en rouges
if (myfield.text.Length > 130) {
charac_nb.color = Color.red;
} else
charac_nb.color = Color.white;
if(myfield.text.Length > 130) {
charac_nb.color = Color.red;
} else
charac_nb.color = Color.white;
//transition vers chat_empty: si l'on vide complètement un message, le tcht se rabaisse.
//transition vers chat_empty: si l'on vide complètement un message, le tcht se rabaisse.
//sinon on le laisse haut (y compris si le message est court).
if ((machine.GetInteger ("etat_chat") == 1 || machine.GetInteger ("etat_chat") == 2) && myfield.text.Length == 0 ) {
if((machine.GetInteger("etat_chat") == 1 || machine.GetInteger("etat_chat") == 2) && myfield.text.Length == 0) {
machine.SetInteger ("etat_chat", 0);
message="";
machine.SetInteger("etat_chat", 0);
message = "";
}
//En cas de validation du message
if(Input.GetKeyDown("space") && myfield.isFocused){
if(Input.GetKeyDown("space") && myfield.isFocused) {
chatWindow.writeMessage("perceval",myfield.text); //inscription du message dans la fenetre de chat
createScrollList.writeMessage("perceval", myfield.text); //inscription du message dans les logs.
chatWindow.writeMessage("perceval", myfield.text); //inscription du message dans la fenetre de chat
createScrollList.writeMessage("perceval", myfield.text); //inscription du message dans les logs.
myfield.gameObject.SetActive(false);
myfield.text=" ";
charac_nb.text="";
print ("space pressed");
myfield.text = " ";
charac_nb.text = "";
print("space pressed");
//texte long
if(machine.GetInteger("etat_chat")==1 || machine.GetInteger("etat_chat")==2){
machine.SetInteger ("etat_chat", 3);
//texte long
if(machine.GetInteger("etat_chat") == 1 || machine.GetInteger("etat_chat") == 2) {
machine.SetInteger("etat_chat", 3);
}
//texte court
if(machine.GetInteger("etat_chat")==0){
machine.SetInteger("etat_chat",3);
if(machine.GetInteger("etat_chat") == 0) {
machine.SetInteger("etat_chat", 3);
}
}
//Gestion de l'état Timer.
if (machine.GetInteger ("etat_chat") == 3) {
if(machine.GetInteger("etat_chat") == 3) {
timer_sec += Time.deltaTime;
timer.text = (max_timer - (int) timer_sec ).ToString() + " secondes restantes";
timer.text = (max_timer - (int) timer_sec).ToString() + " secondes restantes";
if(timer_sec >= (float)max_timer-1){
timer_sec=0;
timer.text="";
machine.SetInteger ("etat_chat", 0);
myfield.text="";
message="";
if(timer_sec >= (float)max_timer - 1) {
timer_sec = 0;
timer.text = "";
machine.SetInteger("etat_chat", 0);
myfield.text = "";
message = "";
}
@ -138,8 +138,8 @@ public class TchatAnim : MonoBehaviour {
}
public void submit(){
print ("submit entered");
public void submit() {
print("submit entered");
}
}

@ -8,20 +8,20 @@ public class chat_scrollbar : MonoBehaviour {
public Scrollbar scrollbar;
public InputField myfield;
public ScrollRect scrollrect;
// Use this for initialization
void Start () {
void Start() {
scrollbar.value = 1;
}
// Update is called once per frame
void Update () {
void Update() {
//print (iseditingtop);
@ -31,11 +31,11 @@ public class chat_scrollbar : MonoBehaviour {
bool isTypingText(){
if (Input.anyKey && Input.GetMouseButton (0) == false && Input.GetMouseButton (1) == false && Input.GetMouseButton (2) == false && Input.GetKey ("return") == false) {
return true;
} else
return false;
bool isTypingText() {
if(Input.anyKey && Input.GetMouseButton(0) == false && Input.GetMouseButton(1) == false && Input.GetMouseButton(2) == false && Input.GetKey("return") == false) {
return true;
} else
return false;
}

@ -4,20 +4,20 @@ using System.Collections.Generic;
public class RulesDatabase {
public static TwoDA GetTable(string name){
public static TwoDA GetTable(string name) {
TwoDA t = null;
if(Get().m_tables.TryGetValue(name, out t)){
if(Get().m_tables.TryGetValue(name, out t)) {
return t;
}
else
return null;
}
public static void SetLocale(string lang){
public static void SetLocale(string lang) {
m_inst.m_strref = GetTable("locale_"+lang);
}
public static string GetStrRef(int strref){
public static string GetStrRef(int strref) {
RulesDatabase inst = Get();
return inst.m_strref.GetValue(strref, "text");
@ -27,12 +27,12 @@ public class RulesDatabase {
private RulesDatabase(){
private RulesDatabase() {
m_tables = new Dictionary<string, TwoDA>();
string[] files = Directory.GetFiles(m_folder, "*.2da", SearchOption.AllDirectories);
foreach(string file in files){
foreach(string file in files) {
string name = Path.GetFileNameWithoutExtension(file);
m_tables.Add(name, new TwoDA(file));
//Debug.Log ("Found "+name);
@ -42,11 +42,11 @@ public class RulesDatabase {
m_tables.TryGetValue("locale_fr", out m_strref);
}
private static RulesDatabase m_inst = null;
private static object m_singlmutex = new Object();
private static RulesDatabase Get(){
lock(m_singlmutex){
private static RulesDatabase Get() {
lock(m_singlmutex) {
if(m_inst==null)
m_inst = new RulesDatabase();
}

@ -3,86 +3,86 @@ using System.Collections.Generic;
using System.Text.RegularExpressions;
public class TwoDA : UnityEngine.Object {
public TwoDA(string filepath) {
// Read the file and display it line by line.
System.IO.StreamReader file = new System.IO.StreamReader(filepath);
string line = file.ReadLine();
m_header = line.Split((string[])null, System.StringSplitOptions.RemoveEmptyEntries);
int nCols = m_header.Length;
m_data = new List<string[]>();
int nFileLine = 1;
while((line = file.ReadLine()) != null)
{
if(line[0] != '#'){//Ignore commented lines
if(line[0] != '#') { //Ignore commented lines
MatchCollection matches = m_rgxField.Matches(line);
if(matches.Count == nCols){
if(matches.Count == nCols) {
int nLine = int.Parse(matches[0].Value);
string[] buff = new string[nCols-1];
for(int i=0 ; i<nCols-1 ; i++){
for(int i=0 ; i<nCols-1 ; i++) {
if(matches[i+1].Groups[1].Success)//Match one word
buff[i] = matches[i+1].Groups[1].Value;
else if(matches[i+1].Groups[2].Success)//Match multi word
buff[i] = matches[i+1].Groups[2].Value;
}
m_data.Add(buff);
}
else
Debug.LogWarning(filepath+": line "+nFileLine.ToString()+" ignored. Found "+matches.Count.ToString()+" columns instead of "+nCols.ToString());
}
nFileLine++;
}
file.Close();
}
public string GetValue(int nRow, string sColumn){
public string GetValue(int nRow, string sColumn) {
int nCol = FindHeaderCol(sColumn);
if(nCol>=0){
if(nCol>=0) {
return m_data[nRow][nCol];
}
else{
else {
throw new UnityException("Column '"+sColumn+"' not found in 2DA");
}
}
public override string ToString(){
public override string ToString() {
string sMsg = "";
foreach(string s in m_header){
foreach(string s in m_header) {
sMsg += s+"\t";
}
sMsg += "\n";
for(int line=0 ; line<m_data.Count ; line++){
for(int line=0 ; line<m_data.Count ; line++) {
sMsg += line.ToString() + "\t";
for(int col=0 ; col<m_data[line].Length ; col++){
for(int col=0 ; col<m_data[line].Length ; col++) {
sMsg += m_data[line][col]+"\t";
}
sMsg += "\n";
}
return sMsg;
}
private int FindHeaderCol(string sColName){
for(int i=0 ; i<m_header.Length ; i++){
private int FindHeaderCol(string sColName) {
for(int i=0 ; i<m_header.Length ; i++) {
if(m_header[i] == sColName)
return i-1;
}
return -1;
}
private static Regex m_rgxField = new Regex("(?:\\b([^\\s]+?)\\b|\"([^\"]+?)\")");
private string[] m_header;
private List<string[]> m_data;

Loading…
Cancel
Save