示例#1
0
        public StartForm() : base()
        {
            Load += Form1_Load;

            //This call is required by the Windows Form Designer.
            InitializeComponent();

            //Add any initialization after the InitializeComponent() call

            MenuItem mitem = new MenuItem();

            mitem.Text = "SemCor";
            mnuNodeMenu.MenuItems.Add(mitem);
            mitem.Click += mnuSemCor;

            txtOutput.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;             // Anchor.Top | Anchor.Left | Anchor.Bottom | Anchor.Right;
            f3 = new AdvancedOptions();
            mnuSaveDisplay.Click     += mnuSaveDisplay_Click;
            mnuClearDisplay.Click    += mnuClearDisplay_Click;
            mnuExit.Click            += mnuExit_Click;
            mnuWordWrap.Click        += mnuWordWrap_Click;
            mnuShowHelp.Click        += mnuShowHelp_Click;
            mnuShowGloss.Click       += mnuShowGloss_Click;
            mnuAdvancedOptions.Click += mnuAdvancedOptions_Click;
            mnuWordNetLicense.Click  += mnuWordNetLicense_Click;
            mnuLGPL.Click            += mnuLGPL_Click;
            btnOverview.Click        += btnOverview_Click;
            btnNoun.Click            += btnWordType_Click;
            btnVerb.Click            += btnWordType_Click;
            btnAdj.Click             += btnWordType_Click;
            btnAdv.Click             += btnWordType_Click;
        }
示例#2
0
        private void updateApplyMidiRangeOption()
        {
            if (_mappings.Count() > 1 && MidiBindingEditor.ApplyMidiRangeCommand.CanExecute(null))
            {
                if (_applyMidiRangeOption == null)
                {
                    _applyMidiRangeOption = new MenuItemViewModel();
                }

                if (!AdvancedOptions.Contains(_applyMidiRangeOption))
                {
                    AdvancedOptions.Add(_applyMidiRangeOption);
                }

                _applyMidiRangeOption.Text    = "Apply Midi Range";
                _applyMidiRangeOption.Command = MidiBindingEditor.ApplyMidiRangeCommand;

                return;
            }

            if (AdvancedOptions.Contains(_applyMidiRangeOption))
            {
                AdvancedOptions.Remove(_applyMidiRangeOption);
            }
        }
示例#3
0
        public StartForm() : base()
        {
            Load += Form1_Load;

            //This call is required by the Windows Form Designer.
            InitializeComponent();

            //Add any initialization after the InitializeComponent() call

            wnColour.CanvasNavigating += CanvasNavigating;
            wnColour.Anchor            = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

            //            txtOutput.Anchor = Anchor.Top Or Anchor.Left Or Anchor.Bottom Or Anchor.Right
            f3 = new AdvancedOptions();
            mnuSaveDisplay.Click     += mnuSaveDisplay_Click;
            mnuClearDisplay.Click    += mnuClearDisplay_Click;
            mnuExit.Click            += mnuExit_Click;
            mnuWordWrap.Click        += mnuWordWrap_Click;
            mnuShowHelp.Click        += mnuShowHelp_Click;
            mnuShowGloss.Click       += mnuShowGloss_Click;
            mnuAdvancedOptions.Click += mnuAdvancedOptions_Click;
            mnuWordNetLicense.Click  += mnuWordNetLicense_Click;
            mnuLGPL.Click            += mnuLGPL_Click;
            btnOverview.Click        += btnOverview_Click;
            btnNoun.Click            += btnWordType_Click;
            btnVerb.Click            += btnWordType_Click;
            btnAdj.Click             += btnWordType_Click;
            btnAdv.Click             += btnWordType_Click;
        }
        //  Events
        //  ======

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            GdAdminWarning.Visibility = Visibility.Hidden;

            TbxAPIKey.Text = AccountSettings.APIKey;
            TbxHost.Text   = AccountSettings.Host;
            PbOne.Password = AccountSettings.Password;
            PbTwo.Password = AccountSettings.Password;

            PbOne.PasswordChanged += PasswordChanged;
            PbTwo.PasswordChanged += PasswordChanged;

            AdvancedOptions advancedOptions = AccountSettings.AdvancedOptions;

            originalAdvancedSettingValue = advancedOptions.PackedValue;
            CbAdvancedOptions.IsChecked  = advancedOptions.Enabled;
            CbRevert.IsChecked           = advancedOptions.Revert;
            CbReclone.IsChecked          = advancedOptions.Reclone;
            CbUpdate.IsChecked           = advancedOptions.Update;
            CbSettings.IsChecked         = advancedOptions.Settings;

            CbCheckForUpdates.IsChecked = AccountSettings.Updates;

            isFullySetUp = true;
        }
        public ShaderLabAdvancedOptionsControl(AdvancedOptions page)
        {
            InitializeComponent();

            BindToOption(EnterOutliningModeWhenFilesOpenCheckBox, page, nameof(page.EnterOutliningModeWhenFilesOpen));
            BindToOption(EnableIntelliSenseCheckBox, page, nameof(page.EnableIntelliSense));
            BindToOption(EnableErrorReportingCheckBox, page, nameof(page.EnableErrorReporting));
            BindToOption(EnableSquigglesCheckBox, page, nameof(page.EnableSquiggles));
        }
示例#6
0
        public HlslAdvancedOptionsControl(AdvancedOptions page)
        {
            InitializeComponent();

            BindToOption(AddSemicolonForTypesCheckBox, page, nameof(page.AddSemicolonForTypes));
            BindToOption(EnterOutliningModeWhenFilesOpenCheckBox, page, nameof(page.EnterOutliningModeWhenFilesOpen));
            BindToOption(EnableErrorReportingCheckBox, page, nameof(page.EnableErrorReporting));
            BindToOption(EnableSquigglesCheckBox, page, nameof(page.EnableSquiggles));
        }
示例#7
0
        public DatabaseSchemaGenerator(AdvancedOptions advanced)
        {
            if (advanced == null)
            {
                throw new ArgumentNullException(nameof(advanced));
            }

            _advanced = advanced;
        }
        public HlslAdvancedOptionsControl(AdvancedOptions page)
        {
            InitializeComponent();

            BindToOption(AddSemicolonForTypesCheckBox, page, nameof(page.AddSemicolonForTypes));
            BindToOption(EnterOutliningModeWhenFilesOpenCheckBox, page, nameof(page.EnterOutliningModeWhenFilesOpen));
            BindToOption(EnableErrorReportingCheckBox, page, nameof(page.EnableErrorReporting));
            BindToOption(EnableSquigglesCheckBox, page, nameof(page.EnableSquiggles));
        }
        public ShaderLabAdvancedOptionsControl(AdvancedOptions page)
        {
            InitializeComponent();

            BindToOption(EnterOutliningModeWhenFilesOpenCheckBox, page, nameof(page.EnterOutliningModeWhenFilesOpen));
            BindToOption(EnableIntelliSenseCheckBox, page, nameof(page.EnableIntelliSense));
            BindToOption(EnableErrorReportingCheckBox, page, nameof(page.EnableErrorReporting));
            BindToOption(EnableSquigglesCheckBox, page, nameof(page.EnableSquiggles));
        }
        private bool AdvancedOptionsHaveChanged()
        {
            AdvancedOptions advancedOptions = new AdvancedOptions(
                enabled: CbAdvancedOptions.IsChecked == true,
                revert: CbRevert.IsChecked == true,
                reclone: CbReclone.IsChecked == true,
                update: CbUpdate.IsChecked == true,
                settings: CbSettings.IsChecked == true);

            return(advancedOptions.PackedValue != originalAdvancedSettingValue);
        }
示例#11
0
        public override void LoadSettingsFromStorage()
        {
            _showFunctionParameters       = LoadBool(ShowFunctionParametersSetting) ?? true;
            _includeAllFunctions          = LoadBool(IncludeAllFunctionsSetting) ?? true;
            _minorCollapseRegionsEnabled  = LoadBool(MinorCollapseRegionsEnabledSetting) ?? true;
            _majorCollapseRegionsEnabled  = LoadBool(MajorCollapseRegionsEnabledSetting) ?? true;
            _customCollapseRegionsEnabled = LoadBool(CustomCollapseRegionsEnabledSetting) ?? true;
            _semanticErrorCheckingEnabled = LoadBool(SemanticErrorCheckingEnabledSetting) ?? false;     // TODO: for right now, I'm defaulting the semantic error checking to false

            if (_optionsChanged != AdvancedOptions.None)
            {
                VSGeneroPackage.Instance.LangPrefs.OnUserPreferencesChanged2(null, null, null, null);
            }

            _optionsChanged = AdvancedOptions.None;
        }
示例#12
0
        /// <summary>
        /// Saves the data from the specified quests wrapper into the config file.
        /// Tries to save in both the portable location (same directory as the executable),
        /// and to the roaming location (AppData).
        /// The portable location is transferable between computers without needing
        /// a corresponding user account, while the roaming location keeps data from
        /// being lost if you unzip a new version of the program to a differently-named
        /// folder.
        /// </summary>
        /// <param name="quests">The quests wrapper.</param>
        public static void Save(QuestCollection quests, string currentQuest, AdvancedOptions options)
        {
            // If there's nothing to save, don't do anything.
            if (quests == null)
            {
                return;
            }

            // Write to each config location (portable and roaming)
            List <Configuration> configs = NetTallyConfigHelper.GetConfigsToWriteTo();

            foreach (var config in configs)
            {
                WriteConfigInformation(config, quests, currentQuest, options);
            }
        }
示例#13
0
        private void updateChangeAssignmentOption()
        {
            var sameTargetType = _mappings.Select(m => m.TargetType).Distinct();

            if (sameTargetType.Count() == 1 && sameTargetType.Single() != TargetType.Global)
            {
                var sameAssignment = _mappings.Select(m => m.Assignment).Distinct();
                if (sameAssignment.Count() == 1)
                {
                    if (_changeAssignmentOption == null)
                    {
                        _changeAssignmentOption = new MenuItemViewModel();
                    }

                    if (!AdvancedOptions.Contains(_changeAssignmentOption))
                    {
                        AdvancedOptions.Add(_changeAssignmentOption);
                    }

                    var assignmentOptions = _mappings.First().Command.AssignmentOptions;
                    var oldAssignment     = assignmentOptions.First(ao => ao.Key == sameAssignment.Single());
                    _changeAssignmentOption.Text     = "Change Assignments: " + oldAssignment.Value + " ->";
                    _changeAssignmentOption.Children = assignmentOptions
                                                       .Where(ao => ao.Key != oldAssignment.Key)
                                                       .Select(o =>
                                                               new MenuItemViewModel
                    {
                        Text    = o.Value,
                        Command = new CommandHandler <MenuItemViewModel>(mi => changeAssignment(o.Key))
                    }
                                                               ).ToList();

                    return;
                }
            }

            if (AdvancedOptions.Contains(_changeAssignmentOption))
            {
                AdvancedOptions.Remove(_changeAssignmentOption);
            }
        }
示例#14
0
        /// <summary>
        /// Saves the information from the provided quest wrapper into this config object.
        /// Also pulls global advanced options.
        /// </summary>
        /// <param name="quests">The collection of saved quests.</param>
        /// <param name="currentQuest">The currently selected quest.</param>
        /// <param name="options">The program configuration options.</param>
        public void Save(QuestCollection quests, string currentQuest, AdvancedOptions options)
        {
            if (quests == null)
            {
                throw new ArgumentNullException(nameof(quests));
            }

            Quests.Clear();
            foreach (var quest in quests)
            {
                Quests.Add(quest);
            }

            CurrentQuest = currentQuest;

            if (options != null)
            {
                DisplayMode             = options.DisplayMode;
                AllowUsersToUpdatePlans = options.AllowUsersToUpdatePlans;
                GlobalSpoilers          = options.GlobalSpoilers;
                DisplayPlansWithNoVotes = options.DisplayPlansWithNoVotes;
                DisableWebProxy         = options.DisableWebProxy;
            }
        }
示例#15
0
        /// <summary>
        /// Generates the ProcessPipDetails for a given Pip
        /// </summary>
        public ProcessPipDetails GenerateProcessPipDetails(Process pip)
        {
            ProcessPipDetails processPipDetails = new ProcessPipDetails();

            InvocationDetails invoDetails = new InvocationDetails
            {
                Executable           = pip.Executable.IsValid ? pip.Executable.Path.ToString(PathTable): null,
                ToolDescription      = pip.ToolDescription.IsValid ? pip.ToolDescription.ToString(StringTable) : null,
                ResponseFilePath     = pip.ResponseFile.IsValid ? pip.ResponseFile.Path.ToString(PathTable) : null,
                Arguments            = pip.Arguments.IsValid ? pip.Arguments.ToString(PathTable) : null,
                ResponseFileContents = pip.ResponseFileData.IsValid ? pip.ResponseFileData.ToString(PathTable) : null,
            };

            invoDetails.EnvironmentVariables = pip.EnvironmentVariables.
                                               Select(x => new KeyValuePair <string, string>
                                                          (x.Name.ToString(StringTable), x.Value.IsValid ? x.Value.ToString(PathTable) : null))
                                               .ToList();
            invoDetails.EnvironmentVariables    = invoDetails.EnvironmentVariables.Any() ? invoDetails.EnvironmentVariables : null;
            processPipDetails.InvocationDetails = invoDetails;

            InputOutputDetails inOutDetails = new InputOutputDetails
            {
                STDInFile    = pip.StandardInput.File.IsValid ? pip.StandardInput.File.Path.ToString(PathTable): null,
                STDOut       = pip.StandardOutput.IsValid ? pip.StandardOutput.Path.ToString(PathTable): null,
                STDError     = pip.StandardError.IsValid ? pip.StandardError.Path.ToString() : null,
                STDDirectory = pip.StandardDirectory.IsValid ? pip.StandardDirectory.ToString(PathTable) : null,
                WarningRegex = pip.WarningRegex.IsValid ? pip.WarningRegex.Pattern.ToString(StringTable) : null,
                ErrorRegex   = pip.ErrorRegex.IsValid ? pip.ErrorRegex.Pattern.ToString(StringTable) : null,
                STDInData    = pip.StandardInputData.IsValid ? pip.StandardInputData.ToString(PathTable) : null
            };

            processPipDetails.InputOutputDetails = inOutDetails;

            DirectoryDetails dirDetails = new DirectoryDetails
            {
                WorkingDirectory      = pip.WorkingDirectory.IsValid ? pip.WorkingDirectory.ToString(PathTable) : null,
                UniqueOutputDirectory = pip.UniqueOutputDirectory.IsValid ? pip.UniqueOutputDirectory.ToString(PathTable) : null,
                TempDirectory         = pip.TempDirectory.IsValid ? pip.TempDirectory.ToString(PathTable) : null,
            };

            if (pip.AdditionalTempDirectories.IsValid)
            {
                dirDetails.ExtraTempDirectories = pip.AdditionalTempDirectories.
                                                  Select(x => x.ToString(PathTable))
                                                  .ToList();
            }
            dirDetails.ExtraTempDirectories    = dirDetails.ExtraTempDirectories.Any() ? dirDetails.ExtraTempDirectories : null;
            processPipDetails.DirectoryDetails = dirDetails;

            AdvancedOptions advancedOptions = new AdvancedOptions
            {
                TimeoutWarning                 = pip.WarningTimeout.GetValueOrDefault(),
                TimeoutError                   = pip.Timeout.GetValueOrDefault(),
                SuccessCodes                   = pip.SuccessExitCodes.ToList(),
                Semaphores                     = pip.Semaphores.Select(x => x.Name.ToString(StringTable)).ToList(),
                HasUntrackedChildProcesses     = pip.HasUntrackedChildProcesses,
                ProducesPathIndependentOutputs = pip.ProducesPathIndependentOutputs,
                OutputsMustRemainWritable      = pip.OutputsMustRemainWritable,
                AllowPreserveOutputs           = pip.AllowPreserveOutputs
            };

            advancedOptions.SuccessCodes      = advancedOptions.SuccessCodes.Any() ? advancedOptions.SuccessCodes : null;
            advancedOptions.Semaphores        = advancedOptions.Semaphores.Any() ? advancedOptions.Semaphores : null;
            processPipDetails.AdvancedOptions = advancedOptions;

            ProcessInputOutputDetails procInOutDetails = new ProcessInputOutputDetails
            {
                FileDependencies      = pip.Dependencies.Select(x => x.IsValid ? x.Path.ToString(PathTable) : null).ToList(),
                DirectoryDependencies = pip.DirectoryDependencies.Select(x => x.IsValid ? x.Path.ToString(PathTable) : null).ToList(),
                OrderDependencies     = pip.OrderDependencies.Select(x => x.Value).ToList(),
                FileOutputs           = pip.FileOutputs.Select(x => x.IsValid ? x.Path.ToString(PathTable) : null).ToList(),
                DirectoryOuputs       = pip.DirectoryOutputs.Select(x => x.IsValid ? x.Path.ToString(PathTable) : null).ToList(),
                UntrackedPaths        = pip.UntrackedPaths.Select(x => x.IsValid ? x.ToString(PathTable) : null).ToList(),
                UntrackedScopes       = pip.UntrackedScopes.Select(x => x.IsValid ? x.ToString(PathTable) : null).ToList(),
            };

            procInOutDetails.FileDependencies           = procInOutDetails.FileDependencies.Any() ? procInOutDetails.FileDependencies : null;
            procInOutDetails.DirectoryDependencies      = procInOutDetails.DirectoryDependencies.Any() ? procInOutDetails.DirectoryDependencies : null;
            procInOutDetails.OrderDependencies          = procInOutDetails.OrderDependencies.Any() ? procInOutDetails.OrderDependencies : null;
            procInOutDetails.FileOutputs                = procInOutDetails.FileOutputs.Any() ? procInOutDetails.FileOutputs : null;
            procInOutDetails.DirectoryOuputs            = procInOutDetails.DirectoryOuputs.Any() ? procInOutDetails.DirectoryOuputs : null;
            procInOutDetails.UntrackedPaths             = procInOutDetails.UntrackedPaths.Any() ? procInOutDetails.UntrackedPaths : null;
            procInOutDetails.UntrackedScopes            = procInOutDetails.UntrackedScopes.Any() ? procInOutDetails.UntrackedScopes : null;
            processPipDetails.ProcessInputOutputDetails = procInOutDetails;

            ServiceDetails servDetails = new ServiceDetails
            {
                IsService              = pip.IsService,
                ShutdownProcessPipId   = pip.ShutdownProcessPipId.Value,
                ServicePipDependencies = pip.ServicePipDependencies.Select(x => x.Value).ToList(),
                IsStartOrShutdownKind  = pip.IsStartOrShutdownKind
            };

            servDetails.ServicePipDependencies = servDetails.ServicePipDependencies.Any() ? servDetails.ServicePipDependencies : null;
            processPipDetails.ServiceDetails   = servDetails;

            return(processPipDetails);
        }
示例#16
0
        /// <summary>
        /// Writes the data from the provided quests wrapper object into the specified configuration file.
        /// </summary>
        /// <param name="quests">The quests wrapper with program data.</param>
        /// <param name="config">The configuration file to save to.</param>
        private static void WriteConfigInformation(Configuration config, QuestCollection quests, string currentQuest, AdvancedOptions options)
        {
            try
            {
                ConfigPrefs.Strict = false;

                if (config.Sections[QuestsSection.SectionName] is QuestsSection questsSection)
                {
                    questsSection.Save(quests, currentQuest, options);
                }

                config.Save(ConfigurationSaveMode.Minimal);
            }
            catch (ConfigurationErrorsException)
            {
                // May not have permission to write, or the original config may have errors.
            }
        }
示例#17
0
 public OptionsForm(int startTabPage)
 {
     this._fontPath = Path.Combine(Program.UserDataFolder, "queryfont.txt");
     this._queriesPath = Path.Combine(Program.UserDataFolder, "querypath.txt");
     this._userOptions = UserOptions.Instance;
     this._advancedOptions = new AdvancedOptions();
     this._oldEditorBackColor = UserOptions.Instance.ActualEditorBackColor;
     this.components = null;
     this.InitializeComponent();
     this.cboFont.DropDownHeight = this.Font.Height * 20;
     this._fonts = new Font[] { new Font(Control.DefaultFont, FontStyle.Regular) };
     this.cboFont.Items.Add("Populating...");
     this.cboFont.SelectedIndex = 0;
     this.fontWorker.RunWorkerAsync();
     this.rbCustomColor.Checked = !string.IsNullOrEmpty(UserOptions.Instance.EditorBackColor);
     this.panColorSample.BackColor = UserOptions.Instance.ActualEditorBackColor;
     if (File.Exists(this._queriesPath))
     {
         try
         {
             this.myQueries.FolderText = File.ReadAllText(this._queriesPath);
         }
         catch
         {
         }
     }
     if (!string.IsNullOrEmpty(this._userOptions.CustomSnippetsFolder))
     {
         this.mySnippets.FolderText = this._userOptions.CustomSnippetsFolder;
     }
     if (!string.IsNullOrEmpty(this._userOptions.PluginsFolder))
     {
         this.myPlugins.FolderText = this._userOptions.PluginsFolder;
     }
     if (File.Exists(Options.CustomStyleSheetLocation))
     {
         this.rbCustomStyleSheet.Checked = true;
     }
     try
     {
         int? maxQueryRows = this._userOptions.MaxQueryRows;
         this.udMaxQueryResults.Value = maxQueryRows.HasValue ? ((decimal) maxQueryRows.GetValueOrDefault()) : 0x3e8;
     }
     catch
     {
     }
     try
     {
         QueryLanguage? defaultQueryLanguage = this._userOptions.DefaultQueryLanguage;
         this.cboLanguage.SelectedIndex = defaultQueryLanguage.HasValue ? ((int) defaultQueryLanguage.GetValueOrDefault()) : 0;
     }
     catch
     {
     }
     this.chkDisable1To1.Checked = File.Exists(Program.OneToOneAckFile) && string.Equals(File.ReadAllText(Program.OneToOneAckFile).Trim(), "False", StringComparison.OrdinalIgnoreCase);
     this.chkLineNumbers.Checked = this._userOptions.ShowLineNumbersInEditor;
     if (this._userOptions.ResultsInGrids)
     {
         this.rbGrids.Checked = true;
     }
     this.rbOptimize.Checked = MainForm.Instance.OptimizeQueries;
     this.rbNoOptimize.Checked = !MainForm.Instance.OptimizeQueries;
     this._advancedOptions.Read();
     this.EnableControls();
     this.lblAdvancedRestart.Font = new Font(this.lblAdvancedRestart.Font, FontStyle.Bold);
     this.tabControl.SelectedIndex = startTabPage;
     this.tabControl_SelectedIndexChanged(this, EventArgs.Empty);
     this.myQueries.MRU = MRU.QueryLocations;
     this.mySnippets.MRU = MRU.SnippetLocations;
     this.myPlugins.MRU = MRU.PluginLocations;
 }
        public DatabaseSchemaGenerator(AdvancedOptions advanced)
        {
            if (advanced == null) throw new ArgumentNullException(nameof(advanced));

            _advanced = advanced;
        }
示例#19
0
 private void Form1_Load(System.Object sender, System.EventArgs e)
 {
     f3 = new AdvancedOptions();
     LoadAbout();
     LoadHistory();
 }
示例#20
0
 public Genero4GLAdvancedOptionsPage()
     : base("Advanced")
 {
     _optionsChanged = AdvancedOptions.None;
 }
示例#21
0
 public void SetChangesApplied()
 {
     _optionsChanged = AdvancedOptions.None;
 }
示例#22
0
		public StartForm() : base()
		{
			Load += Form1_Load;

			//This call is required by the Windows Form Designer.
			InitializeComponent();

			//Add any initialization after the InitializeComponent() call

			MenuItem mitem = new MenuItem();

			mitem.Text = "SemCor";
			mnuNodeMenu.MenuItems.Add(mitem);
			mitem.Click += mnuSemCor;

			txtOutput.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right; // Anchor.Top | Anchor.Left | Anchor.Bottom | Anchor.Right;
			f3 = new AdvancedOptions();
			mnuSaveDisplay.Click += mnuSaveDisplay_Click;
			mnuClearDisplay.Click += mnuClearDisplay_Click;
			mnuExit.Click += mnuExit_Click;
			mnuWordWrap.Click += mnuWordWrap_Click;
			mnuShowHelp.Click += mnuShowHelp_Click;
			mnuShowGloss.Click += mnuShowGloss_Click;
			mnuAdvancedOptions.Click += mnuAdvancedOptions_Click;
			mnuWordNetLicense.Click += mnuWordNetLicense_Click;
			mnuLGPL.Click += mnuLGPL_Click;
			btnOverview.Click += btnOverview_Click;
			btnNoun.Click += btnWordType_Click;
			btnVerb.Click += btnWordType_Click;
			btnAdj.Click += btnWordType_Click;
			btnAdv.Click += btnWordType_Click;
		}
        /// <exception cref="System.ObjectDisposedException"></exception>
        /// <exception cref="System.Security.SecurityException"></exception>
        /// <exception cref="System.UnauthorizedAccessException"></exception>
        /// <exception cref="System.IO.IOException"></exception>
        public static void CreateAdvanced()
        {
            AdvancedOptions advancedOptions = AccountSettings.AdvancedOptions;

            if (!advancedOptions.Enabled)
            {
                return;
            }

            List <Child> enabledChildren = new List <Child>
            {
                new MenuChild()
                {
                    Name  = "KallitheaKlone_msg1",
                    Label = "The options below are all EXPERIMENAL!"
                },
                new MenuChild()
                {
                    Name  = "KallitheaKlone_msg2",
                    Label = "But please test them where it is safe :)"
                },
                new BreakChild()
            };

            if (advancedOptions.Revert)
            {
                enabledChildren.Add(
                    new MenuChild()
                {
                    Name    = "KallitheaKlone_LocalRevert",
                    Label   = "Revert all uncommited changes",
                    Icon    = "\"" + programLocation + "\"",
                    Command = "\"" + programLocation + "\" LocalRevert \"%V\""
                }
                    );
            }

            if (advancedOptions.Reclone)
            {
                enabledChildren.Add(
                    new MenuChild()
                {
                    Name    = "KallitheaKlone_Reclone",
                    Label   = "Delete and re-clone",
                    Icon    = "\"" + programLocation + "\"",
                    Command = "\"" + programLocation + "\" Reclone \"%V\""
                }
                    );
            }

            if (advancedOptions.Update)
            {
                enabledChildren.Add(
                    new MenuChild()
                {
                    Name    = "KallitheaKlone_Update",
                    Label   = "Update to latest commit",
                    Icon    = "\"" + programLocation + "\"",
                    Command = "\"" + programLocation + "\" Update \"%V\""
                }
                    );
            }

            if (advancedOptions.Settings)
            {
                enabledChildren.Add(new BreakChild());
                enabledChildren.Add(
                    new MenuChild()
                {
                    Name    = "KallitheaKlone_Settings",
                    Label   = "Settings",
                    Icon    = "\"" + programLocation + "\"",
                    Command = "\"" + programLocation + "\" Settings \"%V\""
                }
                    );
            }

            MenuParent advancedMenuItems = new MenuParent()
            {
                Name         = "KallitheaKlone_Other",
                Label        = "Other Kallithea Klone Options",
                LocationType = MenuLocation.Both,
                Children     = enabledChildren.ToArray()
            };

            advancedMenuItems.Create();
        }
示例#24
0
        public void loadXml(string name, string path)
        {
            ///BizagiInfo.xml
            ///Catalog__Indexes.xml
            ///Catalog__IndexObjects.xml
            ///Catalog__Localization.xml
            ///Catalog__Objects.xml
            ///Catalog__References.xml
            ///Options.xml
            ///PackageInfo.xml
            ///Relational.xml
            ///
            if (name.ToLower() == "packageinfo.xml")
            {
                var                       xmlCO      = File.ReadAllText(path);
                XmlSerializer             serializer = new XmlSerializer(typeof(PackageContentInformation));
                StringReader              rdr        = new StringReader(xmlCO);
                PackageContentInformation packageContentInformation = (PackageContentInformation)serializer.Deserialize(rdr);
                this.PackageContentInformation = packageContentInformation;

                propertyGrid1.SelectedObject = packageContentInformation;
                txtContent.Text = xmlCO;
            }
            if (name.ToLower() == "relational.xml")
            {
                var           xmlCO        = File.ReadAllText(path);
                XmlSerializer serializer   = new XmlSerializer(typeof(NewDataSet));
                StringReader  rdr          = new StringReader(xmlCO);
                NewDataSet    bADPLYCONFIG = (NewDataSet)serializer.Deserialize(rdr);
                this.BADPLYConfig = bADPLYCONFIG;
                //var dic = new Dictionary<string, string>();
                //foreach (var b in bADPLYCONFIG.BADPLYCONFIG)
                //{
                //    dic.Add(b., b.BAValue);
                //}
                // propertyGrid1.SelectedObject = new DictionaryPropertyGridAdapter(dic);
                txtContent.Text = xmlCO;
            }

            if (name.ToLower() == "options.xml")
            {
                var             xmlCO           = File.ReadAllText(path);
                XmlSerializer   serializer      = new XmlSerializer(typeof(AdvancedOptions));
                StringReader    rdr             = new StringReader(xmlCO);
                AdvancedOptions advancedOptions = (AdvancedOptions)serializer.Deserialize(rdr);
                this.AdvancedOptions = advancedOptions;
                var dic    = new Dictionary <string, string>();
                var option = advancedOptions.AdvancedOption.FirstOrDefault();
                if (option != null)
                {
                    propertyGrid1.SelectedObject = option;
                }
                txtContent.Text = xmlCO;
            }
            if (name.ToLower() == "bizagiinfo.xml")
            {
                var           xmlCO      = File.ReadAllText(path);
                XmlSerializer serializer = new XmlSerializer(typeof(NewDataSet));
                StringReader  rdr        = new StringReader(xmlCO);
                NewDataSet    bizagiInfo = (NewDataSet)serializer.Deserialize(rdr);
                this.BizagiInfo = bizagiInfo;
                var dic = new Dictionary <string, string>();
                foreach (var b in bizagiInfo.BIZAGIINFO)
                {
                    dic.Add(b.BAInfo, b.BAValue);
                }
                propertyGrid1.SelectedObject = new DictionaryPropertyGridAdapter(dic);
                txtContent.Text = xmlCO;
            }
            if (name.ToLower() == "catalog__references.xml")
            {
                var              xmlCO             = File.ReadAllText(path);
                XmlSerializer    serializer        = new XmlSerializer(typeof(ArrayOfReference));
                StringReader     rdr               = new StringReader(xmlCO);
                ArrayOfReference catalogReferences = (ArrayOfReference)serializer.Deserialize(rdr);
                this.CatalogReferences = catalogReferences;

                FilterReferences(catalogReferences.Reference);

                txtContent.Text = xmlCO;
            }
            if (name.ToLower() == "catalog__objects.xml")
            {
                var                  xmlCO            = File.ReadAllText(path);
                CatalogObject        catOb            = new CatalogObject();
                XmlSerializer        serializer       = new XmlSerializer(typeof(ArrayOfCatalogObject));
                StringReader         rdr              = new StringReader(xmlCO);
                ArrayOfCatalogObject resultingMessage = (ArrayOfCatalogObject)serializer.Deserialize(rdr);
                this.DataCatalog = resultingMessage;
                propertyGrid1.SelectedObjects = resultingMessage.CatalogObject.ToArray();
                this.Tabelas = new List <CatalogObject>();
                this.Types   = new List <TipoObjeto>();
                this.Types   = FillTypes(resultingMessage.CatalogObject).OrderBy(d => d.Tipo).ToList();
                cmbType.Items.Clear();
                foreach (var tb in this.Types)
                {
                    cmbType.Items.Add(new ComboIten {
                        Name = tb.Tipo, Value = tb.Tipo, Catalogos = tb.Objetos
                    });
                }
                this.Tabelas = FillTabelas(resultingMessage.CatalogObject);

                //Filter(resultingMessage.CatalogObject);
            }
            if (name.ToLower() == "catalog__indexes.xml")
            {
                var xmlCO = File.ReadAllText(path);
                ArrayOfIndexValue cIndex     = new ArrayOfIndexValue();
                XmlSerializer     serializer = new XmlSerializer(typeof(ArrayOfIndexValue));
                StringReader      rdr        = new StringReader(xmlCO);
                cIndex = (ArrayOfIndexValue)serializer.Deserialize(rdr);
                this.DataCatalogIndex = cIndex;
            }
        }
示例#25
0
		public StartForm() : base()
		{
			Load += Form1_Load;

			//This call is required by the Windows Form Designer.
			InitializeComponent();

			//Add any initialization after the InitializeComponent() call

			wnColour.CanvasNavigating += CanvasNavigating;
			wnColour.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;

			//            txtOutput.Anchor = Anchor.Top Or Anchor.Left Or Anchor.Bottom Or Anchor.Right
			f3 = new AdvancedOptions();
			mnuSaveDisplay.Click += mnuSaveDisplay_Click;
			mnuClearDisplay.Click += mnuClearDisplay_Click;
			mnuExit.Click += mnuExit_Click;
			mnuWordWrap.Click += mnuWordWrap_Click;
			mnuShowHelp.Click += mnuShowHelp_Click;
			mnuShowGloss.Click += mnuShowGloss_Click;
			mnuAdvancedOptions.Click += mnuAdvancedOptions_Click;
			mnuWordNetLicense.Click += mnuWordNetLicense_Click;
			mnuLGPL.Click += mnuLGPL_Click;
			btnOverview.Click += btnOverview_Click;
			btnNoun.Click += btnWordType_Click;
			btnVerb.Click += btnWordType_Click;
			btnAdj.Click += btnWordType_Click;
			btnAdv.Click += btnWordType_Click;
		}