ප්‍රොග්‍රැමින් help එකක් ඔනි..

thedigit2s

Well-known member
  • Oct 3, 2009
    2,788
    3,204
    113
    37
    @ katubedda
    ප්‍රොග්‍රැමින් help එකක් ඔනි..

    මෙකයි යාලුවනේ ප්‍රශ්නේ.

    මට හදා ගන්න ඔනි desktop application එකක්.
    function එක කියනවා නම් client මොන වැඩක් කර කර හිටියත් එක පාරටම POP-UP එකක් generate වෙනන්යි ඔනි. තව මෙ pop-up එකේ display වෙන්න ඔනි my-sql table එකක තියෙන msg එකක්. clients ලා ගොඩක් ඉන්නවා. එ එ client ට අදාල msg එක එ එ කෙනාට යන්න ඔනී. table එකේ client ගේ නමයි මැසේජ් එකයි වෙන වෙනම තියෙනවා. pop-up එක display වෙන්න ඔනි වෙලාව තමයි new msg 1ක් add වෙන වෙලාව.

    තව දෙයක් මේ ඇප් එක බොහෙම ලේසියෙන් install කරන්න පුලුවන් වෙන්න ඔනි.

    මම java vb .net මේලෝ හසරක් දන්නේ නැත. කිසිම දිනෙක desktop app ලියා ද නොමැත .
    කොටින්ම මම මේක පටන්ගන්න ඔනි කොහොම ද කියලා වත් තේරෙන්නෙනැ. server side එකේ වැඩ ටික ඉවරයි. CLIENT තමයි අවුල
     

    K_ZONE

    Well-known member
  • May 28, 2009
    5,172
    4,083
    113
    invoke db "Injected Memory"

    front end එක නැතුව backend එක ඉවර කලේ කොහොමද බං ? :/ මට නම් පිස්සු වගේ. :lol:

    Table එකේ Client ව අදුරගන්න පුලුවන් වෙන්න ID එකක් පාවිච්ච්චි කරන්න Netbios name / Client HASH / MAC / or a haradware ID
    Code:
    ________________________________
    | Message            | Client Hash | isSent |
    -----------------------------------------
    |Hi, you n00b      |123456       |No       |
    -----------------------------------------
    Client එකේ Timer එකක් දාලා මේ වගේ Quary එකක් Run කරන්න කැමති Interval එකක් දීලා,
    HTML:
    SELECT [Message ] FROM foo.[bar table] WHERE [Client Hash] = '123456' AND isSent = 'No'
    ඉටපස්සෙ Message එක පෙන්නලා Table එක Update කරන්න isSent = 'Yes'

    මේ ලේසිම ක්‍රමය, මේක ටිකක් Server එකට බරයි, Client - server Sockets use කරන්න පුලුවන් නම් ගොඩක් හොදයි,
    Push කරන්න පුලුවන් නම් ත්ව ටිකක් හොදයි, ඒත් අලුත් කෙනෙක් නම් ඒවා කරන හැටි කියන එක තේරුමක් නැ මට හිතෙන්නෙ.

    මම උඩින් දාලා තියෙන ක්‍රමය හොදයි, 1st Step එක මෙහෙම ඉවර කරලා, ඉටපස්සෙ Web Service එකක් එක්ක දෙවනි Step එකට කරන්න.
     

    thedigit2s

    Well-known member
  • Oct 3, 2009
    2,788
    3,204
    113
    37
    @ katubedda
    තැන්ක්යු උදවු කරනවට. මම ඔයා කියන විදියට තමයි table 1 හදලා තියෙන්නේ. ඔයා යටින් දීලා තියෙන්නේ browser based කොඩ් එකක්නේ. මට ඔනි එහෙම නෙවෙයි මචෝ මට ඔනි desktop app එකක්. front end හදලා තියෙනන්නේ php වලින්. ඉතින් කවුරු හරි browser එකෙන් page එක loade කරගෙන හිටියේ නැත්නම් එයා දන්නේ නැනේ db එක update වෙලා කියලා. මට ඔනි Desktop එකේ pop up එකක් එන application එකක් හදාගන්න විදිහයි. වයිරස් ගාඩ් එකෙන් වයිරස් එකක් detect කරහම අපි මොන වැඩේ කර කර හිටියත් අනිත් ඔක්කොම window වලට උඩින් එක එනවනේ. අන්න එ වගේ server db එක update උනාම desktop එකේ pop-up msg එකක්.
     

    Banned!

    Member
    Jun 30, 2013
    10,779
    1,070
    0
    තැන්ක්යු උදවු කරනවට. මම ඔයා කියන විදියට තමයි table 1 හදලා තියෙන්නේ. ඔයා යටින් දීලා තියෙන්නේ browser based කොඩ් එකක්නේ. මට ඔනි එහෙම නෙවෙයි මචෝ මට ඔනි desktop app එකක්. front end හදලා තියෙනන්නේ php වලින්. ඉතින් කවුරු හරි browser එකෙන් page එක loade කරගෙන හිටියේ නැත්නම් එයා දන්නේ නැනේ db එක update වෙලා කියලා. මට ඔනි Desktop එකේ pop up එකක් එන application එකක් හදාගන්න විදිහයි. වයිරස් ගාඩ් එකෙන් වයිරස් එකක් detect කරහම අපි මොන වැඩේ කර කර හිටියත් අනිත් ඔක්කොම window වලට උඩින් එක එනවනේ. අන්න එ වගේ server db එක update උනාම desktop එකේ pop-up msg එකක්.

    table eka hamawelema check karapan, aluth record ekak awillanam a client ta adala msg eka popup karapan, kiyanna teren na ban :(
     

    HAneo

    Well-known member
  • Jan 30, 2007
    12,970
    29,168
    113
    Homagama
    Server side eke mokuth one na ... just DB

    ID | Client IP/Name | Message |Isnew
    ===============================
    1 192.168.1.50 "asdasdas" Yes
    2 192.168.1.85 "asdasdad" Yes
    Every time trans ID should be updated by 1 actually increased by 1

    CLient side
    ========
    in a C# program get all the records that Isnew = yes
    Loop trough records
    if Pc IP == Record IP then
    display the message
    update Isnew = NO
    end

    Wade harine every time new ekak add unama client program eken eka check karala balala display karanawane
     

    thedigit2s

    Well-known member
  • Oct 3, 2009
    2,788
    3,204
    113
    37
    @ katubedda
    Server side eke mokuth one na ... just DB

    ID | Client IP/Name | Message |Isnew
    ===============================
    1 192.168.1.50 "asdasdas" Yes
    2 192.168.1.85 "asdasdad" Yes
    Every time trans ID should be updated by 1 actually increased by 1

    CLient side
    ========
    in a C# program get all the records that Isnew = yes
    Loop trough records
    if Pc IP == Record IP then
    display the message
    update Isnew = NO
    end

    Wade harine every time new ekak add unama client program eken eka check karala balala display karanawane


    මෙහෙම තමයි මට ඔනි. C# වලින් Desktop app එකක් ලියන්න මොනව ද ඔනි softwaer ටික.

    මම ජිවිතේට desktop app එකක් ලියලා නැ මචෝ. මට පොඩ්ඩක් මුල අල්ලලා දීපන්..
     
    Last edited:

    HAneo

    Well-known member
  • Jan 30, 2007
    12,970
    29,168
    113
    Homagama
    ok i will gelp you . but one thing want from you that is reply ASAP ok?

    first you have to install what's call "Visual Studio.Net IDE" or you can install Visual C#.net what ever version of it. it comes 2005 , 2008 , 2010 , 2012 what ever you can find. i have already istall this one. but since you have to done the part so you have to install it.
    here this will help you and it's more than easy steps to follow
    http://smartnoob.blogspot.com/2013/04/linking-mysql-databases-with-c.html
    http://stackoverflow.com/questions/...-for-a-mysql-database-in-a-c-sharp-project-wi

    2. it's easy to connect mysql database from the ide what's cal"mysqldatabaseconnection" and Mysqldataadapters.

    3. now you have connection to DB and time to get records
    "select * from <datatable> where isnew = 0" this is Transact SQL statement
    now you have table just like this
    ID PC Message ISNEW
    1 192.168.1.50 "F me usdsdsp" 0
    1 192.168.1.52 "F2222 me up" 0
    1 192.168.1.30 "F mdsdse up" 0

    4. now imagine this pc is 192.168.1.50 ok?

    while (pc == '192.168.1.50')
    {
    display strong message box overriding Messagebox.how();
    and set Isnew = 1;
    update DB;
    }
     

    thedigit2s

    Well-known member
  • Oct 3, 2009
    2,788
    3,204
    113
    37
    @ katubedda
    ok i will gelp you . but one thing want from you that is reply ASAP ok?

    first you have to install what's call "Visual Studio.Net IDE" or you can install Visual C#.net what ever version of it. it comes 2005 , 2008 , 2010 , 2012 what ever you can find. i have already istall this one. but since you have to done the part so you have to install it.
    here this will help you and it's more than easy steps to follow
    http://smartnoob.blogspot.com/2013/04/linking-mysql-databases-with-c.html
    http://stackoverflow.com/questions/...-for-a-mysql-database-in-a-c-sharp-project-wi

    2. it's easy to connect mysql database from the ide what's cal"mysqldatabaseconnection" and Mysqldataadapters.

    3. now you have connection to DB and time to get records
    "select * from <datatable> where isnew = 0" this is Transact SQL statement
    now you have table just like this
    ID PC Message ISNEW
    1 192.168.1.50 "F me usdsdsp" 0
    1 192.168.1.52 "F2222 me up" 0
    1 192.168.1.30 "F mdsdse up" 0

    4. now imagine this pc is 192.168.1.50 ok?

    while (pc == '192.168.1.50')
    {
    display strong message box overriding Messagebox.how();
    and set Isnew = 1;
    update DB;
    }


    Visual Studio.Net IDE
    Visual C#.net

    මේ දෙකෙන් කෝකද මගේ වැඩේ ට වැඩියේන ම හොද? දැනට මම ගාව ඔය එකක් වත් නැ.. ලින්ක් දෙක බලලා install කරගෙන අයේ reply කරන්නම්.

    පිං මචෝ මට උදවු කරනවට.
     

    HAneo

    Well-known member
  • Jan 30, 2007
    12,970
    29,168
    113
    Homagama
    Visual Studio.Net IDE
    Visual C#.net

    මේ දෙකෙන් කෝකද මගේ වැඩේ ට වැඩියේන ම හොද? දැනට මම ගාව ඔය එකක් වත් නැ.. ලින්ක් දෙක බලලා install කරගෙන අයේ reply කරන්නම්.

    පිං මචෝ මට උදවු කරනවට.

    kokath ekayi. habayi Size eka Wadi Visual studio eke
    C#.net IDE eka hodatama athi wadeta.
    Dala Reply karapan
     

    thedigit2s

    Well-known member
  • Oct 3, 2009
    2,788
    3,204
    113
    37
    @ katubedda
    visual .net IDE or visual C# IDE download කරන්න අමාරුයි මචෝ . මම මෙන්න මේක download කරගෙන install කරගත්තා.
    http://www.icsharpcode.net/opensource/sd/

    මෙකෙන් මට ගොඩ යන්න පුලුවන් වෙයි නේද?

    mySql Connector එකක් දාන එක security අඩුයි කියලා තියෙනවා මම දැක්කා. එක එහෙම ද?