private void Form1_Load(object sender, EventArgs e)
 {
     DBGFORM = new DebugMessage();
     DBGFORM.Show();
     aggparam = new AggregateParams();
     aggparam.SetTestParam();
 }
 /// <summary>
 /// 別のインスタンスからプロパティをコピーする
 /// </summary>
 /// <param name="src"></param>
 private void CopyFrom(AggregateParams src)
 {
     this.NAME        = src.NAME;
     this.IDENT       = src.IDENT;
     this.LOGDIR      = src.LOGDIR;
     this.TARGETEXT   = src.TARGETEXT;
     this.COLLECTLIST = src.COLLECTLIST;
 }
 /// <summary>
 /// プロパティを別のインスタンスにコピーする
 /// </summary>
 /// <param name="dest"></param>
 public void CopyTo(AggregateParams dest)
 {
     dest.NAME        = this.NAME;
     dest.IDENT       = this.IDENT;
     dest.LOGDIR      = this.LOGDIR;
     dest.TARGETEXT   = this.TARGETEXT;
     dest.COLLECTLIST = this.COLLECTLIST;
 }
        public void Load(string filename)
        {
            DataContractSerializer serializer = new DataContractSerializer(typeof(AggregateParams));
            XmlReader       xr = XmlReader.Create(filename);
            AggregateParams ap = (AggregateParams)serializer.ReadObject(xr);

            xr.Close();
            CopyFrom(ap);
        }
        private void 集計設定NToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormConfig config;

            config    = new FormConfig();
            config.ap = aggparam;
            if (config.ShowDialog() == DialogResult.OK)
            {
                aggparam = config.ap;
            }
        }
        private void 設定ファイルを開くOToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string filename;

            filename = SelectConfigFile();
            if (filename == string.Empty)
            {
                return;
            }
            AggregateParams ap = new AggregateParams();

            ap.Load(filename);
            aggparam = ap;
        }