//更新给定项,成功返回true,失败意味着没有这个名称的项 public static bool Update(string oldItemName, menuItem newItem) { if (GetAItem(oldItemName) == null) { return(false); } try { //"UPDATE TodoItem SET Ti = ?, Desc = ?, Time = ?, Pic = ?, Finished = ? WHERE Tid = ?" //Name, Formula, Category, Description, Image, Price using (var custstmt = ((App)App.Current).conn.Prepare("update MenuItem set Name = ?, Formula = ?, Category = ?, Description = ?, Image = ?, Price = ? where Name = ?")) { custstmt.Bind(1, newItem.menuName); custstmt.Bind(2, newItem.generateSQLSavingString()); custstmt.Bind(3, newItem.Category); custstmt.Bind(4, newItem.description); custstmt.Bind(5, newItem.Image); custstmt.Bind(6, newItem.price); custstmt.Bind(7, oldItemName); custstmt.Step(); } } catch (Exception ex) { throw ex; } return(true); }
//插入给定的项,成功返回true,失败意味着已经有重复名称的项存在 public static bool Insert(menuItem aim) { if (GetAItem(aim.menuName) != null) { return(false); } // SqlConnection was opened in App.xaml.cs and exposed through property conn try { using (var custstmt = ((App)App.Current).conn.Prepare("INSERT INTO MenuItem (Name, Formula, Category, Description, Image, Price) VALUES (?, ?, ?, ?, ?, ?)")) { custstmt.Bind(1, aim.menuName); custstmt.Bind(2, aim.generateSQLSavingString()); custstmt.Bind(3, aim.Category); custstmt.Bind(4, aim.description); custstmt.Bind(5, aim.Image); custstmt.Bind(6, aim.price); custstmt.Step(); } } catch (Exception ex) { throw ex; } return(true); }
private async void slectphoto(object sender, RoutedEventArgs e) { menuItem i = (menuItem)dataGrid.SelectedItem; BitmapImage tmp = new BitmapImage(); FileOpenPicker fo = new FileOpenPicker(); fo.FileTypeFilter.Add(".png"); fo.FileTypeFilter.Add(".jpg"); fo.SuggestedStartLocation = PickerLocationId.Desktop; var f = await fo.PickSingleFileAsync(); BitmapImage img = new BitmapImage(); tmp = await LoadImage(f); i.trueimage = tmp; string t = f.DisplayType; t = t.Substring(0, t.Length - 2); t = t.ToLower(); i.Image = "Assets/" + f.DisplayName + "." + t; menuManager.Update(i.menuName, i); await peopleViewModel.loadAsync(); dataGrid.SelectedItem = null; }
public IActionResult Add(int ID, string name, decimal price, string description, string category) { menuItem item = new menuItem(ID, name, price, description, category); menuItems.Add(item); return(Redirect("/Menu")); }
public void Dispose() { if (miHumanResourceManagement_HRM_MinewareSystemsHarmonyPAS != null) { miHumanResourceManagement_HRM_MinewareSystemsHarmonyPAS.Dispose(); miHumanResourceManagement_HRM_MinewareSystemsHarmonyPAS = null; } if (miLineActionManager_HRMActionManager_MinewareSystemsHarmonyPAS != null) { miLineActionManager_HRMActionManager_MinewareSystemsHarmonyPAS.Dispose(); miLineActionManager_HRMActionManager_MinewareSystemsHarmonyPAS = null; } if (miOpenLineActions_HRMAddLineActions_MinewareSystemsHarmonyPAS != null) { miOpenLineActions_HRMAddLineActions_MinewareSystemsHarmonyPAS.Dispose(); miOpenLineActions_HRMAddLineActions_MinewareSystemsHarmonyPAS = null; } if (miIncidentManagementSystem_HRMAMS_MinewareSystemsHarmonyPAS != null) { miIncidentManagementSystem_HRMAMS_MinewareSystemsHarmonyPAS.Dispose(); miIncidentManagementSystem_HRMAMS_MinewareSystemsHarmonyPAS = null; } if (miEmailClosures_HRMCloseActions_MinewareSystemsHarmonyPAS != null) { miEmailClosures_HRMCloseActions_MinewareSystemsHarmonyPAS.Dispose(); miEmailClosures_HRMCloseActions_MinewareSystemsHarmonyPAS = null; } if (miGenericReport_HRMRepGeneric_MinewareSystemsHarmonyPAS != null) { miGenericReport_HRMRepGeneric_MinewareSystemsHarmonyPAS.Dispose(); miGenericReport_HRMRepGeneric_MinewareSystemsHarmonyPAS = null; } if (miHRMReports_HRMReportsMenu_MinewareSystemsHarmonyPAS != null) { miHRMReports_HRMReportsMenu_MinewareSystemsHarmonyPAS.Dispose(); miHRMReports_HRMReportsMenu_MinewareSystemsHarmonyPAS = null; } if (miHRMSettings_HRMSettings_MinewareSystemsHarmonyPAS != null) { miHRMSettings_HRMSettings_MinewareSystemsHarmonyPAS.Dispose(); miHRMSettings_HRMSettings_MinewareSystemsHarmonyPAS = null; } if (miFrequncies_HRMSettingsFreq_MinewareSystemsHarmonyPAS != null) { miFrequncies_HRMSettingsFreq_MinewareSystemsHarmonyPAS.Dispose(); miFrequncies_HRMSettingsFreq_MinewareSystemsHarmonyPAS = null; } if (miAdditionalUsers_HRMSettingsUsers_MinewareSystemsHarmonyPAS != null) { miAdditionalUsers_HRMSettingsUsers_MinewareSystemsHarmonyPAS.Dispose(); miAdditionalUsers_HRMSettingsUsers_MinewareSystemsHarmonyPAS = null; } if (miLineActionManagerSetup_SettingsHMR_MinewareSystemsHarmonyPAS != null) { miLineActionManagerSetup_SettingsHMR_MinewareSystemsHarmonyPAS.Dispose(); miLineActionManagerSetup_SettingsHMR_MinewareSystemsHarmonyPAS = null; } }
private void delete_Click(object sender, RoutedEventArgs e) { if (dataGrid.SelectedItem != null) { menuItem i = (menuItem)dataGrid.SelectedItem; menuManager.Remove(i.menuName); peopleViewModel.staticData.Remove(i); dataGrid.SelectedItem = null; } }
//测试菜单数据库 private void testMenu_Click(object sender, RoutedEventArgs e) { string result = ""; menuItem t1 = new menuItem("t1", "apple,1.5,banana,2.5,water,3.5,", "a", "hello", "zzz", "100$"); menuItem t2 = new menuItem("t2", "f**k,1.5,banana,2.5,water,3.5,", "a", "hello", "zzz", "100$"); menuItem t3 = new menuItem("t3", "apple,1.5,banana,2.5,water,100000,", "a", "hello", "zzz", "100$"); menuItem t4 = new menuItem("t4", "apple,1.5,banana,2.5,water,100000,", "a", "hello", "zzz", "100$"); menuItem t5 = new menuItem("t5", "det,1.5,", "a", "hello", "zzz", "100$"); menuItem t6 = new menuItem("t6", "egg,1,", "a", "hello", "zzz", "100$"); result += t1.generateSQLSavingString(); menuManager.BuildDatabase(); menuManager.Insert(t1); menuManager.Insert(t2); menuManager.Insert(t3); menuManager.Insert(t4); menuManager.Insert(t5); menuManager.Insert(t6); menuManager.Remove("t4"); menuManager.Update("t3", new menuItem("t3", "apple,1.5,banana,2.5,water,1999999,", "a", "hello", "zzz", "100$")); result += "\n" + menuManager.GetAItem("t3").generateFormulaString() + "\n"; menuManager.ServeMenuItem("t1"); menuManager.ServeMenuItem("t1"); var temp = menuManager.ServeMenuItem("t1"); List <menuItem> res = menuManager.GetItems(); for (int i = 0; i < res.Count; i++) { result += res.ElementAt(i).menuName; result += " "; result += res.ElementAt(i).SQLString; result += " "; result += res.ElementAt(i).description; result += " "; result += res.ElementAt(i).Category; result += " "; result += res.ElementAt(i).price; result += "\n"; } result += "=====================\n"; result += temp.serveSucessed + "\n"; temp = menuManager.ServeMenuItem("t2"); for (int i = 0; i < temp.needMaterialName.Count; i++) { result += temp.needMaterialName.ElementAt(i) + " " + temp.needMaterialNumber.ElementAt(i) + "\n"; } result += "=====================\n"; temp = menuManager.ServeMenuItem("t5"); for (int i = 0; i < temp.needMaterialName.Count; i++) { result += temp.needMaterialName.ElementAt(i) + " " + temp.needMaterialNumber.ElementAt(i) + "\n"; } test2.Text = result; }
private void OnFocus_ArticleType(object sender, RoutedPropertyChangedEventArgs <object> e) { if (itsME == "Articletype") { if (!itsAnUpdate) { menuItem category = (menuItem)tvrCategory.SelectedItem; txtArticleType.Text = category.id; } } }
public override void Initialize() { menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = AudioMenuState.SOUNDVOLUME; }
public override void Initialize() { menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = ControlsMenuState.OPTIONONE; }
//根据菜名,做一道菜,自动扣除材料库对应材料,返回错误结构体,说明失败的所有原因,错误结构体声明在后面 public static errorMessage ServeMenuItem(string name) { menuItem aim = GetAItem(name); if (aim == null) { return(new errorMessage(false, true)); } int len = aim.materialName.Count(); List <string> needMaterialName = new List <string>(); List <double> needMaterialNumber = new List <double>(); List <string> DeterioratedName = new List <string>(); for (int i = 0; i < len; i++) { string mname = aim.materialName.ElementAt(i); double mnum = aim.materialNumber.ElementAt(i); if (materialManager.GetAItem(mname) == null) { needMaterialName.Add(mname); needMaterialNumber.Add(mnum); continue; } if (materialManager.GetAItem(mname).isDeteriorated()) { needMaterialName.Add(mname); needMaterialNumber.Add(mnum); DeterioratedName.Add(mname); continue; } double needNum = materialManager.CheckNumber(mname, mnum); if (needNum > 0) { needMaterialName.Add(mname); needMaterialNumber.Add(needNum); } } if (needMaterialName.Count() == 0) { for (int i = 0; i < len; i++) { string mname = aim.materialName.ElementAt(i); double mnum = aim.materialNumber.ElementAt(i); materialManager.ChangeNumber(mname, -mnum); } return(new errorMessage(true, false)); } else { return(new errorMessage(false, false, needMaterialName, needMaterialNumber)); } }
public override void Initialize() { menuGray = new menuItem(); menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = GameOverMenuState.RETRY; }
private void menuLoader() { Dispatcher.Invoke(() => { if (myList.Count != 0) { myList.Clear(); } if (menuList.Items.Count != 0) { menuList.Items.Clear(); } try { using (SqlConnection connection = new SqlConnection("Server=tcp:omsdb.database.windows.net,1433;Database=OMSDB;User ID=csce4444@omsdb;Password=Pineapple!;")) { // Formulate the command. SqlCommand command = new SqlCommand(); command.Connection = connection; // Specify the query to be executed. command.CommandType = CommandType.Text; command.CommandText = @" SELECT * FROM dbo.Menu "; // Open a connection to database. connection.Open(); // Read data returned for the query. SqlDataReader reader = command.ExecuteReader(); // while not done reading the stuff returned from the query while (reader.Read()) { //Console.WriteLine((byte)reader[5] + " ayy"); menuItem temp = new menuItem { itemNumber = (int)reader[0], name = (string)reader[1], description = (string)reader[2], price = (decimal)reader[3], visible = (bool)reader[5], // if visible is 1 visible evaluates to true else visible is false category = (string)reader[7] }; myList.Add(temp); menuList.Items.Add(temp.name); } } } catch (Exception) { } }); }
public override void Initialize() { menuGray = new menuItem(); menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = PauseOptionsMenuState.AUDIO; isUpdating = false; }
private void more_info_Click(object sender, RoutedEventArgs e) { if (menuList.SelectedIndex != -1) { int position = menuList.SelectedIndex; menuItem temp = (menuItem)myList[position]; string available = "Unavailable"; if (temp.visible == true) { available = "Available"; } MessageBox.Show("Price: " + temp.price + "\nCategory: " + temp.category + "\nDescription: " + temp.description + "\nAvailability: " + available); } }
public override void Initialize() { menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } CurrentWorkerState = DeleteSaveMenuState.NO; PreviousWorkerState = DeleteSaveMenuState.NO; isUpdating = false; }
void loadNonMenuItems() { GameObject temp = Instantiate(item, Vector3.zero, Quaternion.identity) as GameObject; temp.transform.parent = rootNode.transform; menuItem m = temp.GetComponent <menuItem>(); refObjects[menuItem.deviceType.TapeGroup] = m.Setup(menuItem.deviceType.TapeGroup); temp.SetActive(false); temp = Instantiate(item, Vector3.zero, Quaternion.identity) as GameObject; temp.transform.parent = rootNode.transform; m = temp.GetComponent <menuItem>(); refObjects[menuItem.deviceType.Pano] = m.Setup(menuItem.deviceType.Pano); temp.SetActive(false); }
public Form1() { InitializeComponent(); //Set the initial value of the combo box as I can't find the right thing in the properties menu simSpeedComboBox.SelectedItem = "1.0"; orderNumber = 0; //Be sure that the program doesn't initially assume opening and closing time have already been parsed successfully openCloseParsed = false; notAcceptingOrders = false; //Create our menu menuItem fries = new menuItem("Fries", 3.50, 3); menuItem burger = new menuItem("Burger", 5.50, 5); menuItem drink = new menuItem("Drink", 2.80, 1); menuItem pizza = new menuItem("Pizza", 8.30, 7); menuItem garlicBread = new menuItem("Garlic bread", 3.20, 2); menuItem iceCream = new menuItem("Ice cream", 4.10, 1); menuItem curry = new menuItem("Curry", 5.20, 6); menuItem salad = new menuItem("Salad", 5.40, 3); menuItem buffet = new menuItem("Buffet", 15.00, 11); menuItem friedFish = new menuItem("Fried fish", 3.90, 3); //There's probably a much better way to do this haha menu[0] = fries; menu[1] = burger; menu[2] = drink; menu[3] = pizza; menu[4] = garlicBread; menu[5] = iceCream; menu[6] = curry; menu[7] = salad; menu[8] = buffet; menu[9] = friedFish; //Print it off so we know we got it right... //for(int i = 0; i < menu.Length; i++) //{ // currentOrdersTextBox.Text += menu[i].print() + "\r\n"; //} //Set currentTime to a value so we know if we have neveer started the simulation currentTime = new time(-1, -1); }
static public menuItem getCategoryListAsTreeView() { menuItem root = new menuItem() { id = "", bezeichnung = "Categories" }; List <CategoryModel> tmpListe = getCategoryList(); int charToInt(char c) { return((int)(c - '0')); } foreach (CategoryModel category in tmpListe) { string myID = category.CategoryID; string myDescription = category.Description; if (charToInt(myID[1]) == 0) { root.Items.Add(new menuItem() { id = myID, bezeichnung = myDescription }); } else if (charToInt(myID[2]) == 0) { root.Items[charToInt(myID[0]) - 1].Items.Add(new menuItem() { id = myID, bezeichnung = myDescription }); } else { root.Items[charToInt(myID[0]) - 1].Items[charToInt(myID[1]) - 1].Items.Add(new menuItem() { id = myID, bezeichnung = myDescription }); } } return(root); }
// Este método lo uso solo la primera vez para poder crear un objeto del tipo json que luego voy a desserializar private void crearJsonMenu() { menuDta mnu = new menuDta(); mnu.Nombre = "Cena"; mnu.id = "1"; mnu.types = new List <menuType>(); menuType type = new menuType(); type.titulo_es = "Platos"; type.hora_desde = "10:00"; type.hora_hasta = "18:00"; type.items = new List <menuItem>(); menuItem item = new menuItem(); item.titulo_es = "Papas Fritas"; item.titulo_en = "Chips"; item.titulo_pt = "Patatas Fritas"; type.items.Add(item); menuItem item2 = new menuItem(); item2.titulo_es = "Lomo"; item2.titulo_en = "Meat Beef"; item2.titulo_pt = "Rostizado"; type.items.Add(item2); mnu.types.Add(type); //Obtengo el directorio para el archivo var service = HttpContext.RequestServices.GetService(typeof(Microsoft.AspNetCore.Hosting.IHostingEnvironment)) as Microsoft.AspNetCore.Hosting.IHostingEnvironment; string folderName = "json/"; string webRootPath = service.WebRootPath; string newPath = Path.Combine(webRootPath, folderName); //Serializo el objeto a json string objeto = JsonConvert.SerializeObject(mnu); //Escribo en disco el archivo System.IO.File.WriteAllText(newPath + @"/menu_" + mnu.id + ".json", objeto); }
//得到所有的菜,返回一个list public static List <menuItem> GetItems() { List <menuItem> result = new List <menuItem>(); using (var custstmt = ((App)App.Current).conn.Prepare("SELECT Name, Formula, Category, Description, Image, Price FROM MenuItem")) { while (custstmt.Step() == SQLiteResult.ROW) { menuItem beCheck = new menuItem( (string)custstmt[0], (string)custstmt[1], (string)custstmt[2], (string)custstmt[3], (string)custstmt[4], (string)custstmt[5] ); result.Add(beCheck); } } return(result); }
//得到指定名称的菜 public static menuItem GetAItem(string name) { menuItem result = null; using (var custstmt = ((App)App.Current).conn.Prepare("SELECT Name, Formula, Category, Description, Image, Price FROM MenuItem WHERE Name = ?")) { custstmt.Bind(1, name); while (custstmt.Step() == SQLiteResult.ROW) { result = new menuItem( (string)custstmt[0], (string)custstmt[1], (string)custstmt[2], (string)custstmt[3], (string)custstmt[4], (string)custstmt[5] ); } } return(result); }
//模糊搜索菜名,返回符合条件的list public static List <menuItem> SerachName(string str) { List <menuItem> result = new List <menuItem>(); using (var custstmt = ((App)App.Current).conn.Prepare("SELECT Name, Formula, Category, Description, Image, Price FROM MenuItem WHERE Name LIKE ?")) { custstmt.Bind(1, "%" + str + "%"); while (custstmt.Step() == SQLiteResult.ROW) { menuItem beCheck = new menuItem( (string)custstmt[0], (string)custstmt[1], (string)custstmt[2], (string)custstmt[3], (string)custstmt[4], (string)custstmt[5] ); result.Add(beCheck); } } return(result); }
public override void Initialize() { menuBackground = new menuItem(); int_NumOfOptions = 5; menuItems = new menuItem[5]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } loadSlots = new loadSlot[4]; for (int i = 0; i < 4; i++) { loadSlots[i] = new loadSlot(); } v2_tempTime = Vector2.Zero; CurrentWorkerState = LoadMenuState.BACK; PreviousWorkerState = LoadMenuState.BACK; }
void loadMenu() { menuItems = new GameObject[(int)menuItem.deviceType.Max]; menuItemScripts = new menuItem[menuItems.Length]; for (int i = 0; i < menuItems.Length; i++) { menuItems[i] = Instantiate(item, Vector3.zero, Quaternion.identity) as GameObject; menuItems[i].transform.parent = rootNode.transform; menuItem m = menuItems[i].GetComponent <menuItem>(); refObjects[(menuItem.deviceType)i] = m.Setup((menuItem.deviceType)i); menuItemScripts[i] = m; } int tempCount = 0; float h = 0; float arc = 37.5f; while (tempCount < menuItems.Length) { for (int i = 0; i < rowLength; i++) { if (tempCount < menuItems.Length) { menuItems[tempCount].transform.localPosition = Quaternion.Euler(0, (arc / rowLength) * (i - rowLength / 2f) + (arc / rowLength) / 2f, 0) * (Vector3.forward * -.5f) - (Vector3.forward * -.5f) + Vector3.up * h; menuItems[tempCount].transform.rotation = Quaternion.Euler(0, (arc / rowLength) * (i - rowLength / 2f) + (arc / rowLength) / 2f, 0); } tempCount++; } h += 0.07f; } metronomeNode.transform.localPosition = Quaternion.Euler(0, -arc / 2 - 10, 0) * (Vector3.forward * -.5f) - (Vector3.forward * -.5f) + Vector3.up * .014f; metronomeNode.transform.rotation = Quaternion.Euler(0, -arc / 2 - 10, 0); settingsNode.transform.localPosition = Quaternion.Euler(0, arc / 2 + 10, 0) * (Vector3.forward * -.5f) - (Vector3.forward * -.5f); settingsNode.transform.rotation = Quaternion.Euler(0, arc / 2 + 10, 0); }
private void CreateCustomer_Click(object sender, RoutedEventArgs e) { List <String> tmp = new List <string>(); tmp.Add("233"); List <double> tmp2 = new List <double>(); tmp2.Add(1); menuItem newItem = new menuItem("samplename", tmp, tmp2, "Eastern", "", "", "100$"); peopleViewModel.staticData.Add(newItem); dataGrid.SelectItem(newItem); dataGrid.ScrollItemIntoView(newItem, () => { try { dataGrid.BeginEdit(dataGrid.SelectedItem); } catch { } }); }
public override void Initialize() { UIBackground = new menuItem(); numbers = new Texture2D[10]; inkMeters = new menuItem(); inkNumbers = new menuItem[int_NumOfInkNumbers]; for (int i = 0; i < int_NumOfInkNumbers; i++) { inkNumbers[i] = new menuItem(); } healthMeters = new menuItem(); healthNumbers = new menuItem[int_NumOfHealthNumbers]; for (int i = 0; i < int_NumOfHealthNumbers; i++) { healthNumbers[i] = new menuItem(); } char_Temp = new char[4]; }
void writeHorizonalMenu(int i, menuItem menItem, ref StringBuilder rawXML) { string acceleration = menudef.acceleration; string duration = menudef.duration; int onleft = 0; int onright = 0; switch (i) { case 0: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 700).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menItem.isDefault) { rawXML.AppendLine("<width>1280</width>"); rawXML.AppendLine("<height>720</height>"); } else { rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); } rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onup>" + (menItem.id + 700).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 1: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 800).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onup>" + (menItem.id + 800).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } //rawXML.AppendLine("<ondown>" + (menItem.id + 700).ToString() + "01</ondown>"); rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 2: //rawXML.AppendLine("<control>"); //rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); //rawXML.AppendLine("<type>label</type>"); //rawXML.AppendLine("<posX>-160</posX>"); //rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); //rawXML.AppendLine("<width>320</width>"); //rawXML.AppendLine("<height>72</height>"); //rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); //rawXML.AppendLine("<font>#labelFont</font>"); //rawXML.AppendLine("<align>center</align>"); //rawXML.AppendLine("<label>" + menItem.name + "</label>"); //if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 1) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")|control.isvisible(" + (menuItems[0].id + 100).ToString() + ")</visible>"); //else if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 2) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")|control.isvisible(" + (menuItems[1].id + 100).ToString() + ")</visible>"); //else if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 3) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[2].id + 700).ToString() + ")|control.isvisible(" + (menuItems[2].id + 100).ToString() + ")</visible>"); //else // rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")|control.isvisible(" + (menItem.id + 101).ToString() + ")</visible>"); //rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); //rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); //rawXML.AppendLine("</control>"); break; case 3: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1120</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 698).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 4: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>800</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 5: if (menudef.dropShadow) { rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>482</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 2) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); } rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>480</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 6: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>160</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 7: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 702).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "160,0" + quote + " end=" + quote + "-160,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 8: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1120</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 3 == -3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 3).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 9: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>800</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,0" + quote + " end=" + quote + "320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 10: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>800</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 11: if (menudef.dropShadow) { rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>481</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 1) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); } rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>480</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 12: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>160</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-320,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 13: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-480,0" + quote + " end=" + quote + "-160,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,300" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; } }
public void Arrange() { _repo = new menuRepository(); _content = new MenuItem(5, "ham sandwich", "ham on bread", new List<string>(),{ "bread", "lettuce", "mayo", "pickle" }, 6.00m;
public bool Save_MenuItems_tables(menuItem model) { return(objMenuItemsProviders.Save_MenuItems_tables(model)); }
void writeHorizonalMenu(int i, menuItem menItem, ref StringBuilder rawXML) { string acceleration = tbAcceleration.Text; string duration = tbDuration.Text; int onleft = 0; int onright = 0; switch (i) { case 0: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 700).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-45</posY>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menItem.isDefault) { rawXML.AppendLine("<width>1920</width>"); rawXML.AppendLine("<height>1080</height>"); } else { rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); } rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == formStreamedMpEditor.musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: if (!IsOnlineVideosGroup(menItem.hyperlinkParameter)) { string search = string.IsNullOrEmpty(menItem.hyperlinkParameterSearch) ? string.Empty : "|search:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterSearch); string category = string.IsNullOrEmpty(menItem.hyperlinkParameterCategory) ? string.Empty : "|category:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterCategory); rawXML.AppendLine("<hyperlinkParameter>site:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + category + search + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } else { rawXML.AppendLine("<hyperlinkParameter>group:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter.Substring(7)) + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onup>" + (menItem.id + 700).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 1: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 800).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-45</posY>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == formStreamedMpEditor.musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: if (!IsOnlineVideosGroup(menItem.hyperlinkParameter)) { string search = string.IsNullOrEmpty(menItem.hyperlinkParameterSearch) ? string.Empty : "|search:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterSearch); string category = string.IsNullOrEmpty(menItem.hyperlinkParameterCategory) ? string.Empty : "|category:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterCategory); rawXML.AppendLine("<hyperlinkParameter>site:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + category + search + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } else { rawXML.AppendLine("<hyperlinkParameter>group:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter.Substring(7)) + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onup>" + (menItem.id + 800).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 2: break; case 3: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1680</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 698).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 4: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1200</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 5: if (cbDropShadow.Checked) { rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>723</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset + 3) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); } rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>720</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 6: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>240</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 7: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 702).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "240,0" + quote + " end=" + quote + "-240,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 8: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1680</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 3 == -3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 3).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 9: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1200</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,0" + quote + " end=" + quote + "480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 10: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>1200</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 11: if (cbDropShadow.Checked) { rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>722</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset + 2) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); } rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>720</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 12: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>240</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-480,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 13: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(txtMenuPos.Text) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-720,0" + quote + " end=" + quote + "-240,0" + quote + " time=" + quote + duration + quote + " acceleration=" + quote + acceleration + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "0,450" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + "-0.1" + quote + " reversible=" + quote + "false" + quote + ">windowclose</animation>"); rawXML.AppendLine("</control>"); break; } }
public override void Initialize() { menuBackground = new menuItem(); }
private void btnUpdate_Click(object sender, EventArgs e) { if (used_list.SelectedItem != null) { int index = used_list.SelectedIndex; int selected = menuItems[used_list.SelectedIndex].identifier; menuItem used_item = new menuItem(); used_item.name = new_name.Text; used_item.identifier = selected; used_item.property = string.Empty; if (cB_singleImage.Checked) { used_item.bgImage = new_bgimage.Text; } if (cB_FanartHandler.Checked) { used_item.bgImage = combo_FanartHandler.Text; } if (cB_RecentMedia.Checked) { if (rB_Movies.Checked) { used_item.media = "MovingPictures"; } else if (rB_Series.Checked) { used_item.media = "TVSeries"; } else if (rB_Music.Checked) { used_item.media = "Music"; } else if (rB_Recordings.Checked) { used_item.media = "Recordings"; } else if (rB_MyFilms.Checked) { used_item.media = "MyFilms"; } else if (rB_Pictures.Checked) { used_item.media = "Pictures"; } } else { used_item.media = ""; } if (new_windowid.Text.Length > 0) { if (Convert.ToInt32(new_windowid.Text) == 501 && cboParameterViews.Text != "") { used_item.hyperlink = Convert.ToInt32(504); } else { used_item.hyperlink = Convert.ToInt32(new_windowid.Text); } } else { used_item.hyperlink = -1; } if (cboParameterViews.SelectedIndex != -1 || movPicsCategoryCombo.Visible) { if (used_item.hyperlink == 9811) { used_item.property = getTVSeriesViewKey(cboParameterViews.SelectedItem.ToString()); } if (used_item.hyperlink == 504) { used_item.property = getMusicViewKey(cboParameterViews.SelectedItem.ToString()); } if (used_item.hyperlink == 4755) { string OnlineVideosReturn = ""; if (cB_onlinevideosOption.Checked) OnlineVideosReturn = "Root"; else OnlineVideosReturn = "Locked"; used_item.property = "site:" + getOnlineVideosViewKey(cboParameterViews.SelectedItem.ToString()) + "|return:" + OnlineVideosReturn; } if (used_item.hyperlink == 96742) { if (movPicsCategoryCombo.SelectedIndex != -1) { int? id = GetMovPicsCategoryNodeID(movPicsCategoryCombo.SelectedNode); if (id != null) { used_item.property = "categoryid:" + id.ToString(); } ClearMovingPicturesCategories(); } } } used_list.Items.RemoveAt(index); used_list.Items.Insert(index, used_item.name); menuItems.RemoveAt(index); menuItems.Insert(index, used_item); } }
public override void Initialize() { menuBackground = new menuItem(); menuItems = new menuItem[int_NumOfOptions]; for (int i = 0; i < int_NumOfOptions; i++) { menuItems[i] = new menuItem(); } resItems = new menuItem[int_NumOfResOptions]; for (int i = 0; i < int_NumOfResOptions; i++) { resItems[i] = new menuItem(); } CurrentWorkerState = VideoMenuState.BACK; CurrentResState = ResolutionOptions.ZERO; }
private void btnAdd_Click(object sender, EventArgs e) { if (new_name.Text != "") { if (avail_list.SelectedItem != null) { toolStripStatusLabel1.Text = avail_list.SelectedItem.ToString() + " added to menu"; } menuItem item = new menuItem(); item.name = new_name.Text; item.identifier = menuItems.Count; item.property = string.Empty; if (cB_singleImage.Checked) { item.bgImage = new_bgimage.Text; } else if (cB_FanartHandler.Checked) { item.bgImage = combo_FanartHandler.Text; } if (cB_RecentMedia.Checked) { if (rB_Movies.Checked) { item.media = "MovingPictures"; } else if (rB_Series.Checked) { item.media = "TVSeries"; } else if (rB_Music.Checked) { item.media = "Music"; } else if (rB_Recordings.Checked) { item.media = "Recordings"; } else if (rB_MyFilms.Checked) { item.media = "MyFilms"; } else if (rB_Pictures.Checked) { item.media = "Pictures"; } } else { item.media = ""; } int num1; bool res = int.TryParse(new_windowid.Text, out num1); if (res == false) { item.hyperlink = -1; } else { if (num1 == 501 && cboParameterViews.Text != "") { item.hyperlink = 504; } else { item.hyperlink = num1; } } if (cboParameterViews.SelectedIndex != -1 || movPicsCategoryCombo.Visible || tbEditorStartParamsOutput.Text != string.Empty) { if (item.hyperlink == 9811) { item.property = getTVSeriesViewKey(cboParameterViews.SelectedItem.ToString()); } if (item.hyperlink == 504) { item.property = getMusicViewKey(cboParameterViews.SelectedItem.ToString()); } if (item.hyperlink == 4755) { string OnlineVideosReturn = ""; if (cB_onlinevideosOption.Checked) OnlineVideosReturn = "Root"; else OnlineVideosReturn = "Locked"; item.property = "site:" + getOnlineVideosViewKey(cboParameterViews.SelectedItem.ToString()) + "|return:" + OnlineVideosReturn; } if (item.hyperlink == 96742) { if (movPicsCategoryCombo.SelectedIndex != -1) { int? id = GetMovPicsCategoryNodeID(movPicsCategoryCombo.SelectedNode); if (id != null) item.property = "categoryid:" + id.ToString(); ClearMovingPicturesCategories(); } } if(item.hyperlink == 7986) { item.property = tbEditorStartParamsOutput.Text; } } else item.property = ""; menuItems.Add(item); used_list.Items.Add(item.name); // Clear items new_name.Text = ""; new_bgimage.Text = ""; new_windowid.Text = ""; cboParameterViews.Text = ""; movPicsCategoryCombo.SelectedIndex = -1; cB_RecentMedia.Checked = false; if (used_list.Items.Count > 0) avail_list.SelectedIndex = -1; } else { MessageBox.Show("Please enter a name for this item", "Missing Fields", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
void writeVerticalMenu(int i, menuItem menItem, ref StringBuilder rawXML) { string acceleration = menudef.acceleration; string duration = menudef.duration; string menuVisControl = string.Empty; int onup = 0; int ondown = 0; if (menItem.subMenuLevel1ID > 0) menuVisControl = "control.isvisible(" + menItem.subMenuLevel1ID.ToString() + ")|"; switch (i) { case 0: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 700).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menItem.isDefault) { rawXML.AppendLine("<width>1280</width>"); rawXML.AppendLine("<height>720</height>"); } else { rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); } rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onup = menuItems[menuItems.Count - 1].id; else onup = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) ondown = menuItems[0].id; else ondown = (menItem.id + 1); if (menItem.subMenuLevel1.Count > 0) { rawXML.AppendLine("<onright>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onright>"); if (menudef.exitStyleNew) rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (!menudef.exitStyleNew) { if (menudef.disableExitMenu) { rawXML.AppendLine("<onright>" + (menItem.id + 700).ToString() + "</onright>"); rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); } else { rawXML.AppendLine("<onright>7777</onright>"); rawXML.AppendLine("<onleft>7777</onleft>"); } } else { rawXML.AppendLine("<onright>" + (menItem.id + 700).ToString() + "</onright>"); if (menudef.disableExitMenu) rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); } } rawXML.AppendLine("<onup>" + (onup + 800).ToString() + "</onup>"); rawXML.AppendLine("<ondown>" + (ondown + 700).ToString() + "</ondown>"); rawXML.AppendLine("</control>"); break; case 1: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 800).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.name.ToLower() == "shutdown") rawXML.AppendLine("<action>99</action>"); else if (menItem.name.ToLower() == "exit") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onup = menuItems[menuItems.Count - 1].id; else onup = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) ondown = menuItems[0].id; else ondown = (menItem.id + 1); if (menItem.subMenuLevel1.Count > 0) { rawXML.AppendLine("<onright>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onright>"); if (menudef.exitStyleNew) rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (!menudef.exitStyleNew) { if (menudef.disableExitMenu) { rawXML.AppendLine("<onright>" + (menItem.id + 800).ToString() + "</onright>"); rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); } else { rawXML.AppendLine("<onright>7777</onright>"); rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (menudef.disableExitMenu) rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); } } rawXML.AppendLine("<onup>" + (onup + 800).ToString() + "</onup>"); rawXML.AppendLine("<ondown>" + (ondown + 700).ToString() + "</ondown>"); rawXML.AppendLine("</control>"); break; case 2: //rawXML.AppendLine("<control>"); //rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); //rawXML.AppendLine("<type>label</type>"); //rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); //rawXML.AppendLine("<posY>-24</posY>"); //rawXML.AppendLine("<width>500</width>"); //rawXML.AppendLine("<height>72</height>"); //rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); //rawXML.AppendLine("<font>#labelFont</font>"); //rawXML.AppendLine("<align>right</align>"); //rawXML.AppendLine("<label>" + menItem.name + "</label>"); //if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 1) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); //else if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 2) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); //else if (menuItems.IndexOf(menItem) + 3 == menuItems.Count + 3) // rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[2].id + 700).ToString() + ")</visible>"); //else // rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); //rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); //rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); //rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,118" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); //rawXML.AppendLine("</control>"); break; case 3: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>542</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 698).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 4: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>442</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 5: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>342</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 6: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>242</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 7: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>142</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 702).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 8: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>-24</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 3 == -3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 3).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-118" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 9: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>542</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 10: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>442</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 11: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>342</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 12: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>242</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 13: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(menudef.menuPos) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>142</posY>"); rawXML.AppendLine("<width>500</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-400,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-400,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + " 400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-100" + quote + " time=" + quote + " 250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; } }
public void loadMenuSettings() { string defaultcontrol = null; string defaultImage = null; string usermenuprofile = SkinInfo.mpPaths.configBasePath + "usermenuprofile.xml"; string id = null; string _selectedFont = null; string _labelFont = null; string activeRssImageType = null; string targetScreenRes = null; string tvRecentDisplayType = null; string movPicsDisplayType = null; string mostRecentSumStyle = null; string mostRecentTVSeriesSummStyle = null; string mostRecentMovPicsSummStyle = null; string bgFolderName = null; int subMenuItems1 = 0; int subMenuItems2 = 0; bool folderUpdateRequired = false; XmlDocument doc = new XmlDocument(); // // Open the usermenu settings file - NOTE: need to check for it in correct location, if not found look in skin dir for default version // if (!File.Exists(usermenuprofile)) { // Ok, so no usermenuprofile.xml exists, this is most likely because this is a new skin install and this is the first time // the editor has been run and the file has not yet been created in the default location. // Check for and load the default version supplied with the skin usermenuprofile = SkinInfo.mpPaths.streamedMPpath + "usermenuprofile.xml"; if (!File.Exists(usermenuprofile)) { //ok, so now really in trouble, throw an error to the user and bailout! //helper.showError("Can't find usermenuprofile.xml \r\r" + SkinInfo.mpPaths.configBasePath + "usermenuprofile.xml", errorCode.major); } } try { doc.Load(usermenuprofile); } catch (Exception e) { //helper.showError("Exception while loading usermenuprofile.xml\n\nUnable to Continue - please restore from backup" + e.Message, errorCode.major); } // // Get the version of usermenuprofile // XmlNode versionControlNode = doc.DocumentElement.SelectSingleNode("/profile/version"); string versionNum = null, optionsTag = null, menuTag = null; if (versionControlNode != null) { versionNum = versionControlNode.InnerText; } switch (versionNum) { case "2.0": optionsTag = "StreamedMP Options"; menuTag = "StreamedMP Menu Items"; bgFolderName = "SMPbackgrounds"; break; case "1.0": optionsTag = "StreamedMP Options"; menuTag = "StreamedMP Menu Items"; folderUpdateRequired = true; //if (foldersUpdated()) // bgFolderName = "SMPbackgrounds"; break; default: optionsTag = "StreamedMP Options"; menuTag = "Menu Items"; break; } // Now read the file XmlNodeList nodelist = doc.DocumentElement.SelectNodes("/profile/skin"); // Get the last selected Menu... try { switch (readEntryValue(optionsTag, "menustyle", nodelist)) { case "verticalStyle": menuStyle = chosenMenuStyle.verticalStyle; menudef.verticalStyle = true; menudef.selectedFont = "mediastream16tc"; menudef.labelFont = "mediastream28tc"; break; case "horizontalStandardStyle": menuStyle = chosenMenuStyle.horizontalStandardStyle; menudef.selectedFont = "mediastream28tc"; menudef.labelFont = "mediastream28tc"; break; case "horizontalContextStyle": menuStyle = chosenMenuStyle.horizontalContextStyle; menudef.selectedFont = "mediastream28tc"; menudef.labelFont = "mediastream28tc"; break; case "graphicMenuStyle": menuStyle = chosenMenuStyle.graphicMenuStyle; menudef.selectedFont = "mediastream28tc"; menudef.labelFont = "mediastream28tc"; break; default: menuStyle = chosenMenuStyle.verticalStyle; menudef.selectedFont = "mediastream16tc"; menudef.labelFont = "mediastream28tc"; break; } //...and Weather styles if (readEntryValue(optionsTag, "weatherstyle", nodelist) == "bottom") { weatherStyle = chosenWeatherStyle.bottom; } else if (readEntryValue(optionsTag, "weatherstyle", nodelist) == "middle") { weatherStyle = chosenWeatherStyle.middle; } else { weatherStyle = chosenWeatherStyle.bottom; } } catch { } // Get the Focus Colour and set the background on the control menudef.focusAlpha = readEntryValue(optionsTag, "menuitemFocus", nodelist).Substring(0, 2); try { string RGB = defFocus; RGB = readEntryValue(optionsTag, "menuitemFocus", nodelist).Substring(2); Color col = ColorFromRGB(RGB); menudef.focusColor = RGB; } catch { menudef.focusColor = defFocus; } // Get the NoFocus Colour and set the background on the control menudef.noFocusAlpha = readEntryValue(optionsTag, "menuitemNoFocus", nodelist).Substring(0, 2); try { string RGB = defUnFocus; RGB = readEntryValue(optionsTag, "menuitemNoFocus", nodelist).Substring(2); Color col = ColorFromRGB(RGB); menudef.noFocusColor = RGB; } catch { menudef.noFocusColor = defUnFocus; } // Line up all the options this also sets the defaults for the style // which can be overidden by user settings below //syncEditor(sync.OnLoad); // Re-read and set menupos and 5 day weather location if (readEntryValue(optionsTag, "weatherstyle", nodelist) == "bottom") { weatherStyle = chosenWeatherStyle.bottom; } else if (readEntryValue(optionsTag, "weatherstyle", nodelist) == "middle") { weatherStyle = chosenWeatherStyle.middle; } else { weatherStyle = chosenWeatherStyle.bottom; } if (readEntryValue(optionsTag, "menustyle", nodelist) == "verticalStyle") menudef.menuPos = readEntryValue(optionsTag, "menuXPos", nodelist); else menudef.menuPos = readEntryValue(optionsTag, "menuYPos", nodelist); // // Check and set the Global and Plugin options and apply any customization by user // try { menudef.selectedFont = readEntryValue(optionsTag, "selectedFont", nodelist); menudef.labelFont = readEntryValue(optionsTag, "labelFont", nodelist); menudef.acceleration = readEntryValue(optionsTag, "acceleration", nodelist); menudef.duration = readEntryValue(optionsTag, "duration", nodelist); menudef.dropShadow = bool.Parse(readEntryValue(optionsTag, "dropShadow", nodelist)); menudef.rssEnabled = bool.Parse(readEntryValue(optionsTag, "enableRssfeed", nodelist)); menudef.twitterEnabled = bool.Parse(readEntryValue(optionsTag, "enableTwitter", nodelist)); menudef.wrapString = bool.Parse(readEntryValue(optionsTag, "wrapString", nodelist)); menudef.weatherBGLink = bool.Parse(readEntryValue(optionsTag, "weatherBGlink", nodelist)); menudef.enableFiveDayWeather = bool.Parse(readEntryValue(optionsTag, "fiveDayWeatherCheckBox", nodelist)); menudef.summaryWeatherEnabled = bool.Parse(readEntryValue(optionsTag, "summaryWeatherCheckBox", nodelist)); menudef.clearCache = bool.Parse(readEntryValue(optionsTag, "cboClearCache", nodelist)); menudef.animatedWeatherIcons = bool.Parse(readEntryValue(optionsTag, "animatedWeather", nodelist)); menudef.horizontalContextLabels = bool.Parse(readEntryValue(optionsTag, "horizontalContextLabels", nodelist)); menudef.fullWeatherSummaryBottom = bool.Parse(readEntryValue(optionsTag, "fullWeatherSummaryBottom", nodelist)); menudef.fullWeatherSummaryMiddle = bool.Parse(readEntryValue(optionsTag, "fullWeatherSummaryMiddle", nodelist)); menudef.disableClock = bool.Parse(readEntryValue(optionsTag, "disableOnScreenClock", nodelist)); menudef.hideFanartScraper = bool.Parse(readEntryValue(optionsTag, "hideFanartScrapingtext", nodelist)); menudef.overlayFanart = bool.Parse(readEntryValue(optionsTag, "enableOverlayFanart", nodelist)); menudef.animateBackground = bool.Parse(readEntryValue(optionsTag, "animatedBackground", nodelist)); menudef.enableMostRecentTVSeries = bool.Parse(readEntryValue(optionsTag, "tvSeriesMostRecent", nodelist)); menudef.enableMostRecentMovPics = bool.Parse(readEntryValue(optionsTag, "movPicsMostRecent", nodelist)); menudef.cycleMostRecentFanart = bool.Parse(readEntryValue(optionsTag, "mostRecentCycleFanart", nodelist)); menudef.mrSeriesEpisodeFormat = bool.Parse(readEntryValue(optionsTag, "mrSeriesEpisodeFormat", nodelist)); menudef.mrTitleLast = bool.Parse(readEntryValue(optionsTag, "mrTitleLast", nodelist)); menudef.exitStyleNew = bool.Parse(readEntryValue(optionsTag, "settingOldStyleExitButtons", nodelist)); menudef.tvseriesCycleFanart = bool.Parse(readEntryValue(optionsTag, "mrTVSeriesCycleFanart", nodelist)); menudef.movepicsCycleFanart = bool.Parse(readEntryValue(optionsTag, "mrMovPicsCycleFanart", nodelist)); menudef.tvSeriesEpisodeFont = readEntryValue(optionsTag, "mrEpisodeFont", nodelist); menudef.tvSeriesSeriesFont = readEntryValue(optionsTag, "mrSeriesFont", nodelist); menudef.movpicsTitleFont = readEntryValue(optionsTag, "mrMovieTitleFont", nodelist); menudef.movpicsDetailFont = readEntryValue(optionsTag, "mrMovieDetailFont", nodelist); menudef.hideRuntime = bool.Parse(readEntryValue(optionsTag, "mrMovPicsHideRuntime", nodelist)); menudef.hideCertifcation = bool.Parse(readEntryValue(optionsTag, "mrMovPicsHideCertification", nodelist)); menudef.hideRating = bool.Parse(readEntryValue(optionsTag, "mrMovPicsHideRating", nodelist)); menudef.useTextRating = bool.Parse(readEntryValue(optionsTag, "mrMovPicsUseTextRating", nodelist)); menudef.movpicsRecentWatched = bool.Parse(readEntryValue(optionsTag, "mrMovPicsWatched", nodelist)); menudef.tvSeriesRecentWatched = bool.Parse(readEntryValue(optionsTag, "mrTVSeriesWatched", nodelist)); menudef.tvSeriesDisableFadeLables = bool.Parse(readEntryValue(optionsTag, "mrTVSeriesDisableFadeLabel", nodelist)); menudef.movpicsDisableFadeLables = bool.Parse(readEntryValue(optionsTag, "mrMovPicsDisableFadeLabel", nodelist)); menudef.enableMostRecentRecordedTV = bool.Parse(readEntryValue(optionsTag, "mrRecordedTVEnabled", nodelist)); menudef.enableMostRecentMusic = bool.Parse(readEntryValue(optionsTag, "mrMusicEnabled", nodelist)); menudef.driveFreeSpaceList = readEntryValue(optionsTag, "driveFreeSpaceList", nodelist); menudef.enableSleepControlOverlay = bool.Parse(readEntryValue(optionsTag, "sleepControlEnabled", nodelist)); menudef.enableStocksOverlay = bool.Parse(readEntryValue(optionsTag, "stocksControlEnabled", nodelist)); menudef.enablePowerControlOverlay = bool.Parse(readEntryValue(optionsTag, "powerControlEnabled", nodelist)); menudef.enableHTPCInfoOverlay = bool.Parse(readEntryValue(optionsTag, "htpcinfoControlEnabled", nodelist)); menudef.enableUpdateControlOverlay = bool.Parse(readEntryValue(optionsTag, "updateControlEnabled", nodelist)); menudef.disableExitMenu = bool.Parse(readEntryValue(optionsTag, "disableExitMenu", nodelist)); activeRssImageType = readEntryValue(optionsTag, "activeRssImageType", nodelist); targetScreenRes = readEntryValue(optionsTag, "targetScreenRes", nodelist); splashScreenImage = readEntryValue(optionsTag, "splashScreenImage", nodelist); tvRecentDisplayType = readEntryValue(optionsTag, "tvRecentDisplayType", nodelist); movPicsDisplayType = readEntryValue(optionsTag, "movPicsDisplayType", nodelist); mostRecentSumStyle = readEntryValue(optionsTag, "mostRecentSumStyle", nodelist); // Hang over from when juts TVSeries was supported mostRecentTVSeriesSummStyle = readEntryValue(optionsTag, "mostRecentTVSeriesSummStyle", nodelist); mostRecentMovPicsSummStyle = readEntryValue(optionsTag, "mostRecentMovPicsSummStyle", nodelist); } catch { // Most likley a new option added but not written to file yet - just continue } if (string.IsNullOrEmpty(driveFreeSpaceList)) driveFreeSpaceList = "false"; if (!(driveFreeSpaceList == "false")) { menudef.enableDriveFreeSpace = true; string[] configuredDrives = driveFreeSpaceList.Split(','); foreach (string hd in configuredDrives) { DriveInfo hdDetails = new DriveInfo(hd); string thisDrive = hd + " (" + hdDetails.VolumeLabel + ")"; formStreamedMpEditor.driveFreeSpaceDrives.Add(hd); } } //if (tvSeriesOptions.mrSeriesFont == "mediastream9c") // tvSeriesOptions.mrSeriesFont = "mediastream10c"; //if (tvSeriesOptions.mrEpisodeFont == "mediastream9c") // tvSeriesOptions.mrEpisodeFont = "mediastream10c"; //if (tvSeriesOptions.mrSeriesFont == "false" || tvSeriesOptions.mrEpisodeFont == "false") //{ // tvSeriesOptions.mrSeriesFont = "mediastream10c"; // tvSeriesOptions.mrEpisodeFont = "mediastream10tc (Bold)"; //} //if (movPicsOptions.MovieTitleFont == "false" || movPicsOptions.MovieDetailFont == "false") //{ // movPicsOptions.MovieTitleFont = "mediastream10tc (Bold)"; // movPicsOptions.MovieDetailFont = "mediastream10c"; //} // As only saving the animated state set the static state true if animimated state is false //if (!animatedIconsInstalled()) //{ // WeatherIconsAnimated.Enabled = false; // menudef.animatedWeatherIcons = false; //} //if (menudef.animatedWeatherIcons) // weatherIconsStatic.Checked = false; //else // weatherIconsStatic.Checked = true; if (!weatherBackgoundsInstalled()) { menudef.weatherBGLink = false; } //if (tvRecentDisplayType == "summary" || movPicsDisplayType == "summary") // btFormatOptions.Enabled = true; //if (tvRecentDisplayType == "summary") //{ // tvSeriesRecentStyle = tvSeriesRecentType.summary; // rbTVSeriesSummary.Checked = true; // gbSummaryStyle.Enabled = true; //} //else //{ // tvSeriesRecentStyle = tvSeriesRecentType.full; // rbTBSeriesFull.Checked = true; // gbSummaryStyle.Enabled = false; //} //if (movPicsDisplayType == "summary") //{ // movPicsRecentStyle = movPicsRecentType.summary; // rbMovPicsSummary.Checked = true; //} //else //{ // movPicsRecentStyle = movPicsRecentType.full; // rbMovPicsFull.Checked = true; //} // TVSeries most recent summry Style //if (mostRecentTVSeriesSummStyle == "fanart") //{ // mrTVSeriesSummStyle = mostRecentTVSeriesSummaryStyle.fanart; // rbFanartStyle.Checked = true; //} //else if (mostRecentTVSeriesSummStyle == "poster") //{ // mrTVSeriesSummStyle = mostRecentTVSeriesSummaryStyle.poster; // rbPosterStyle.Checked = true; //} //else //{ // //Default to Fanart Style // mrTVSeriesSummStyle = mostRecentTVSeriesSummaryStyle.fanart; // rbFanartStyle.Checked = true; //} // Moving Pictures most recent summry Style //if (mostRecentMovPicsSummStyle == "fanart") //{ // mrMovPicsSummStyle = mostRecentMovPicsSummaryStyle.fanart; // rbFanartStyle.Checked = true; //} //else if (mostRecentMovPicsSummStyle == "poster") //{ // mrMovPicsSummStyle = mostRecentMovPicsSummaryStyle.poster; // rbPosterStyle.Checked = true; //} //else //{ // //Default to Fanart Style // mrMovPicsSummStyle = mostRecentMovPicsSummaryStyle.fanart; // rbFanartStyle.Checked = true; //} // // Old Setting - if found in usermenuprofile use as setting for TVSeries Summary Style // //if (mostRecentSumStyle == "fanart") //{ // mrTVSeriesSummStyle = mostRecentTVSeriesSummaryStyle.fanart; // rbFanartStyle.Checked = true; //} //else if (mostRecentSumStyle == "poster") //{ // mrTVSeriesSummStyle = mostRecentTVSeriesSummaryStyle.poster; // rbPosterStyle.Checked = true; //} //if (splashScreenImage == "false") // splashScreenImage = "splashscreen.png"; //if (targetScreenRes == "HD") // setHDScreenRes(); //else if (targetScreenRes == "SD") // setSDScreenRes(); switch (activeRssImageType) { case "infoservice": rssImage = rssImageType.infoserviceImage; break; case "noimage": rssImage = rssImageType.noImage; break; case "skin": rssImage = rssImageType.skinImage; break; default: rssImage = rssImageType.skinImage; break; } //if (_selectedFont != "false") //{ // cboSelectedFont.Text = _selectedFont; //} //if (_labelFont != "false") //{ // cboLabelFont.Text = _labelFont; //} //if (menuStyle == chosenMenuStyle.verticalStyle) // menudef.menuPos = readEntryValue(optionsTag, "menuXPos", nodelist); //else // menudef.menuPos = readEntryValue(optionsTag, "menuYPos", nodelist); //Version isver = new Version("1.6.0.0"); //if (getInfoServiceVersion().CompareTo(isver) >= 0) // infoServiceDayProperty = "forecast"; //else // infoServiceDayProperty = "day"; //// Check if Moving Pictures is installed and enabled, if not disable most recent options //if (MovingPicturesVersion == "0.0.0.0") //{ // pMovPicsRecent.Enabled = false; // cbMostRecentMovPics.Checked = false; // cbMovPicsRecentWatched.Checked = false; // cbMostRecentMovPics.Refresh(); //} //else //{ // if (!helper.pluginEnabled(Helper.Plugins.MovingPictures)) // { // pMovPicsRecent.Enabled = false; // cbMostRecentMovPics.Checked = false; // cbMovPicsRecentWatched.Checked = false; // cbMostRecentMovPics.Refresh(); // } //} //// Check in TVSeries is installed and enabled, if not disable most recent options //if (TVSeriesVersion == "0.0.0.0") //{ // pTVSeriesRecent.Enabled = false; // cbMostRecentTvSeries.Checked = false; // cbTVSeriesRecentWatched.Checked = false; // cbMostRecentTvSeries.Refresh(); //} //else //{ // if (!helper.pluginEnabled(Helper.Plugins.MPTVSeries)) // { // pTVSeriesRecent.Enabled = false; // cbMostRecentTvSeries.Checked = false; // cbTVSeriesRecentWatched.Checked = false; // cbMostRecentTvSeries.Refresh(); // } //} // // Read in the menu items // for (int i = 0; i < int.Parse(readEntryValue(menuTag, "count", nodelist)); i++) { menuItem mnuItem = new menuItem(); mnuItem.disableBGSharing = true; mnuItem.name = readEntryValue(menuTag, "menuitem" + i.ToString() + "name", nodelist); mnuItem.contextLabel = readEntryValue(menuTag, "menuitem" + i.ToString() + "label", nodelist); mnuItem.bgFolder = readEntryValue(menuTag, "menuitem" + i.ToString() + "folder", nodelist); mnuItem.fanartProperty = readEntryValue(menuTag, "menuitem" + i.ToString() + "fanartproperty", nodelist); mnuItem.hyperlink = readEntryValue(menuTag, "menuitem" + i.ToString() + "hyperlink", nodelist); mnuItem.hyperlinkParameter = readEntryValue(menuTag, "menuitem" + i.ToString() + "hyperlinkParameter", nodelist); mnuItem.hyperlinkParameterOption = readEntryValue(menuTag, "menuitem" + i.ToString() + "hyperlinkParameterOption", nodelist); mnuItem.fanartHandlerEnabled = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "fanarthandlerenabled", nodelist)); mnuItem.EnableMusicNowPlayingFanart = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "enablemusicnowplayingfanart", nodelist)); mnuItem.isDefault = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "isdefault", nodelist)); mnuItem.isWeather = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "isweather", nodelist)); mnuItem.updateStatus = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "updatestatus", nodelist)); mnuItem.disableBGSharing = bool.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "disableBGSharing", nodelist)); mnuItem.id = int.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "id", nodelist)); mnuItem.buttonTexture = readEntryValue(menuTag, "menuitem" + i.ToString() + "buttonTexture", nodelist); mnuItem.xmlFileName = readEntryValue(menuTag, "menuitem" + i.ToString() + "xmlFileName", nodelist); //if (mnuItem.xmlFileName == "false") // mnuItem.xmlFileName = getXMLFileName(mnuItem.hyperlink); mnuItem.showMostRecent = readMostRecentDisplayOption(readEntryValue(menuTag, "menuitem" + i.ToString() + "showMostRecent", nodelist), mnuItem.hyperlink); mnuItem.fhBGSource = readFHSource(readEntryValue(menuTag, "menuitem" + i.ToString() + "fanartSource", nodelist), mnuItem.fanartProperty); // // Graphical Menu Default Image Load // if (string.IsNullOrEmpty(mnuItem.buttonTexture) || mnuItem.buttonTexture.ToLower() == "false") { mnuItem.buttonTexture = setDefaultIcons(int.Parse(mnuItem.hyperlink), "Black"); } // // Convert any 504 skinID's back to 501 (they will be converted back if there is a hyperlink parameter) // if (mnuItem.hyperlink == "504") mnuItem.hyperlink = "501"; // // Read submenu data // if (readEntryValue(menuTag, "menuitem" + i.ToString() + "subMenuLevel1ID", nodelist) != "false") { mnuItem.subMenuLevel1ID = int.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "subMenuLevel1ID", nodelist)); subMenuItems1 = int.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "submenu1", nodelist)); subMenuItems2 = int.Parse(readEntryValue(menuTag, "menuitem" + i.ToString() + "submenu2", nodelist)); if (subMenuItems1 > 0) { for (int k = 0; k < subMenuItems1; k++) { subMenuItem subItem = new subMenuItem(); subItem.displayName = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "displayName", nodelist); subItem.baseDisplayName = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "baseDisplayName", nodelist); subItem.xmlFileName = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "xmlFileName", nodelist); subItem.hyperlink = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "hyperlink", nodelist); subItem.hyperlinkParameter = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "hyperlinkParameter", nodelist); subItem.hyperlinkParameterOption = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "hyperlinkParameterOption", nodelist); subItem.hyperlinkParameterSearch = readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "hyperlinkParameterSearch", nodelist); // // Convert any 504 skinID's back to 501 (they will be converted back if there is a hyperlink parameter) // if (subItem.hyperlink == "504") subItem.hyperlink = "501"; switch (readEntryValue(menuTag, "submenu" + i.ToString() + "1subitem" + k.ToString() + "mrDisplay", nodelist)) { case "off": subItem.showMostRecent = displayMostRecent.off; break; case "tvSeries": subItem.showMostRecent = displayMostRecent.tvSeries; break; case "movies": subItem.showMostRecent = displayMostRecent.movies; break; case "music": subItem.showMostRecent = displayMostRecent.music; break; case "recordedTV": subItem.showMostRecent = displayMostRecent.recordedTV; break; case "freeDriveSpace": subItem.showMostRecent = displayMostRecent.freeDriveSpace; break; case "htpcInfo": subItem.showMostRecent = displayMostRecent.htpcInfo; break; case "powerControl": subItem.showMostRecent = displayMostRecent.powerControl; break; case "sleepControl": subItem.showMostRecent = displayMostRecent.sleepControl; break; case "stocks": subItem.showMostRecent = displayMostRecent.stocks; break; case "updateControl": subItem.showMostRecent = displayMostRecent.updateControl; break; } mnuItem.subMenuLevel1.Add(subItem); } } if (subMenuItems2 > 0) { for (int k = 0; k < subMenuItems2; k++) { subMenuItem subItem = new subMenuItem(); subItem.displayName = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "displayName", nodelist); subItem.baseDisplayName = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "baseDisplayName", nodelist); subItem.xmlFileName = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "xmlFileName", nodelist); subItem.hyperlink = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "hyperlink", nodelist); subItem.hyperlinkParameter = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "hyperlinkParameter", nodelist); subItem.hyperlinkParameterOption = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "hyperlinkParameterOption", nodelist); subItem.hyperlinkParameterSearch = readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "hyperlinkParameterSearch", nodelist); // // Convert any 504 skinID's back to 501 (they will be converted back if there is a hyperlink parameter) // if (subItem.hyperlink == "504") subItem.hyperlink = "501"; switch (readEntryValue(menuTag, "submenu" + i.ToString() + "2subitem" + k.ToString() + "mrDisplay", nodelist)) { case "off": subItem.showMostRecent = displayMostRecent.off; break; case "tvSeries": subItem.showMostRecent = displayMostRecent.tvSeries; break; case "movies": subItem.showMostRecent = displayMostRecent.movies; break; case "music": subItem.showMostRecent = displayMostRecent.music; break; case "recordedTV": subItem.showMostRecent = displayMostRecent.recordedTV; break; case "freeDriveSpace": subItem.showMostRecent = displayMostRecent.freeDriveSpace; break; case "htpcInfo": subItem.showMostRecent = displayMostRecent.htpcInfo; break; case "powerControl": subItem.showMostRecent = displayMostRecent.powerControl; break; case "sleepControl": subItem.showMostRecent = displayMostRecent.sleepControl; break; case "stocks": subItem.showMostRecent = displayMostRecent.stocks; break; case "updateControl": subItem.showMostRecent = displayMostRecent.updateControl; break; } mnuItem.subMenuLevel2.Add(subItem); } } } //isWeather.Checked = mnuItem.isWeather; //disableBGSharing.Checked = mnuItem.disableBGSharing; //if (mnuItem.fanartHandlerEnabled) // checkAndSetRandomFanart(mnuItem.fanartProperty); //// Set the default control //if (mnuItem.isDefault) // defaultcontrol = mnuItem.id.ToString(); //id = mnuItem.id.ToString(); //itemsOnMenubar.Items.Add(mnuItem.name, id.Equals(defaultcontrol)); // If user decides not to use multiimage backgrounds then we need a default image, lets check and set if one is required defaultImage = readEntryValue(menuTag, "menuitem" + i.ToString() + "defaultimage", nodelist); // Version 2.0 usermenu profile - check if folder structure updated but menu has not. // if so replace "Animations" with "SMPBackgrounds" // Belts and Braces checks //if (versionNum == "1.0" && foldersUpdated()) //{ // if (defaultImage.ToLower().StartsWith("animations")) // { // defaultImage = bgFolderName + "\\" + mnuItem.bgFolder + "\\" + Path.GetFileName("C:\\" + defaultImage); // } //} // Check if the stored image still exists, if nor set to default.jpg //if (!System.IO.File.Exists((imageDir(defaultImage)))) // defaultImage = bgFolderName + "\\" + mnuItem.bgFolder + "\\default.jpg"; //if (defaultImage.ToLower().StartsWith(bgFolderName.ToLower())) // mnuItem.defaultImage = defaultImage; //else //{ // if (!mnuItem.bgFolder.Contains("\\")) // mnuItem.defaultImage = bgFolderName + "\\" + mnuItem.bgFolder + "\\default.jpg"; // else // mnuItem.defaultImage = mnuItem.bgFolder + "\\default.jpg"; //} menuItems.Add(mnuItem); } //reloadBackgroundItems(); //UpdateImageControlVisibility(); //btGenerateMenu.Enabled = true; //if (folderUpdateRequired) // updateBackgroundFolders(); }
void writeVerticalMenu(int i, menuItem menItem, ref StringBuilder rawXML) { string acceleration = tbAcceleration.Text; string duration = tbDuration.Text; string menuVisControl = string.Empty; int onup = 0; int ondown = 0; if (menItem.subMenuLevel1ID > 0) menuVisControl = "control.isvisible(" + menItem.subMenuLevel1ID.ToString() + ")|"; switch (i) { case 0: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 700).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-45</posY>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menItem.isDefault) { rawXML.AppendLine("<width>1920</width>"); rawXML.AppendLine("<height>1080</height>"); } else { rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); } rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == formStreamedMpEditor.musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: if (!IsOnlineVideosGroup(menItem.hyperlinkParameter)) { string search = string.IsNullOrEmpty(menItem.hyperlinkParameterSearch) ? string.Empty : "|search:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterSearch); string category = string.IsNullOrEmpty(menItem.hyperlinkParameterCategory) ? string.Empty : "|category:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterCategory); rawXML.AppendLine("<hyperlinkParameter>site:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + category + search + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } else { rawXML.AppendLine("<hyperlinkParameter>group:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter.Substring(7)) + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onup = menuItems[menuItems.Count - 1].id; else onup = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) ondown = menuItems[0].id; else ondown = (menItem.id + 1); if (menItem.subMenuLevel1.Count > 0) { rawXML.AppendLine("<onright>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onright>"); if (cbExitStyleNew.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); else { if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (!cbExitStyleNew.Checked) { if (cbDisableExitMenu.Checked) { rawXML.AppendLine("<onright>" + (menItem.id + 700).ToString() + "</onright>"); rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); } else { rawXML.AppendLine("<onright>7777</onright>"); rawXML.AppendLine("<onleft>7777</onleft>"); } } else { rawXML.AppendLine("<onright>" + (menItem.id + 700).ToString() + "</onright>"); if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 700).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); } } rawXML.AppendLine("<onup>" + (onup + 800).ToString() + "</onup>"); rawXML.AppendLine("<ondown>" + (ondown + 700).ToString() + "</ondown>"); rawXML.AppendLine("</control>"); break; case 1: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 800).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-45</posY>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<width>480</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.name.ToLower() == "shutdown") rawXML.AppendLine("<action>99</action>"); else if (menItem.name.ToLower() == "exit") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == formStreamedMpEditor.musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: if (!IsOnlineVideosGroup(menItem.hyperlinkParameter)) { string search = string.IsNullOrEmpty(menItem.hyperlinkParameterSearch) ? string.Empty : "|search:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterSearch); string category = string.IsNullOrEmpty(menItem.hyperlinkParameterCategory) ? string.Empty : "|category:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameterCategory); rawXML.AppendLine("<hyperlinkParameter>site:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + category + search + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } else { rawXML.AppendLine("<hyperlinkParameter>group:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter.Substring(7)) + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); } break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + HttpUtility.HtmlEncode(menItem.hyperlinkParameter) + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onup = menuItems[menuItems.Count - 1].id; else onup = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) ondown = menuItems[0].id; else ondown = (menItem.id + 1); if (menItem.subMenuLevel1.Count > 0) { rawXML.AppendLine("<onright>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onright>"); if (cbExitStyleNew.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); else { if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (!cbExitStyleNew.Checked) { if (cbDisableExitMenu.Checked) { rawXML.AppendLine("<onright>" + (menItem.id + 800).ToString() + "</onright>"); rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); } else { rawXML.AppendLine("<onright>7777</onright>"); rawXML.AppendLine("<onleft>7777</onleft>"); } } else { if (cbDisableExitMenu.Checked) rawXML.AppendLine("<onleft>" + (menItem.id + 800).ToString() + "</onleft>"); else rawXML.AppendLine("<onleft>" + (menItem.id + 600).ToString() + "01</onleft>"); } } rawXML.AppendLine("<onup>" + (onup + 800).ToString() + "</onup>"); rawXML.AppendLine("<ondown>" + (ondown + 700).ToString() + "</ondown>"); rawXML.AppendLine("</control>"); break; case 2: break; case 3: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>813</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 698).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 4: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>663</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 5: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>513</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 6: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>363</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 7: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>213</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 702).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 8: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>-36</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 3 == -3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 3).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-177" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 9: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>813</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 10: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>663</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 11: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>513</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#selectedFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 12: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>363</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; case 13: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + HttpUtility.HtmlEncode(menItem.name) + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>" + (int.Parse(txtMenuPos.Text) + textXOffset) + "</posX>"); rawXML.AppendLine("<posY>213</posY>"); rawXML.AppendLine("<width>750</width>"); rawXML.AppendLine("<height>108</height>"); rawXML.AppendLine("<textcolor>#menuitemNoFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>right</align>"); rawXML.AppendLine("<label>" + HttpUtility.HtmlEncode(menItem.name) + "</label>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "-600,0" + quote + " end=" + quote + "0,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowOpen</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " end=" + quote + "-600,0" + quote + " tween=" + quote + "quadratic" + quote + " easing=" + quote + "in" + quote + " time=" + quote + "400" + quote + " delay=" + quote + "200" + quote + ">WindowClose</animation>"); rawXML.AppendLine("<animation effect=" + quote + "slide" + quote + " start=" + quote + "0,-150" + quote + " time=" + quote + "250" + quote + " acceleration=" + quote + " -0.4" + quote + " reversible=" + quote + "false" + quote + ">Visible</animation>"); rawXML.AppendLine("</control>"); break; } }
private void checkAndSetDefultImage(menuItem item) { // Set default image.... if (!item.bgFolder.Contains("\\")) item.defaultImage = bgFolderName + "\\" + item.bgFolder + "\\default.jpg"; else item.defaultImage = item.bgFolder + "\\default.jpg"; // And check if it exists and create if not. string filetotest = imageDir(item.defaultImage); if (!System.IO.File.Exists(filetotest)) { string[] fileList = getFileListing(Path.GetDirectoryName(item.defaultImage), "*.*", true); createDefaultJpg(Path.GetDirectoryName(item.defaultImage)); } }
private bool loadIDs(bool onLoad) { avail_list.Enabled = true; avail_list.Items.Clear(); string[] files = System.IO.Directory.GetFiles(path); foreach (string file in files) { try { if (file.ToLower().StartsWith("common") == false && file.ToLower().Contains("dialog") == false && file.ToLower().Contains("wizard") == false && file.ToLower().Contains("basichome") == false) { XmlDocument doc = new XmlDocument(); doc.Load(file); XmlNode node = doc.DocumentElement.SelectSingleNode("/window/id"); ids.Add(node.InnerText); avail_list.Items.Add(file.Remove(0, file.LastIndexOf(@"\") + 1).Replace(".xml", "")); menuItem avail_item = new menuItem(); avail_item.name = file.Remove(0, file.LastIndexOf(@"\") + 1).Replace(".xml", ""); avail_item.hyperlink = Convert.ToInt32(node.InnerText); avail_item.bgImage = ""; AvailmenuItems.Add(avail_item); } } catch { } } if (avail_list.Items.Count > 0) { //loadSkin("BasicHome.xml"); avail_list.Items.Clear(); foreach (menuItem item in AvailmenuItems) { avail_list.Items.Add(item.name); } return true; } else { // Dont need to complain when first loading the app as its possible that the skin isnt installed if (!onLoad) MessageBox.Show("Error reading directory."); return false; } }
private void btnSubAdd_Click(object sender, EventArgs e) { if (used_list.SelectedItem == null) { MessageBox.Show("Please select the Mainmenu this item belongs to", "Missing Fields", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (avail_list.SelectedItem == null) { MessageBox.Show("Please select an item from the 'Available modules' list", "Missing Fields", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } if (new_windowid.Text != "" && new_name.Text != "") { used_list_submenu.Enabled = true; toolStripStatusLabel1.Text = avail_list.SelectedItem.ToString() + " added to menu"; menuItem item = new menuItem(); item.name = new_name.Text; item.owner = menuItems[used_list.SelectedIndex].identifier; item.property = string.Empty; if (Convert.ToInt32(new_windowid.Text) == 501 && cboParameterViews.Text != "") { item.hyperlink = Convert.ToInt32(504); } else { item.hyperlink = Convert.ToInt32(new_windowid.Text); } if (cboParameterViews.SelectedIndex != -1 || movPicsCategoryCombo.Visible || tbEditorStartParamsOutput.Text != string.Empty) { if (item.hyperlink == 9811) { item.property = getTVSeriesViewKey(cboParameterViews.SelectedItem.ToString()); } if (item.hyperlink == 504) { item.property = getMusicViewKey(cboParameterViews.SelectedItem.ToString()); } if (item.hyperlink == 4755) { string OnlineVideosReturn = ""; if (cB_onlinevideosOption.Checked) OnlineVideosReturn = "Root"; else OnlineVideosReturn = "Locked"; item.property = "site:" + getOnlineVideosViewKey(cboParameterViews.SelectedItem.ToString()) + "|return:" + OnlineVideosReturn; } if (item.hyperlink == 96742) { if (movPicsCategoryCombo.SelectedIndex != -1) { int? id = GetMovPicsCategoryNodeID(movPicsCategoryCombo.SelectedNode); if (id != null) item.property = "categoryid:" + id.ToString(); ClearMovingPicturesCategories(); } } if (item.hyperlink == 7986) { item.property = tbEditorStartParamsOutput.Text; } } singleChildren.Add(new Child(item.owner, used_list_submenu.Items.Count, new_name.Text, item.hyperlink, "", item.property, "")); used_list_submenu.Items.Add(item.name); // Clear items new_name.Text = ""; new_windowid.Text = ""; cboParameterViews.Text = ""; movPicsCategoryCombo.SelectedIndex = -1; cB_singleImage.Checked = false; cB_FanartHandler.Checked = false; cB_RecentMedia.Checked = false; if (used_list_submenu.Items.Count > 0) avail_list.SelectedIndex = -1; } else { MessageBox.Show("All fields must be completed", "Missing Fields", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
void addButton_Click(object sender, EventArgs e) { int index = ids.IndexOf(selectedWindowID.Text); try { while (rawXMLFileNames[index].ToString().ToLower() != selectedWindow.Text.ToLower()) { index = ids.IndexOf(selectedWindowID.Text, index + 1); } } catch (Exception exp) { helper.showError("QuickSelect Skin XML Missing or Invalid" + exp.Message, errorCode.info); return; } if (xmlFiles.SelectedItem != null && (bgBox.Text != "" || cboFanartProperty.Text != "") && tbItemName.Text != "") { toolStripStatusLabel1.Text = rawXMLFileNames[index].ToString() + " added to menu"; menuItem item = new menuItem(); item.xmlFileName = rawXMLFileNames[index].ToString(); item.name = tbItemName.Text; item.contextLabel = cboContextLabel.Text; item.hyperlink = ids[index]; item.bgFolder = bgBox.Text; item.fanartProperty = cboFanartProperty.Text; if (fhRBScraper.Checked) item.fhBGSource = fanartSource.Scraper; else item.fhBGSource = fanartSource.UserDef; item.fanartHandlerEnabled = cbItemFanartHandlerEnable.Checked; item.EnableMusicNowPlayingFanart = cbEnableMusicNowPlayingFanart.Checked; item.isWeather = weatherSkinID.Split('|').Contains(item.hyperlink); item.disableBGSharing = disableBGSharing.Checked; // If using 3D backgrounds disable BG sharing for item. if (!item.fanartHandlerEnabled && (bgBox.Text.ToLower() == "3dbackgrounds")) item.disableBGSharing = true; item.showMostRecent = getMostRecentDisplayOption(); if ((pluginTakesParameter(item.hyperlink) && cboParameterViews.SelectedIndex != -1) || (movPicsCategoryCombo.Visible && movPicsCategoryCombo.SelectedIndex != -1)) { switch (item.hyperlink) { case tvseriesSkinID: item.hyperlinkParameter = getTVSeriesViewKey(cboParameterViews.SelectedItem.ToString()); break; case musicSkinID: item.hyperlinkParameter = getMusicViewKey(cboParameterViews.SelectedItem.ToString()); break; case onlineVideosSkinID: item.hyperlinkParameter = getOnlineVideosViewKey(cboParameterViews.SelectedItem.ToString()); item.hyperlinkParameterSearch = ovTxtSearch.Text; item.hyperlinkParameterCategory = cboOnlineVideosCategories.Text; break; case movingPicturesSkinID: if (movPicsCategoryCombo.SelectedIndex != -1) { // store the ID of the selected node if (item.hyperlink == movingPicturesSkinID) { int? id = GetMovPicsCategoryNodeID(movPicsCategoryCombo.SelectedNode); if (id != null) item.hyperlinkParameter = id.ToString(); } ClearMovingPicturesCategories(); } break; default: break; } } else item.hyperlinkParameter = "false"; if (item.fanartHandlerEnabled) checkAndSetRandomFanart(item.fanartProperty); else checkAndSetDefultImage(item); if (string.IsNullOrEmpty(buttonTexture.SelectedIcon)) item.buttonTexture = setDefaultIcons(int.Parse(item.hyperlink), "Black"); else item.buttonTexture = buttonTexture.SelectedIcon; //buttonTexture.MenuItem = item.name; setDefaultIcons(int.Parse(item.hyperlink), "Black"); if (cbOnlineVideosReturn.Checked) item.hyperlinkParameterOption = "Root"; else item.hyperlinkParameterOption = "Locked"; menuItems.Add(item); itemsOnMenubar.Items.Add(item.name); reloadBackgroundItems(); // clear up tbItemName.Text = string.Empty; bgBox.Text = string.Empty; cboContextLabel.Text = string.Empty; cboParameterViews.Text = string.Empty; cboOnlineVideosCategories.Text = string.Empty; ovTxtSearch.Text = string.Empty; if (itemsOnMenubar.Items.Count > 2) btGenerateMenu.Enabled = true; xmlFiles.SelectedIndex = -1; // select item added itemsOnMenubar.SelectedIndex = itemsOnMenubar.Items.Count - 1; changeOutstanding = true; } else { helper.showError("All fields must be complete before a Menu Item can be added", errorCode.info); } }
void writeGraphicalMenu(int i, menuItem menItem, ref StringBuilder rawXML) { string acceleration = menudef.acceleration; string duration = menudef.duration; int onleft = 0; int onright = 0; switch (i) { case 0: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 700).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); if (menItem.isDefault) { rawXML.AppendLine("<width>1280</width>"); rawXML.AppendLine("<height>720</height>"); } else { rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); } rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onup>" + (menItem.id + 700).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 1: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>button</type>"); rawXML.AppendLine("<id>" + (menItem.id + 800).ToString() + "</id>"); rawXML.AppendLine("<posX>0</posX>"); rawXML.AppendLine("<posY>-30</posY>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<width>320</width>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textureFocus>-</textureFocus>"); rawXML.AppendLine("<textureNoFocus>-</textureNoFocus>"); if (menItem.hyperlink == "196299") rawXML.AppendLine("<action>99</action>"); else if (menItem.hyperlink == "196297") rawXML.AppendLine("<action>97</action>"); else if (menItem.hyperlink == musicSkinID && menItem.hyperlinkParameter != "false") rawXML.AppendLine("<hyperlink>504</hyperlink>"); else rawXML.AppendLine("<hyperlink>" + menItem.hyperlink.ToString() + "</hyperlink>"); //Plugin Parameter handling if (menItem.hyperlinkParameter != "false") { switch (menItem.hyperlink) { case onlineVideosSkinID: rawXML.AppendLine("<hyperlinkParameter>site:" + menItem.hyperlinkParameter + "|return:" + menItem.hyperlinkParameterOption + "</hyperlinkParameter>"); break; case movingPicturesSkinID: rawXML.AppendLine("<hyperlinkParameter>categoryid:" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; default: rawXML.AppendLine("<hyperlinkParameter>" + menItem.hyperlinkParameter + "</hyperlinkParameter>"); break; } } rawXML.AppendLine("<hover>-</hover>"); if (menuItems.IndexOf(menItem) == 0) onleft = menuItems[menuItems.Count - 1].id; else onleft = (menItem.id - 1); if (menuItems.IndexOf(menItem) == menuItems.Count - 1) onright = menuItems[0].id; else onright = (menItem.id + 1); rawXML.AppendLine("<onleft>" + (onleft + 800).ToString() + "</onleft>"); rawXML.AppendLine("<onright>" + (onright + 700).ToString() + "</onright>"); if (menItem.subMenuLevel1ID > 0) rawXML.AppendLine("<onup>" + (menItem.subMenuLevel1ID + 1).ToString() + "</onup>"); else { if (menudef.disableExitMenu) rawXML.AppendLine("<onup>" + (menItem.id + 800).ToString() + "</onup>"); else rawXML.AppendLine("<onup>" + (menItem.id + 600).ToString() + "01</onup>"); } rawXML.AppendLine("<visible>control.isvisible(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 2: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>-88</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[2].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 799 + 4).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"-210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 3: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>1240</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == 0) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 697).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 4: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>1027</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 698).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 5: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>814</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699).ToString() + ")</visible>"); //rawXML.AppendLine("<animation effect=\"zoom\" start=\"150,150\" end=\"100,100\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 6: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>641</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 152) + "</posY>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"fade\" delay=\"600\" time=\"300\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>640</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 151) + "</posY>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"fade\" delay=\"600\" time=\"300\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>576</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 700).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"zoom\" end=\"150,150\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"238,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 7: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>338</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 701).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"zoom\" start=\"150,150\" end=\"100,100\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"238,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 8: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>125</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 702).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 9: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>125</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 700).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 4 == menuItems.Count + 3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[2].id + 700).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 699 + 4).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"-210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 10: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>1027</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 3 == -3) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 3].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 3 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 3).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 11: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>814</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 2 == -2) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 2].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) - 2 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 2).ToString() + ")</visible>"); //rawXML.AppendLine("<animation effect=\"zoom\" start=\"150,150\" end=\"100,100\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"0,0\" end=\"238,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 12: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>814</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) - 1 == -1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[menuItems.Count - 1].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) - 1).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"zoom\" start=\"150,150\" end=\"100,100\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"-210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 13: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>641</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 152) + "</posY>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>" + dropShadowColor + "</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"fade\" delay=\"600\" time=\"300\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>label</type>"); rawXML.AppendLine("<posX>640</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset + 151) + "</posY>"); rawXML.AppendLine("<height>72</height>"); rawXML.AppendLine("<textcolor>#menuitemFocus</textcolor>"); rawXML.AppendLine("<font>#labelFont</font>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<label>" + menItem.name + "</label>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"fade\" delay=\"600\" time=\"300\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>576</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); rawXML.AppendLine("<visible>Control.HasFocus(" + (menItem.id + 800).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"zoom\" end=\"150,150\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"-238,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 14: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>338</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 1 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 1).ToString() + ")</visible>"); //rawXML.AppendLine("<animation effect=\"zoom\" start=\"150,150\" end=\"100,100\" time=\"600\" acceleration=\"-0.1\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"-210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; case 15: rawXML.AppendLine("<control>"); rawXML.AppendLine("<description>" + menItem.name + i.ToString() + "</description>"); rawXML.AppendLine("<type>image</type>"); rawXML.AppendLine("<posX>125</posX>"); rawXML.AppendLine("<posY>" + (int.Parse(menudef.menuPos) + basicHomeValues.textYOffset) + "</posY>"); rawXML.AppendLine("<width>128</width>"); rawXML.AppendLine("<height>128</height>"); rawXML.AppendLine("<align>center</align>"); rawXML.AppendLine("<texture>" + menItem.buttonTexture + "</texture>"); if (menuItems.IndexOf(menItem) + 2 == menuItems.Count + 1) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[1].id + 800).ToString() + ")</visible>"); else if (menuItems.IndexOf(menItem) + 2 == menuItems.Count) rawXML.AppendLine("<visible>Control.HasFocus(" + (menuItems[0].id + 800).ToString() + ")</visible>"); else rawXML.AppendLine("<visible>Control.HasFocus(" + ((menItem.id + 800) + 2).ToString() + ")</visible>"); rawXML.AppendLine("<animation effect=\"slide\" start=\"-210,0\" time=\"" + duration + "\" acceleration=\"" + acceleration + "\" reversible=\"false\">Visible</animation>"); rawXML.AppendLine("<animation effect=\"slide\" end=\"0,300\" time=\"250\" acceleration=\"-0.1\" reversible=\"false\">windowclose</animation>"); rawXML.AppendLine("</control>"); break; } }
private void fillBackgroundItem(menuItem menItem) { bool newBG = true; foreach (backgroundItem bgitem in bgItems) { // if we are sharing the same image folder and background sharing is enabled // update the existing background item if (!menItem.disableBGSharing && !bgitem.disableBGSharing) { // check if current item is unique if (!menItem.fanartHandlerEnabled.Equals(bgitem.fanartHandlerEnabled)) continue; if (menItem.fanartHandlerEnabled) { if (bgitem.fanartPropery != menItem.fanartProperty) continue; } else { if (bgitem.folder != menItem.bgFolder) continue; } // share background item bgitem.ids.Add(menItem.id.ToString()); bgitem.mname.Add(menItem.name.ToString()); bgitem.name = bgitem.name + ", " + menItem.name; if (bgitem.subMenuID == 0) bgitem.subMenuID = menItem.subMenuLevel1ID; newBG = false; } } // create a new background item if (newBG == true) { backgroundItem newbgItem = new backgroundItem(); newbgItem.folder = menItem.bgFolder; newbgItem.fanartPropery = menItem.fanartProperty; newbgItem.fhBGSource = menItem.fhBGSource; newbgItem.fanartHandlerEnabled = menItem.fanartHandlerEnabled; newbgItem.EnableMusicNowPlayingFanart = menItem.EnableMusicNowPlayingFanart; newbgItem.ids.Add(menItem.id.ToString()); newbgItem.mname.Add(menItem.name.ToString()); newbgItem.name = menItem.name; newbgItem.image = menItem.defaultImage; newbgItem.isWeather = menItem.isWeather; newbgItem.disableBGSharing = menItem.disableBGSharing; newbgItem.subMenuID = menItem.subMenuLevel1ID; bgItems.Add(newbgItem); } }
void saveButton_Click(object sender, EventArgs e) { if (itemsOnMenubar.SelectedItem != null) { int index = itemsOnMenubar.SelectedIndex; menuItem item = new menuItem(); item = menuItems[index]; item.name = tbItemName.Text; item.contextLabel = cboContextLabel.Text; item.bgFolder = bgBox.Text; item.fanartProperty = cboFanartProperty.Text; if (fhRBScraper.Checked) item.fhBGSource = fanartSource.Scraper; else item.fhBGSource = fanartSource.UserDef; item.fanartHandlerEnabled = cbItemFanartHandlerEnable.Checked; item.EnableMusicNowPlayingFanart = cbEnableMusicNowPlayingFanart.Checked; item.xmlFileName = selectedWindow.Text; item.hyperlink = selectedWindowID.Text; item.hyperlinkParameter = "false"; if (cboParameterViews.SelectedIndex != -1) { if (item.hyperlink == tvseriesSkinID) item.hyperlinkParameter = getTVSeriesViewKey(cboParameterViews.SelectedItem.ToString()); if (item.hyperlink == musicSkinID) item.hyperlinkParameter = getMusicViewKey(cboParameterViews.SelectedItem.ToString()); if (item.hyperlink == onlineVideosSkinID) { item.hyperlinkParameter = getOnlineVideosViewKey(cboParameterViews.SelectedItem.ToString()); item.hyperlinkParameterSearch = ovTxtSearch.Text; item.hyperlinkParameterCategory = cboOnlineVideosCategories.Text; } } else { cboParameterViews.Text = string.Empty; } if (movPicsCategoryCombo.SelectedIndex != -1) { // store the ID of the selected node if (item.hyperlink == movingPicturesSkinID) { int? id = GetMovPicsCategoryNodeID(movPicsCategoryCombo.SelectedNode); if (id != null) item.hyperlinkParameter = id.ToString(); } } item.disableBGSharing = disableBGSharing.Checked; // If using 3D backgrounds disable BG sharing for item. if (!item.fanartHandlerEnabled && (bgBox.Text.ToLower() == "3dbackgrounds")) item.disableBGSharing = true; item.isWeather = weatherSkinID.Split('|').Contains(item.hyperlink); item.showMostRecent = getMostRecentDisplayOption(); if (item.isWeather && weatherBGlink.Checked && item.fanartHandlerEnabled) { DialogResult result = helper.showError("You have selected to use Fanart Random images for the Weather item\nbut the option 'Link Background to Current Weather' is enabled\nand will override this setting\n\nDisable the 'Link Background to Current Weather' Option? ", errorCode.infoQuestion); if (result == DialogResult.Yes) { weatherBGlink.Checked = false; } } if (item.fanartHandlerEnabled) checkAndSetRandomFanart(item.fanartProperty); else { checkAndSetDefultImage(item); } item.buttonTexture = buttonTexture.SelectedIcon; if (cbOnlineVideosReturn.Checked) item.hyperlinkParameterOption = "Root"; else item.hyperlinkParameterOption = "Locked"; menuItems[index] = item; itemsOnMenubar.Items.RemoveAt(index); itemsOnMenubar.Items.Insert(index, item.name); reloadBackgroundItems(); screenReset(); disableItemControls(); cancelCreateButton.Visible = false; btGenerateMenu.Enabled = true; changeOutstanding = true; cboParameterViews.Visible = false; linkClearCategories.Visible = false; lblCategories.Visible = false; cboOnlineVideosCategories.Visible = false; if (menuStyle == chosenMenuStyle.graphicMenuStyle) displayMenuIcon(item.buttonTexture); } }
private void LoadWindowPlugins() { string directory = Config.GetSubFolder(Config.Dir.Plugins, "windows"); if (!Directory.Exists(directory)) return; using (Settings xmlreader = new Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { string[] files = Directory.GetFiles(directory, "*.dll"); foreach (string pluginFile in files) { try { Assembly pluginAssembly = Assembly.LoadFrom(pluginFile); if (pluginAssembly != null) { Type[] exportedTypes = pluginAssembly.GetExportedTypes(); foreach (Type type in exportedTypes) { // an abstract class cannot be instanciated if (type.IsAbstract) continue; // Try to locate the interface we're interested in if (type.GetInterface("MediaPortal.GUI.Library.ISetupForm") != null) { try { // Create instance of the current type object pluginObject = Activator.CreateInstance(type); ISetupForm pluginForm = pluginObject as ISetupForm; if (pluginForm != null) { if (pluginForm.PluginName().Equals("Home")) continue; if (pluginForm.PluginName().Equals("my Plugins")) continue; if (pluginForm.PluginName().Equals("Topbar")) continue; //Works? string enabled = xmlreader.GetValue("plugins", pluginForm.PluginName()); if (enabled.CompareTo("yes") != 0) continue; string showInHome = xmlreader.GetValue("home", pluginForm.PluginName()); if (showInHome.CompareTo("no") == 0) { menuItem item = new menuItem(); item.name = pluginForm.PluginName(); item.hyperlink = pluginForm.GetWindowId(); item.bgImage = ""; item.media = ""; PluginmenuItems.Add(item); } if (showInHome.CompareTo("yes") == 0) { menuItem item = new menuItem(); item.name = pluginForm.PluginName(); item.hyperlink = pluginForm.GetWindowId(); item.bgImage = ""; item.media = ""; if (item.name == "TV" && tvhasbeenadded != true) // Fix for TV showing up two times in MP module-list. Bug? { tvhasbeenadded = true; HomemenuItems.Add(item); } else if (item.name != "TV") { HomemenuItems.Add(item); } } } } catch (Exception setupFormException) { Log.Info("Avalon plugin: Exception in plugin SetupForm loading :{0}", setupFormException.Message); Log.Info("Avalon plugin: Current class is :{0}", type.FullName); Log.Info(setupFormException.StackTrace); } } } } } catch (Exception unknownException) { Log.Info("Avalon plugin: Exception in plugin loading :{0}", unknownException.Message); Log.Info(unknownException.StackTrace); } } } // Manually add the plugins window menuItem item2 = new menuItem(); item2.name = "Plugins"; item2.hyperlink = 34; HomemenuItems.Add(item2); }
private void BtnSaveLbl_MouseClick(object sender, MouseEventArgs e) { try { if (TxtItemName.Text.Trim() != "" && TxtRate.Text.Trim() != "" && ComboBoxCategory.SelectedIndex >= 0 && ComboBoxSection.SelectedIndex >= 0 && colorHexValMenuItem != null) { int TempId = 0; try { Int32.TryParse(MenuItemsIdforUpdate.ToString(), out TempId); } catch (Exception) { } if (objMenuItemsService.IsItemNameExist(TxtItemName.Text.Trim(), TempId).Count < 1) { if (BtnSaveLbl.Text == "Save") { if (TxtBarCode.Text.Length != 8) { MessageBox.Show("Please Enter 8 Digit Unique Barcode"); } else if (TxtBarCode.Text.Length == 8 && objMenuItemsService.Get_SelectedBarcode(TxtBarCode.Text).Count > 0) { MessageBox.Show("Barcode Already Exist in DataBase"); } else if (TxtBarCode.Text.Length == 8 && objMenuItemsService.Get_SelectedBarcode(TxtBarCode.Text).Count == 0) { menuItem obj = new menuItem(); obj.itemName = TxtItemName.Text.Trim(); obj.Price = Convert.ToDouble(TxtRate.Text.Trim()); double a = 0; Double.TryParse(TxtDiscount.Text, out a); obj.discountpercnt = a; if (CheckBoxStatus.Checked == true) { obj.status = true; } else { obj.status = false; } obj.cat_id = Convert.ToInt32(ComboBoxCategory.SelectedValue.ToString()); obj.section_id = Convert.ToInt32(ComboBoxSection.SelectedValue.ToString()); obj.color = colorHexValMenuItem; obj.quantity = Convert.ToDouble(txtQnty.Text); obj.id = 0; obj.barcode = TxtBarCode.Text; obj.Aed_Vat = Convert.ToDouble(textboxAedVat.Text); if (objMenuItemsService.Save_MenuItems_tables(obj)) { MessageBox.Show("Table Added Seccessfully."); ClearAll(); LoadAllTables(); } else { MessageBox.Show("Table Insertion Filed"); } } } else if (BtnSaveLbl.Text == "Update") { menuItem obj = new menuItem(); obj.itemName = TxtItemName.Text.Trim(); obj.Price = Convert.ToDouble(TxtRate.Text.Trim()); double a = 0; Double.TryParse(TxtDiscount.Text, out a); obj.discountpercnt = a; if (CheckBoxStatus.Checked == true) { obj.status = true; } else { obj.status = false; } obj.cat_id = Convert.ToInt32(ComboBoxCategory.SelectedValue.ToString()); obj.section_id = Convert.ToInt32(ComboBoxSection.SelectedValue.ToString()); colorHexValMenuItem = HexConverter(TxtColorPickerMenuItem.BackColor); obj.color = colorHexValMenuItem; obj.id = MenuItemsIdforUpdate; if (objMenuItemsService.Save_MenuItems_tables(obj)) { MessageBox.Show("Updated Seccessfully."); ClearAll(); LoadAllTables(); } else { MessageBox.Show("Table Insertion Filed"); } } } else { MessageBox.Show("Item ALready Exist!"); } } else { MessageBox.Show("Incomplete Form", "Please Fill Complete Form.!"); } } catch (Exception exp) { MessageBox.Show(exp.Message, "Error Message"); } }
public void Dispose() { if (miHarmonyPAS_HPAS_MinewareSystemsHarmonyPAS != null) { miHarmonyPAS_HPAS_MinewareSystemsHarmonyPAS.Dispose(); miHarmonyPAS_HPAS_MinewareSystemsHarmonyPAS = null; } if (miHarmonyReports_HPASReports_MinewareSystemsHarmonyPAS != null) { miHarmonyReports_HPASReports_MinewareSystemsHarmonyPAS.Dispose(); miHarmonyReports_HPASReports_MinewareSystemsHarmonyPAS = null; } if (miPlanning_HPASPlanning_MinewareSystemsHarmonyPAS != null) { miPlanning_HPASPlanning_MinewareSystemsHarmonyPAS.Dispose(); miPlanning_HPASPlanning_MinewareSystemsHarmonyPAS = null; } if (miProductionSystemAdministration_HPASSystemAdmin_MinewareSystemsHarmonyPAS != null) { miProductionSystemAdministration_HPASSystemAdmin_MinewareSystemsHarmonyPAS.Dispose(); miProductionSystemAdministration_HPASSystemAdmin_MinewareSystemsHarmonyPAS = null; } if (miCalendars_HPASSystemAdminCalendars_MinewareSystemsHarmonyPAS != null) { miCalendars_HPASSystemAdminCalendars_MinewareSystemsHarmonyPAS.Dispose(); miCalendars_HPASSystemAdminCalendars_MinewareSystemsHarmonyPAS = null; } if (miCalendarTypes_HPASSystemAdminCalendarsCaltype_MinewareSystemsHarmonyPAS != null) { miCalendarTypes_HPASSystemAdminCalendarsCaltype_MinewareSystemsHarmonyPAS.Dispose(); miCalendarTypes_HPASSystemAdminCalendarsCaltype_MinewareSystemsHarmonyPAS = null; } if (miSectionCalendar_HPASSystemAdminCalendarsSectionCalendar_MinewareSystemsHarmonyPAS != null) { miSectionCalendar_HPASSystemAdminCalendarsSectionCalendar_MinewareSystemsHarmonyPAS.Dispose(); miSectionCalendar_HPASSystemAdminCalendarsSectionCalendar_MinewareSystemsHarmonyPAS = null; } if (miOrgStructure_HPASSystemAdminOrgStructure_MinewareSystemsHarmonyPAS != null) { miOrgStructure_HPASSystemAdminOrgStructure_MinewareSystemsHarmonyPAS.Dispose(); miOrgStructure_HPASSystemAdminOrgStructure_MinewareSystemsHarmonyPAS = null; } if (miSections_HPASSystemAdminOrgStructureSections_MinewareSystemsHarmonyPAS != null) { miSections_HPASSystemAdminOrgStructureSections_MinewareSystemsHarmonyPAS.Dispose(); miSections_HPASSystemAdminOrgStructureSections_MinewareSystemsHarmonyPAS = null; } if (miWorkplaceAdmin_HPASWorkplaceAdmin_MinewareSystemsHarmonyPAS != null) { miWorkplaceAdmin_HPASWorkplaceAdmin_MinewareSystemsHarmonyPAS.Dispose(); miWorkplaceAdmin_HPASWorkplaceAdmin_MinewareSystemsHarmonyPAS = null; } if (miWorkplaceCodes_HPASWorkplaceCodes_MinewareSystemsHarmonyPAS != null) { miWorkplaceCodes_HPASWorkplaceCodes_MinewareSystemsHarmonyPAS.Dispose(); miWorkplaceCodes_HPASWorkplaceCodes_MinewareSystemsHarmonyPAS = null; } if (miWorkplaces_HPASWorkplaces_MinewareSystemsHarmonyPAS != null) { miWorkplaces_HPASWorkplaces_MinewareSystemsHarmonyPAS.Dispose(); miWorkplaces_HPASWorkplaces_MinewareSystemsHarmonyPAS = null; } if (miGeoStructure_HPASSystemAdminGeoStructure_MinewareSystemsHarmonyPAS != null) { miGeoStructure_HPASSystemAdminGeoStructure_MinewareSystemsHarmonyPAS.Dispose(); miGeoStructure_HPASSystemAdminGeoStructure_MinewareSystemsHarmonyPAS = null; } if (miEndtypes_HPASSystemAdminEndtypes_MinewareSystemsHarmonyPAS != null) { miEndtypes_HPASSystemAdminEndtypes_MinewareSystemsHarmonyPAS.Dispose(); miEndtypes_HPASSystemAdminEndtypes_MinewareSystemsHarmonyPAS = null; } if (miLevels_HPASSystemAdminLevels_MinewareSystemsHarmonyPAS != null) { miLevels_HPASSystemAdminLevels_MinewareSystemsHarmonyPAS.Dispose(); miLevels_HPASSystemAdminLevels_MinewareSystemsHarmonyPAS = null; } if (miGrids_HPASSystemAdminGrid_MinewareSystemsHarmonyPAS != null) { miGrids_HPASSystemAdminGrid_MinewareSystemsHarmonyPAS.Dispose(); miGrids_HPASSystemAdminGrid_MinewareSystemsHarmonyPAS = null; } if (miBoxholes_HPASSystemAdminBoxholes_MinewareSystemsHarmonyPAS != null) { miBoxholes_HPASSystemAdminBoxholes_MinewareSystemsHarmonyPAS.Dispose(); miBoxholes_HPASSystemAdminBoxholes_MinewareSystemsHarmonyPAS = null; } if (miOreBody_HPASSystemAdminOreBody_MinewareSystemsHarmonyPAS != null) { miOreBody_HPASSystemAdminOreBody_MinewareSystemsHarmonyPAS.Dispose(); miOreBody_HPASSystemAdminOreBody_MinewareSystemsHarmonyPAS = null; } if (miOtherCalendars_HPASSystemAdminCalendarsMillCalendar_MinewareSystemsHarmonyPAS != null) { miOtherCalendars_HPASSystemAdminCalendarsMillCalendar_MinewareSystemsHarmonyPAS.Dispose(); miOtherCalendars_HPASSystemAdminCalendarsMillCalendar_MinewareSystemsHarmonyPAS = null; } if (miCrews_HPASSystemAdminOrgStructureCrews_MinewareSystemsHarmonyPAS != null) { miCrews_HPASSystemAdminOrgStructureCrews_MinewareSystemsHarmonyPAS.Dispose(); miCrews_HPASSystemAdminOrgStructureCrews_MinewareSystemsHarmonyPAS = null; } if (miProcessCodes_HPASWorkplaceProcessCodes_MinewareSystemsHarmonyPAS != null) { miProcessCodes_HPASWorkplaceProcessCodes_MinewareSystemsHarmonyPAS.Dispose(); miProcessCodes_HPASWorkplaceProcessCodes_MinewareSystemsHarmonyPAS = null; } if (miBookings_HPASBooking_MinewareSystemsHarmonyPAS != null) { miBookings_HPASBooking_MinewareSystemsHarmonyPAS.Dispose(); miBookings_HPASBooking_MinewareSystemsHarmonyPAS = null; } if (miTrammingBooking_HPASBookingTramming_MinewareSystemsHarmonyPAS != null) { miTrammingBooking_HPASBookingTramming_MinewareSystemsHarmonyPAS.Dispose(); miTrammingBooking_HPASBookingTramming_MinewareSystemsHarmonyPAS = null; } if (miMillingBooking_HPASBookingMilling_MinewareSystemsHarmonyPAS != null) { miMillingBooking_HPASBookingMilling_MinewareSystemsHarmonyPAS.Dispose(); miMillingBooking_HPASBookingMilling_MinewareSystemsHarmonyPAS = null; } if (miDailyBookings_HPASBookingDailyBookings_MinewareSystemsHarmonyPAS != null) { miDailyBookings_HPASBookingDailyBookings_MinewareSystemsHarmonyPAS.Dispose(); miDailyBookings_HPASBookingDailyBookings_MinewareSystemsHarmonyPAS = null; } if (miSICCapture_HPASBookingSIC_MinewareSystemsHarmonyPAS != null) { miSICCapture_HPASBookingSIC_MinewareSystemsHarmonyPAS.Dispose(); miSICCapture_HPASBookingSIC_MinewareSystemsHarmonyPAS = null; } if (miBusinessPlanImport_HPASPlanningBusinessPlan_MinewareSystemsHarmonyPAS != null) { miBusinessPlanImport_HPASPlanningBusinessPlan_MinewareSystemsHarmonyPAS.Dispose(); miBusinessPlanImport_HPASPlanningBusinessPlan_MinewareSystemsHarmonyPAS = null; } if (miSampling_HPASWorkplacesSampling_MinewareSystemsHarmonyPAS != null) { miSampling_HPASWorkplacesSampling_MinewareSystemsHarmonyPAS.Dispose(); miSampling_HPASWorkplacesSampling_MinewareSystemsHarmonyPAS = null; } if (miPegs_HPPASSystemAdminSetupCodesPeg_MinewareSystemsHarmonyPAS != null) { miPegs_HPPASSystemAdminSetupCodesPeg_MinewareSystemsHarmonyPAS.Dispose(); miPegs_HPPASSystemAdminSetupCodesPeg_MinewareSystemsHarmonyPAS = null; } if (miKriging_HPASWorkplacesKriging_MinewareSystemsHarmonyPAS != null) { miKriging_HPASWorkplacesKriging_MinewareSystemsHarmonyPAS.Dispose(); miKriging_HPASWorkplacesKriging_MinewareSystemsHarmonyPAS = null; } if (miSurvey_HPASSurvey_MinewareSystemsHarmonyPAS != null) { miSurvey_HPASSurvey_MinewareSystemsHarmonyPAS.Dispose(); miSurvey_HPASSurvey_MinewareSystemsHarmonyPAS = null; } if (miSurveyCapture_HPASSurveyCapture_MinewareSystemsHarmonyPAS != null) { miSurveyCapture_HPASSurveyCapture_MinewareSystemsHarmonyPAS.Dispose(); miSurveyCapture_HPASSurveyCapture_MinewareSystemsHarmonyPAS = null; } if (miOreflowStorages_HPASBookingsOreflowStorages_MinewareSystemsHarmonyPAS != null) { miOreflowStorages_HPASBookingsOreflowStorages_MinewareSystemsHarmonyPAS.Dispose(); miOreflowStorages_HPASBookingsOreflowStorages_MinewareSystemsHarmonyPAS = null; } if (miTrammingProblems_HPASSystemAdminSetupCodesTramProblems_MinewareSystemsHarmonyPAS != null) { miTrammingProblems_HPASSystemAdminSetupCodesTramProblems_MinewareSystemsHarmonyPAS.Dispose(); miTrammingProblems_HPASSystemAdminSetupCodesTramProblems_MinewareSystemsHarmonyPAS = null; } if (miTopPanelsSetup_HPASSystemAdminSetupCodesTopPanels_MinewareSystemsHarmonyPAS != null) { miTopPanelsSetup_HPASSystemAdminSetupCodesTopPanels_MinewareSystemsHarmonyPAS.Dispose(); miTopPanelsSetup_HPASSystemAdminSetupCodesTopPanels_MinewareSystemsHarmonyPAS = null; } if (miBonusCapture_HPASBookingBonusCapture_MinewareSystemsHarmonyPAS != null) { miBonusCapture_HPASBookingBonusCapture_MinewareSystemsHarmonyPAS.Dispose(); miBonusCapture_HPASBookingBonusCapture_MinewareSystemsHarmonyPAS = null; } if (miHoistingBooking_HPASBookingHoisting_MinewareSystemsHarmonyPAS != null) { miHoistingBooking_HPASBookingHoisting_MinewareSystemsHarmonyPAS.Dispose(); miHoistingBooking_HPASBookingHoisting_MinewareSystemsHarmonyPAS = null; } if (miTrammingPLanning_HPASPlanningTramming_MinewareSystemsHarmonyPAS != null) { miTrammingPLanning_HPASPlanningTramming_MinewareSystemsHarmonyPAS.Dispose(); miTrammingPLanning_HPASPlanningTramming_MinewareSystemsHarmonyPAS = null; } if (miSetupCodes_HPASSystemAdminSetupCodes_MinewareSystemsHarmonyPAS != null) { miSetupCodes_HPASSystemAdminSetupCodes_MinewareSystemsHarmonyPAS.Dispose(); miSetupCodes_HPASSystemAdminSetupCodes_MinewareSystemsHarmonyPAS = null; } if (miProblems_HPASSystemAdminSetupCodesProblems_MinewareSystemsHarmonyPAS != null) { miProblems_HPASSystemAdminSetupCodesProblems_MinewareSystemsHarmonyPAS.Dispose(); miProblems_HPASSystemAdminSetupCodesProblems_MinewareSystemsHarmonyPAS = null; } if (miCalendars_HPASSystemAdminCalendarsCalendars_MinewareSystemsHarmonyPAS != null) { miCalendars_HPASSystemAdminCalendarsCalendars_MinewareSystemsHarmonyPAS.Dispose(); miCalendars_HPASSystemAdminCalendarsCalendars_MinewareSystemsHarmonyPAS = null; } if (miProblemSetup_HPASProblemSetup_MinewareSystemsHarmonyPAS != null) { miProblemSetup_HPASProblemSetup_MinewareSystemsHarmonyPAS.Dispose(); miProblemSetup_HPASProblemSetup_MinewareSystemsHarmonyPAS = null; } }
public bool loadMenuIDs(bool onLoad) { menuItems.Clear(); used_list.Enabled = true; used_list.Items.Clear(); used_list_submenu.Items.Clear(); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "Avalon.xml"))) { int a = 0; do { //Read menu if (xmlreader.GetValueAsString("AvalonBasicHome", "menuItemName" + a, "") != "") { Parents.Add(new Owner(a, xmlreader.GetValueAsString("AvalonBasicHome", "menuItemName" + a, ""), xmlreader.GetValueAsInt("AvalonBasicHome", "menuItemName" + a, 0), xmlreader.GetValueAsString("AvalonBasicHome", "menuItemParameter" + a, ""))); menuItem used_item = new menuItem(); used_item.identifier = a; used_item.name = xmlreader.GetValueAsString("AvalonBasicHome", "menuItemName" + a, ""); used_item.hyperlink = xmlreader.GetValueAsInt("AvalonBasicHome", "menuItemHyperlink" + a, 0); used_item.bgImage = xmlreader.GetValueAsString("AvalonBasicHome", "menuItemBgImage" + a, ""); used_item.property = xmlreader.GetValueAsString("AvalonBasicHome", "menuItemParameter" + a, ""); used_item.media = xmlreader.GetValueAsString("AvalonBasicHome", "menuItemRecentMedia" + a, ""); menuItems.Add(used_item); used_list.Items.Add(used_item.name); configloaded = true; int b = 0; do { //Read submenu if (xmlreader.GetValueAsString("AvalonBasicHomeSubmenu" + a, "submenuItemName" + b, "") != "") { //Log.Info("found some submenus, :" + a + ", " + b + "navn: " + xmlreader.GetValueAsString("AvalonBasicHomeSubmenu" + a, "submenuItemName" + b, "")); singleChildren.Add(new Child(a, b, xmlreader.GetValueAsString("AvalonBasicHomeSubmenu" + a, "submenuItemName" + b, ""), xmlreader.GetValueAsInt("AvalonBasicHomeSubmenu" + a, "submenuItemHyperlink" + b, 0), xmlreader.GetValueAsString("AvalonBasicHomeSubmenu" + a, "submenuItemBgImage" + b, ""), xmlreader.GetValueAsString("AvalonBasicHomeSubmenu" + a, "submenuItemParameter" + b, ""), xmlreader.GetValueAsString("AvalonBasicHome", "menuItemRecentMedia" + a, ""))); } b++; } while (b < 250); } a++; } while (a < 25); cB_FanartHandler.Checked = false; new_bgimage.Visible = false; cB_singleImage.Checked = false; combo_FanartHandler.Visible = false; bt_browse.Visible = false; rB_Movies.Visible = false; rB_MyFilms.Visible = false; rB_Music.Visible = false; rB_Recordings.Visible = false; rB_Pictures.Visible = false; rB_Series.Visible = false; cB_FanartHandler.Location = new Point(12, 42); } //return true; if (used_list.Items.Count > 0) { return true; } else { // Dont need to complain when first loading the app as its possible that the skin isnt installed if (!onLoad) MessageBox.Show("Error reading directory."); return false; } // Remove double entries int cnt = used_list.Items.Count; for (int i = 1; i < (cnt / 2) + 1; i++) { used_list.Items.RemoveAt(i); menuItems.RemoveAt(i); } cnt = used_list.Items.Count - 1; used_list.Items.RemoveAt(cnt); menuItems.RemoveAt(cnt); }