Ejemplo n.º 1
0
        private void trackTibiaCastFilesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog();

            openFileDialog.Filter           = "TibiaCast Files (*.recording)|*.recording";
            openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Tibiacast\\Recordings";
            openFileDialog.Multiselect      = true;
            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                try
                {
                    if (Client == null)
                    {
                        var c = new Client("Tibia.dat", ClientVersion.Current);
                        Client = c;
                    }

                    miniMap.BeginUpdate();

                    var reader = new TibiaCastReader(Client);
                    reader.BeginRead(openFileDialog.FileNames, ReadTibiaCastFilesCallback, null);
                }
                catch (Exception ex)
                {
                    Trace.WriteLine("Error while tracking tibia cast files. Details: " + ex.Message);
                }
            }
        }
Ejemplo n.º 2
0
        private void trackTibiaCastFilesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "TibiaCast Files (*.recording)|*.recording";
            openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Tibiacast\\Recordings";
            openFileDialog.Multiselect = true;
            if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                try
                {
                    if (Client == null)
                    {
                        var c = new Client("Tibia.dat", ClientVersion.Current);
                        Client = c;
                    }

                    miniMap.BeginUpdate();

                    var reader = new TibiaCastReader(Client);
                    reader.BeginRead(openFileDialog.FileNames, ReadTibiaCastFilesCallback, null);
                }
                catch (Exception ex)
                {
                    Trace.WriteLine("Error while tracking tibia cast files. Details: " + ex.Message);
                }
            }
        }