Inheritance: MonoBehaviour
        /// <summary>
        /// each new command set will be automatically separated by a separator
        /// </summary>
        /// <param name="mainMenuItem"></param>
        /// <param name="menuCommands"></param>
        public void AddMenuCommandSet(MainMenuItem mainMenuItem, IEnumerable<MenuCommand> menuCommands)
        {
            IList<MenuCommand> selectedMenuCommands = null; // make that more clear

            switch (mainMenuItem)
            {
                case MainMenuItem.NavigateMenu:
                    if (_navigateMenuCommands == null)
                    {
                        _navigateMenuCommands = new List<MenuCommand>();
                    }
                    else
                    {
                        _navigateMenuCommands.Add(MenuCommand.CreateSeparator());
                    }
                    selectedMenuCommands = _navigateMenuCommands;
                    break;

                case MainMenuItem.ViewMenu:
                    if (_viewMenuCommands == null)
                    {
                        _viewMenuCommands = new List<MenuCommand>();
                    }
                    else
                    {
                        _viewMenuCommands.Add(MenuCommand.CreateSeparator());
                    }
                    selectedMenuCommands = _viewMenuCommands;
                    break;
            }

            selectedMenuCommands.AddAll(menuCommands);
        }
Esempio n. 2
0
 void menu_Click(object sender, MainMenuItem e)
 {
     switch (e.Id) {
         case "EditImageMeta": {
                 List<int> nodeIds = new List<int>();
                 WAFContext.StartWorkflowMethod(new WMEditImageMeta(flu.SelectedFiles));
             } break;
         default:
             break;
     }
 }
Esempio n. 3
0
 void menu_Click(object sender, MainMenuItem e)
 {
     if (e.Id == "Forum_AddForumCategory") {
         ForumCategory fc = WAFContext.Session.NewContent<ForumCategory>();
         fc.Name = "Forum category";
         ForumGlobalSettings settings = ForumUtil.GetSiteForumSettings(WAFContext.Session.SiteId, WAFContext.Session.LCID);
         fc.ForumSettings.Set(settings.Key);
         fc.UpdateChanges();
         e.Id = fc.Key.ToString();
         if (ForumCategoryCreated != null) {
             ForumCategoryCreated(this, e);
         }
     }
 }
Esempio n. 4
0
 void menu_Click(object sender, MainMenuItem e)
 {
     if (e.Id == "Webshop_AddShop") {
         List<Shop> shops = WAFContext.Engine.SystemSession.Query<Shop>().Where(AqlShop.SiteId == WAFContext.Session.SiteId).Execute(1);
         if (shops.Count == 0) {
             Shop shop = WAFContext.Session.NewContent<Shop>();
             shop.Name = "New shop";
             shop.UpdateChanges();
             e.Id = shop.Key.ToString();
             List<Currency> currencies = WAFContext.Session.Query<Currency>().OrderBy(AqlCurrency.Name, false).Execute();
             if (currencies.Count > 0) {
                 Currency curr = currencies[0];
                 curr.ShopsWhereDefault.Add(shop.NodeId);
                 curr.UpdateChanges();
             } else {
                 //no existing currency. Create US Dollar currency
                 Currency currency = WAFContext.Session.NewContent<Currency>();
                 currency.ShopsWhereDefault.Add(shop.NodeId);
                 currency.Name = "US Dollar";
                 currency.Sign = "$";
                 currency.BaseCurrency = true;
                 currency.ISOCode = "840";
                 currency.Code = "USD";
                 currency.UpdateChanges();
             }
             if (ShopCreated != null) {
                 ShopCreated(this, e);
             }
             //SetupShopWizard
             SetupShopWizard shopWizard = new SetupShopWizard();
             shopWizard.PathFromRootToApp = WAFContext.PathFromRootToAppFolder;
             shopWizard.ShopId = shop.NodeId;
             WAFContext.Session.StartWorkflowMethod(shopWizard);
             Response.Redirect(WAFContext.Url.Current.ToString());
         } else {
             WAFContext.Session.Notify("The current site already has a shop. Only one shop is allowed per site.");
         }
     }
 }
Esempio n. 5
0
 void menu_Click(object sender, MainMenuItem e)
 {
     switch (e.Id) {
         case "View_ShowAllFiles":
         case "View_ShowFileNames":
             if (ViewChanged != null) ViewChanged(sender, e); break;
         default: break;
     }
 }
Esempio n. 6
0
        private void WriteMenuItem(MainMenuItem menuItem, HtmlTextWriter output)
        {
            output.Write("<li class=\"{0}\">", menuItem.Type);
            string localizedText = "RESOURCE NOT FOUND";
            string prettyNavUrl  = menuItem.NavigateUrl ?? string.Empty;

            if (menuItem.Type == MenuItemType.SpecialSelfSignup)
            {
                if (string.IsNullOrEmpty(CurrentOrganization.VanityDomain))
                {
                    prettyNavUrl = "/Signup?OrganizationId=" + CurrentOrganization.Identity;
                }
                else
                {
                    prettyNavUrl = "//" + CurrentOrganization.VanityDomain + "/Signup";
                }
                menuItem.Type = MenuItemType.Link;  // once the link is set, change to type Link to go into normal logic
            }

            if (!Debugger.IsAttached)
            {
                prettyNavUrl = prettyNavUrl.Replace("/Pages/v5/", "/").Replace(".aspx", "");
            }

            if (!String.IsNullOrEmpty(menuItem.ResourceKey))
            {
                object resourceObject = GetGlobalResourceObject("Menu5", "Menu5_" + menuItem.ResourceKey);
                if (resourceObject != null)
                {
                    localizedText = resourceObject.ToString();
                }
            }
            localizedText = localizedText.Replace("[Regular]", _regularLocalized);
            // TODO IF APPLICABLE - add other [Regulars] [Regularship] etc.
            localizedText = Server.HtmlEncode(localizedText);  // muy importante
            string cssClass = String.Empty;

            if (menuItem.Type == MenuItemType.BuildNumber)
            {
                localizedText = Swarmops.Logic.Support.Formatting.SwarmopsVersion;
                cssClass      = " dir=\"ltr\"";
            }

            string iconSize = string.Empty;

            if (menuItem.ImageUrl != null && _imageSizeLookup.ContainsKey(menuItem.ImageUrl))
            {
                iconSize = _imageSizeLookup[menuItem.ImageUrl]; // from cache
            }
            else if (menuItem.ImageUrl != null)
            {
                string[] iconSizePreferences = { "40", "96", "128", "20", "16" };

                foreach (string testSize in iconSizePreferences)
                {
                    if (
                        File.Exists(
                            Server.MapPath("~/Images/PageIcons/" + menuItem.ImageUrl + "-" + testSize + "px.png")))
                    {
                        iconSize = testSize + "px";
                        _imageSizeLookup[menuItem.ImageUrl] = iconSize;
                        break; // break at first located preference
                    }
                }

                // Let it break if none is found, that'll generate a broken image and be visible immediately
            }

            switch (menuItem.Type)
            {
            // TODO: More types here, and check with the CSS. Some work to get good looking

            case MenuItemType.Link:
                if (!string.IsNullOrEmpty(menuItem.ImageUrl))
                {
                    output.Write(
                        "<a href=\"{1}\"><img src=\"/Images/PageIcons/{0}-{3}.png\"  height=\"20\" width=\"20\"  />{2}</a>",
                        menuItem.ImageUrl, prettyNavUrl, localizedText, iconSize);
                }
                else
                {
                    output.Write(
                        "<a href=\"{0}\">{1}</a>",
                        prettyNavUrl, localizedText);
                }
                break;

            case MenuItemType.Disabled:
            case MenuItemType.BuildNumber:
                string imageUrl = "/Images/PageIcons/" + menuItem.ImageUrl + "-" + iconSize + ".png";
                if (String.IsNullOrEmpty(menuItem.ImageUrl))
                {
                    imageUrl = "/Images/PageIcons/transparency-16px.png";
                    // doesn't matter in slightest if browser resizes to 20px
                }
                output.Write("<a href='#disabled'><img src=\"{0}\" height=\"20\" width=\"20\" /><span{2}>{1}</span></a>", imageUrl,
                             localizedText, cssClass);
                break;

            case MenuItemType.Submenu:
                if (string.IsNullOrEmpty(menuItem.ImageUrl))
                {
                    output.Write("<a href='#'>" + localizedText + "</a>");
                }
                else
                {
                    output.Write(
                        "<a href=\"#\"><img src=\"/Images/PageIcons/{0}-{3}.png\"  height=\"20\" width=\"20\"  />{2}</a>",
                        menuItem.ImageUrl, prettyNavUrl, localizedText, iconSize);
                }
                break;

            case MenuItemType.Separator:
                output.Write("&nbsp;<hr/>");
                break;

            default:
                throw new NotImplementedException();
            }

            if (menuItem.Children.Length > 0)
            {
                output.Write("<ul>");
                foreach (MainMenuItem child in menuItem.Children)
                {
                    WriteMenuItem(child, output);
                }
                output.Write("</ul>");
            }

            output.Write("</li>");
        }
Esempio n. 7
0
    void menu_Click(object sender, MainMenuItem e)
    {
        switch (e.Id) {
            case "Delete":

                WAFContext.StartWorkflowMethod(new DeleteMessage(lstMessages.GetSelectedKeys()), Local.Text("Web.WAF.Edit.Messages.DefaultDeleteSelectedMessages")).InBackgroundMode = false;
                break;
            case "MarkRead":
                foreach (MessageBase m in WAFContext.Session.GetContents<MessageBase>(lstMessages.GetSelectedKeys())) {
                    m.Read = true;
                    if (m.Changed) m.UpdateChanges();
                }
                break;
            case "MarkUnRead":
                foreach (MessageBase m in WAFContext.Session.GetContents<MessageBase>(lstMessages.GetSelectedKeys())) {
                    m.Read = false;
                    if (m.Changed) m.UpdateChanges();
                }
                break;
            default: break;
        }
    }
Esempio n. 8
0
 void menu_Click(object sender, MainMenuItem e)
 {
 }
Esempio n. 9
0
 void menu_Click(object sender, MainMenuItem e)
 {
     if (e.Id == "Blog_AddBlog") {
         Blog b = WAFContext.Session.NewContent<Blog>();
         b.Name = "Blog name";
         b.UpdateChanges();
         e.Id = b.Key.ToString();
         if (BlogCreated != null) {
             BlogCreated(this, e);
         }
     }
 }
Esempio n. 10
0
        private void WriteMenuItem(MainMenuItem menuItem, HtmlTextWriter output)
        {
            output.Write("<li class=\"{0}\">", menuItem.Type);
            string localizedText = "RESOURCE NOT FOUND";
            string prettyNavUrl  = menuItem.NavigateUrl ?? string.Empty;

            if (!Debugger.IsAttached)
            {
                prettyNavUrl = prettyNavUrl.Replace("/Pages/v5/", "/").Replace(".aspx", "");
            }

            if (!String.IsNullOrEmpty(menuItem.ResourceKey))
            {
                object resourceObject = GetGlobalResourceObject("Menu5", "Menu5_" + menuItem.ResourceKey);
                if (resourceObject != null)
                {
                    localizedText = resourceObject.ToString();
                }
            }
            localizedText = localizedText.Replace("[Regular]", _regularLocalized);
            // TODO IF APPLICABLE - add other [Regulars] [Regularship] etc.
            localizedText = Server.HtmlEncode(localizedText);  // muy importante

            if (menuItem.Type == MenuItemType.BuildNumber)
            {
                localizedText = Swarmops.Logic.Support.Formatting.SwarmopsVersion;
            }

            string iconSize = "40px";

            if (File.Exists(Server.MapPath("~/Images/PageIcons/" + menuItem.ImageUrl + "-20px.png")))
            {
                iconSize = "20px";
            }

            switch (menuItem.Type)
            {
            // TODO: More types here, and check with the CSS. Some work to get good looking

            case MenuItemType.Link:
                output.Write(
                    "<a href=\"{1}\"><img src=\"/Images/PageIcons/{0}-{3}.png\"  height=\"20\" width=\"20\"  />{2}</a>",
                    menuItem.ImageUrl, prettyNavUrl, localizedText, iconSize);
                break;

            case MenuItemType.Disabled:
            case MenuItemType.BuildNumber:
                string imageUrl = "/Images/PageIcons/" + menuItem.ImageUrl + "-" + iconSize + ".png";
                if (String.IsNullOrEmpty(menuItem.ImageUrl))
                {
                    imageUrl = "/Images/PageIcons/transparency-16px.png";
                    // doesn't matter in slightest if browser resizes to 20px
                }
                output.Write("<a href='#disabled'><img src=\"{0}\" height=\"20\" width=\"20\" />{1}</a>", imageUrl,
                             localizedText);
                break;

            case MenuItemType.Submenu:
                output.Write("<a href='#'>" + localizedText + "</a>");
                break;

            case MenuItemType.Separator:
                output.Write("&nbsp;<hr/>");
                break;

            default:
                throw new NotImplementedException();
            }

            if (menuItem.Children.Length > 0)
            {
                output.Write("<ul>");
                foreach (MainMenuItem child in menuItem.Children)
                {
                    WriteMenuItem(child, output);
                }
                output.Write("</ul>");
            }

            output.Write("</li>");
        }
Esempio n. 11
0
        private void AddExtensionItems()
        {
            extensionsItem.Items.Clear();
            AddMenuChild(extensionsItem.Items, "LOCReloadScripts", mainModel.ReloadScriptsCommand);
            extensionsItem.Items.Add(new Separator());
            var args  = new GetMainMenuItemsArgs();
            var toAdd = new List <MainMenuItem>();

            foreach (var plugin in mainModel.Extensions.Plugins.Values)
            {
                try
                {
                    var items = plugin.Plugin.GetMainMenuItems(args);
                    if (items.HasItems())
                    {
                        toAdd.AddRange(items);
                    }
                }
                catch (Exception e) when(!PlayniteEnvironment.ThrowAllErrors)
                {
                    logger.Error(e, $"Failed to get menu items from plugin {plugin.Description.Name}");
                }
            }

            foreach (var script in mainModel.Extensions.Scripts)
            {
                if (script.SupportedMenus.Contains(Scripting.SupportedMenuMethods.MainMenu))
                {
                    try
                    {
                        var items = script.GetMainMenuItems(args);
                        if (items.HasItems())
                        {
                            foreach (var item in items)
                            {
                                var newItem = MainMenuItem.FromScriptMainMenuItem(item);
                                newItem.Action = (a) =>
                                {
                                    script.InvokeFunction(item.FunctionName, new List <object>
                                    {
                                        new ScriptMainMenuItemActionArgs()
                                    });
                                };

                                toAdd.Add(newItem);
                            }
                        }
                    }
                    catch (Exception e) when(!PlayniteEnvironment.ThrowAllErrors)
                    {
                        logger.Error(e, $"Failed to get menu items from script {script.Name}");
                    }
                }
            }

            if (toAdd.Count > 0)
            {
                var menuItems          = new Dictionary <string, MenuItem>();
                var menuExtensionItems = new Dictionary <string, MenuItem>();
                foreach (var item in toAdd)
                {
                    object newItem = null;
                    if (item.Description == "-")
                    {
                        newItem = new Separator();
                    }
                    else
                    {
                        newItem = new MenuItem()
                        {
                            Header = item.Description,
                            Icon   = MenuHelpers.GetIcon(item.Icon)
                        };

                        if (item.Action != null)
                        {
                            ((MenuItem)newItem).Click += (_, __) =>
                            {
                                try
                                {
                                    item.Action(new MainMenuItemActionArgs());
                                }
                                catch (Exception e) when(!PlayniteEnvironment.ThrowAllErrors)
                                {
                                    logger.Error(e, "Main menu extension action failed.");
                                    Dialogs.ShowErrorMessage(
                                        ResourceProvider.GetString("LOCMenuActionExecError") +
                                        Environment.NewLine + Environment.NewLine +
                                        e.Message, "");
                                }
                            };
                        }
                    }

                    var startIndex = Items.IndexOf(extensionsItem) + 1;
                    if (item.MenuSection.IsNullOrEmpty())
                    {
                        Items.Insert(startIndex, newItem);
                    }
                    else
                    {
                        if (item.MenuSection == "@")
                        {
                            extensionsItem.Items.Add(newItem);
                        }
                        else if (item.MenuSection.StartsWith("@"))
                        {
                            var parent = MenuHelpers.GenerateMenuParents(menuExtensionItems, item.MenuSection.Substring(1), extensionsItem.Items);
                            parent?.Items.Add(newItem);
                        }
                        else
                        {
                            var parent = MenuHelpers.GenerateMenuParents(menuItems, item.MenuSection, Items, startIndex);
                            parent?.Items.Add(newItem);
                        }
                    }
                }
            }
        }
Esempio n. 12
0
 public AboutViewModel()
 {
     Title          = MainMenuItem.GetMenus().Where(w => w.Id == MenuItemType.About).First().Title;
     OpenWebCommand = new Command(() => Device.OpenUri(new Uri("https://xamarin.com/platform")));
 }
Esempio n. 13
0
        public void showPage(int idx)
        {
            Console.WriteLine("MasterDetailMenuPageModel->showPage()");

            if (Glo.Data.showpage_running)
            {
                Console.WriteLine("MasterDetailMenuPageModel->showPage: break;showpage_running..");
                return;
            }
            else
            {
                Console.WriteLine("MasterDetailMenuPageModel->showPage: idx=" + idx);
            }

            try
            {
                Glo.Data.showpage_running = true;

                MainMenuItem item = Glo.Data.MainMenuItems[idx];
                //Page obj = (Page)Activator.CreateInstance(item.TargetType);
                //if (item.Id.Equals("HOMEPAGE"))

                // 현재 페이지와 이동 페이지가 같으면 이동하지말고 메뉴만 닫는다
                if (Glo.Data.Page_ID == item.Page_Id)
                {
                    showPage_cancelled();
                    return;
                }
                else
                {
                    Glo.Data.Page_ID = item.Page_Id;
                    //Detail = new NavigationPage(obj);
                    Type t = item.TargetType;

                    //var masterDetailPage = this.GetPageFromCache<MasterDetailPageModel>();

                    Page p = null;
                    //p = this.GetPageFromCache<HomePageModel>() as Page;

                    //var page;
                    if (item.Page_Id == Constants.PAGEID_HOME)
                    {
                        p = this.GetPageFromCache <HomePageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_SEND)
                    {
                        p = this.GetPageFromCache <SendPageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_RECV)
                    {
                        p = this.GetPageFromCache <ReceivePageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_TRADE)
                    {
                        p = this.GetPageFromCache <TradePageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_UPDATE)
                    {
                        p = this.GetPageFromCache <UpdatePageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_WALLET)
                    {
                        p = this.GetPageFromCache <WalletModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_SETTING)
                    {
                        p = this.GetPageFromCache <SettingsPageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_BUYNSELL)
                    {
                        p = this.GetPageFromCache <BuyandsellModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_HISTORY)
                    {
                        p = this.GetPageFromCache <HistoryPageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_SENDMONEY)
                    {
                        p = this.GetPageFromCache <SendMoneyPageModel>() as Page;
                    }
                    else if (item.Page_Id == Constants.PAGEID_RECEIVEMONEY)
                    {
                        p = this.GetPageFromCache <ReceiveMoneyPageModel>() as Page;
                    }

                    if (p == null)
                    {
                        showPage_cancelled();
                        return;
                    }

                    //masterDetailPage.GetPageModel().SetDetail(p);
                    //var masterDetailPage = this.GetPageFromCache<MasterDetailPageModel>();

                    //var masterDetailPage = (this).GetCurrentPage() as Xamarin.Forms.MasterDetailPage;
                    //((MasterDetailPage)masterDetailPage).SetDetail(p);
                    var masterDetailPage = this.GetPageFromCache <MasterDetailPageModel>();
                    ((MasterDetailPage)masterDetailPage).SetDetail(p);
                    //Glo.Data.MasterDetailPageObj.SetDetail(p);
                    //Glo.Data.MasterDetailPageObj.SetDetail(p);
                }

                // moved to SetDetail()
                //Glo.Data.showpage_running = false;
            }
            catch (Exception e)
            {
                Console.WriteLine("MasterDetailMenuPageModel->showPage: Exception=" + e.ToString());
                showPage_cancelled();
                return;
            }
        }
Esempio n. 14
0
 public override string ToString()
 {
     return("MainMenuItemArray[" + MainMenuItem.ToString(_items) + "]");
 }
Esempio n. 15
0
 protected void SetCursor(MainMenuItem item)
 {
     SetCursor(Items.IndexOf(item));
 }
Esempio n. 16
0
 public static string ToString(MainMenuItem[] items)
 {
     string result = "";
     foreach(MainMenuItem item in items) {
         if(!string.IsNullOrEmpty(result))
         {
             result+=", ";
         }
         result += item.itemName;
     }
     result = "items=["+result+"]";
     return result;
 }
        public void ProcessRequest(HttpRequest request, Org.Reddragonit.EmbeddedWebServer.Interfaces.Site site)
        {
            request.ResponseHeaders["Cache-Control"] = "max-age = " + (60 * 60).ToString();
            List <string> paths = new List <string>();
            string        ext   = request.URL.AbsolutePath.Substring(request.URL.AbsolutePath.LastIndexOf("."));
            string        bPath = "scripts";

            if (ext == ".css")
            {
                bPath = "styles";
            }
            switch (request.URL.AbsolutePath)
            {
            case "/resources/scripts/core.js":
            case "/resources/styles/core.css":
                paths.AddRange(_CORE_PATHS);
                break;

            case "/resources/scripts/setup.js":
            case "/resources/styles/setup.css":
                paths.AddRange(_SETUP_PATHS);
                break;

            case "/resources/scripts/user.js":
                paths.AddRange(_USER_PATHS);
                foreach (MainMenuItem mmi in MainMenuItem.LoadAll())
                {
                    if (mmi.JavascriptURLs != null)
                    {
                        paths.AddRange(mmi.JavascriptURLs);
                    }
                    if (mmi.CombinedURLs != null)
                    {
                        paths.AddRange(mmi.CombinedURLs);
                    }
                    if (mmi.SubMenuItems != null)
                    {
                        foreach (SubMenuItem smi in mmi.SubMenuItems)
                        {
                            if (smi.JavascriptURLs != null)
                            {
                                paths.AddRange(smi.JavascriptURLs);
                            }
                            if (smi.CombinedURLs != null)
                            {
                                paths.AddRange(smi.CombinedURLs);
                            }
                        }
                    }
                    foreach (IHomePageComponent ihp in parts)
                    {
                        if (ihp.JSUrls != null)
                        {
                            paths.AddRange(ihp.JSUrls);
                        }
                    }
                }
                break;

            case "/resources/styles/user.css":
                paths.AddRange(_USER_PATHS);
                foreach (MainMenuItem mmi in MainMenuItem.LoadAll())
                {
                    if (mmi.CssURLs != null)
                    {
                        paths.AddRange(mmi.CssURLs);
                    }
                    if (mmi.CombinedURLs != null)
                    {
                        paths.AddRange(mmi.CombinedURLs);
                    }
                    if (mmi.SubMenuItems != null)
                    {
                        foreach (SubMenuItem smi in mmi.SubMenuItems)
                        {
                            if (smi.CssURLs != null)
                            {
                                paths.AddRange(smi.CssURLs);
                            }
                            if (smi.CombinedURLs != null)
                            {
                                paths.AddRange(smi.CombinedURLs);
                            }
                        }
                    }
                    foreach (IHomePageComponent ihp in parts)
                    {
                        if (ihp.CSSUrls != null)
                        {
                            paths.AddRange(ihp.CSSUrls);
                        }
                    }
                }
                break;
            }
            request.ResponseHeaders.ContentType = HttpUtility.GetContentTypeForExtension(request.URL.AbsolutePath.Substring(request.URL.AbsolutePath.LastIndexOf(".")));
            foreach (string str in paths)
            {
                if (str.StartsWith("TYPE=") || str.StartsWith("/EmbeddedJSGenerator.js?TYPE="))
                {
                    if (ext != ".css")
                    {
                        request.ResponseWriter.WriteLine("/* " + str + " */");
                        foreach (IRequestHandler irh in site.Handlers)
                        {
                            if (irh is EmbeddedServiceHandler)
                            {
                                request.ResponseWriter.WriteLine(((EmbeddedServiceHandler)irh).GenerateJSForServiceType(str.Substring(str.IndexOf("=") + 1)));
                            }
                        }
                    }
                }
                else
                {
                    List <string> tpaths = new List <string>();
                    if (str.StartsWith("/"))
                    {
                        if (str.EndsWith(".min" + ext))
                        {
                            tpaths.Add(str);
                            tpaths.Add(str.Substring(0, str.LastIndexOf(".min")) + ext);
                        }
                        else
                        {
                            tpaths.Add(str);
                            tpaths.Add(str.Substring(0, str.LastIndexOf(ext)) + ".min" + ext);
                        }
                    }
                    else
                    {
                        tpaths.AddRange(new string[] {
                            "/resources/" + bPath + "/" + str.Replace(".", "/") + ext,
                            "/resources/" + bPath + "/base/" + str.Replace(".", "/") + ext,
                            "/resources/" + bPath + "/" + (request.IsMobile ? "mobile" : "desktop") + "/" + str.Replace(".", "/") + ext,
                            "Org.Reddragonit.FreeSwitchConfig.Site." + bPath + ".base." + str + ext,
                            "Org.Reddragonit.FreeSwitchConfig.Site." + bPath + "." + (request.IsMobile ? "mobile" : "desktop") + "." + str + ext,
                            "/resources/" + bPath + "/" + str.Replace(".", "/") + ".min" + ext,
                            "/resources/" + bPath + "/base/" + str.Replace(".", "/") + ".min" + ext,
                            "/resources/" + bPath + "/" + (request.IsMobile ? "mobile" : "desktop") + "/" + str.Replace(".", "/") + ".min" + ext,
                            "Org.Reddragonit.FreeSwitchConfig.Site." + bPath + ".base." + str + ".min" + ext,
                            "Org.Reddragonit.FreeSwitchConfig.Site." + bPath + "." + (request.IsMobile ? "mobile" : "desktop") + "." + str + ".min" + ext
                        });
                    }
                    foreach (string path in tpaths)
                    {
                        if (path.StartsWith("/"))
                        {
                            request.ResponseWriter.WriteLine("/* " + path + " */");
                            VirtualMappedRequest vmp = new VirtualMappedRequest(new Uri("http://" + request.URL.Host + ":" + request.URL.Port.ToString() + path), request.Headers["Accept-Language"]);
                            Org.Reddragonit.BackBoneDotNet.RequestHandler.HandleRequest(vmp);
                            request.ResponseWriter.WriteLine(vmp.ToString());
                            if (site.EmbeddedFiles != null)
                            {
                                if (site.EmbeddedFiles.ContainsKey(path))
                                {
                                    if (ModelHandler.CompressJS)
                                    {
                                        request.ResponseWriter.WriteLine((request.URL.AbsolutePath.EndsWith(".js") ? JSMinifier.Minify(Utility.ReadEmbeddedResource(site.EmbeddedFiles[path].DLLPath)) : CSSMinifier.Minify(Utility.ReadEmbeddedResource(site.EmbeddedFiles[path].DLLPath))));
                                    }
                                    else
                                    {
                                        request.ResponseWriter.WriteLine(Utility.ReadEmbeddedResource(site.EmbeddedFiles[path].DLLPath));
                                    }
                                }
                            }
                            string tmpStr = Utility.ReadEmbeddedResource(_ReverseURL(path));
                            if (tmpStr != null)
                            {
                                if (ModelHandler.CompressJS)
                                {
                                    request.ResponseWriter.WriteLine((request.URL.AbsolutePath.EndsWith(".js") ? JSMinifier.Minify(tmpStr) : CSSMinifier.Minify(tmpStr)));
                                }
                                else
                                {
                                    request.ResponseWriter.WriteLine(tmpStr);
                                }
                            }
                        }
                        else
                        {
                            request.ResponseWriter.WriteLine("/* " + _ExtractURL(path) + " */");
                            request.ResponseWriter.WriteLine(Utility.ReadEmbeddedResource(path));
                        }
                    }
                }
            }
            if (request.URL.AbsolutePath == "/resources/scripts/core.js")
            {
                _WriteConstants(request);
            }
            else if (request.URL.AbsolutePath == "/resources/scripts/setup.js")
            {
            }
            else if (request.URL.AbsolutePath == "/resources/scripts/user.js")
            {
                Template st = new Template(Utility.ReadEmbeddedResource("Org.Reddragonit.FreeSwitchConfig.Site.Deployments.home.js"));
                st.SetAttribute("components", parts);
                request.ResponseWriter.WriteLine(st.ToString());
            }
        }
        public DashboardItemTemplate(MainMenuItem menuItem)
        {
            InitializeComponent();

            RelativeLayout layout = new RelativeLayout();

            layout.BackgroundColor = Color.FromHex("#ffffff");

            var tapGestureRecognizer = new TapGestureRecognizer();

            tapGestureRecognizer.Tapped += (s, e) => {
                Tapped?.Invoke(this, new WidgetTappedEventArgs(menuItem.TargetPage));
            };

            layout.GestureRecognizers.Add(tapGestureRecognizer);

            var backgroundImage = new Image()
            {
                Source = new FileImageSource()
                {
                    File = menuItem.BackgroundImage
                },
                Aspect           = Aspect.AspectFill,
                InputTransparent = false
            };

            layout.Children.Add(backgroundImage,
                                Constraint.Constant(0),
                                Constraint.Constant(0),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Width);
            }),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Height);
            }));

            var iconImage = new CircleImage()
            {
                Source = new FileImageSource()
                {
                    File = menuItem.IconSource
                },
                Aspect           = Aspect.AspectFill,
                BorderColor      = Color.Black,
                BorderThickness  = 1,
                WidthRequest     = 20,
                HeightRequest    = 20,
                InputTransparent = false
            };

            layout.Children.Add(
                iconImage,
                Constraint.RelativeToParent((parent) => {
                return((parent.Width / 2) - (iconImage.Width / 2));
            }),
                Constraint.RelativeToParent((parent) => {
                return(parent.Height * .25);
            }),
                Constraint.RelativeToParent((parent) => {
                return(parent.Width * .45);
            }),
                Constraint.RelativeToParent((parent) => {
                return(parent.Width * .45);
            })
                );

            iconImage.SizeChanged += (sender, e) => {
                layout.ForceLayout();
            };

            var dashlabel = new Label()
            {
                Text = menuItem.Title,
                HorizontalTextAlignment = TextAlignment.Center,
                TextColor        = Color.Black,
                FontFamily       = Device.OnPlatform("AvenirNextCondensed-Bold", "sans-serif-condensed", null),
                InputTransparent = true
            };

            layout.Children.Add(dashlabel,
                                Constraint.Constant(0),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Height - 30);
            }),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Width);
            }),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Height);
            }));

            var dashItemCount = new Label
            {
                Text = menuItem.ItemCount == 0 ? string.Empty : menuItem.ItemCount.ToString(),
                HorizontalTextAlignment = TextAlignment.Center,
                TextColor        = Color.Black,
                FontFamily       = Device.OnPlatform("AvenirNextCondensed-Bold", "sans-serif-condensed", null),
                InputTransparent = true
            };

            layout.Children.Add(dashItemCount,
                                Constraint.Constant(0),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Height - 10);
            }),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Width);
            }),
                                Constraint.RelativeToParent((parent) => {
                return(parent.Height);
            }));

            Content = layout;
        }
Esempio n. 19
0
        public HomePage()
        {
            InitializeComponent();
            List <MainMenuItem> menuItems = new List <MainMenuItem>();
            MainMenuItem        mi        = new MainMenuItem();

            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Home";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "Self";

            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Add Pet/s";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "SampleView";

            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Add Vet/s";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "SampleView";
            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Add Insurance Company";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "SampleView";
            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "My Details";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "SampleView";
            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Sync Data";
            mi.ShowToggleSwitch = true;
            mi.TargetPage       = "SampleView";
            menuItems.Add(mi);

            mi                  = new MainMenuItem();
            mi.MenuIcon         = "furryfiticon.png";
            mi.MenuItemName     = "Log out";
            mi.ShowToggleSwitch = false;
            mi.TargetPage       = "SimpleLoginPage";
            menuItems.Add(mi);


            listView.ItemsSource = menuItems;

            //navigationDrawer.ContentView = new HealthCarePage().Content;
            navigationDrawer.ContentView = new DashboardContent().Content;
        }
Esempio n. 20
0
 void DefinitionMaster_NativeViewChanged(object sender, MainMenuItem e)
 {
     setQuery();
 }
Esempio n. 21
0
 void menu_Click(object sender, MainMenuItem e)
 {
     if (WAFContext.HasStoppedFSMonitoringAllFolders || WAFContext.HasStoppedFSMonitoringNonSpecialFolders) {
         WAFContext.Restart();
     } else {
         switch (e.Id) {
             case "Options_StopMonitorAllChanges":
                 WAFContext.StopFSMonitoringAllFolders();
                 break;
             case "Options_StopMonitorNonSpecialChanges":
                 WAFContext.StopFSMonitoringNonSpecialFolders();
                 break;
             case "Options_Restart":
                 WAFContext.Restart();
                 break;
             case "View_ShowFolderSize":
             case "View_ShowFoldersInList":
                 if (_tree.GetSelectedCount() == 1) {
                     string path = WAFContext.PathFromRootToAppFolder + _tree.GetSelectedValues().GetFirst().Replace(":", "\\").Replace("..", "");
                     if (path.EndsWith("\\")) updateFileList();
                 }
                 break;
             case "View_ShowFilesInTree":
                 _tree.ShowFiles = WAFMaster.EditModule.Menu.IsItemChecked("View_ShowFilesInTree");
                 _tree.Refresh();
                 break;
             default: break;
         }
     }
     MainMenu menu = WAFMaster.EditModule.Menu;
     menu.SetItemCheckStatus("Options_StopMonitorNonSpecialChanges", !WAFContext.HasStoppedFSMonitoringNonSpecialFolders);
     menu.SetItemCheckStatus("Options_StopMonitorAllChanges", !WAFContext.HasStoppedFSMonitoringAllFolders);
 }
Esempio n. 22
0
        protected override async Task OnLoaded()
        {
            ChannelSession.Services.InputService.Initialize(new WindowInteropHelper(this).Handle);
            foreach (HotKeyConfiguration hotKeyConfiguration in ChannelSession.Settings.HotKeys.Values)
            {
                ChannelSession.Services.InputService.RegisterHotKey(hotKeyConfiguration.Modifiers, hotKeyConfiguration.Key);
            }

            if (!string.IsNullOrEmpty(ChannelSession.Settings.Name))
            {
                this.Title += " - " + ChannelSession.Settings.Name;
            }

            this.Title += " - v" + Assembly.GetEntryAssembly().GetName().Version.ToString();

            await this.MainMenu.Initialize(this);

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Chat, new ChatControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Chat");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Channel, new ChannelControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Channel");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Commands, new ChatCommandsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Commands");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Events, new EventsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Events");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Timers, new TimerControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Timers");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.ActionGroups, new ActionGroupControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Action-Groups");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.CommunityCommands, new CommunityCommandsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Community-Commands");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Users, new UsersControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Users");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.CurrencyRankInventory, new CurrencyRankInventoryControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Currency,-Rank,-&-Inventory");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.ChannelPoints, new TwitchChannelPointsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Channel-Points");

            this.streamlootsCardsMainMenuItem = await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.StreamlootsCards, new StreamlootsCardsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Streamloots-Cards");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.StreamPass, new StreamPassControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Stream-Pass");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.RedemptionStore, new RedemptionStoreControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Redemption-Store");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.OverlayWidgets, new OverlayWidgetsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Overlay-Widgets");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Games, new GamesControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Games");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Giveaway, new GiveawayControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Giveaways");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.GameQueue, new GameQueueControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Game-Queue");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Quotes, new QuoteControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Quotes");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Statistics, new StatisticsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Statistics");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Moderation, new ModerationControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Moderation");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.CommandHistory, new CommandHistoryControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Commands");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Services, new ServicesControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Services");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Webhooks, new WebhooksControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki/Webhooks");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Accounts, new AccountsControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.Changelog, new ChangelogControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki");

            await this.MainMenu.AddMenuItem(MixItUp.Base.Resources.About, new AboutControl(), "https://github.com/SaviorXTanren/mixer-mixitup/wiki");

            ChannelSession.Services.Streamloots.OnStreamlootsConnectionChanged += StreamlootsService_OnStreamlootsConnectionChanged;
            if (!ChannelSession.Services.Streamloots.IsConnected)
            {
                this.MainMenu.HideMenuItem(this.streamlootsCardsMainMenuItem);
            }

            this.MainMenu.MenuItemSelected(MixItUp.Base.Resources.Chat);

            ActivationProtocolHandler.OnCommunityCommandActivation += ActivationProtocolHandler_OnCommunityCommandActivation;
            ActivationProtocolHandler.OnCommandFileActivation      += ActivationProtocolHandler_OnCommandFileActivation;
        }
Esempio n. 23
0
        private void WriteMenuItem(MainMenuItem menuItem, HtmlTextWriter output)
        {
            output.Write("<li class=\"{0}\">", menuItem.Type.ToString());
            string localizedText = "RESOURCE NOT FOUND";

            if (!String.IsNullOrEmpty(menuItem.ResourceKey))
            {
                object resourceObject = GetGlobalResourceObject("Menu5", "Menu5_" + menuItem.ResourceKey);
                if (resourceObject != null)
                {
                    localizedText = resourceObject.ToString();
                }
            }
            localizedText = Server.HtmlEncode(localizedText); // muy importante

            if (menuItem.Type == MenuItemType.BuildNumber)
            {
                localizedText = GetBuildIdentity();
            }

            string iconSize = "40px";

            if (File.Exists(Server.MapPath("~/Images/PageIcons/" + menuItem.ImageUrl + "-20px.png")))
            {
                iconSize = "20px";
            }

            switch (menuItem.Type)
            {
            // TODO: More types here, and check with the CSS. Some work to get good looking

            // MEH forcing build

            case MenuItemType.Link:
                output.Write("<a href=\"{1}\"><img src=\"/Images/PageIcons/{0}-{3}.png\"  height=\"20\" width=\"20\"  />{2}</a>",
                             menuItem.ImageUrl, menuItem.NavigateUrl, localizedText, iconSize);
                break;

            case MenuItemType.Disabled:
            case MenuItemType.BuildNumber:
                string imageUrl = "/Images/PageIcons/" + menuItem.ImageUrl + "-" + iconSize + ".png";
                if (String.IsNullOrEmpty(menuItem.ImageUrl))
                {
                    imageUrl = "/Images/PageIcons/transparency-16px.png";     // doesn't matter in slightest if browser resizes to 20px
                }
                output.Write("<a href='#disabled'><img src=\"{0}\" height=\"20\" width=\"20\" />{1}</a>", imageUrl, localizedText);
                break;

            case MenuItemType.Submenu:
                output.Write("<a href='#'>" + localizedText + "</a>");
                break;

            case MenuItemType.Separator:
                output.Write("&nbsp;<hr/>");
                break;

            default:
                throw new NotImplementedException();
            }

            if (menuItem.Children.Length > 0)
            {
                output.Write("<ul>");
                foreach (MainMenuItem child in menuItem.Children)
                {
                    WriteMenuItem(child, output);
                }
                output.Write("</ul>");
            }

            output.Write("</li>");
        }
 private void InitializeComponent()
 {
     this.components = new Container();
     this.mainBarManager = new XafBarManager(this.components);
     this._mainMenuBar = new XafBar();
     this.barSubItemFile = new MainMenuItem();
     this.cObjectsCreation = new ActionContainerBarItem();
     this.cFile = new ActionContainerBarItem();
     this.cSave = new ActionContainerBarItem();
     this.cPrint = new ActionContainerBarItem();
     this.cExport = new ActionContainerBarItem();
     this.cExit = new ActionContainerBarItem();
     this.barSubItemEdit = new MainMenuItem();
     this.cUndoRedo = new ActionContainerBarItem();
     this.cEdit = new ActionContainerBarItem();
     this.cRecordEdit = new ActionContainerBarItem();
     this.cOpenObject = new ActionContainerBarItem();
     this.barSubItemView = new MainMenuItem();
     this.cPanels = new ActionContainerMenuBarItem();
     this.cViewsHistoryNavigation = new ActionContainerBarItem();
     this.cMenus = new ActionContainerMenuBarItem();
     this.cRecordsNavigation = new ActionContainerBarItem();
     this.cView = new ActionContainerBarItem();
     this.cReports = new ActionContainerBarItem();
     this.cDefault = new ActionContainerBarItem();
     this.cSearch = new ActionContainerBarItem();
     this.cFilters = new ActionContainerBarItem();
     this.cFullTextSearch = new ActionContainerBarItem();
     this.cAppearance = new ActionContainerMenuBarItem();
     this.barSubItemTools = new MainMenuItem();
     this.cTools = new ActionContainerMenuBarItem();
     this.cOptions = new ActionContainerMenuBarItem();
     this.cDiagnostic = new ActionContainerMenuBarItem();
     this.barSubItemWindow = new MainMenuItem();
     this.cWindows = new XafBarLinkContainerItem();
     this.barMdiChildrenListItem = new BarMdiChildrenListItem();
     this.Window = new ActionContainerBarItem();
     this.barSubItemHelp = new MainMenuItem();
     this.cHelp = new ActionContainerMenuBarItem();
     this.cAbout = new ActionContainerMenuBarItem();
     this.standardToolBar = new XafBar();
     this._statusBar = new XafBar();
     this.mainBarAndDockingController = new BarAndDockingController(this.components);
     this.barDockControlTop = new BarDockControl();
     this.barDockControlBottom = new BarDockControl();
     this.barDockControlLeft = new BarDockControl();
     this.barDockControlRight = new BarDockControl();
     this.mainDockManager = new DockManager(this.components);
     this.imageList1 = new ImageList(this.components);
     this.dockPanelMenus = new DockPanel();
     this.dockPanel1_Container = new ControlContainer();
     this.rootMenuItemsActionContainer1 = new MenuItemsActionContainer();
     this.cMenu = new ActionContainerBarItem();
     this.barSubItemPanels = new BarSubItem();
     this.viewSitePanel = new PanelControl();
     this.formStateModelSynchronizerComponent = new FormStateModelSynchronizer(this.components);
     ((ISupportInitialize)this.documentManager).BeginInit();
     ((ISupportInitialize)this.mainBarManager).BeginInit();
     ((ISupportInitialize)this.mainBarAndDockingController).BeginInit();
     ((ISupportInitialize)this.mainDockManager).BeginInit();
     this.dockPanelMenus.SuspendLayout();
     this.dockPanel1_Container.SuspendLayout();
     ((ISupportInitialize)this.viewSitePanel).BeginInit();
     base.SuspendLayout();
     this.actionsContainersManager.ActionContainerComponents.Add(this.cObjectsCreation);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cFile);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cSave);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cPrint);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cExport);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cExit);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cUndoRedo);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cEdit);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cRecordEdit);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cOpenObject);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cPanels);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cViewsHistoryNavigation);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cMenus);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cRecordsNavigation);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cView);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cReports);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cDefault);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cSearch);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cFilters);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cFullTextSearch);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cAppearance);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cTools);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cOptions);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cDiagnostic);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cAbout);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cMenu);
     this.actionsContainersManager.ActionContainerComponents.Add(this.Window);
     this.actionsContainersManager.ActionContainerComponents.Add(this.cHelp);
     this.actionsContainersManager.ActionContainerComponents.Add(this.rootMenuItemsActionContainer1);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cObjectsCreation);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cSave);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cEdit);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cRecordEdit);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cOpenObject);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cUndoRedo);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cPrint);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cView);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cReports);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cExport);
     this.actionsContainersManager.ContextMenuContainers.Add(this.cMenu);
     this.actionsContainersManager.DefaultContainer = this.cDefault;
     this.modelSynchronizationManager.ModelSynchronizableComponents.Add(this.formStateModelSynchronizerComponent);
     this.modelSynchronizationManager.ModelSynchronizableComponents.Add(this.mainBarManager);
     this.viewSiteManager.ViewSiteControl = this.viewSitePanel;
     this.mainBarManager.Bars.AddRange(new Bar[]
     {
         this._mainMenuBar,
         this.standardToolBar,
         this._statusBar
     });
     this.mainBarManager.Controller = this.mainBarAndDockingController;
     this.mainBarManager.DockControls.Add(this.barDockControlTop);
     this.mainBarManager.DockControls.Add(this.barDockControlBottom);
     this.mainBarManager.DockControls.Add(this.barDockControlLeft);
     this.mainBarManager.DockControls.Add(this.barDockControlRight);
     this.mainBarManager.DockManager = this.mainDockManager;
     this.mainBarManager.Form = this;
     this.mainBarManager.Items.AddRange(new BarItem[]
     {
         this.barSubItemFile,
         this.barSubItemEdit,
         this.barSubItemView,
         this.barSubItemTools,
         this.barSubItemHelp,
         this.cFile,
         this.cObjectsCreation,
         this.cPrint,
         this.cExport,
         this.cSave,
         this.cEdit,
         this.cOpenObject,
         this.cUndoRedo,
         this.cAppearance,
         this.cReports,
         this.cExit,
         this.cRecordEdit,
         this.cRecordsNavigation,
         this.cViewsHistoryNavigation,
         this.cSearch,
         this.cFullTextSearch,
         this.cFilters,
         this.cView,
         this.cDefault,
         this.cTools,
         this.cMenus,
         this.cDiagnostic,
         this.cOptions,
         this.cAbout,
         this.cWindows,
         this.cPanels,
         this.cMenu,
         this.barSubItemWindow,
         this.barMdiChildrenListItem,
         this.Window,
         this.barSubItemPanels,
         this.cHelp
     });
     this.mainBarManager.MainMenu = this._mainMenuBar;
     this.mainBarManager.MaxItemId = 37;
     this.mainBarManager.StatusBar = this._statusBar;
     this.mainBarManager.Disposed += new EventHandler(this.mainBarManager_Disposed);
     this._mainMenuBar.BarName = "Main Menu";
     this._mainMenuBar.DockCol = 0;
     this._mainMenuBar.DockRow = 0;
     this._mainMenuBar.DockStyle = BarDockStyle.Top;
     this._mainMenuBar.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.barSubItemFile),
         new LinkPersistInfo(this.barSubItemEdit),
         new LinkPersistInfo(this.barSubItemView),
         new LinkPersistInfo(this.barSubItemTools),
         new LinkPersistInfo(this.barSubItemWindow),
         new LinkPersistInfo(this.barSubItemHelp)
     });
     this._mainMenuBar.OptionsBar.MultiLine = true;
     this._mainMenuBar.OptionsBar.UseWholeRow = true;
     this._mainMenuBar.TargetPageCategoryColor = Color.Empty;
     this._mainMenuBar.Text = "Main menu";
     this.barSubItemFile.Caption = "Файл";
     this.barSubItemFile.Id = 0;
     this.barSubItemFile.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cObjectsCreation, true),
         new LinkPersistInfo(this.cFile, true),
         new LinkPersistInfo(this.cSave, true),
         new LinkPersistInfo(this.cPrint, true),
         new LinkPersistInfo(this.cExport, true),
         new LinkPersistInfo(this.cExit, true)
     });
     this.barSubItemFile.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemFile.Name = "barSubItemFile";
     this.barSubItemFile.VisibleInRibbon = false;
     this.cObjectsCreation.ApplicationMenuIndex = 1;
     this.cObjectsCreation.ApplicationMenuItem = true;
     this.cObjectsCreation.TargetPageGroupCaption = null;
     this.cObjectsCreation.Caption = "Создание объектов";
     this.cObjectsCreation.ContainerId = "ObjectsCreation";
     this.cObjectsCreation.Id = 18;
     this.cObjectsCreation.MergeType = BarMenuMerge.MergeItems;
     this.cObjectsCreation.Name = "cObjectsCreation";
     this.cObjectsCreation.TargetPageCategoryColor = Color.Empty;
     this.cFile.ApplicationMenuIndex = 2;
     this.cFile.ApplicationMenuItem = true;
     this.cFile.TargetPageGroupCaption = null;
     this.cFile.Caption = "Файл";
     this.cFile.ContainerId = "File";
     this.cFile.Id = 5;
     this.cFile.MergeOrder = 2;
     this.cFile.MergeType = BarMenuMerge.MergeItems;
     this.cFile.Name = "cFile";
     this.cFile.TargetPageCategoryColor = Color.Empty;
     this.cSave.ApplicationMenuIndex = 7;
     this.cSave.ApplicationMenuItem = true;
     this.cSave.TargetPageGroupCaption = null;
     this.cSave.Caption = "Сохранить";
     this.cSave.ContainerId = "Save";
     this.cSave.Id = 8;
     this.cSave.MergeType = BarMenuMerge.MergeItems;
     this.cSave.Name = "cSave";
     this.cSave.TargetPageCategoryColor = Color.Empty;
     this.cPrint.ApplicationMenuIndex = 11;
     this.cPrint.ApplicationMenuItem = true;
     this.cPrint.TargetPageGroupCaption = null;
     this.cPrint.Caption = "Печать";
     this.cPrint.ContainerId = "Print";
     this.cPrint.Id = 6;
     this.cPrint.MergeType = BarMenuMerge.MergeItems;
     this.cPrint.Name = "cPrint";
     this.cPrint.TargetPageCategoryColor = Color.Empty;
     this.cExport.ApplicationMenuIndex = 10;
     this.cExport.ApplicationMenuItem = true;
     this.cExport.TargetPageGroupCaption = null;
     this.cExport.Caption = "Экспорт";
     this.cExport.ContainerId = "Export";
     this.cExport.Id = 7;
     this.cExport.MergeType = BarMenuMerge.MergeItems;
     this.cExport.Name = "cExport";
     this.cExport.TargetPageCategoryColor = Color.Empty;
     this.cExit.ApplicationMenuIndex = 900;
     this.cExit.ApplicationMenuItem = true;
     this.cExit.TargetPageGroupCaption = null;
     this.cExit.Caption = "Выход";
     this.cExit.ContainerId = "Exit";
     this.cExit.Id = 8;
     this.cExit.MergeOrder = 900;
     this.cExit.Name = "cExit";
     this.cExit.TargetPageCategoryColor = Color.Empty;
     this.barSubItemEdit.Caption = "Правка";
     this.barSubItemEdit.Id = 1;
     this.barSubItemEdit.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cUndoRedo, true),
         new LinkPersistInfo(this.cEdit, true),
         new LinkPersistInfo(this.cRecordEdit, true),
         new LinkPersistInfo(this.cOpenObject, true)
     });
     this.barSubItemEdit.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemEdit.Name = "barSubItemEdit";
     this.barSubItemEdit.VisibleInRibbon = false;
     this.cUndoRedo.Caption = "Отменить/Повторить";
     this.cUndoRedo.TargetPageGroupCaption = "Edit";
     this.cUndoRedo.ContainerId = "UndoRedo";
     this.cUndoRedo.Id = 10;
     this.cUndoRedo.MergeType = BarMenuMerge.MergeItems;
     this.cUndoRedo.Name = "cUndoRedo";
     this.cUndoRedo.TargetPageCategoryColor = Color.Empty;
     this.cEdit.TargetPageGroupCaption = null;
     this.cEdit.Caption = "Правка";
     this.cEdit.ContainerId = "Edit";
     this.cEdit.Id = 9;
     this.cEdit.MergeType = BarMenuMerge.MergeItems;
     this.cEdit.Name = "cEdit";
     this.cEdit.TargetPageCategoryColor = Color.Empty;
     this.cRecordEdit.TargetPageGroupCaption = null;
     this.cRecordEdit.Caption = "Изменить запись";
     this.cRecordEdit.ContainerId = "RecordEdit";
     this.cRecordEdit.Id = 9;
     this.cRecordEdit.MergeType = BarMenuMerge.MergeItems;
     this.cRecordEdit.Name = "cRecordEdit";
     this.cRecordEdit.TargetPageCategoryColor = Color.Empty;
     this.cOpenObject.TargetPageGroupCaption = null;
     this.cOpenObject.Caption = "Открыть объект";
     this.cOpenObject.ContainerId = "OpenObject";
     this.cOpenObject.Id = 9;
     this.cOpenObject.MergeType = BarMenuMerge.MergeItems;
     this.cOpenObject.Name = "cOpenObject";
     this.cOpenObject.TargetPageCategoryColor = Color.Empty;
     this.barSubItemView.Caption = "Вид";
     this.barSubItemView.Id = 2;
     this.barSubItemView.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cPanels, true),
         new LinkPersistInfo(this.cViewsHistoryNavigation, true),
         new LinkPersistInfo(this.cMenus, true),
         new LinkPersistInfo(this.cRecordsNavigation, true),
         new LinkPersistInfo(this.cView, true),
         new LinkPersistInfo(this.cReports, true),
         new LinkPersistInfo(this.cDefault, true),
         new LinkPersistInfo(this.cSearch, true),
         new LinkPersistInfo(BarLinkUserDefines.None, false, this.cFilters, true),
         new LinkPersistInfo(BarLinkUserDefines.None, false, this.cFullTextSearch, true),
         new LinkPersistInfo(this.cAppearance, true)
     });
     this.barSubItemView.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemView.Name = "barSubItemView";
     this.cPanels.Caption = "Панели";
     this.cPanels.TargetPageGroupCaption = null;
     this.cPanels.TargetPageCaption = "View";
     this.cPanels.ContainerId = "Panels";
     this.cPanels.Id = 16;
     this.cPanels.MergeType = BarMenuMerge.MergeItems;
     this.cPanels.Name = "cPanels";
     this.cPanels.TargetPageCategoryColor = Color.Empty;
     this.cViewsHistoryNavigation.TargetPageGroupCaption = null;
     this.cViewsHistoryNavigation.Caption = "Просмотр истории навигации";
     this.cViewsHistoryNavigation.ContainerId = "ViewsHistoryNavigation";
     this.cViewsHistoryNavigation.Id = 35;
     this.cViewsHistoryNavigation.MergeType = BarMenuMerge.MergeItems;
     this.cViewsHistoryNavigation.Name = "cViewsHistoryNavigation";
     this.cViewsHistoryNavigation.TargetPageCategoryColor = Color.Empty;
     this.cMenus.TargetPageGroupCaption = null;
     this.cMenus.Caption = "Меню";
     this.cMenus.ContainerId = "Menus";
     this.cMenus.Id = 14;
     this.cMenus.MergeType = BarMenuMerge.MergeItems;
     this.cMenus.Name = "cMenus";
     this.cMenus.TargetPageCategoryColor = Color.Empty;
     this.cRecordsNavigation.TargetPageGroupCaption = null;
     this.cRecordsNavigation.Caption = "Записи навигации";
     this.cRecordsNavigation.ContainerId = "RecordsNavigation";
     this.cRecordsNavigation.Id = 10;
     this.cRecordsNavigation.MergeType = BarMenuMerge.MergeItems;
     this.cRecordsNavigation.Name = "cRecordsNavigation";
     this.cRecordsNavigation.TargetPageCategoryColor = Color.Empty;
     this.cView.TargetPageGroupCaption = null;
     this.cView.Caption = "Вид";
     this.cView.ContainerId = "View";
     this.cView.Id = 12;
     this.cView.MergeType = BarMenuMerge.MergeItems;
     this.cView.Name = "cView";
     this.cView.TargetPageCategoryColor = Color.Empty;
     this.cReports.ApplicationMenuIndex = 12;
     this.cReports.ApplicationMenuItem = true;
     this.cReports.TargetPageGroupCaption = "View";
     this.cReports.Caption = "Отчеты";
     this.cReports.ContainerId = "Reports";
     this.cReports.Id = 11;
     this.cReports.MergeType = BarMenuMerge.MergeItems;
     this.cReports.Name = "cReports";
     this.cReports.TargetPageCategoryColor = Color.Empty;
     this.cDefault.TargetPageGroupCaption = null;
     this.cDefault.Caption = "По умолчанию";
     this.cDefault.ContainerId = "Default";
     this.cDefault.Id = 50;
     this.cDefault.MergeType = BarMenuMerge.MergeItems;
     this.cDefault.Name = "cDefault";
     this.cDefault.TargetPageCategoryColor = Color.Empty;
     this.cSearch.TargetPageGroupCaption = null;
     this.cSearch.Caption = "Поиск";
     this.cSearch.ContainerId = "Search";
     this.cSearch.Id = 11;
     this.cSearch.MergeType = BarMenuMerge.MergeItems;
     this.cSearch.Name = "cSearch";
     this.cSearch.TargetPageCategoryColor = Color.Empty;
     this.cFilters.TargetPageGroupCaption = null;
     this.cFilters.Caption = "Фильтры";
     this.cFilters.ContainerId = "Filters";
     this.cFilters.Id = 26;
     this.cFilters.MergeType = BarMenuMerge.MergeItems;
     this.cFilters.Name = "cFilters";
     this.cFilters.TargetPageCategoryColor = Color.Empty;
     this.cFullTextSearch.Alignment = BarItemLinkAlignment.Right;
     this.cFullTextSearch.TargetPageGroupCaption = null;
     this.cFullTextSearch.Caption = "Полнотекстовый поиск";
     this.cFullTextSearch.ContainerId = "FullTextSearch";
     this.cFullTextSearch.Id = 12;
     this.cFullTextSearch.MergeType = BarMenuMerge.MergeItems;
     this.cFullTextSearch.Name = "cFullTextSearch";
     this.cFullTextSearch.TargetPageCategoryColor = Color.Empty;
     this.cAppearance.TargetPageGroupCaption = null;
     this.cAppearance.Caption = "Внешний вид";
     this.cAppearance.ContainerId = "Appearance";
     this.cAppearance.Id = 9;
     this.cAppearance.MergeType = BarMenuMerge.MergeItems;
     this.cAppearance.Name = "cAppearance";
     this.cAppearance.TargetPageCategoryColor = Color.Empty;
     this.barSubItemTools.Caption = "Инструменты";
     this.barSubItemTools.Id = 3;
     this.barSubItemTools.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cTools, true),
         new LinkPersistInfo(this.cOptions, true),
         new LinkPersistInfo(this.cDiagnostic, true)
     });
     this.barSubItemTools.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemTools.Name = "barSubItemTools";
     this.cTools.TargetPageGroupCaption = null;
     this.cTools.Caption = "Инструменты";
     this.cTools.ContainerId = "Tools";
     this.cTools.Id = 13;
     this.cTools.MergeType = BarMenuMerge.MergeItems;
     this.cTools.Name = "cTools";
     this.cTools.TargetPageCategoryColor = Color.Empty;
     this.cOptions.TargetPageGroupCaption = null;
     this.cOptions.Caption = "Настройки";
     this.cOptions.ContainerId = "Options";
     this.cOptions.Id = 14;
     this.cOptions.MergeType = BarMenuMerge.MergeItems;
     this.cOptions.Name = "cOptions";
     this.cOptions.TargetPageCategoryColor = Color.Empty;
     this.cDiagnostic.TargetPageGroupCaption = null;
     this.cDiagnostic.Caption = "Диагностика";
     this.cDiagnostic.ContainerId = "Diagnostic";
     this.cDiagnostic.Id = 16;
     this.cDiagnostic.MergeType = BarMenuMerge.MergeItems;
     this.cDiagnostic.Name = "cDiagnostic";
     this.cDiagnostic.TargetPageCategoryColor = Color.Empty;
     this.barSubItemWindow.Caption = "Окно";
     this.barSubItemWindow.Id = 32;
     this.barSubItemWindow.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cWindows),
         new LinkPersistInfo(this.Window, true)
     });
     this.barSubItemWindow.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemWindow.Name = "barSubItemWindow";
     this.cWindows.TargetPageCaption = "View";
     this.cWindows.TargetPageCategoryCaption = null;
     this.cWindows.Caption = "Окна";
     this.cWindows.TargetPageGroupCaption = null;
     this.cWindows.Id = 16;
     this.cWindows.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.barMdiChildrenListItem)
     });
     this.cWindows.MergeType = BarMenuMerge.MergeItems;
     this.cWindows.Name = "cWindows";
     this.cWindows.TargetPageCategoryColor = Color.Empty;
     this.barMdiChildrenListItem.Caption = "Список окон";
     this.barMdiChildrenListItem.Id = 37;
     this.barMdiChildrenListItem.Name = "barMdiChildrenListItem";
     this.Window.TargetPageCaption = "View";
     this.Window.TargetPageGroupCaption = "Windows";
     this.Window.Caption = "Окно";
     this.Window.ContainerId = "Windows";
     this.Window.Id = 34;
     this.Window.MergeType = BarMenuMerge.MergeItems;
     this.Window.Name = "Window";
     this.Window.TargetPageCategoryColor = Color.Empty;
     this.barSubItemHelp.Caption = "Помощь";
     this.barSubItemHelp.Id = 4;
     this.barSubItemHelp.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cHelp, true),
         new LinkPersistInfo(this.cAbout, true)
     });
     this.barSubItemHelp.MergeType = BarMenuMerge.MergeItems;
     this.barSubItemHelp.Name = "barSubItemHelp";
     this.barSubItemHelp.VisibleInRibbon = false;
     this.cHelp.Caption = "Помощь";
     this.cHelp.TargetPageGroupCaption = null;
     this.cHelp.ContainerId = "Help";
     this.cHelp.Id = 36;
     this.cHelp.MergeType = BarMenuMerge.MergeItems;
     this.cHelp.Name = "cHelp";
     this.cHelp.TargetPageCategoryColor = Color.Empty;
     this.cAbout.ApplicationMenuIndex = 15;
     this.cAbout.ApplicationMenuItem = true;
     this.cAbout.Caption = "О программе";
     this.cAbout.TargetPageGroupCaption = null;
     this.cAbout.ContainerId = "About";
     this.cAbout.Id = 15;
     this.cAbout.MergeType = BarMenuMerge.MergeItems;
     this.cAbout.Name = "cAbout";
     this.cAbout.TargetPageCategoryColor = Color.Empty;
     this.standardToolBar.BarName = "Main Toolbar";
     this.standardToolBar.DockCol = 0;
     this.standardToolBar.DockRow = 1;
     this.standardToolBar.DockStyle = BarDockStyle.Top;
     this.standardToolBar.LinksPersistInfo.AddRange(new LinkPersistInfo[]
     {
         new LinkPersistInfo(this.cViewsHistoryNavigation, true),
         new LinkPersistInfo(this.cObjectsCreation, true),
         new LinkPersistInfo(this.cSave, true),
         new LinkPersistInfo(this.cEdit, true),
         new LinkPersistInfo(this.cUndoRedo, true),
         new LinkPersistInfo(this.cRecordEdit, true),
         new LinkPersistInfo(this.cOpenObject),
         new LinkPersistInfo(this.cView, true),
         new LinkPersistInfo(this.cReports),
         new LinkPersistInfo(this.cDefault, true),
         new LinkPersistInfo(this.cRecordsNavigation, true),
         new LinkPersistInfo(this.cFilters, true),
         new LinkPersistInfo(this.cSearch, true),
         new LinkPersistInfo(this.cFullTextSearch)
     });
     this.standardToolBar.OptionsBar.UseWholeRow = true;
     this.standardToolBar.TargetPageCategoryColor = Color.Empty;
     this.standardToolBar.Text = "Main Toolbar";
     this._statusBar.BarName = "StatusBar";
     this._statusBar.CanDockStyle = BarCanDockStyle.Bottom;
     this._statusBar.DockCol = 0;
     this._statusBar.DockRow = 0;
     this._statusBar.DockStyle = BarDockStyle.Bottom;
     this._statusBar.OptionsBar.AllowQuickCustomization = false;
     this._statusBar.OptionsBar.DisableClose = true;
     this._statusBar.OptionsBar.DisableCustomization = true;
     this._statusBar.OptionsBar.DrawDragBorder = false;
     this._statusBar.OptionsBar.DrawSizeGrip = true;
     this._statusBar.OptionsBar.UseWholeRow = true;
     this._statusBar.TargetPageCategoryColor = Color.Empty;
     this._statusBar.Text = "Status Bar";
     this.mainBarAndDockingController.PropertiesBar.AllowLinkLighting = false;
     this.barDockControlTop.CausesValidation = false;
     this.barDockControlTop.Parent = this;
     this.barDockControlTop.Size = new Size(792, 51);
     this.barDockControlTop.Dock = DockStyle.Top;
     this.barDockControlTop.Location = new Point(0, 0);
     // this.barDockControlTop.ZOrder = 6;
     this.barDockControlBottom.CausesValidation = false;
     this.barDockControlBottom.Parent = this;
     this.barDockControlBottom.Size = new Size(792, 23);
     this.barDockControlBottom.Dock = DockStyle.Bottom;
     this.barDockControlBottom.Location = new Point(0, 543);
     // this.barDockControlBottom.ZOrder = 5;
     this.barDockControlLeft.CausesValidation = false;
     this.barDockControlLeft.Parent = this;
     // this.barDockControlLeft.ZOrder = 3;
     this.barDockControlLeft.Location = new Point(0, 51);
     this.barDockControlLeft.Dock = DockStyle.Left;
     this.barDockControlLeft.Size = new Size(0, 492);
     this.barDockControlRight.CausesValidation = false;
     this.barDockControlRight.Parent = this;
     // this.barDockControlRight.ZOrder = 4;
     this.barDockControlRight.Location = new Point(792, 51);
     this.barDockControlRight.Dock = DockStyle.Right;
     this.barDockControlRight.Size = new Size(0, 492);
     this.mainDockManager.Controller = this.mainBarAndDockingController;
     this.mainDockManager.Form = this;
     this.mainDockManager.Images = this.imageList1;
     this.mainDockManager.MenuManager = this.mainBarManager;
     this.mainDockManager.RootPanels.AddRange(new DockPanel[]
     {
         this.dockPanelMenus
     });
     this.mainDockManager.TopZIndexControls.AddRange(new string[]
     {
         "DevExpress.XtraBars.BarDockControl",
         "System.Windows.Forms.StatusBar",
         "DevExpress.ExpressApp.Win.Templates.Controls.XafRibbonControl",
         "DevExpress.XtraBars.Ribbon.RibbonStatusBar"
     });
     this.imageList1.ColorDepth = ColorDepth.Depth32Bit;
     this.imageList1.ImageSize = new Size(16, 16);
     this.imageList1.TransparentColor = Color.Transparent;
     this.dockPanelMenus.Controls.Add(this.dockPanel1_Container);
     this.dockPanelMenus.Dock = DockingStyle.Left;
     this.dockPanelMenus.ID = new Guid("17f71733-1ca6-4a29-aa2c-56cbcc2b43dd");
     this.dockPanelMenus.Size = new Size(200, 492);
     this.dockPanelMenus.Text = "Навигация";
     this.dockPanelMenus.Parent = this;
     this.dockPanelMenus.Location = new Point(0, 51);
     this.dockPanelMenus.Name = "dockPanelMenus";
     this.dockPanelMenus.Options.AllowDockBottom = false;
     this.dockPanelMenus.Options.AllowDockTop = false;
     this.dockPanelMenus.OriginalSize = new Size(200, 200);
     this.dockPanelMenus.TabStop = false;
     this.dockPanelMenus.Tag = "Menus";
     this.dockPanel1_Container.Controls.Add(this.rootMenuItemsActionContainer1);
     this.dockPanel1_Container.Parent = dockPanelMenus;
     this.dockPanel1_Container.Location = new Point(4, 23);
     this.dockPanel1_Container.Size = new Size(192, 465);
     this.dockPanel1_Container.TabIndex = 0;
     this.dockPanel1_Container.Name = "dockPanel1_Container";
     this.rootMenuItemsActionContainer1.Parent = dockPanel1_Container;
     this.rootMenuItemsActionContainer1.TabIndex = 0;
     this.rootMenuItemsActionContainer1.Size = new Size(192, 465);
     this.rootMenuItemsActionContainer1.Dock = DockStyle.Fill;
     this.rootMenuItemsActionContainer1.Location = new Point(0, 0);
     this.rootMenuItemsActionContainer1.Name = "rootMenuItemsActionContainer1";
     this.cMenu.Caption = "Меню";
     this.cMenu.TargetPageGroupCaption = null;
     this.cMenu.ContainerId = "Menu";
     this.cMenu.Id = 7;
     this.cMenu.Name = "cMenu";
     this.cMenu.TargetPageCategoryColor = Color.Empty;
     this.barSubItemPanels.Caption = "Панели";
     this.barSubItemPanels.Id = 35;
     this.barSubItemPanels.Name = "barSubItemPanels";
     this.viewSitePanel.BorderStyle = BorderStyles.NoBorder;
     this.viewSitePanel.Parent = this;
     this.viewSitePanel.Location = new Point(200, 51);
     this.viewSitePanel.Size = new Size(592, 492);
     this.viewSitePanel.Dock = DockStyle.Fill;
     this.viewSitePanel.TabIndex = 4;
     this.viewSitePanel.Name = "viewSitePanel";
     this.formStateModelSynchronizerComponent.Form = this;
     this.formStateModelSynchronizerComponent.Model = null;
     this.Text = "MainForm";
     this.ClientSize = new Size(792, 566);
     // this.Margin = new Padding(3, 5, 3, 5);
     this.AutoScaleDimensions = new SizeF(6, 13);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.BarManager = this.mainBarManager;
     base.Controls.Add(this.viewSitePanel);
     base.Controls.Add(this.dockPanelMenus);
     base.Controls.Add(this.barDockControlLeft);
     base.Controls.Add(this.barDockControlRight);
     base.Controls.Add(this.barDockControlBottom);
     base.Controls.Add(this.barDockControlTop);
     base.IsMdiContainer = true;
     base.Name = "MenusMainForm";
     ((ISupportInitialize)this.documentManager).EndInit();
     ((ISupportInitialize)this.mainBarManager).EndInit();
     ((ISupportInitialize)this.mainBarAndDockingController).EndInit();
     ((ISupportInitialize)this.mainDockManager).EndInit();
     this.dockPanelMenus.ResumeLayout(false);
     this.dockPanel1_Container.ResumeLayout(false);
     ((ISupportInitialize)this.viewSitePanel).EndInit();
     base.ResumeLayout(false);
 }
Esempio n. 25
0
 public void onHover (MainMenuItem item)
 {
     //Debug.Log(string.Format("onHover({0})", item._itemName));
     Logger.Log (item.itemName + " onHover", Logger.Level.DEBUG);
     selectItem (item.itemName);
 }
Esempio n. 26
0
 void TemplatesMaster_ViewChanged(object sender, MainMenuItem e)
 {
     _treeControl.ShowFileNames = TemplatesMaster.ShowFileNames;
     _treeControl.Refresh();
 }
Esempio n. 27
0
 public static void replaceTextBy(string target, string replacement, MainMenuItem[] items, string debug = "") {
     //Debug.Log(string.Format("replaceTextBy({0}, {1}, {2}, {3})", target, replacement, MainMenuItemArray.ToString(items), debug));
     for(int index = 0; index < items.Length; index++) {
         if(items[index].itemName == target) {
             items[index].itemName = replacement;
             MainMenuManager.redraw (items);
             return;
         }
     }
     Logger.Log("MainMenuManager::MainMenuItem::replaceTextBy static "+debug+" FAIL with target="+target+" and replacement="+replacement, Logger.Level.WARN);
 }
Esempio n. 28
0
 void menu_Click(object sender, MainMenuItem e)
 {
     switch (e.Id) {
         case "Restart": WAFContext.Restart(); break;
         case "Reset": WAFContext.Reset(); break;
         case "ResetSession": {
                 var thisGuid = WAFContext.Session.SessionId;
                 foreach (var s in WAFContext.Engine.GetAllSessions()) {
                     if (s.SessionId != thisGuid && s.SessionId != WAFContext.Engine.SystemSession.SessionId) s.Dispose();
                 }
                 WAFContext.Session.Notify("Session are reset. ");
                 WAFContext.Session.QueUIAction(new UIActionRefreshPage(Guid.Empty));
             }
             break;
         case "ClearCache": WAFContext.Engine.ClearCache(); break;
         case "ClearIndexQue": WAFRuntime.Engine.Dao.ClearIndexQue(); break;
         case "GetIndexQueInfo": WAFContext.Session.Notify(DialogueIcon.Info, "Index que statistics", WAFRuntime.Engine.Dao.GetActionQueStatistics()); break;
         case "DeleteSearchIndex":
             try {
                 WAFRuntime.Engine.Dao.DeleteIndex();
                 WAFContext.Session.Notify(DialogueIcon.Info, "The search index was deleted", "Rebuild index to recreate it. ");
             } catch (Exception error) {
                 WAFContext.Session.Notify(error);
             }
             break;
         case "Setup":
             Session["WAF_AllowSystemSetup"] = true;
             Response.Write("<script type=\"text/javascript\">window.parent.parent.location=\"" + WAFContext.UrlFromRootToApp + WAFContext.UrlFromAppToSystemSetup + "\";</script>");
             Response.End();
             //Response.Redirect();
             break;
         case "FlushGC": GC.Collect(); break;
         default: break;
     }
 }
Esempio n. 29
0
 public static void setVisibility (MainMenuItem[] items, string itemKey, bool isVisible, string debug = null, float spacing = defaultVerticalSpacing) {
     //Debug.Log(string.Format("setVisibility({0},{1},{2},{3},{4})", MainMenuItemArray.ToString(items), itemKey, isVisible.ToString(), debug, spacing.ToString()));
     if(!string.IsNullOrEmpty(debug)) {
         //Debug.LogError("MainMenuManager::setVisibility(items, "+itemKey+", "+isVisible+", "+debug+", "+spacing);
     }
     for(int index = 0; index < items.Length; index++) {
         items[index].initializeIfNecessary();
         if(items[index].itemName == itemKey) {
             items[index].displayed = isVisible;
             if(!string.IsNullOrEmpty(debug)) {
                 //Debug.LogError("MainMenuManager::setVisibility "+debug+" found "+itemKey+" and set its visibility to "+isVisible);
             }
             break;
         } else if(!string.IsNullOrEmpty(debug)) {
             //Debug.LogError("MainMenuManager::setVisibility "+debug+": '"+itemKey+"'≠'"+items[index].itemName+"'");
         } 
     }
     MainMenuManager.redraw (items, debug, spacing);
 }
Esempio n. 30
0
        public MainMenuItem[] CreateMainMenuItems()
        {
            var mTasks = new MainMenuItem("Tasks");
            mTasks.MainMenuLocation = MainMenuLocation.Separate;

            var mAddTask = new MainMenuItem("Add Task ...");
            mAddTask.Click += (sender, args) => SetDueDateUsingPicker();
            mAddTask.AddSeparator = true;
            mTasks.AddDropDownItem(mAddTask);

            var mAddTaskDueToday = new MainMenuItem("Due Today");
            mAddTaskDueToday.Click += (sender, args) => SetDueDateToday();
            mTasks.AddDropDownItem(mAddTaskDueToday);

            var mAddTaskDueTomorrow = new MainMenuItem("Tomorrow");
            mAddTaskDueTomorrow.Click += (sender, args) => SetDueDateTomorrow();
            mTasks.AddDropDownItem(mAddTaskDueTomorrow);

            var mAddTaskDueNextWeek = new MainMenuItem("Next Week");
            mAddTaskDueNextWeek.Click += (sender, args) => SetDueDateNextWeek();
            mTasks.AddDropDownItem(mAddTaskDueNextWeek);

            var mAddTaskDueNextMonth = new MainMenuItem("Next Month");
            mAddTaskDueNextMonth.Click += (sender, args) => SetDueDateNextMonth();
            mTasks.AddDropDownItem(mAddTaskDueNextMonth);

            var mAddTaskDueNextQuarter = new MainMenuItem("Next Quarter");
            mAddTaskDueNextQuarter.Click += (sender, args) => SetDueDateNextQuarter();
            mAddTaskDueNextQuarter.AddSeparator = true;
            mTasks.AddDropDownItem(mAddTaskDueNextQuarter);

            var mCompleteTask = new MainMenuItem("Complete Task");
            mCompleteTask.Click += (sender, args) => CompleteTask();
            mCompleteTask.AddSeparator = true;
            mTasks.AddDropDownItem(mCompleteTask);

            var mRemoveTask = new MainMenuItem("Remove Task");
            mRemoveTask.Click += (sender, args) => RemoveTask();
            mRemoveTask.AddSeparator = true;
            mTasks.AddDropDownItem(mRemoveTask);

            var mCalendar = new MainMenuItem("View Calendar");
            mCalendar.Click = OnCalendarMenuClick;
            mTasks.AddDropDownItem(mCalendar);

            return new MainMenuItem[] { mTasks };
        }
Esempio n. 31
0
 public static void redraw (MainMenuItem[] items, string debug = null, float spacing = defaultVerticalSpacing) {
     //Debug.Log(string.Format("redraw({0}, {1}, {2})", MainMenuItemArray.ToString(items), debug, spacing.ToString()));
     if(!string.IsNullOrEmpty(debug)) {
         //Debug.LogError("MainMenuManager::redraw "+debug);
     }
     if(items.Length != 0) {
         Vector2 nextRelativeOffset = items[0].anchor.relativeOffset;
         foreach(MainMenuItem item in items)
         {
             item.gameObject.SetActive(item.displayed);
             if(!string.IsNullOrEmpty(debug)) {
                 //Debug.LogError("MainMenuManager::redraw "+debug+" set "+item.itemName+" activity to "+item.displayed);
             }
             if(item.displayed) {
                 item.anchor.relativeOffset = nextRelativeOffset;
                 nextRelativeOffset = new Vector2(nextRelativeOffset.x, nextRelativeOffset.y + spacing);
             }
         }
     } else {
         Logger.Log("MainMenuManager::redraw static no item", Logger.Level.WARN);
     }
 }
 public SetupViewModel(INavigation navigation, DatabaseService databaseService)
 {
     this.navigation      = navigation;
     this.databaseService = databaseService;
     Title = MainMenuItem.GetMenus().Where(w => w.Id == MenuItemType.Setup).First().Title;
 }
Esempio n. 33
0
    void menu_Click(object sender, MainMenuItem e)
    {
        if (e.Id == "Newsletter_AddNewsletter") {
            Newsletter nl = WAFContext.Session.NewContent<Newsletter>();

            nl.Name = Local.Text("Web.WAF.Edit.Newsletter.NewsletterMasterNewNewsletter");
            nl.UpdateChanges();
            e.Id = nl.Key.ToString();
            if (NewsletterCreated != null) {
                NewsletterCreated(this,e);
            }
        } else if (e.Id == "Newsletter_AddSubscriberList") {
            NewsletterRecipientList nlrl = WAFContext.Session.NewContent<NewsletterRecipientList>();

            nlrl.Name = Local.Text("Web.WAF.Edit.Newsletter.NewsletterMasterNewSubscriberlist");
            nlrl.UpdateChanges();
            e.Id = nlrl.Key.ToString();
            if (SubscriberListCreated != null) {
                SubscriberListCreated(this, e);
            }
        } else if (e.Id == "Newsletter_SendBasic") {
            WMSendBasicNewsletter wmSendBasic = new WMSendBasicNewsletter();
            WAFContext.Session.StartWorkflowMethod(wmSendBasic);
        } else if (e.Id == "Newsletter_SendRegular") {
            WMSendRegularNewsletter wmSendRegular = new WMSendRegularNewsletter();
            WAFContext.Session.StartWorkflowMethod(wmSendRegular);
        }
    }
Esempio n. 34
0
 void menu_Click(object sender, MainMenuItem e)
 {
     switch (e.Id) {
         case "FullRebuildXml": DefinitionFullRebuildXml(); break;
         case "HotRebuildXml": DefinitionHotRebuildXml(); break;
         case "DBRebuildXml": DefinitionDbRebuildXml(); break;
         case "CreateTemporaryXML": DefinitionCreateXml(); break;
         case "DeleteTemporaryXML": DefinitionDeleteXml(); break;
         case "ValidateFullXml": WAFContext.StartWorkflowMethod(new WMValidateDefinitions(false, true)); break;
         case "ValidateHotXml": WAFContext.StartWorkflowMethod(new WMValidateDefinitions(true, true)); break;
         // case "EditXMLDef": DefinitionEditXml(); break;
         case "DownloadXMLDef": WAFContext.StartWorkflowMethod(new WMSendFile(WAFContext.PathCustomDefinitions + "ContentDefinitionsTemp.xml", false)); break;
         case "UploadXMLDef": WAFContext.StartWorkflowMethod(new UploadXmlDef()); break;
         case "EnsureDb": WAFContext.StartWorkflowMethod(new EnsuringDatabaseFields()); break;
         case "DownloadDb": WAFContext.StartWorkflowMethod(new DownloadDatabase()); break;
         case "UploadDb": WAFContext.StartWorkflowMethod(new UploadDatabase()); break;
         case "Restart": WAFContext.Restart(); break;
         case "Reset": WAFContext.Reset(); break;
         case "View_NativeTypes": if (NativeViewChanged != null) { NativeViewChanged(sender, e); } break;
         case "MergeOntology": WAFContext.StartWorkflowMethod(new MergeOntology()); break;
         case "ExportOntology": WAFContext.StartWorkflowMethod(new ExportOntology()); break;
         case "CopyOntology": WAFContext.StartWorkflowMethod(new CopyOntology()); break;
         case "LoadDefNoIds": WAFContext.StartWorkflowMethod(new LoadDefNoIds()); break;
         case "LoadDefNoGuids": WAFContext.StartWorkflowMethod(new LoadDefNoGuids()); break;
         default: break;
     }
 }
 protected override void ViewAppearing(object sender, EventArgs e)
 {
     base.ViewAppearing(sender, e);
     Title = MainMenuItem.GetMenus().Where(w => w.Id == MenuItemType.DepartmentList).First().Title;
     Items = databaseService.GetDepartments();
 }
Esempio n. 36
0
 void menu_Click(object sender, MainMenuItem e)
 {
     try {
         initLinkGraph();
         //MainMenu menu = WAFMaster.EditModule.Menu;
         contentTree.IncludeDeleted = WAFMaster.EditModule.Menu.IsItemChecked("View_Deleted");
         contentForm.IncludeDeleted = WAFMaster.EditModule.Menu.IsItemChecked("View_Deleted");
         contentTree.IncludeUnpublished = WAFMaster.EditModule.Menu.IsItemChecked("View_Unpublished");
         contentTree.ShowIDs = WAFMaster.EditModule.Menu.IsItemChecked("View_IDs");
         contentForm.IncludeUnpublished = WAFMaster.EditModule.Menu.IsItemChecked("View_Unpublished");
         if (e.Id == "Content_NewSelected") {
             foreach (string skey in contentTree.GetSelectedValues()) {
                 CKeyNLR key = new CKeyNLR(skey);
                 if (WAFContext.Session.NodeExists(key.NodeId, true, true)) {
                     HierarchicalContent hContent = WAFContext.Session.GetContent<HierarchicalContent>(key.NodeId);
                     HierarchicalContent hNewContent = (HierarchicalContent)WAFContext.Session.NewContent(hContent.ClassId);
                     hNewContent.Name = WAFContext.Session.Definitions.ContentClass[hContent.ClassId].GetName(WAFContext.Session);
                     if (hContent.Parent.IsSet()) hNewContent.Parent.Set(hContent.Parent.GetKey());
                     hNewContent.UpdateChanges();
                 }
             }
         } else if (e.Id == "Translate") {
             WAFContext.StartWorkflowMethod(new Translate());
         } else if (e.Id == "View_AdvancedPropertyOptions") {
             if (contentForm.Content != null) WAFContext.RedirectToEdit(contentForm.ContentKey);
         } else if (e.Id == "Content_Delete") {
             deleteContents m = new deleteContents();
             m.Keys = new List<CKeyNLR>();
             foreach (string skey in contentTree.GetSelectedValues()) m.Keys.Add(new CKeyNLR(skey));
             string msg = "Delete " + m.Keys.Count + " content(s) and their children to the wastebin?";
             WAFContext.StartWorkflowMethod(m, msg);
         }
     } catch (Exception error) {
         WAFContext.Session.Notify(DialogueIcon.Info, "This is not possible", error.Message);
     }
 }
Esempio n. 37
0
 public void onHover(MainMenuItem item)
 {
     //Debug.Log(string.Format("onHover({0})", item._itemName));
     Logger.Log(item.itemName + " onHover", Logger.Level.DEBUG);
     selectItem(item.itemName);
 }