col1); = Convert.ToDouble (comboBox1.Text); (row1); (int i = 0; i
{(int j = 0; j
{. Rows [i]. Cells [j]. Value = tablesCriterionImportance [i, j];
}
}
}
}
// завантаження таблиці інтервалів превосходстваvoid button11_Click (object sender, EventArgs e)
{FN; (openFileDialog1.ShowDialog () == DialogResult.OK)
{. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; = openFileDialog1.FileName ; My = new Reader (FN);. ReadTable (out tablesIntervalSuperiority, out row1, out col1); = Convert.ToDouble (comboBox1.Text); (row1); (int i = 0; i
{(int j = 0; j
{. Rows [i]. Cells [j]. Value = tablesIntervalSuperiority [i, j];
}
}
}
}
// збереження таблиці критеріїв важностіvoid button10_Click (object sender, EventArgs e)
{FN;. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; (saveFileDialog1 . ShowDialog () == DialogResult.OK)
{= saveFileDialog1.FileName;. WriteTable (FN, tablesCriterionImportance);
}
}
// збереження таблиці інтервалів превосходстваvoid button12_Click (object sender, EventArgs e)
{FN;. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; (saveFileDialog1 . ShowDialog () == DialogResult.OK)
{= saveFileDialog1.FileName;. WriteTable (FN, tablesIntervalSuperiority);
}
}
// збереження матриці індексів согласіяvoid button13_Click (object sender, EventArgs e)
{FN;. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; (saveFileDialog1 . ShowDialog () == DialogResult.OK)
{= saveFileDialog1.FileName;. WriteTable (FN, TableOfAgreementIndex);
}
}
// збереження матриці індексів несогласіяvoid button14_Click (object sender, EventArgs e)
{FN;. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; (saveFileDialog1 . ShowDialog () == DialogResult.OK)
{= saveFileDialog1.FileName;. WriteTable (FN, TableOfDisagreementIndex);
}
}
// збереження ядраvoid button15_Click (object sender, EventArgs e)
{FN;. InitialDirectory = "G: temp";. Filter = "diag files (*. diag) | *. abs | All files | *. *"; (saveFileDialog1 . ShowDialog () == DialogResult.OK)
{= saveFileDialog1.FileName;. WriteTableOfRule (FN, TableofDecisiveRule);
}
}
} Reader
{string fileName; string [] inputTxt; double [,] matrix; int row; int col; System.Globalization.NumberFormatInfo numberFormat; Reader (string Name)
{= Name;
} void ReadTable (out double [,] table, out int rows, out int cols)
{= new System.Globalization.NumberFormatInfo ();. CurrencyDecimalSeparator = "."; [] output = File.ReadAllLines (fileName); [] aloneString = output [0]. Split ( new char [] {''});
// double [,] temp = new double [output.Length, aloneString.Length]; = new double [output.Length, aloneString.Length]; = output.Length; = aloneString.Length ; (int i = 0; i
{[0, i] = double.Parse (aloneString [i], numberFormat);
} (int i = 1; i
{= output [i]. Split (new char [] {''}); (int j = 0; j
{[i, j] = double.Parse (aloneString [j], numberFormat);
}
}
}
} Writer
{static string fileName; static string [] outputTxt; static double [,] matrix; static string [,] matrix1; static int row; static int col; static System.Globalization.NumberFormatInfo numberFormat; static void WriteTable (string nameFile, double [,] table)
{. fileName = nameFile;. matrix = table; (Writer.matrix! = null)
{= matrix.GetLength (0); = matrix.GetLength (1); = new string [row]; (int i = 0; i |