عرض مشاركة واحدة
قديم 2019-07-31, 04:40 PM
المشاركة 15
MeGoo
.:: عضو نشيط ::.
  • غير متواجد
افتراضي رد: اول مشاكل سورس M.H.B بتاع X-Coder
جرب الاول تغير ملف read الي جايبلك ايرور ده ب ده

كود:
using system;
using system.collections.generic;
using system.linq;
using system.text;
using system.io;

namespace 
khaledmohamed.database
{
    public class 
read Idisposable
    
{

        private 
string location "";
        private 
streamreader sr;
        public 
int count 0;

        private 
string[] items;
        private 
int32 curent_count = -1;

        public 
read(string file)
        {
            
location file;
        }
        public 
void dispose()
        {
            
location string.empty;
            
sr null;
            
items null;
            
count 0;

        }
        public 
string[] outbase() { return items; }
        public 
uint acount;
        public 
bool useread()
        {
            
acount++;
            return 
items.length >= acount;
        }
        public 
bool reader(bool useinvalid true)
        {
            
string[] data null;
                      
            if (
file.exists(location))
            {
                try
                {
                    
using (sr file.opentext(location))
                    {
                        
count int.parse(sr.readline().split('=')[1]);
                        
data = new string[count];
                        for (
int x 0countx++)
                        {
                            
data[x] = sr.readline();
                        }
                        if (
count == 0)
                            return 
false;                       
                    }
                }
                catch (
exception e)
                {
                    
console.writeline(e.tostring());
                    return 
false;   
                }
            }
            else if (
useinvalid)
            {                
                
data null;
                
console.writeline("invalid reader " location " location");
                return 
false;   
            }

            
items = new string[count];
            for (
int x 0countx++)
            {
                
items[x] = data[x];
            }
            return 
true;
        }
        public 
uint32 readuint32(uint32 add_def)
        {
            
curent_count += 1;
            if (
curent_count count)
            {
                if (
items[curent_count] == null)
                    return 
add_def;
                else
                    return 
uint32.parse(items[curent_count]);
            }
            else
                return 
add_def;
        }
        public 
uint16 readuint16(uint16 add_def)
        {
            
curent_count += 1;
            if (
curent_count count)
            {
                if (
items[curent_count] == null)
                    return 
add_def;
                else
                    return 
uint16.parse(items[curent_count]);
            }
            else
                return 
add_def;
        }
        public 
uint64 readuint64(uint64 add_def)
        {
            
curent_count += 1;
            if (
curent_count count)
            {
                if (
items[curent_count] == null)
                    return 
add_def;
                else
                    return 
uint64.parse(items[curent_count]);
            }
            else
                return 
add_def;
        }
        public 
byte readbyte(byte add_def)
        {
            
curent_count += 1;
            if (
curent_count count)
            {
                if (
items[curent_count] == null)
                    return 
add_def;
                else
                    return 
byte.parse(items[curent_count]);
            }
            else
                return 
add_def;
        }
        public 
string readstring(string add_def)
        {
            
curent_count += 1;
            if (
curent_count count)
            {
                if (
items[curent_count] == null)
                    return 
add_def;
                else
                    return 
items[curent_count];
            }
            else
                return 
add_def;
        }

    }


متنساش تغير اسم البروجيكت
هو الى انا وصلتله ان السورس علية حماية
انا عاوز اعرف الحماية دي بتقف منين عشان هشغلها بس لمه احط السورس على الفي بي اس
يعنى عاوز اشيل الحماية من السورس لمه اكون شغال على الجهاز الخاص
تعرف حماية السورس دا منين