public newSkin(IAttrRow iAttrRow) { s_pW = this; m_iAttrRow = iAttrRow; m_pathSkinGroup = m_iAttrRow.m_parent.m_xmlCtrl.m_openedFile.m_path; m_skinGroupShortName = ""; m_skinName = null; InitializeComponent(); this.Owner = MainWindow.s_pW; if (Project.Setting.s_skinPath != null && Project.Setting.s_skinPath != "" && Directory.Exists(Project.Setting.s_skinPath)) { DirectoryInfo skinDi = new DirectoryInfo(Project.Setting.s_skinPath); foreach(FileInfo fi in skinDi.GetFiles()) { ComboBoxItem cbiSkin = new ComboBoxItem(); cbiSkin.Content = System.IO.Path.GetFileNameWithoutExtension(fi.Name); cbiSkin.ToolTip = fi.FullName; cbiSkin.Selected += mx_groupCbi_Selected; mx_groupCbBox.Items.Add(cbiSkin); } } object ret = XmlItemContextMenu.showTmplGroup("skin", mx_tmplCbBox, mx_tmplCbi_Selected, m_iAttrRow.m_parent.m_xe.Name + "_skinTmpl"); if (mx_tmplCbBox.Items.Count > 0) { if (ret != null && ret is ComboBoxItem) { ComboBoxItem cbiTmpl = (ComboBoxItem)ret; cbiTmpl.IsSelected = true; } else { if (mx_tmplCbBox.Items.GetItemAt(0) is ComboBoxItem) { ComboBoxItem cbiFirst = (ComboBoxItem)mx_tmplCbBox.Items.GetItemAt(0); cbiFirst.IsSelected = true; } } } }
private void mx_new_Click(object sender, RoutedEventArgs e) { if (m_parent.m_basic != null && m_parent.m_basic is Basic) { switch (m_name) { case "skin": { newSkin winNewSkin = new newSkin(this); winNewSkin.ShowDialog(); } break; case "image": { } break; case "ImageName": { } break; case "particleName": { } break; default: break; } } }
private void mx_link_Click(object sender, RoutedEventArgs e) { if (m_parent.m_basic != null && m_parent.m_basic is Basic) { switch (m_name) { case "skin": { if(m_value != "") { m_parent.m_xmlCtrl.findSkinAndSelect(mx_value.Text, (BoloUI.Basic)m_parent.m_basic); } else { newSkin winNewSkin = new newSkin(this); winNewSkin.ShowDialog(); } } break; case "image": { } break; case "ImageName": { } break; default: break; } } }
private void mx_root_Unloaded(object sender, RoutedEventArgs e) { s_pW = null; }