示例#1
0
文件: gui.cs 项目: fthomas/drohne
    private void LoadSelectedLogFiles(ArrayList logFiles)
    {
        int    count  = 0;
        string status = "";

        this.totalLog = null;

        foreach (Hashtable logFileInfo in logFiles)
        {
            string    fn     = (String)logFileInfo["Filename"];
            LogFormat format = (LogFormat)logFileInfo["Format"];

            if (this.totalLog == null)
            {
                this.totalLog = LogBase.CreateLogInstanceFromFile(fn, format);
            }
            else
            {
                this.totalLog.Append(LogBase.CreateLogInstanceFromFile(fn,
                                                                       format));
            }

            if (format != this.totalLog.Format)
            {
                this.ShowDifferentLogFormatDialog(fn);
            }

            status = String.Format("{0}: \"{1}\"",
                                   Drohne.i18n("Loaded File"), fn);

            this.statusbar.Push(1, status);

            if (count++ == 0)
            {
                this.saveFilename.Extension = FilenameHelper.GetExtension(fn);
            }
        }

        status = String.Format("{0}: {1}, {2}: {3}",
                               Drohne.i18n("Files Loaded"), count,
                               Drohne.i18n("Log Format"), this.totalLog.Format);

        this.statusbar.Push(1, status);

        this.PopulateSlicesTreeView();
    }