示例#1
0
        private void PrepareResultWindow()
        {
            var title             = TextBlockCreator.TitleTextBlock("Result Status");
            var statusDescreption = TextBlockCreator.RegularTextBlock("Summation of edges:");

            ResultTextBlock           = TextBlockCreator.RegularTextBlock("").WithHorizonalAlignment(HorizontalAlignment.Center).PlusFontSize(10);
            this.StatusViewer.Content = GuiExtensions.CreateStackPanel(title, statusDescreption, ResultTextBlock);
        }
示例#2
0
        public static StackPanel Create(Dispatcher d, Action <OptimizationType> onOptimizationChosen)
        {
            var title = TextBlockCreator.TitleTextBlock("Method");
            var chooseOptimizationRadioButtonChooser = RadioButtonChooser.Create(d, OptimizationTypeUtils.All,
                                                                                 OptimizationTypeUtils.AsString, onOptimizationChosen);

            return(GuiExtensions.CreateStackPanel(title, chooseOptimizationRadioButtonChooser));
        }
        private UIElement ShowVisual()
        {
            var chooser = RadioButtonChooser.Create(Dispatcher, new[] { true, false }, b => b.ToString(), OnVisualChanged);

            chooser.Orientation = Orientation.Horizontal;
            var text       = TextBlockCreator.RegularTextBlock("Show Visual:").WithBullet();
            var stackPanel = GuiExtensions.CreateStackPanel(text, chooser);

            stackPanel.Orientation = Orientation.Horizontal;
            (chooser.Children[0] as RadioButton).IsChecked = true;
            return(stackPanel);
        }
示例#4
0
        private StackPanel InitBranchAndBoundSettings()
        {
            var title = TextBlockCreator.TitleTextBlock("Branch & Bound Settings");

            return(GuiExtensions.CreateStackPanel(title));
        }
示例#5
0
        private StackPanel InitLocalSearchSettings()
        {
            var title = TextBlockCreator.TitleTextBlock("Local Search Settings");

            return(GuiExtensions.CreateStackPanel(title));
        }
示例#6
0
 public static object GetResource(this IDotnetExpander expander, Type type)
 {
     return(Ex.Cache.Read("resourcesettings", type.AssemblyQualifiedName, () =>
     {
         var setting = (ExSetting)CreateInstance(expander, type);
         setting.Name = GetSettingValue(setting, setting.Name, GetResourceNames(expander, setting.AssemblyName, setting.Code));
         setting.Description = GetSettingValue(setting, setting.Description, GetResourceDescriptions(expander, setting.AssemblyName, setting.Code));
         setting.Shortcut = GetSettingValue(setting, setting.Shortcut, GetResourceShortcuts(expander, setting.AssemblyName, setting.Code));
         setting.SpecName = GetSettingValue(setting, setting.SpecName, GetResourceSpecifies(expander, setting.AssemblyName, setting.Code));
         setting.Picture = System.Convert.FromBase64String(GetSettingValue(setting, GuiExtensions.GetDefaultImageAsString(), GetResourcePictures(expander, setting.AssemblyName, setting.Code)));
         setting.Validate();
         return setting;
     }));
 }