public Item(CasetBase c1, CasetBase c2)
 {
     this.c1 = c1; c1.StringChanged += c1_StringChanged; c1.PropertyChanged += c1_PropertyChanged;
     this.c2 = c2; c2.StringChanged += c2_StringChanged; c2.PropertyChanged += c2_PropertyChanged;
 }
        public void OpenResx(String[] alfp)
        {
            CloseMe();

            if (alfp.Length >= 1) c1 = Caset.LoadFrom(alfp[0]);
            if (alfp.Length >= 2) c2 = Caset.LoadFrom(alfp[1]);

            ((GridViewColumn)FindName("h1")).Header = (alfp.Length >= 1) ? System.IO.Path.GetFileName(alfp[0]) : "無し";
            ((GridViewColumn)FindName("h2")).Header = (alfp.Length >= 2) ? System.IO.Path.GetFileName(alfp[1]) : "無し";

            foreach (String k in c1.Names.Concat(c2.Names).Distinct()) {
                oc.Add(new Item(c1, c2) { Name = k });
            }
        }
        private void mMany_Click(object sender, RoutedEventArgs e)
        {
            SelFolder form = new SelFolder();
            form.DataContext = proj.Clone();
            form.Left = this.Left + 24;
            form.Top = this.Top + 24;
            if (!(form.ShowDialog() ?? false)) return;

            proj = (Proj1)form.DataContext;

            CloseMe();

            c1 = new MCaset(proj.GetLang1Files(), proj.IsMulti.Value);
            c2 = new MCaset(proj.GetLang2Files(), proj.IsMulti.Value);

            ((GridViewColumn)FindName("h1")).Header = lLangDisp1.Text = proj.LangDisp1;
            ((GridViewColumn)FindName("h2")).Header = lLangDisp2.Text = proj.LangDisp2;

            foreach (String k in c1.Names.Concat(c2.Names).Distinct()) {
                oc.Add(new Item(c1, c2) { Name = k });
            }
        }
 public void CloseMe()
 {
     oc.Clear();
     c1 = new Caset();
     c2 = new Caset();
 }