アットウィキロゴ

Resource

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using DxLibDLL;
 
namespace DesignProject
{
    class Graph
    {
        public string fileName { get; set; }
        public int handle { get; set; }
 
        public Graph(string fileName, int handle)
        {
            this.fileName = fileName;
            this.handle = handle;
        }
    }
 
    class Resource
    {
        private List<Graph> graphList;
        public int graphCount { get { return(this.graphList.Count);} }
 
        public Resource()
        {
            this.graphList = new List<Graph>();
        }
 
        public int SetGraph(string fileName)
        {
            this.graphList.Add(new Graph(fileName, DX.LoadGraph(fileName)));
            return (this.graphList.Count - 1);
        }
 
        public int GetGraphHandle(int id)
        {
            return (this.graphList[id].handle);
        }
 
        public string GetGraphFileName(int id)
        {
            return (this.graphList[id].fileName);
        }
 
        public void DownLoadGraph(string fileURL, string saveFileName)
        {
            WebClient wc = new System.Net.WebClient();
            wc.DownloadFile(fileURL, saveFileName);
            wc.Dispose();
        }
 
        public void DrawGraph( int x, int y, int id, int flag)
        {
            DX.DrawGraph(x, y, GetGraphHandle(id), flag);
        }
    }
}
 

タグ:

+ タグ編集
  • タグ:
最終更新:2010年12月08日 20:42
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。