C#小弟需要一位能翻譯的
using System;using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace FuzzyLogicUI
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
if (FuzzyApp.InputVariables.Count > 0)
{
variable1.Current = FuzzyApp.InputVariables;
variable1.Populate();
populateVariables();
}
reloadStrip();
configurationUI1.loadData();
}
private void reloadStrip()
{
toolStripStatusLabel1.Text = "Inputs : " + FuzzyApp.InputVariables.Count.ToString();
toolStripStatusLabel2.Text = "Outputs : " + FuzzyApp.OutputVariables.Count.ToString();
toolStripStatusLabel3.Text = "Rules : " + FuzzyApp.Rules.Count.ToString();
}
private void populateVariables()
{
for (int i = 0; i < FuzzyApp.InputVariables.Count; i++)
{
if (InputView.Items.ContainsKey(FuzzyApp.InputVariables.Name) == false)
{
InputView.Items.Add(FuzzyApp.InputVariables.Name, FuzzyApp.InputVariables.Name, 1);
}
}
for (int i = 0; i < FuzzyApp.OutputVariables.Count; i++)
{
if (OutputView.Items.ContainsKey(FuzzyApp.OutputVariables.Name) == false)
{
OutputView.Items.Add(FuzzyApp.OutputVariables.Name, FuzzyApp.OutputVariables.Name, 1);
}
}
}
private void AddVariable_Click(object sender, EventArgs e)
{
NewVariable var = new NewVariable();
var.ParentTab = InOutTabs;
var.ShowDialog();
populateVariables();
}
private void InputView_SelectedIndexChanged(object sender, EventArgs e)
{
if (InputView.SelectedIndices.Count > 0)
{
int index = InputView.SelectedIndices;
variable1.ClearVariable();
variable1.Current = FuzzyApp.InputVariables;
variable1.Populate();
}
}
private void OutputView_SelectedIndexChanged(object sender, EventArgs e)
{
if (OutputView.SelectedIndices.Count > 0)
{
int index = OutputView.SelectedIndices;
variable1.ClearVariable();
variable1.Current = FuzzyApp.OutputVariables;
variable1.Populate();
}
}
private void MainPanel_SelectedIndexChanged(object sender, EventArgs e)
{
if (MainPanel.SelectedTab.Text.Equals("Rules"))
{
rule1.loadVariables();
rule1.loadRules();
}以上是程式碼
我需要的是好比說像開始頭是定義所需的指示詞為那些蛙歌=ˇ=++
然而簡單來講就是能解釋這個程式碼裡頭的東西XD
麻煩各位大大=ˋ= 跨謀......這是小弟範圍以外的領域了= = 哈哈 我對裡面的涵數有看沒有懂 快哭了我 個人建議你去買本C#的書來重頭慢慢看會比較好
難就難在回答者不一定想一行一行慢慢看這什麼鬼XD 沒關係= = 我已經暫時先搞出來了 @"@ 只是現在要開始搞JAVA= =
頁:
[1]