PDA

View Full Version : آموزش ساخت نرم افزار فرهنگ لغت



ROSTAM2
پنج شنبه 20 مهر 1402, 13:20 عصر
در این مجموعه آموزشی نحوه ایجاد یک نرم افزار فرهنگ لغت بصورت ابتدائی توضیح داده شده....

بخش اول: https://www.aparat.com/v/zwfUB (https://www.aparat.com/v/zwfUB)

بخش دوم: https://www.aparat.com/v/hF7g2 (https://www.aparat.com/v/hF7g2)

بخش سوم: https://www.aparat.com/v/HYnFB (https://www.aparat.com/v/HYnFB)

بخش چهارم: https://www.aparat.com/v/ujV3h (https://www.aparat.com/v/ujV3h)

بخش پنجم: https://www.aparat.com/v/GC4jI (https://www.aparat.com/v/GC4jI)

بخش ششم: https://www.aparat.com/v/4LDIe (https://www.aparat.com/v/4LDIe)

155014


If Me.ToolStripTextBox1.TextLength = 0 Then Exit Sub
Dim ID As Guid = Nothing
ID = Guid.NewGuid
Dim Row As DataRow = Nothing
Dim Word As String = Me.ToolStripTextBox1.Text
Select Case Me.ToolStripComboBox1.SelectedIndex
Case 1
If Me.EnTableAdapter1.CountOf(Word) > 0 Then
MsgBox("این کلمه در جدول موجود است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
Exit Select
End If
With Me.EnTableAdapter1
.InsertQuery(ID, Word, "")
Row = .GetDataByID(ID).Rows(0)
End With
Case 0
If Me.FaTableAdapter1.CountOf(Word) > 0 Then
MsgBox("این کلمه در جدول موجود است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
Exit Select
End If
With Me.FaTableAdapter1
.InsertQuery(ID, Word, "")
Row = .GetDataByID(ID).Rows(0)
End With
End Select
If Row Is Nothing Then Exit Sub


With If(Me.ToolStripComboBox1.SelectedIndex = 0, Me.ListBox1, Me.ListBox3)
.Items.Add(Row)
End With

ROSTAM2
پنج شنبه 20 مهر 1402, 18:18 عصر
بخش هفتم: (https://aparat.com/v/OtYvE)https://aparat.com/v/OtYvE

بخش هشتم: (https://aparat.com/v/n0CQy)https://aparat.com/v/n0CQy

155017


Dim TranslateIDs As String = ""

Select Case selectedLanguage
Case "en"
Dim EnRow As DictionaryDataSet.enRow = Me.ListBox1.SelectedItem
Dim faRow As DictionaryDataSet.faRow = Me.ListBox3.SelectedItem
TranslateIDs = Me.EnTableAdapter1.GetTranslateIDs(EnRow.ID)
If TranslateIDs.Contains(faRow.ID.ToString) Then
MsgBox("این مفهوم برای کلمه قبلا ثبت شده است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
GoTo NoAdd
End If
TranslateIDs = Me.EnTableAdapter1.GetTranslateIDs(EnRow.ID) + "," + faRow.ID.ToString
Me.EnTableAdapter1.UpdateQuery(TranslateIDs, EnRow.ID, EnRow.Word)
Me.ListBox2.Items.Add(faRow)
NoAdd:
TranslateIDs = Me.FaTableAdapter1.GetTranslateIDs(faRow.ID)
If TranslateIDs.Contains(EnRow.ID.ToString) Then
MsgBox("این مفهوم برای کلمه قبلا ثبت شده است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
Exit Select
End If
TranslateIDs = Me.FaTableAdapter1.GetTranslateIDs(faRow.ID) + "," + EnRow.ID.ToString
With Me.FaTableAdapter1
.UpdateQuery(TranslateIDs, faRow.ID, faRow.Word)
End With


Case "fa"
Dim EnRow As DictionaryDataSet.enRow = Me.ListBox3.SelectedItem
Dim faRow As DictionaryDataSet.faRow = Me.ListBox1.SelectedItem
TranslateIDs = Me.FaTableAdapter1.GetTranslateIDs(faRow.ID)
If TranslateIDs.Contains(EnRow.ID.ToString) Then
MsgBox("این مفهوم برای کلمه قبلا ثبت شده است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
GoTo NoAdd1
End If
TranslateIDs = Me.FaTableAdapter1.GetTranslateIDs(faRow.ID) + "," + EnRow.ID.ToString
With Me.FaTableAdapter1
.UpdateQuery(TranslateIDs, faRow.ID, faRow.Word)
End With
Me.ListBox2.Items.Add(EnRow)
NoAdd1:
TranslateIDs = Me.EnTableAdapter1.GetTranslateIDs(EnRow.ID)
If TranslateIDs.Contains(faRow.ID.ToString) Then
MsgBox("این مفهوم برای کلمه قبلا ثبت شده است!", MsgBoxStyle.Exclamation + MsgBoxStyle.MsgBoxRight)
Exit Select
End If
TranslateIDs = Me.EnTableAdapter1.GetTranslateIDs(EnRow.ID) + "," + faRow.ID.ToString
Me.EnTableAdapter1.UpdateQuery(TranslateIDs, EnRow.ID, EnRow.Word)
End Select