public BookmarkEditor(Comisor.MainWindow mainWindow, string strName, string strPath, string strCurrentPath = "") { InitializeComponent(); this.main = mainWindow; this.Title = Comisor.Resource.Bookmark_Editor; lbName.Content = Comisor.Resource.Bookmark_Name + ":"; lbPath.Content = Comisor.Resource.Bookmark_FilePath + ":"; List<string> nameOption = new List<string>(); nameOption.AddRange(strPath.Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries)); nameOption.Reverse(); nameOption.Insert(0, strName); ys.DataProcessor.RemoveSame(ref nameOption); cbName.ItemsSource = nameOption; cbName.SelectedIndex = 0; List<string> pathOption = new List<string>(); pathOption.Add(strPath); if (strCurrentPath != "") pathOption.Add(strCurrentPath); ys.DataProcessor.RemoveSame(ref pathOption); cbPath.Focus(); cbPath.ItemsSource = pathOption; cbPath.SelectedIndex = 0; ckbShortcut.Content = Comisor.Resource.Bookmark_CreatShortcut; btnOK.Content = mainWindow.resource.imgOK; btnCancel.Content = mainWindow.resource.imgCancel; this.PreviewKeyDown += new KeyEventHandler(InputBox_PreviewKeyDown); }
public Editor(Comisor.MainWindow mainWindow) { this.main = mainWindow; }