Need Help In C# PLZ

06/07/2018 20:21 HiddenAfter#1
Hi everyone hope your fine
i need some help in C# i'm new i want to use DataCore V4 ( iSmokeDrow )
to add / update files in Rappelz Data.xxx files anyone can help me thx
06/07/2018 20:33 Dark Blaze#2
[Only registered and activated users can see links. Click Here To Register...]
06/07/2018 20:41 HiddenAfter#3
I know i actually download it and i did spent the last two days trying at least get some results but i'm lost i need someone to guid me that's all
06/07/2018 22:15 Dark Blaze#4
Quote:
Originally Posted by HiddenAfter View Post
I know i actually download it and i did spent the last two days trying at least get some results but i'm lost i need someone to guid me that's all
The documentation is in the thread and there are some examples.
06/07/2018 22:42 HiddenAfter#5
Quote:
Originally Posted by Dark Blaze View Post
The documentation is in the thread and there are some examples.
okey !! let me explain to you what i need
look i need for example to import this image let say : test.png into data.xxx files.
i've created new project and add datacore.dll
and i did make a form when i clicked on button
start to import the image like this
PHP Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DataCore;
using DataCore.Functions;
using DataCore.Structures;
namespace 
WindowsFormsApplication1
{
    public 
partial class Form1 Form
    
{
        
Core dCore = new Core(trueEncoding.Default);
        public 
Form1()
        {
            
InitializeComponent();
        }

        private 
void button1_Click(object senderEventArgs e)
        {
            
dCore.Load(@"E:\WorkSpace\Rappelz\DataCore\Data\data.000");

            
dCore.ImportFileEntry(@"E:\test.png");

        }
    }

i know i'm doing it wrong even before itried to start the programme and it didn't work can u please explain to me how can i do it ?
06/08/2018 12:47 ThunderNikk#6
So I only dabble in C# and really don't know enough to help you but I may be able to provide some better direction.

I know SilentWisdom did a lot of work with datacore and had some open source releases that used datacore for client handling like Grimoire.

Maybe you could take a look at his source and use it to give you a little bit of an idea of how to handle your project. Maybe you have already done this but if you haven't it might give you a little better idea of how to handle integrating datacore into your code.
06/08/2018 13:11 HiddenAfter#7
Quote:
Originally Posted by ThunderNikk View Post
So I only dabble in C# and really don't know enough to help you but I may be able to provide some better direction.

I know SilentWisdom did a lot of work with datacore and had some open source releases that used datacore for client handling like Grimoire.

Maybe you could take a look at his source and use it to give you a little bit of an idea of how to handle your project. Maybe you have already done this but if you haven't it might give you a little better idea of how to handle integrating datacore into your code.
Thank you ill do it
06/08/2018 14:40 SilentWisdom#8
Wrap the core. Functions in a try statement, you're probably getting an error. Used to be datacore would fire an event called ErrorOccured but it was coded out and now Datacore will throw specific exceptions.

try { /*core.function goes in here*/ }
catch (Exception ex) { Message box.Show(ex.Message, "DataCore Exception", MessageBoxButtons.OK }

P.s. DataCore is not multithreaded by nature so if you issue long polling function requests get ready for your front end to lock up until the function exits. I suggest you look into the TASK api:

Code:
using System.Threading.Tasks;

void async method()
{
await Task.Run(() => { 
core.Load(path);
core.ImportFileEntry(arg, arg); });

}
Also remember if you don't properly subscribe to events you won't get progress or status updates from DataCore.

(Sorry for weirdness wrote this on mobile omw to work)
06/08/2018 15:14 HiddenAfter#9
Quote:
Originally Posted by ThunderNikk View Post
So I only dabble in C# and really don't know enough to help you but I may be able to provide some better direction.

I know SilentWisdom did a lot of work with datacore and had some open source releases that used datacore for client handling like Grimoire.

Maybe you could take a look at his source and use it to give you a little bit of an idea of how to handle your project. Maybe you have already done this but if you haven't it might give you a little better idea of how to handle integrating datacore into your code.
Quote:
Originally Posted by SilentWisdom View Post
Wrap the core. Functions in a try statement, you're probably getting an error. Used to be datacore would fire an event called ErrorOccured but it was coded out and now Datacore will throw specific exceptions.

try { /*core.function goes in here*/ }
catch (Exception ex) { Message box.Show(ex.Message, "DataCore Exception", MessageBoxButtons.OK }

P.s. DataCore is not multithreaded by nature so if you issue long polling function requests get ready for your front end to lock up until the function exits. I suggest you look into the TASK api:

Code:
using System.Threading.Tasks;

void async method()
{
await Task.Run(() => { 
core.Load(path);
core.ImportFileEntry(arg, arg); });

}
Also remember if you don't properly subscribe to events you won't get progress or status updates from DataCore.

(Sorry for weirdness wrote this on mobile omw to work)
thank you for the reply
allright now i'v done some changes on my part
so i made the programme load the data.xxx when start then start to import a image after i clicked on
import button like that
PHP Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DataCore;
using DataCore.Structures;
using DataCore.Functions;

namespace 
WindowsFormsApplication3
{
    public 
partial class Form1 Form
    
{

        
Core dCore = new Core(trueEncoding.Default);
        
        public 
Form1()
        {
            
InitializeComponent();
            try { 
dCore.Load(@"E:\WorkSpace\Rappelz\DataCore\Data\data.000"); label.Text "Loading Done !"; }
            catch (
Exception ex) { label.Text ex.Message "DataCore Exception"; }
        }

        private 
void button_Click(object senderEventArgs e)
        {
            try { 
dCore.ImportFileEntry(@"E:/test.png"); label.Text "Loading Done !"; }
            catch (
Exception ex) { label.Text ex.Message "DataCore Exception"; }
        }
    }

when i start my programme i got this
[Only registered and activated users can see links. Click Here To Register...]

but after i click on import
igot this
[Only registered and activated users can see links. Click Here To Register...]
PHP Code:
{"An exception of type 'System.StackOverflowException' was thrown."
!! so ? :confused:
06/08/2018 16:13 SilentWisdom#10
Message me on Skype @ [Only registered and activated users can see links. Click Here To Register...]
06/08/2018 18:27 HiddenAfter#11
Quote:
Originally Posted by SilentWisdom View Post
Message me on Skype @ [Only registered and activated users can see links. Click Here To Register...]
i sent u message.. thx