Exemplo n.º 1
0
        private void SaveOutMenus(MOG_PropertiesIni ripMenu, TreeNodeCollection nodes)
        {
            foreach (TreeNode node in nodes)
            {
                PropertyProperty property = node.Tag as PropertyProperty;
                if (property != null)
                {
                    if (node.Parent.Text == "Root")
                    {
                        ripMenu.PutString("Property.Menu", "{MenuItem}" + property.MenuText, "[" + property.PropertyCategory + "]" + "{" + property.PropertySubCategory + "}" + property.PropertyName + "=" + property.PropertyValue);
                    }
                    else
                    {
                        ripMenu.PutString(node.Parent.Text, "{MenuItem}" + property.MenuText, "[" + property.PropertyCategory + "]" + "{" + property.PropertySubCategory + "}" + property.PropertyName + "=" + property.PropertyValue);
                    }
                }
                else
                {
                    PropertyMenu menu = node.Tag as PropertyMenu;
                    if (menu != null)
                    {
                        if (node.Parent.Text == "Root")
                        {
                            ripMenu.PutString("Property.Menu", "{MenuItem}" + menu.MenuText, menu.MenuText);
                        }
                        else
                        {
                            ripMenu.PutString(node.Parent.Text, "{MenuItem}" + menu.MenuText, menu.MenuText);
                        }

                        // Menus ALWAYS require a section...even if it is blank!
                        ripMenu.PutSection(menu.MenuText);
                    }
                }

                if (node.Nodes.Count > 0)
                {
                    SaveOutMenus(ripMenu, node.Nodes);
                }
            }
        }
Exemplo n.º 2
0
        private void WebTabAddButton_Click(object sender, EventArgs e)
        {
            if (WebTabTitleTextBox.Text.Length != 0 &&
                WebTabURLTextBox.Text.Length != 0)
            {
                MOG_PropertiesIni project = MOG_ControllerProject.GetProject().GetConfigFile();
                if (project != null)
                {
                    project.PutSectionString("WebTabs", WebTabTitleTextBox.Text);
                    project.PutString("WebTab_" + WebTabTitleTextBox.Text, "Title", WebTabTitleTextBox.Text);
                    project.PutString("WebTab_" + WebTabTitleTextBox.Text, "URL", WebTabURLTextBox.Text);
                    project.PutString("WebTab_" + WebTabTitleTextBox.Text, "POSITION", "-1");
                    project.Save();

                    ListViewItem item = new ListViewItem(WebTabTitleTextBox.Text);
                    item.SubItems.Add(WebTabURLTextBox.Text);
                    item.SubItems.Add("");

                    WebTabTabsListView.Items.Add(item);

                    SavePositionSettings(project);
                }
            }
        }
Exemplo n.º 3
0
        private void SavePositionSettings(MOG_PropertiesIni project)
        {
            if (project == null)
            {
                project = MOG_ControllerProject.GetProject().GetConfigFile();
            }

            int i = 0;

            if (project != null)
            {
                foreach (ListViewItem item in WebTabTabsListView.Items)
                {
                    item.SubItems[2].Text = i.ToString();
                    project.PutString("WebTab_" + item.Text, "POSITION", item.SubItems[2].Text);
                    i++;
                }

                project.Save();
            }
        }
Exemplo n.º 4
0
 private void ConstructDefaultSkin(string filename)
 {
     mSkinDef = new MOG_PropertiesIni(filename);
     mSkinDef.PutString("Workspace", "{Inbox}Button.Rest", "Skin\\InboxButton(Rest).png");
     mSkinDef.PutString("Workspace", "{Inbox}Button.Hover", "Skin\\InboxButton(Hover).png");
     mSkinDef.PutString("Workspace", "{Inbox}Button.Pressed", "Skin\\InboxButton(Pressed).png");
     mSkinDef.PutString("Workspace", "{Inbox}BackgroundBarMiddle", "Skin\\WideBar_Middle.png");
     mSkinDef.PutString("Workspace", "{Inbox}BackgroundBarEnd", "Skin\\WideBar_End.png");
     mSkinDef.PutString("Workspace", "{MyTasks}Button.Rest", "Skin\\TasksButton(Rest).png");
     mSkinDef.PutString("Workspace", "{MyTasks}Button.Hover", "None");
     mSkinDef.PutString("Workspace", "{MyTasks}Button.Pressed", "None");
     mSkinDef.PutString("Workspace", "{MyTasks}BackgroundBarMiddle", "Skin\\ThinBar_Middle.png");
     mSkinDef.PutString("Workspace", "{MyTasks}BackgroundBarEnd", "Skin\\ThinBar_End.png");
     mSkinDef.PutString("Workspace", "{LocalExplorer}Button.Rest", "Skin\\LocalExplorerButton(Rest).png");
     mSkinDef.PutString("Workspace", "{LocalExplorer}Button.Hover", "None");
     mSkinDef.PutString("Workspace", "{LocalExplorer}Button.Pressed", "None");
     mSkinDef.PutString("Workspace", "{LocalExplorer}BackgroundBarMiddle", "Skin\\ThinBar_Middle.png");
     mSkinDef.PutString("Workspace", "{LocalExplorer}BackgroundBarEnd", "Skin\\ThinBar_End.png");
     mSkinDef.PutString("Workspace", "{MyWorkspace}Button.Rest", "Skin\\WorkspaceButton(Rest).png");
     mSkinDef.PutString("Workspace", "{MyWorkspace}Button.Hover", "Skin\\WorkspaceButton(Hover).png");
     mSkinDef.PutString("Workspace", "{MyWorkspace}Button.Pressed", "Skin\\WorkspaceButton(Pressed).png");
     mSkinDef.PutString("Workspace", "{MyWorkspace}BackgroundBarMiddle", "Skin\\ThinBar_Middle.png");
     mSkinDef.PutString("Workspace", "{MyWorkspace}BackgroundBarEnd", "Skin\\ThinBar_End.png");
     mSkinDef.PutString("Workspace", "{MyTools}Button.Rest", "Skin\\ToolBoxButton(Rest).png");
     mSkinDef.PutString("Workspace", "{MyTools}Button.Hover", "Skin\\ToolBoxButton(Hover).png");
     mSkinDef.PutString("Workspace", "{MyTools}Button.Pressed", "Skin\\ToolBoxButton(Pressed).png");
     mSkinDef.PutString("Workspace", "{MyTools}BackgroundBarMiddle", "Skin\\ThinBar_Middle.png");
     mSkinDef.PutString("Workspace", "{MyTools}BackgroundBarEnd", "Skin\\ThinBar_End.png");
     mSkinDef.Save();
 }