Esempio n. 1
0
        static public int SaveSetting(string property, string key, string val)
        {
            int rc = 0;

            if (Settings != null)
            {
                if (property != null && property.Length > 0 &&
                    key != null && key.Length > 0)
                {
                    rc = Settings.PutPropertyString("MOGOptions", property, key, val);
                    Settings.Save();
                }
            }

            return(rc);
        }
Esempio n. 2
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();
 }
Esempio n. 3
0
        private void PropertyFilenameWizardPage_CloseFromNext(object sender, MOG_ControlsLibrary.Utils.PageEventArgs e)
        {
            if (PropertyFilenameTextBox.Text.Length > 0)
            {
                string PropertyMenuFullName = MOG_Tokens.GetFormattedString(PropertyFilenameTextBox.Text, MOG_Tokens.GetProjectTokenSeeds(MOG_ControllerProject.GetProject()));

                string LocatedPropertyMenu = MOG_ControllerSystem.LocateTool(PropertyMenuFullName);

                if (LocatedPropertyMenu.Length == 0)
                {
                    // Make sure we got a filename with a full path, if we didn't it is probably a relational path
                    if (!Path.IsPathRooted(PropertyMenuFullName))
                    {
                        PropertyMenuFullName = MOG_ControllerProject.GetProject().GetProjectToolsPath() + "\\Property.Menus\\" + PropertyMenuFullName;
                    }
                }
                else
                {
                    PropertyMenuFullName = LocatedPropertyMenu;
                }

                // Create or open the existing properties
                MOG_PropertiesIni ripMenu = new MOG_PropertiesIni(PropertyMenuFullName);

                // Reset our menu
                ripMenu.Empty();

                // Add the properties
                ripMenu.PutSection("Property.Menu");
                SaveOutMenus(ripMenu, PropertyContextMenuTreeView.Nodes[0].Nodes);

                // Save the properties
                ripMenu.Save();

                // Save our new propertyMenu filename
                mPropertyMenu = PropertyMenuFullName;
            }

            // Skip to the end
            e.Page = PropertyEndWizardPage;
        }
Esempio n. 4
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();
            }
        }
Esempio n. 5
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);
                }
            }
        }